Search Overlay

Payments API

You can quickly and securely process Apple Pay payments from your customers using Payments API. You must pass the payment-handle received in the createPaymentHandle function's callback function to your backend server. You must make a POST call to Payments API to complete the Apple payment. You must pass the private key in the header while making payments API call. Endpoint Test URL and Endpoint Production URL

Below is the sample request packet. For detailed info on each parameter, please check Paysafe Payments API

Request

{
"merchantRefNum": "fff7db6a0d627d54021d",
"amount": 500,
"currencyCode": "USD",
"dupCheck": true,
"settleWithAuth": true,
"paymentHandleToken": "AUwDUgdHLKY6yGm",
"customerIp": "172.0.0.1",
"description": "Magazine subscription"
}

Response

{
"id": "9dcd77d0-0088-4aa4-8211-a52347674d07",
"paymentType": "CARD",
"paymentHandleToken": "AQaTq1B3Re30IxN",
"merchantRefNum": "fff7db6a0d627d54021d",
"currencyCode": "USD",
"settleWithAuth": true,
"txnTime": "2021-08-26T11:26:06Z",
"billingDetails": {
"nickName": "Home",
"street": "{{street}}",
"city": "{{city}}",
"zip": "{{zip}}",
"state": "{{state}}",
"country": "{{country}}"
},
"customerIp": "172.0.0.1",
"status": "COMPLETED",
"amount": 500,
"preAuth": false,
"availableToSettle": 0,
"gatewayResponse": {
"code": "VPS",
"responseCode": "00",
"avsCode": "I",
"authCode": "187638",
"avsResponse": "NOT_PROCESSED",
"cvvVerification": "NOT_PROCESSED",
"serializable": true
},
"merchantDescriptor": {
"dynamicDescriptor": "OnlineStoreeeeeeeee",
"phone": "1234567899"
},
"settlements": [
{
"merchantRefNum": "fff7db6a0d627d54021d",
"amount": 500,
"id": "9dcd77d0-0088-4aa4-8211-a52347674d07",
"availableToRefund": 500,
"txnTime": 1629977166000,
"status": "PENDING"
}
],
"card": {
"cardExpiry": {
"month": "11",
"year": "2024"
},
"status": "ACTIVE",
"lastDigits": "0002",
"cardCategory": "CREDIT"
}
}
PREV
On this Page