Process an online transaction using Apple Pay.
You can submit an Apple Pay transaction in two ways:
- Encrypted token (recommended): Pass the payment token from the Apple Pay sheet in
fundingData.card.applePayToken. PXP decrypts it during transaction processing. You do not need to call the wallet decrypt endpoint or send card number fields. - Decrypted token: Decrypt the token on your backend using
POST /v1/wallets/ApplePay/decrypt-token, then submit the decrypted card details using the card not present card type withwalletTypeset toApplePay.
Use the following request when you have the encrypted payment token from the Apple Pay sheet on the client device.
{
"merchant": "MERCHANT-1",
"site": "SITE-1",
"merchantTransactionId": "This_is_my_merchant_transaction_id",
"merchantTransactionDate": "2024-01-27 08:51:02.826445+00:00",
"transactionMethod": {
"intent": "Authorisation",
"entryType": "Ecom",
"fundingType": "Card"
},
"amounts": {
"transaction": 30.32,
"currencyCode": "EUR"
},
"fundingData": {
"card": {
"applePayToken": "{\"version\":\"EC_v1\",\"data\":\"eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0...\",\"signature\":\"MIAGCSqGSIb3DQEHAqCAMIACAQEx...\",\"header\":{\"ephemeralPublicKey\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...\",\"publicKeyHash\":\"h0j3M6S0X8/x...\",\"transactionId\":\"32b030ca0603b2c5f0e2c5c8f0c0e0c0\"}}"
}
},
"shopper": {
"id": "Shopper_01",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1980-03-01",
"email": "shopper@example.com"
}
}| Parameter | Description |
|---|---|
merchantstring (≤ 20 characters) required | Your unique merchant identifier, as assigned by PXP. |
sitestring (≤ 20 characters) required | Your unique site identifier, as assigned by PXP. |
merchantTransactionIdstring (≤ 50 characters) required | A unique identifier for this transaction. |
merchantTransactionDatedate-time required | The date and time when the transaction happened, in ISO 8601 format. |
transactionMethodobject required | Details about the transaction method. |
transactionMethod.entryTypestring required | The entry type. For e-commerce transactions, this is always Ecom. |
transactionMethod.fundingTypestring required | The funding type. For card transactions, this is always Card. |
transactionMethod.intentstring required | The payment intent. Learn more about intents. Possible values:
|
amountsobject required | Details about the transaction amount. |
amounts.transactionnumber | The transaction amount. The numbers after the decimal will be zero padded if they are less than the expected currencyCode exponent. For example, GBP 1.1 = GBP 1.10, EUR 1 = EUR 1.00, or BHD 1.3 = 1.300. The transaction will be rejected if numbers after the decimal are greater than the expected currencyCode exponent (e.g., GBP 1.234), or if a decimal is supplied when the currencyCode exponent does not require it (e.g., JPY 1.0). |
amounts.currencyCodestring (1-3 characters) required | The currency code associated with the transaction, in ISO 4217 format. |
fundingDataobject required | Details about the payment method used for the transaction. |
fundingData.cardobject required | Apple Pay card details. Use the Apple Pay card type and submit only applePayToken (and optional dynamicDescriptors). |
fundingData.card.applePayTokenstring required | The encrypted payment token returned by Apple Pay on the client device. Submit this value as a JSON string serialisation of the Apple Pay payment token object (including version, data, signature, and header). PXP decrypts this server-side during transaction processing. |
fundingData.card.dynamicDescriptorsobject | Optional merchant-defined descriptors that appear on the cardholder's statement. Learn more about dynamic descriptors. |
fundingData.card.dynamicDescriptors.cardAcceptorNamestring (≤ 22 characters) | A description of the transaction that will appear on the cardholder's statement. |
shopperobject | Details about the shopper making the payment. |
If your request is successful, you'll receive a 200 response that includes the transaction's state. You'll also receive a Transaction (Card Authorised) webhook notification. Learn more about webhooks.
{
"state": "Authorised",
"stateData": {},
"approvalCode": "676821",
"merchantTransactionDate": "2025-03-31T10:39:37",
"merchantTransactionId": "08081f55-6b8b-45d5-b097-3450dfff61e7",
"systemTransactionId": "7cf52570-9ca3-4423-b246-e0bcb0fb34d1",
"fundingData": {
"cardScheme": "MasterCard",
"expiryMonth": null,
"expiryYear": null,
"gatewayTokenId": "5fbd77ce-02c1-40ed-94bc-1016660b7512",
"providerResponse": {
"provider": "pxpfinancial",
"code": "00",
"emvDataResponse": {},
"paymentAccountReference": "637607302178175469",
"electronicCommerceIndicatorAdjustment": "05",
"merchantAdvice": {},
"authorisedAmount": 10,
"settlementDate": "2025-04-01T00:00:00"
},
"processorTransactionId": "403e7285-2993-4de4-b0ff-5e2f18bf7a8f"
}
}