# Apple Pay transaction

Process an online transaction using Apple Pay.

## Initiate an Apple Pay transaction

/v1/transactions

### Request example

Use the following request to initiate an Apple Pay transaction.


```json
{
  "merchant": "MERCHANT-1",
  "site": "SITE-1",
  "merchantTransactionId": "ECOM-001",
  "merchantTransactionDate": "2025-01-27 08:51:02.826445+00:00",
  "transactionMethod": {
    "intent": "Purchase",
    "fundingType": "Card",
    "entryType": "Ecom"
  },
  "amounts": {
    "transaction": 10,
    "currencyCode": "GBP"
  },
  "threeDSecureData": {
    "cardHolderAuthenticationVerificationValue": "MjAwNjI0MDkwMTEwMjA4NjU0MTY=",
    "electronicCommerceIndicator": "05"
  },
  "fundingData": {
    "card": {
      "primaryAccountNumber": "4111111111111111",
      "expiryMonth": "1",
      "expiryYear": "2025",
      "holderName": "John Doe",
      "walletType": "ApplePay"
    }
  }
}
```

| Parameter | Description |
|  --- | --- |
| `merchant`string (≤ 20 characters) | Your unique merchant identifier, as assigned by PXP. |
| `site`string (≤ 20 characters) | Your unique site identifier, as assigned by PXP. |
| `merchantTransactionId`string (≤ 50 characters) | A unique identifier for this transaction. |
| `merchantTransactionDate`date-time | The date and time when the transaction happened, in ISO 8601 format. |
| `transactionMethod`object | Details about the transaction method. |
| `transactionMethod.entryType`string | The entry type. For e-commerce transactions, this is always `Ecom`. |
| `transactionMethod.fundingType`string | The funding type. For card transactions, this is always `Card`. |
| `transactionMethod.intent`string | The payment intent. [Learn more about intents](/guides/transactions/how-it-works#intents).  Possible values:`Authorisation``EstimatedAuthorisation``Purchase``Payout``Refund` |
| `amounts`object | Details about the transaction amount. |
| `amounts.transaction`number | 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` of  the exponent does not require it (e.g., JPY 1.0). |
| `amounts.currencyCode`string (1-3 characters) | The currency code associated with the transaction, in ISO 4217 format. |
| `threeDSecureData`object | Details about the 3DS data. If `authenticationId` is provided, it will be used by PXP to look up the associated 3D Secure authentication data. If `authenticationId` isn't provided, you'll need to provide the authentication data instead. |
| `threeDSecureData.authenticationId`string | A unique reference provided by PXP for the authentication request, represented as a GUID. |
| `threeDSecureData.cardHolderAuthenticationVerificationValue`string | The Cardholder Authentication Verification Value (CAVV) is generated by the card issuer as part of the 3D Secure authentication process for Visa transactions. It indicates that the cardholder has been authenticated, and it should be appended to the authorisation request. |
| `threeDSecureData.electronicCommerceIndicator`string | The Electronic Commerce Indicator (ECI) specifies the security level of an online transaction and the authentication outcome, crucial for determining liability in the event of a dispute. Possible values:`01`: Transaction processed with SSL or equivalent but without cardholder authentication (considered less secure, higher risk).`02`: Transaction processed with cardholder authentication (e.g., 3D Secure), indicating a higher level of security.`05`: Transaction processed with 3D Secure authentication, cardholder authenticated successfully (high security).`06`: Transaction attempted 3D Secure authentication but could not be completed; cardholder not authenticated (medium security).`07`: Transaction processed without 3D Secure authentication, due to issuer or cardholder not participating in 3D Secure (considered less secure, higher risk). |
| `fundingData`object | Details about the payment method used for the transaction. |
| `fundingData.card`object | Details about the card. |
| `fundingData.card.primaryAccountNumber`string (10-19 characters) | The unique number assigned to a payment card, such as a credit or debit card. This number typically contains 16 digits, structured in a specific format to indicate the card network, issuing bank, and account number. |
| `fundingData.card.expiryMonth`string (2 characters) | The expiry month (`MM`) of the card. |
| `fundingData.card.expiryYear`string (4 characters) | The expiry year (`YYYY`) of the card. |
| `fundingData.card.holderName`string (≤ 100 characters) | The full name of the individual who owns the payment card. This name is printed on the physical card and is used for verifying the cardholder's identity during transactions. |
| `fundingData.card.walletType`string | The type of digital wallet being used for the transaction. Set this to `ApplePay`. |


### Response example

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.


```json
{
  "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"
  }
}
```