- Item Name : DevDocs - Documentation for Developers
- Author : FastSwiff
- Copyright : 2024 by FastSwiff
Steps:
-
Create an order with the mandatory fields from OrderRequest.
-
Once the Order is created , orderkeyid and PaymentProcessUrl will be provided as a response as part of the order creation - which redirects the user/customer to the Process payment page.
-
Customer chooses the payment type and provides the details.
-
Payment is processed and redirects to the url provided in the RedirectUrl parameter of the OrderRequest.
-
Payment details can be obtained by making a call to the Detail API
-
Order can be updated in 10days with customer information and shipping details after payment completion.
Check Request , Response Object and samples
Order Request , Order Request Sample, Order Response , Order Response Sample
REST Post Urls:
Create Payment Request URL: uatapi.fastswiff.com/payment/api/order/create
Detail and Status Payment Request URL: uatapi.fastswiff.com/payment/api/order/Detail
Required headers:
-
Authorizationbasic FastSwiffAuthenticationrequired
FastSwiffAuthentication = base64encoded(MerchantAuthenticationKey:Merchant AuthenticationToken:M:MID) OR generate Authorization Header value in FastSwiff Dashboard.
-
Content-Type application/jsonrequired
-
Merchantkeyidintegerrequired
Please get this merchantkeyid from FastSwiff Dashboard
-
MIDintegerrequired
Id which is obtained on MerchantRegistration
-
UniqueRequestIdstring(10)required
Unique Id generated for that particular request and it should not be repeated, alphanumeric only.
-
OrderAmount decimal(18,2)required
Transaction Amount - This amount will be shown to user for payment.
-
ProductDatastring - Json Objectrequired
Product/Service detail related to the order, please review ProductData for more detail and example.
-
CustomerData CustomerData objectrequired
Customer detail - billing, shipping, Please refer CustomerData for more detail.
-
IntegrationData IntegrationData Object
Required few details like username, source, integration type etc, Please refer IntegrationData for more detail.
-
OrderType string- Specified Data only
Default - PAYMENT, FUTUREBILLING
-
OrderId string(20)
OrderNo/Id from merchant system, alphanumeric only.
-
OrderAmountData List of AmountDetail
Please see contents below AmountDetail
-
NextStepFlowData string - Json Object
What will be next step for user information after payment is completed, please review NextStepFlowData for more detail and example.
-
TransactionData TransactionData Object
Specific payment type - used for UPI intent, seamless- please review TransactionData for more detail and example.
-
UserDefinedData UserDefinedData Object
List user defined custom objects. Please refer UserDefinedData for detail and example.
-
RequestDateTime datetime
MMDDYYYY
-
RedirectUrl url
Redirect url given by the merchant after transaction
-
AmountTypeDesc string(20)
description of the order amount
-
Amount decimal(18,2)
Order Amount
ProductData Object:
Note: Product/service detail of the order, this detail will be displayed on payment page (by default, and can be configured, please check settings in merchant portal) and the transaction reciept.example "ProductData":"'PaymentReason':'OnlineOrder for OrderNo- 1234', 'ItemId':'T-shirt', 'Size':'medium', 'AppName':'yourAppName'" Suggestion: Please refer below table contents as suggestion and you can add as per your requirement. However it should be valid json object
-
PaymentReason string(50)
Reason for this payment
-
ServiceType string(50)
Type of the service
-
ProductName string(50)
Name of the product
TransactionData:
Seamless for UPI, Netbanking and Wallets:UPI : PaymentType:"UPI", VPA is required Upi Intent: PaymentType as "UPIINTENT", IPAddress is required and IntegrationData
-
PaymentType Specified Data
Payment Mode - NetBanking, UPI, UPIINTENT, Wallet
-
IndustrySpecificationCode string(20)
-
PartialPaymentOption specified value - True/false
To accept partial payment from user, if true then user will able to modify amount before payment and order will be marked as partial paid after approval of transaction.
-
Vpastring(50)required
UPI ID/ virtual address of payer - example ramchandra@upi
-
AccountNumber# string
Bank Account Number
-
Ifsc# string
Bank Ifsc Code
-
AadhaarNo# string
Account holder AadhaarNo
Payment Type - Netbanking:
Note: If TransactionData PaymentType is Netbanking, please refer below-
BankNamestring - Specificed Datarequired
BankCode for Netbanking, example - PG0001 for Allahabad Bank- Retail
Please refer for Bank Code list
Payment Type - Wallet:
Note: If TransactionData PaymentType is Wallet, please refer below-
WalletTypestring - Specificed Datarequired
Wallet Type , example - PayTm, PhonePe Please refer for Wallet Type list
-
username#string
User mobile no or login id
-
MobileNoNumber(10)required
Contact number of the customer
-
CustomerIdstring(10 )
IId of the customer
-
CustomerNotesstring(200 )
Any considerations mentioned by customer
-
FirstName string(20)
First Name of the customer
-
LastNamestring(20)
Last Name of the customer
-
EmailReceiptEmail bool
True / False
-
BillingAddress string(100)
Address on which the bill is generated
-
BillingCity string(20)
Billing city of the customer
-
BillingStatety string(20)
Billing state of the customer
-
BillingCountry string(20)
Billing country of the customer
-
BillingZipCode string(20)
Zip code of the billing address
-
ShippingFirstName string(20)
First name of the customer in shipping address
-
ShippingLastName string(20)
Last name of the customer in shipping address
-
ShippingAddress string(100)
Address on which the bill is generated
-
ShippingCity string(20)
shipping city of the customer
-
ShippingState string(20)
shipping state of the customer
-
ShippingCountry string(20)
shipping country of the customer
-
ShippingZipCode string(20)
Zip code of the shipping address
-
ShippingMobileNo number(10)
Mobile no. of the customer in shipping address
UserDefinedData(Object) :
Note: Supports upto 20 user defined object. By default pass blank value in each key.example: "UserDefinedData": "UserDefined1": ""
-
UserDefined1string(50)
-
UserDefined2string(50)
-
UserDefined3string(50)
-
UserDefined4string(50)
-
UserDefined5string(50)
-
UserDefined6string(50)
-
UserDefined7string(50)
-
UserDefined8string(50)
-
UserDefined9string(50)
-
UserDefined10string(50)
-
UserDefined11string(50)
-
UserDefined12string(50)
-
UserDefined13string(50)
-
UserDefined14string(50)
-
UserDefined15string(50)
-
UserDefined16string(50)
-
UserDefined17string(50)
-
UserDefined18string(50)
-
UserDefined19string(50)
-
UserDefined20string(50)
IntegrationData(Object):
-
Sourcestring(20)required
Application Name and Version.
Source name should be "MobileSDK" if the integration type is 11. -
IntegrationTypestring(10)required
// 0 or null default, 1 Seamless - CardNumber should be encrypted and merchant should be enabled for seamless,
11 - Mobile integration -
UserNamestring(20)
Username of the customer
-
HashData string(250)
Hash for request data
-
PlatformId string(10)
Integrated Distributor ID - Platform
-
IPAddress string(250)required
IP address of the Merchant's server.
If PaymentType is UPIINTENT, IPAddress is
SplitPaymentData(Object):
-
SplitTypeIntgerrequired
Amount.
-
AutoSplitBoolrequired
0/1
-
SplitPaymentVendor List of SplitPaymentrequired
Please see contents below SplitPayment
Split Payment Vendor:
-
VendorIdIntger
VendorId of Customer
-
SplitPaymentdecimal(18,2)
Order Amount
OrderResponse:
-
OrderKeyIdstring(30)
Id generated based on the create order request from FastSwiff and should be stored in your system for status, verification or any communication with FastSwiff.
-
MerchantKeyIdinteger
Id which is obtained on MerchantRegistration
-
UniqueRequestIdstring(20)
Echo from request
-
OrderAmountdecimal(18,2)
Transaction Amount
-
OrderStatusstring(10)
Status of the order. Please refer for Order Status Codes
-
OrderStatusTextstring(50)
Order Status Text ex: created, completed-approved transaction,cancelled payment by user. Please refer Order Status Code for any programming decision
-
PaymentTransactionIdstring(50)
Id generated for that transaction
-
PaymentResponseCodeint
Payment Status of the order. Please refer for Payment Response Codes
-
PaymentApprovalCodestring(20)
Unique number identifying the Approved transaction
-
PaymentMethodstring Specified Values
Transaction processed as
-
PaymentAccountstring(50)
Payment processed account detail. Data depending on PaymentMethod. if processed as UPI - then VPA /UPI ID,
Credit/DebitCard - then Card number first 6 and last 4 of card ,
Netbanking - then BankName,
Wallet - then Wallet Name like PayTM, PhonePe etc -
PaymentProcessUrl*url
FastSwiff payment url for customer to pay, you need to redirect to this url for payment processing.
-
OrderTypestring(20)
Echo from request
-
OrderIdstring(20)
Echo from request
-
OrderNotes string(100)
Risk and Security Notes - if you see detail in this, make sure to address with business team as soon as possible
-
PaymentDateTimedatetime
Time & Date of the payment
-
UpdatedDateTimedatetime
Updated time & date of the payment
-
OrderPaymentCustomerDataobject of CustomerData
If user have changed their customer data on FastSwiff payment page while transaction processing, updated data will be provided in this.
-
OrderKeyIdstring(30)required
OrderKeyId generated based on the create order request
-
MerchantKeyIdintegerrequired
MerchantKeyId obtained on Merchant registration
-
PaymentTransactionId string(50)required
PaymentTransactionId generated for specific transaction provided by FastSwiff system
-
PaymentType string(20)required
Identifies the type of the payment., eg:Credit/debit/upi,etc
Validation Error Response:
Note: Due to any invalid input values or invalid configuration, response will be provided as validation errors-
ResponseCodeint
OrderKeyId generated based on the create order request
-
Code string
Defined ErrorCode
-
Message string
Error Description
-
FieldName string
Name of invalid field if error due to data issue
-
DeveloperMessage string
Message for developers to understand issue, mostly configuration issue detail will be available in this field
-
MoreInfoUrl string
Url to learn more about this issue
-
RequestUniqueId string
Echo from request
Order Status Response:
It is same response as Order Create Response, please refer Order Response
Authorization: basic YTVhZWNlNTg3NWEwNDA0NGJmZjQ5MWRlNzM0MWVmNGE6ZTJkYTI2MTYxYjRiNDhmYzk1YjU5ZGFmMjE5MWZiMzM6TTo3Nzcx
Content-Type: application/json
{
"MID":"Your MID - Provided by FastSwiff",
"UniqueRequestId":"f3f5b5c13h",
"UserDefinedData":{
"UserDefined1":""
},
"ProductData":"{ 'PaymentReason':'OnlineOrder for OrderNo- 1234', 'ItemId':'T-shirt', 'Size':'medium', 'AppName':'yourAppName' }",
"RequestDateTime":"06232021",
"RedirectUrl":"https://fastswiff.com",
"TransactionData":{
"AcceptedPaymentTypes":"",
"PaymentType":"",
"SurchargeType":"",
"SurchargeValue":"",
"RefTransactionId":"",
"IndustrySpecificationCode":"",
"PartialPaymentOption":""
},
"OrderAmount":"100",
"OrderType":"",
"OrderAmountData":{
"AmountTypeDesc":"3",
"Amount":"2"
},
"CustomerData":{
"CustomerId":"152433",
"CustomerNotes":"Mens clothing",
"FirstName":"ravi",
"LastName":"sharma",
"MobileNo":"7337327109",
"Email":"test@gmail.com",
"EmailReceipt":"true",
"BillingAddress":"44 bhagvan nagar",
"BillingCity":"orissa",
"BillingState":"orissa",
"BillingCountry":"India",
"BillingZipCode":"30202020",
"ShippingFirstName":"ravi",
"ShippingLastName":"sharma",
"ShippingAddress":"44 bhagvan nagar",
"ShippingCity":"orissa",
"ShippingState":"orissa",
"ShippingCountry":"India",
"ShippingZipCode":"30202020",
"ShippingMobileNo":"7337327109"
},
"IntegrationData":{
"UserName":"ravi",
"Source":"3213",
"IntegrationType":"",
"HashData":"",
"PlatformId":"1"
}
}
}
{
"OrderKeyId":"210923M8340Uf3f5b5c13h",
"MerchantKeyId":8340,
"UniqueRequestId":"f3f5b5c13h",
"OrderType":"PAYMENT",
"OrderAmount":100.0,
"OrderId":null,
"OrderStatus":null,
"OrderPaymentStatus":0,
"OrderPaymentStatusText":null,
"PaymentStatus":0,
"PaymentTransactionId":null,
"PaymentResponseCode":0,
"PaymentApprovalCode":null,
"PaymentTransactionRefNo":null,
"PaymentResponseText":null,
"PaymentMethod":null,
"PaymentAccount":null,
"OrderNotes":null,
"PaymentDateTime":null,
"UpdatedDateTime":null,
"PaymentProcessUrl":"https://uat.fastswiff.com/payment/payment?orderid=210923M8340Uf3f5b5c13h",
"OrderPaymentCustomerData":{
"FirstName":"ravi",
"LastName":null,
"Address":null,
"City":null,
"State":null,
"ZipCode":null,
"Country":null,
"MobileNo":"7337327109",
"Email":"test@gmail.com",
"UserId":null,
"IpAddress":null
},
"UpiLink":null,
"OrderPaymentTransactionDetail":null,
"UserDefinedData":{
"UserDefined1":"",
"UserDefined2":null,
"UserDefined3":null,
"UserDefined4":null,
"UserDefined5":null,
"UserDefined6":null,
"UserDefined7":null,
"UserDefined8":null,
"UserDefined9":null,
"UserDefined10":null,
"UserDefined11":null,
"UserDefined12":null,
"UserDefined13":null,
"UserDefined14":null,
"UserDefined15":null,
"UserDefined16":null,
"UserDefined17":null,
"UserDefined18":null,
"UserDefined19":null,
"UserDefined20":null
}
}