Apple Pay Direct Integration

Overview

Apple Pay Direct Integration allows you to process Apple Pay payments by decrypting the Apple Pay token on your side. After decrypting the token, you extract the card details provided by Apple Pay and send them to MyFatoorah to process the payment.

How It Works

The payment is processed immediately without redirecting the customer for authentication. The payment result is returned directly in the same response.

Endpoint: POST /v3/payments(Create Payment)

{
    "PaymentMethod": "APPLE_PAY",
    "Order": {
        "Amount": 20
    },
    "SourceOfFund": {
        "Card": {
            "Number": "5204240498885735",
            "ExpiryMonth": "06",
            "ExpiryYear": "26",
            "Cryptogram": "ALJJjhJSf8kZAmsy+VVBAoABFA==",
        }
    },
    "IntegrationUrls": {
        "Redirection": "https://your-website.com/payment-callback"
    }
}
{
    "IsSuccess": true,
    "Message": "",
    "ValidationErrors": null,
    "Data": {
        "InvoiceId": "6389687",
        "PaymentId": "07076389687322474674",
        "PaymentURL": "https://your-website.com/payment-callback?paymentId=07076389687322474674&Id=07076389687322474674",
        "PaymentCompleted": true,
        "TransactionDetails": {
            "Invoice": {
                "Id": "6389687",
                "Status": "PENDING",
                "Reference": "2025001620",
                "CreationDate": "2025-12-24T16:37:19.8046448Z",
                "ExpirationDate": "2026-05-23T16:37:19.8046448Z",
                "ExternalIdentifier": null,
                "UserDefinedField": "",
                "MetaData": null
            },
            "Transaction": {
                "Id": "07076389687322474674",
                "Status": "FAILED",
                "PaymentMethod": "Apple Pay",
                "PaymentId": "07076389687322474674",
                "ReferenceId": "07076389687322474674",
                "TrackId": "24-12-2025_3224746",
                "AuthorizationId": "07076389687322474674",
                "TransactionDate": "2025-12-24T16:37:19.8671123Z",
                "ECI": "",
                "IP": {
                    "Address": "",
                    "Country": ""
                },
                "Error": {
                    "Code": "MF002",
                    "Message": "DECLINED : Restricted card"
                },
                "Card": {
                    "NameOnCard": "",
                    "Number": "520424xxxxxx5735",
                    "Token": "",
                    "PanHash": "98899f423ac13b6dbdc3ef62b275ece6e37d60f73b0c6894379b9c48d847c2ff",
                    "ExpiryMonth": "06",
                    "ExpiryYear": "26",
                    "Brand": "",
                    "Issuer": "",
                    "IssuerCountry": "",
                    "FundingMethod": ""
                }
            },
            "Customer": {
                "Reference": "",
                "Name": "Anonymous",
                "Mobile": "+965",
                "Email": ""
            },
            "Amount": {
                "BaseCurrency": "KWD",
                "ValueInBaseCurrency": "20",
                "ServiceCharge": "0.022",
                "ServiceChargeVAT": "0.003",
                "ReceivableAmount": "19.975",
                "DisplayCurrency": "KWD",
                "ValueInDisplayCurrency": "20",
                "PayCurrency": "KWD",
                "ValueInPayCurrency": "20"
            },
            "Suppliers": []
        }
    }
}