Payments API

You can easily and securely process Apple pay payment from your customers using Payments API. You need to pass payment-handle received in createPaymentHandle function's callback function to your backend server. You need to make POST call to Payments API to complete the Apple payment. You need to pass 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 of 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"
    }
}
Did you find this page useful?