Skip to main content

Documentation

Creating a Payment with Apple Pay (encrypted)

This procedure describes how to create a payment with an encrypted Apple Pay payload.

Initiate this process with a call to the Rapyd API.

Prerequisites

URL

post {{base_url}}/v1/payments

Request Body

{
    "amount": 10,
    "currency": "USD",
    "description": "encrypted payload",
    "payment_method": {
        "type": "by_visa_card",
        "address": null,
        "digital_wallet": {
            "type": "apple_pay",
            "details": {
                "token": {
                    "paymentData": {
                        "data": "V7OcjttPJnUJaQH7x7OjbIeZSINuc...pm+2RquBArCp71Z9CPSGwQ6bfcq09Dwsw3WJ0RGg=",
                        "signature": "MIAGCSqGSIb3DQEHAqCAM...xCzAJBgNVBAY3Sbrb7MpYRdEAAAAAAAA=",
                        "header": {
                            "publicKeyHash": "L6vppo38t31Q/9npxRy/xbA1+cs13h1LV+pMO/FYwvo=",
                            "ephemeralPublicKey": "MFkwEwYHKoZI...sum3onbZcAU/4Q==",
                            "transactionId": "4f4fac7a1...a6a8ba2c0e8c5"
                        },
                        "version": "EC_v1"
                    },
                    "paymentMethod": {
                        "displayName": "MasterCard 1512",
                        "network": "MasterCard",
                        "type": "credit"
                    },
                    "transactionIdentifier": "4F4FAC7A10474...8BA2C0E8C5"
                }
            }
        }
    }
}

Note

You must use the entire token object that you got from Apple Pay, without any changes. The example here has truncated some of the long values for clarity.

Publication date: