Web Integration

As developers, you play a crucial role in shaping the future of online transactions, and our platform is here to empower you every step of the way. From integrating payment gateways into websites and applications to harnessing the power of APIs for secure transactions, our resources provide comprehensive guidance and expert insights to streamline your development process. Join us as we delve into the intricacies of web integration, unlocking new possibilities for frictionless payment solutions and elevating user experiences to new heights. Let's collaborate and innovate together in the dynamic world of digital payments.

Prerequisites

Run the following checklist before you begin the integration:



Please refer Order API Documentation for more details.


Use the below url to create an order in your (backend) server.


UAT URL: https://uatapi.fastswiff.com/payment/api/order


Production URL: https://api.fastswiff.com/payment/api/order


Order Status Response:

It is same response as Order Create Response, please refer OrderResponse




	Authorization: basic authentication with base64encoded

	FastSwiffAuthentication – <MerchantAuthenticationKey>: <MerchantAuthenticationToken>:M: <MID>

											

{
	"Merchantkeyid": "7963",
	"UniqueRequestId": "f3f5b5c13f",
	"UserDefinedData": {
		"UserDefined1": ""
		},
	"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": "amway product",
		"FirstName": "kanhaiya",
		"LastName": "dhaked",
		"MobileNo": "08619083450",
		"Email": "demo@gmail.com",
		"EmailReceipt": "true",
		"BillingAddress": "44 bhawar nagar semal",
		"BillingCity": "semla",
		"BillingState": "Rajasthan",
		"BillingCountry": "India",
		"BillingZipCode": "30202020",
		"ShippingFirstName": "yagyang",
		"ShippingLastName": "dhaked",
		"ShippingAddress": "44 bhawar nagar semal",
		"ShippingCity": "semla",
		"ShippingState": "Rajasthan",
		"ShippingCountry": "India",
		"ShippingZipCode": "30202020",
		"ShippingMobileNo": "08619083450"
		},
	"IntegrationData": {
		"UserName": "ranjith",
		"Source": "3213",
		"IntegrationType": "11",
		"HashData": "",
		"PlatformId": "1"
	},
 
}

											

//basic authentication with base64encoded 
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL =>  'https://uatapi.fastswiff/payment/api/order/create',
CURLOPT_RETURNTRANSFER =>  true,
CURLOPT_ENCODING =>  "",
CURLOPT_MAXREDIRS =>  10,
CURLOPT_TIMEOUT =>  0,
CURLOPT_FOLLOWLOCATION =>  true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST =>  "POST",
CURLOPT_POSTFIELDS =>$post_data,
CURLOPT_HTTPHEADER => $header,
));
$response = curl_exec($curl);
if(curl_errno($curl)){
  throw new Exception(curl_error($curl));
  }
curl_close($curl);  

FastSwiff Samples SDK_PHP Download

def orderCreate(self,post_data):
      #now = datetime.datetime.now()
      
       myfamily = {
			'Merchantkeyid':self.MerchantKeyId,
			'UniqueRequestId':FastSwiffIntegration.get_random_string(10),
			'OrderAmount':post_data.get( 'OrderAmount'),
			'OrderType':post_data.get( 'OrderType'),
			"UserDefinedData" : {
              "UserDefined1" :  ""    
            },
			"RequestDateTime": "",
			"RedirectUrl": "https://a2zfame.com",
			"TransactionData" : {
				"AcceptedPaymentTypes" :  "Linus",
				"PaymentType" : 2011,
				"SurchargeType": "",
				"SurchargeValue": "",
				"RefTransactionId": "",
				"IndustrySpecificationCode": "",
				"PartialPaymentOption": ""
			},
			'OrderAmountData':{
				"AmountTypeDesc":post_data.get('AmountTypeDesc'),
				"Amount":post_data.get('Amount')
			},
			"CustomerData":{
				"CustomerId":post_data.get( 'CustomerId'),
				"CustomerNotes":post_data.get( 'CustomerNotes'),
				"FirstName":post_data.get( 'FirstName'),
				"LastName":post_data.get( 'LastName'),
				"MobileNo":post_data.get( 'MobileNo'),
				"Email":post_data.get( 'Email'),
				"EmailReceipt":post_data.get( 'EmailReceipt'),
				"BillingAddress":post_data.get( 'BillingAddress'),
				"BillingCity":post_data.get( 'BillingCity'),
				"BillingState":post_data.get( 'BillingState'),
				"BillingCountry":post_data.get( 'BillingCountry'),
				"BillingZipCode":post_data.get( 'BillingZipCode'),
				"ShippingFirstName":post_data.get( 'ShippingFirstName'),
				"ShippingLastName":post_data.get(' ShippingLastName'),
				"ShippingAddress":post_data.get( 'ShippingAddress'),
				"ShippingCity":post_data.get( 'ShippingCity'),
				"ShippingState":post_data.get( 'ShippingState'),
				"ShippingCountry":post_data.get( 'ShippingCountry'),
				"ShippingZipCode":post_data.get( 'ShippingZipCode'),
				"ShippingMobileNo":post_data.get( 'ShippingMobileNo'),
			},
			"IntegrationData":{
				"UserName":post_data.get( "UserName"),
				"Source":post_data.get( "Source"),
				"IntegrationType":post_data.get( "IntegrationType"),
				"HashData":post_data.get( "HashData"),
				"PlatformId":post_data.get( "PlatformId"),
			}
      }

      message = self.AuthenticationKey+ ":"+self.AuthenticationToken+ ":M:"+self.MerchantKeyId
      message_bytes = message.encode('ascii')
      base64_bytes = base64.b64encode(message_bytes)
      base64_message = base64_bytes.decode('ascii')
      
      url = self.paymentURL+ "/create"      
      payload = json.JSONEncoder().encode(myfamily);
      headers = {
      'content-type':  "application/json"?,
      'authorization':  "Basic "+base64_message,
      'cache-control':  "no-cache",
      'postman-token':  "d755d76a-eee0-437a-48f6-cd08297493f8"
      }

      response = requests.request("POST", url, data=payload, headers=headers)
      pprint.pprint("yagyang start")
      pprint.pprint(response.text)
      pprint.pprint("yagyang end")
      
       return json.loads(response.text)

fastswiff Samples SDK_Python Download

{
	"OrderKeyId":"210619M11172U6f463b05b1",
	"MerchantKeyId":11172,
	"UniqueRequestId":"6f463b05b1",
	"OrderType":"PAYMENT",
	"OrderAmount":45,
	"OrderId":77,
	"OrderStatus":'',
	"OrderPaymentStatus":0,
	"OrderPaymentStatusText":'',
	"PaymentStatus":0,
	"PaymentTransactionId":'',
	"PaymentResponseCode":0,
	"PaymentApprovalCode":'',
	"PaymentTransactionRefNo":'',
	"PaymentResponseText":'',
	"PaymentMethod":'',
	"PaymentAccount":'',
	"OrderNotes":'',
	"PaymentDateTime":'',
	"UpdatedDateTime":'',
	"PaymentProcessUrl":"https:\/\/fastswiff.com\/payment\/payment?orderid=210619M11172U6f463b05b1",
	"OrderPaymentCustomerData":{
		"FirstName":"kanhaiya",
		"LastName":'dhaked',
		"Address":'jaipur',
		"City":'jaipur',
		"State":'RJ',
		"ZipCode":'302020',
		"Country":'IN',
		"MobileNo":"8619083450",
		"Email":"kl.nagar7@gmail.com",
		"UserId":'34',
		"IpAddress":'127.0.0.1'
	},
	"UpiLink":"upi:\/\/pay?pa=A2zfame@yesbank&pn=A2zfame&mc=8999&am=0&mam=null&cu=INR&mode=01&orgid=00000&mid=YES0000001558758&sign=YzYxYzhmOWI5MjY1MjM3ZDEzMzQ0NDhkYWQ3NTNlZGE5OTcwMDE2MjEyODQ2ZDFiZjdlNTU4YmM3OThkOTY0NGIxYzk3OGIxNGZjM2VkMWRhYjA2MDA4MDhhZDY2M2Q2Y2I5MWQ4ZmExMTAzMjU0YzJhNTk4MDRjMzhlZmVkNGI="
}
 
											
Tools

Select Color

Modes

light

light

dark

dark

Sidebar

Backgrounds

default

Default

bg-1

Bg-1

bg-2

Bg-2

bg-3

Bg-3

bg-4

Bg-4

bg-5

Bg-5

Box Design

default

Default

box-1

Box-1

box-2

Box-2

box-3

Box-3