> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.coinflow.cash/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.coinflow.cash/_mcp/server.

# Apple Pay Checkout

POST https://api-sandbox.coinflow.cash/api/checkout/v2/apple-pay/{merchantId}
Content-Type: application/json

Reference: https://docs.coinflow.cash/api-reference/api-reference/checkout/apple-pay

## Authentication

- `x-coinflow-auth-session-key` header (required) — The session key generated for the end user - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key
- `x-coinflow-auth-wallet` header (required) — The web3 wallet of the end user - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key
- `x-coinflow-auth-blockchain` header (required) — The blockchain associated with the end user - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key
- `x-coinflow-auth-user-id` header (required) — The external identifier of the end user - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key
- `Authorization` header (required) — The API key of the merchant - see https://docs.coinflow.cash/api-reference/api-reference/authentication/get-session-key

## Request

### Path parameters

- `merchantId` (string, required)

### Headers

- `x-device-id` (string, optional)

### Body (application/json)

This endpoint expects an ApplePayCheckoutArgs.

- `subtotal` (Subtotal, required)
- `applePayPayment` (ApplePayPayment, required) — Apple Pay Payment received from the Apple Pay SDK Details can be found here: https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypayment
- `userLocation` (IUserLocation, optional) — End-user geographic coordinates captured at the moment of the withdrawal request. Consumed by `BlockingRuleMethod.GEOLOCATION` enforcement. Replay-of-different-coords bypass is prevented server-side: the first resolved \{country, state} for a given (merchant, user) pair is pinned in Redis, and subsequent requests are evaluated against that pinned value regardless of the lat/lng they submit.
- `customPayInFees` (list of CustomPayInFeeConfig, optional)
- `fixedFee` (Cents, optional)
- `threeDsChallengePreference` (enum, optional)
  - Allowed values: `NoPreference`, `Frictionless`, `Challenge`
- `statementDescriptor` (string, optional) — If the bank supports dynamic descriptors, this will appear on the customer's statement.
- `customerInfo` (CustomerInfo, optional)
- `webhookInfo` (AnyObject, optional)
- `chargebackProtectionData` (list of CartItemClassOmitted, optional) — Cart item details required for Coinflow Chargeback Protection. Required if the merchant uses chargeback protection.
- `feePercentage` (double, optional) — If this purchase is for a seller/submerchant where the marketplace takes a fee, this is the % fee which is taken from the subtotal amount.
- `jwtToken` (string, optional) — This is a token encoding the parameters for the request. Allows purchase parameters to be verified to prevent manipulation when the checkout page is presented to the user.
- `overrideChargebackProtectionDecision` (boolean, optional)
- `chargebackProtectionAccountType` (enum, optional)
  - Allowed values: `guest`, `private`, `business`
- `doNotReviewChargebackProtection` (boolean, optional)
- `settlementType` (enum, optional)
  - Allowed values: `Credits`, `USDC`
- `customerUsdcTransferData` (CustomerUsdcTransferData, optional) — Customer signed USDC transferWithAuthorization data for dual-source payments Used for combined USDC + Credit Card payments on EVM chains
- `customerUsdcTransferDataV2` (CustomerUsdcTransferDataV2, optional) — V2 of CustomerUsdcTransferData — replaces the (v, r, s) triple with a single `signature` bytes string, matching USDC FiatTokenV2_2's bytes-overload `transferWithAuthorization`. All other fields unchanged from V1.
- `authOnly` (boolean, optional) — Only authorize the purchase. This will not actually capture the payment.(default: false)
- `accountFundingTransaction` (AccountFundingTransaction, optional) — Used for Account Funding Transactions
- `rent` (LamportsAmount, optional)
- `transactionData` (EvmTransactionData, optional) — (EVM only) if you want to execute an EVM transaction on a successful purchase, you can pass a transaction request here. Gas fees for the transaction will be automatically calculated and added to the total charged to the customer. Optionally the merchant can opt to pay for these gas fees.
- `stellarTransaction` (string, optional) — (Stellar only) Base64 XDR transaction string for executing a merchant contract call on a successful purchase. For transaction purchases, pass the base64 XDR string created using `.toXDR()` on a transaction built with generated TypeScript bindings (e.g., `NftClientWrapper.buildNftPurchaseTx`). For direct USDC transfers (no merchant transaction), omit this field or pass undefined. Gas fees for the transaction will be automatically calculated and added to the total charged to the customer.
- `presentment` (enum, optional)
  - Allowed values: `USD`, `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CHF`, `CLF`, `CLP`, `CNY`, `COP`, `CRC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `GBP`, `GEL`, `GHS`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MWK`, `MVR`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RWF`, `SAR`, `SCR`, `SDG`, `SEK`, `SGD`, `SLE`, `SLL`, `SOS`, `SRD`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWL`, `CDF`, `ERN`, `FKP`, `KPW`, `RUB`, `SBD`, `SHP`, `SSP`, `VES`
- `destinationAuthKey` (string, optional) — If utilizing USDC settlement to addresses other than your main merchant settlement address. Utilize this destinationAuthKey which is a JWT encoded with the information for which address to send the USDC to.

## Response

### 200

Ok

- `paymentId` (string, required) — The ID of the payment that was created.

## Errors

### 402 Payment Required Error

ApplePay unavailable

- `any`

### 423 Locked Error

Customer is Blocked

- `any`

### 451 Unavailable for Legal Reasons Error

Must Complete Additional Verification

- `verification` (Verification, required)
- `verificationLink` (string, optional) — Link which can be hosted in an iframe or redirect the user to complete verification.
- `redirectLink` (string, optional) — Link where the user will be redirected to upon successful verification.
- `additionalVerificationLinks` (list of AdditionalVerification, optional) — Additional links which can be hosted in an iframe or redirect the user to complete verification.
- `rejectionReasons` (list of string, optional) — List of reasons as to why the verification was rejected.

## Types

### Subtotal

- CurrencyCents: CurrencyCents
- Cents: Cents
- TokenSubtotal: TokenSubtotal

### ApplePayPayment

Apple Pay Payment received from the Apple Pay SDK Details can be found here: https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypayment

- `token` (ApplePayPaymentToken, required)
- `billingContact` (ApplePayBillingContact, required)
- `shippingContact` (Pick_ApplePayJS.ApplePayPaymentContact.emailAddress_, optional) — From T, pick a set of properties whose keys are in the union K
- `decrypted` (DecryptedApplePayToken, optional)

### IUserLocation

End-user geographic coordinates captured at the moment of the withdrawal request. Consumed by `BlockingRuleMethod.GEOLOCATION` enforcement. Replay-of-different-coords bypass is prevented server-side: the first resolved \{country, state} for a given (merchant, user) pair is pinned in Redis, and subsequent requests are evaluated against that pinned value regardless of the lat/lng they submit.

- `lat` (double, required)
- `lng` (double, required)

### CustomPayInFeeConfig

- `fee` (CustomPayInFeeValue, required)
- `lineItemLabel` (string, required)

### Cents

- `cents` (integer, required)

### CustomerInfo

- SplitNameCustomerInfo: SplitNameCustomerInfo
- NameCustomerInfo: NameCustomerInfo

### AnyObject

- `example` (string, optional)

### CartItemClassOmitted

- Pick_nftCartItem.Exclude_keyofnftCartItem.sellingPrice-or-itemClass__: Pick_nftCartItem.Exclude_keyofnftCartItem.sellingPrice-or-itemClass__
- Pick_GiftCardCartItem.Exclude_keyofGiftCardCartItem.listPrice__: Pick_GiftCardCartItem.Exclude_keyofGiftCardCartItem.listPrice__
- CryptoCartItem: CryptoCartItem
- MoneyTopUpCartItem: MoneyTopUpCartItem
- TravelCartItem: TravelCartItem
- FlightTicketCartItem: FlightTicketCartItem
- FlightUpgradeCartItem: FlightUpgradeCartItem
- LodgingCartItem: LodgingCartItem

### CustomerUsdcTransferData

Customer signed USDC transferWithAuthorization data for dual-source payments Used for combined USDC + Credit Card payments on EVM chains

- `from` (string, required)
- `to` (string, required)
- `value` (string, required)
- `validAfter` (CustomerUsdcTransferDataValidAfter, required)
- `validBefore` (CustomerUsdcTransferDataValidBefore, required)
- `nonce` (string, required)
- `v` (double, required)
- `r` (string, required)
- `s` (string, required)

### CustomerUsdcTransferDataV2

V2 of CustomerUsdcTransferData — replaces the (v, r, s) triple with a single `signature` bytes string, matching USDC FiatTokenV2_2's bytes-overload `transferWithAuthorization`. All other fields unchanged from V1.

- `from` (string, required)
- `to` (string, required)
- `value` (string, required)
- `validAfter` (CustomerUsdcTransferDataV2ValidAfter, required)
- `validBefore` (CustomerUsdcTransferDataV2ValidBefore, required)
- `nonce` (string, required)
- `signature` (string, required)

### AccountFundingTransaction

Used for Account Funding Transactions

- `recipientAftInfo` (RecipientAftInfo, optional)

### LamportsAmount

- `lamports` (LamportsAmountLamports, required) — Amount of lamports. Must be a whole, non-negative number; as a string it may contain digits only (no sign, decimal point, or exponent).

### EvmTransactionData

(EVM only) if you want to execute an EVM transaction on a successful purchase, you can pass a transaction request here. Gas fees for the transaction will be automatically calculated and added to the total charged to the customer. Optionally the merchant can opt to pay for these gas fees.

- SafeMintRedeem: SafeMintRedeem
- ReturnedTokenIdRedeem: ReturnedTokenIdRedeem
- KnownTokenIdRedeem: KnownTokenIdRedeem
- NormalRedeem: NormalRedeem
- TokenRedeem: TokenRedeem
- DecentRedeem: DecentRedeem

### Verification

- `reference` (string, required)
- `status` (enum, required)
  - Allowed values: `pending`, `partial-approval`, `approved`, `rejected`, `expired`
- `vendor` (enum, required)
  - Allowed values: `middesk`, `sumsub`, `sumsub_docv`, `persona`, `persona_kyb`, `unassigned`
- `name` (string, optional)
- `attested` (boolean, optional)
- `shareToken` (string, optional)
- `shareTokenStatus` (string, optional)
- `sessionToken` (string, optional)
- `rejectionReasons` (list of string, optional)

### AdditionalVerification

- `name` (string, required)
- `link` (string, required)
- `reference` (string, required)
- `vendor` (enum, required)
  - Allowed values: `middesk`, `sumsub`, `sumsub_docv`, `persona`, `persona_kyb`, `unassigned`
- `sessionToken` (string, optional)

### CurrencyCents

- `cents` (integer, required)
- `currency` (enum, required)
  - Allowed values: `USD`, `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CHF`, `CLF`, `CLP`, `CNY`, `COP`, `CRC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `GBP`, `GEL`, `GHS`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MWK`, `MVR`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RWF`, `SAR`, `SCR`, `SDG`, `SEK`, `SGD`, `SLE`, `SLL`, `SOS`, `SRD`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWL`, `CDF`, `ERN`, `FKP`, `KPW`, `RUB`, `SBD`, `SHP`, `SSP`, `VES`

### TokenSubtotal

- `address` (string, required) — The tokens address Solana - Token Mint Address Evm - Token Contract Address
- `amount` (TokenSubtotalAmount, required) — Number of tokens, from 0 to 1,000,000,000,000 inclusive. String values must be a plain decimal with at most 12 integer digits and 18 fractional digits.
- `decimals` (double, optional) — Number of decimals for the token

### ApplePayPaymentToken

- `transactionIdentifier` (string, required) — A unique identifier for this payment.
- `paymentMethod` (ApplePayPaymentTokenPaymentMethod, required) — Information about the card used in the transaction.
- `paymentData` (ApplePayPaymentTokenPaymentData, required) — An object containing the encrypted payment data.

### ApplePayBillingContact

- `givenName` (string, required) — The contact's given name.
- `familyName` (string, required) — The contact's family name.
- `addressLines` (list of string, required) — The street portion of the address for the contact.
- `country` (string, optional) — The name of the country for the contact.
- `emailAddress` (string, optional) — An email address for the contact.
- `postalCode` (string, optional) — The zip code or postal code, where applicable, for the contact.
- `locality` (string, optional) — The city for the contact.
- `administrativeArea` (string, optional) — The state for the contact.
- `subAdministrativeArea` (string, optional) — The subadministrative area (such as a county or other region) in a postal address.
- `countryCode` (string, optional) — The contact’s two-letter ISO 3166 country code.

### Pick_ApplePayJS.ApplePayPaymentContact.emailAddress_

From T, pick a set of properties whose keys are in the union K

- `emailAddress` (string, optional) — An email address for the contact.

### DecryptedApplePayToken

- `applicationPrimaryAccountNumber` (string, required)
- `applicationExpirationDate` (string, required)
- `currencyCode` (string, required)
- `transactionAmount` (double, required)
- `deviceManufacturerIdentifier` (string, required)
- `paymentDataType` (string, required)
- `paymentData` (PaymentData, required)

### CustomPayInFeeValue

- CustomPayInFeeValue0
- CustomPayInFeeValue1

### SplitNameCustomerInfo

- `firstName` (string, required)
- `lastName` (string, required)
- `verificationId` (string, optional)
- `displayName` (string, optional)
- `address` (string, optional)
- `city` (string, optional)
- `state` (string, optional)
- `zip` (string, optional)
- `country` (string, optional)
- `ip` (string, optional)
- `lat` (string, optional)
- `lng` (string, optional)
- `dob` (string, optional) — Date of birth in YYYY-MM-DD format
- `email` (string, optional)

### NameCustomerInfo

- `verificationId` (string, optional)
- `displayName` (string, optional)
- `address` (string, optional)
- `city` (string, optional)
- `state` (string, optional)
- `zip` (string, optional)
- `country` (string, optional)
- `ip` (string, optional)
- `lat` (string, optional)
- `lng` (string, optional)
- `dob` (string, optional) — Date of birth in YYYY-MM-DD format
- `email` (string, optional)
- `name` (string, optional)

### Pick_nftCartItem.Exclude_keyofnftCartItem.sellingPrice-or-itemClass__

From T, pick a set of properties whose keys are in the union K

- `productName` (string, required) — The name of the related product
- `productType` (enum, required)
  - Allowed values: `inGameProduct`, `gameOfSkill`, `dataStorage`, `computingResources`, `sportsTicket`, `eSportsTicket`, `musicTicket`, `conferenceTicket`, `virtualSportsTicket`, `virtualESportsTicket`, `virtualMusicTicket`, `virtualConferenceTicket`, `alcohol`, `DLC`, `subscription`, `fundACause`, `realEstate`, `computingContract`, `digitalArt`, `topUp`, `ownershipContract`, `inGameCurrency`, `digitalCollectibles`, `digitalCollectiblesMarketplace`, `digitalGiftingMarketplace`, `sweepstakes`, `virtualSportsEvents`, `contractInvoicing`, `onlineCasino`, `cryptoOnramp`, `gaming`, `travelDocuments`, `musicStreaming`, `digitalContent`, `eBooks`, `digitalSubscriptionContent`
- `quantity` (double, required) — The number of units sold
- `listPrice` (PickNftCartItemExcludeKeyofnftCartItemSellingPriceOrItemClassListPrice, optional) — The item's list price
- `rawProductData` (AnyObject, optional)
- `seller` (SellerInfo, optional)
- `transactionHistory` (list of TransactionHistoryItem, optional)

### Pick_GiftCardCartItem.Exclude_keyofGiftCardCartItem.listPrice__

From T, pick a set of properties whose keys are in the union K

- `id` (string, required) — The cart items’s unique ID
- `sellingPrice` (PickGiftCardCartItemExcludeKeyofGiftCardCartItemListPriceSellingPrice, required)
- `itemClass` (enum, required)
  - Allowed values: `giftCard`
- `productType` (enum, required)
  - Allowed values: `giftCard`
- `quantity` (double, required) — The number of units sold
- `itemFulfillment` (enum, required) — How the product was fulfilled.
  - Allowed values: `digital`, `physical`
- `brand` (string, optional) — The name of the brand
- `rawProductData` (Record_string.any_, optional) — Construct a type with a set of properties K of type T
- `seller` (SellerInfo, optional)
- `sku` (string, optional) — The stock-keeping unit (SKU) number
- `categories` (list of string, optional) — The category in the site/app in which the item was classified (e.g., fashion)
- `isGift` (boolean, optional)
- `recipientInfo` (RecipientInfo, optional)
- `expectedDeliveryDelay` (double, optional) — The expected delay in delivery, in hours
- `isPresetAmount` (boolean, optional) — Represents whether the item amount is taken from a preset list, e.g. 25, 50, 100, etc. or whether it was a different amount, e.g. 27

### CryptoCartItem

Represents a crypto item in a shopping cart

- `itemClass` (enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: crypto Example: crypto
  - Allowed values: `crypto`
- `units` (string, required) — The amount in the crypto currency which is specified in the `cryptoCurrency` property Example: 1.04112 Pattern: ^[0-9]+(\.[0-9]+)?$
- `cryptoCurrency` (string, required) — The crypto-currency symbol (uppercase) Example: BTC Pattern: ^[A-Z0-9-]+$
- `unitPrice` (CryptoCartItemUnitPrice, required) — The price per 1 unit
- `recipientInfo` (RecipientInfo, required)
- `id` (string, optional) — The cart items's unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
- `rawProductData` (AnyObject, optional)
- `expectedDeliveryDelay` (double, optional) — The expected delay in delivery, in hours Min value: 0
- `seller` (SellerInfo, optional)

### MoneyTopUpCartItem

Represents a money top-up item in a shopping cart

- `itemClass` (enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: moneyTopUp Example: moneyTopUp
  - Allowed values: `moneyTopUp`
- `sellingPrice` (CurrencyAmount, required) — Common currency amount structure
- `topUpAmount` (CurrencyAmount, required) — Common currency amount structure
- `quantity` (double, required) — Quantity Example: 2
- `isPresetAmount` (boolean, required) — Represents whether the item amount is taken from a preset list, e.g. 25, 50, 100, etc. or whether it was a different amount, e.g. 27
- `id` (string, optional) — The cart items's unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
- `rawProductData` (Record_string.any_, optional) — Construct a type with a set of properties K of type T
- `recipientInfo` (RecipientInfo, optional)

### TravelCartItem

Represents a travel booking item in a shopping cart

- `itemClass` (enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: travel Example: travel
  - Allowed values: `travel`
- `sellingPrice` (CurrencyAmount, required) — Common currency amount structure
- `lodging` (TravelLodging, required) — The lodging details of the travel booking
- `pnr` (string, required) — The flight ticket's PNR code Example: X36Q9C
- `trip` (TravelTrip, required) — The trip details of the travel booking
- `firstFlight` (TravelFirstFlight, required) — The first flight details of the trip
- `id` (string, optional) — The cart items's unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
- `rawProductData` (AnyObject, optional)
- `listPrice` (CurrencyAmount, optional) — Common currency amount structure
- `recipientInfo` (RecipientInfo, optional)

### FlightTicketCartItem

Represents a flight ticket item in a shopping cart

- `itemClass` (enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: flightTicket Example: flightTicket
  - Allowed values: `flightTicket`
- `sellingPrice` (CurrencyAmount, required) — Common currency amount structure
- `pnr` (string, required) — The flight ticket's PNR code Example: X36Q9C
- `trip` (TravelTrip, required) — The trip details of the travel booking
- `firstFlight` (TravelFirstFlight, required) — The first flight details of the trip
- `id` (string, optional) — The cart items's unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
- `rawProductData` (AnyObject, optional)
- `listPrice` (CurrencyAmount, optional) — Common currency amount structure
- `recipientInfo` (RecipientInfo, optional)

### FlightUpgradeCartItem

Represents a flight upgrade item in a shopping cart

- `itemClass` (enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: flightUpgrade Example: flightUpgrade
  - Allowed values: `flightUpgrade`
- `sellingPrice` (CurrencyAmount, required) — Common currency amount structure
- `upgradeType` (enum, required) — The type of upgrade Example: changes
  - Allowed values: `changes`, `fareIncrease`, `baggage`, `seats`, `insurance`, `other`
- `id` (string, optional) — The cart items's unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
- `rawProductData` (AnyObject, optional)
- `listPrice` (CurrencyAmount, optional) — Common currency amount structure
- `recipientInfo` (RecipientInfo, optional)
- `pnr` (string, optional) — The flight ticket's PNR code Example: X36Q9C
- `description` (string, optional) — The upgrade description, required when the upgrade type is `other`

### LodgingCartItem

Represents a lodging reservation item in a shopping cart. The reservation fields are flattened at the top level of the item.

- `reservationId` (string, required) — Hotel reservation id Example: X36Q9C
- `nights` (double, required) — The number of nights booked in the reservation Min value: 1 Example: 2
- `checkInDate` (string, required) — The check-in date Example: 2022-05-02
- `checkInHour` (string, required) — The hour of day in which the check-in is done Example: 18 Pattern: ^([01][0-9]|2[0-3])$
- `hotel` (TravelLodgingHotel, required) — The booked hotel details
- `wereExtrasPurchased` (boolean, required) — Indicates whether extras were purchased in the reservation
- `isRefundable` (boolean, required) — Indicates whether the reservation is refundable
- `highestRoomType` (string, required) — The most luxurious room booked in the reservation Example: Presidential Suite
- `numberOfRooms` (double, required) — The number of rooms booked in the reservation Min value: 1 Example: 2
- `numberOfGuests` (double, required) — The number of guests in the reservation Min value: 1 Example: 4
- `numberOfKids` (double, required) — The number of kids, out of the number of guests in the reservation Min value: 0 Example: 2
- `itemClass` (enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: lodging Example: lodging
  - Allowed values: `lodging`
- `sellingPrice` (CurrencyAmount, required) — Common currency amount structure
- `id` (string, optional) — The cart items's unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
- `rawProductData` (AnyObject, optional)
- `listPrice` (CurrencyAmount, optional) — Common currency amount structure
- `recipientInfo` (RecipientInfo, optional)

### CustomerUsdcTransferDataValidAfter

- string
- double

### CustomerUsdcTransferDataValidBefore

- string
- double

### CustomerUsdcTransferDataV2ValidAfter

- string
- double

### CustomerUsdcTransferDataV2ValidBefore

- string
- double

### RecipientAftInfo

- `firstName` (string, required)
- `lastName` (string, required)
- `address1` (string, required)
- `city` (string, required)
- `postalCode` (string, required)
- `countryCode` (string, required)
- `state` (string, optional)
- `dateOfBirth` (string, optional) — Recipients Date Of Birth in YYYMMDD format.
- `phoneNumber` (string, optional)
- `documentReference` (string, optional)

### LamportsAmountLamports

Amount of lamports. Must be a whole, non-negative number; as a string it may contain digits only (no sign, decimal point, or exponent).

- string
- integer

### SafeMintRedeem

(EVM only) If your contract mints an NFT via a OpenZeppelin Safe Mint Call, then utilize this object. The contract mints the NFT to msg.sender (which is the Coinflow contract), the Coinflow contract picks up the SafeMint event, and fwd's the NFT to the end user's wallet.

- `transaction` (SafeMintRedeemTransaction, required) — Transaction to be called.
- `type` (enum, required)
  - Allowed values: `safeMint`
- `waitForHash` (boolean, optional) — Whether the UI should wait for the transaction to be sent and the hash to be returned.
- `nftContract` (string, optional)

### ReturnedTokenIdRedeem

(EVM only) If your contract returns the NFT ID, then utilize this object. The contract mints the NFT to msg.sender (which is the Coinflow contract), the Coinflow contract picks up the returned NFT ID, and fwd's the NFT to the end user's wallet.

- `transaction` (ReturnedTokenIdRedeemTransaction, required) — Transaction to be called.
- `type` (enum, required)
  - Allowed values: `returned`
- `waitForHash` (boolean, optional) — Whether the UI should wait for the transaction to be sent and the hash to be returned.
- `nftContract` (string, optional)

### KnownTokenIdRedeem

(EVM only) If your know the ID of the NFT being purchased, then utilize this object. The contract transfers the NFT to msg.sender (which is the Coinflow contract), the Coinflow contract fwd's the NFT to the end user's wallet.

- `transaction` (KnownTokenIdRedeemTransaction, required) — Transaction to be called.
- `nftContract` (string, required) — The address of the Nft's Contract
- `nftId` (string, required) — The ID of the NFT being purchased. Will be forwarded by the Coinflow contract to the customer's wallet.
- `waitForHash` (boolean, optional) — Whether the UI should wait for the transaction to be sent and the hash to be returned.

### NormalRedeem

(EVM only) If your contract sends the item/service being purchased via a custom "receiver" field, then utilize this object. The coinflow contract calls the "to" contract, which transfers the NFT/item to the "receiver" address defined in the contract function arguments.

- `transaction` (NormalRedeemTransaction, required) — Transaction to be called.
- `waitForHash` (boolean, optional) — Whether the UI should wait for the transaction to be sent and the hash to be returned.

### TokenRedeem

- `type` (enum, required)
  - Allowed values: `token`
- `destination` (string, required)
- `waitForHash` (boolean, optional) — Whether the UI should wait for the transaction to be sent and the hash to be returned.

### DecentRedeem

If your contract exists on a chain supported by Decent, pass this object in order to call it.

- `type` (enum, required)
  - Allowed values: `decent`
- `dstChainId` (double, required) — ID of the destination chain you will be using Find your chain ID here: https://chainlist.org/
- `dstToken` (string, required) — Address on that chain of the token you will be receiving
- `contractAddress` (string, required) — The contract address which will be called on the destination chain
- `contractData` (string, required)
- `cost` (DecentRedeemCost, required) — Amount of the token on the destination chain you will be receiving
- `waitForHash` (boolean, optional) — Whether the UI should wait for the transaction to be sent and the hash to be returned.

### TokenSubtotalAmount

Number of tokens, from 0 to 1,000,000,000,000 inclusive. String values must be a plain decimal with at most 12 integer digits and 18 fractional digits.

- double
- string

### ApplePayPaymentTokenPaymentMethod

Information about the card used in the transaction.

- `network` (ApplePayPaymentTokenPaymentMethodNetwork, required) — A string, suitable for display, that is the name of the payment network backing the card.
- `displayName` (string, required) — A string, suitable for display, that describes the card.
- `type` (enum, optional) — A value representing the card's type of payment. Optional: Apple omits this field (or sends an empty string) for cards it does not classify, including some Amex corporate/commercial cards. Treat a missing value as unknown rather than assuming a funding type.
  - Allowed values: ``, `debit`, `credit`, `prepaid`, `store`

### ApplePayPaymentTokenPaymentData

An object containing the encrypted payment data.

- `version` (string, required)
- `header` (ApplePayPaymentTokenPaymentDataHeader, required)
- `signature` (string, required)
- `data` (string, required)

### PaymentData

- `onlinePaymentCryptogram` (string, required)
- `eciIndicator` (string, optional)

### CustomPayInFeeValue0

- `cents` (double, required)
- `currency` (enum, required)
  - Allowed values: `USD`, `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CHF`, `CLF`, `CLP`, `CNY`, `COP`, `CRC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `GBP`, `GEL`, `GHS`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MWK`, `MVR`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RWF`, `SAR`, `SCR`, `SDG`, `SEK`, `SGD`, `SLE`, `SLL`, `SOS`, `SRD`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWL`, `CDF`, `ERN`, `FKP`, `KPW`, `RUB`, `SBD`, `SHP`, `SSP`, `VES`
- `percent` (double, required, nullable)
- `isFixed` (boolean, required)

### CustomPayInFeeValue1

- `cents` (double, required, nullable)
- `currency` (double, required, nullable)
- `percent` (double, required)
- `isFixed` (boolean, required)

### PickNftCartItemExcludeKeyofnftCartItemSellingPriceOrItemClassListPrice

The item's list price

- `currency` (string, optional)
- `valueInCurrency` (double, optional)

### SellerInfo

- `id` (string, optional) — Id of the seller
- `email` (string, optional, nullable) — Email Example: lois.lane@dailyplanet.com
- `firstName` (string, optional) — First name Example: Lois
- `lastName` (string, optional) — Last name Example: Lois
- `dob` (string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0\[1-9]|1\[0-2])-(0\[1-9]|\[12]\[0-9]|3\[01]))?\$
- `rawSellerData` (Record_string.any_, optional) — Construct a type with a set of properties K of type T

### TransactionHistoryItem

- `txType` (string, required)
- `chain` (string, required)
- `paymentAmount` (string, required)
- `paymentToken` (string, required)
- `to` (string, required)
- `from` (string, required)
- `registryContract` (string, required)
- `assetID` (string, required)
- `txTime` (string, required)
- `blockNumber` (double, required)
- `txHash` (string, required)

### PickGiftCardCartItemExcludeKeyofGiftCardCartItemListPriceSellingPrice

- `currency` (string, required)
- `valueInCurrency` (double, required)

### Record_string.any_

Construct a type with a set of properties K of type T

### RecipientInfo

- `accountId` (string, optional) — The ID of the account that will receive the purchased goods
- `dob` (string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0\[1-9]|1\[0-2])-(0\[1-9]|\[12]\[0-9]|3\[01]))?\$
- `email` (string, optional, nullable) — Email Example: lois.lane@dailyplanet.com
- `firstName` (string, optional) — First name Example: Lois
- `gender` (string, optional) — Gender Example: female
- `lastName` (string, optional) — Last name Example: Lois
- `message` (string, optional) — The message that the recipient will receive
- `phoneInfo` (PhoneInfo, optional) — Phone information structure
- `shippingAddress` (CartItemAddress, optional) — Address structure
- `wallet` (RecipientInfoWallet, optional) — The crypto wallet that will receive the funds

### CryptoCartItemUnitPrice

The price per 1 unit

- `currency` (string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
- `valueInCurrency` (double, required) — The amount in the currency, which is specified in the `currency` property Example: 90

### CurrencyAmount

Common currency amount structure

- `valueInCurrency` (double, required) — The amount in the currency, which is specified in the `currency` property Example: 90
- `currency` (string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD

### TravelLodging

The lodging details of the travel booking

- `reservationId` (string, required) — Hotel reservation id Example: X36Q9C
- `nights` (double, required) — The number of nights booked in the reservation Min value: 1 Example: 2
- `checkInDate` (string, required) — The check-in date Example: 2022-05-02
- `checkInHour` (string, required) — The hour of day in which the check-in is done Example: 18 Pattern: ^([01][0-9]|2[0-3])$
- `hotel` (TravelLodgingHotel, required) — The booked hotel details
- `wereExtrasPurchased` (boolean, required) — Indicates whether extras were purchased in the reservation
- `isRefundable` (boolean, required) — Indicates whether the reservation is refundable
- `highestRoomType` (string, required) — The most luxurious room booked in the reservation Example: Presidential Suite
- `numberOfRooms` (double, required) — The number of rooms booked in the reservation Min value: 1 Example: 2
- `numberOfGuests` (double, required) — The number of guests in the reservation Min value: 1 Example: 4
- `numberOfKids` (double, required) — The number of kids, out of the number of guests in the reservation Min value: 0 Example: 2

### TravelTrip

The trip details of the travel booking

- `numberOfFlights` (double, required) — The number of flights in the trip Min value: 1 Example: 2
- `numberOfCheckedBags` (double, required) — The number of checked bags Min value: 0 Example: 1
- `firstWayDestination` (string, required) — The first-way destination's three-letter IATA airport code Example: JFK Pattern: ^\[A-Z]\$
- `isRoundTrip` (boolean, required) — `true` if the trip is a round-trip Example: true
- `highestClass` (enum, required) — `luxurious` if the highest bought travel class in the trip is a luxury class (business/first), `economy` otherwise Example: luxurious
  - Allowed values: `economy`, `luxurious`
- `isFlexibleTicket` (boolean, required) — True if the trip ticket is a flexible ticket Example: true
- `wereExtrasPurchased` (boolean, required) — True if extras were included in the trip purchase Example: true

### TravelFirstFlight

The first flight details of the trip

- `numberOfTravelers` (double, required) — The number of travelers in the first flight Min value: 1 Example: 2
- `departureTime` (double, required) — The timestamp of the departure, in *milliseconds* since the unix epoch Example: 1551398400000
- `departureAirport` (string, required) — The first-flight departure airport's three-letter IATA code Example: JFK Pattern: ^\[A-Z]\$
- `duration` (double, required) — The first-flight duration, in hours Min value: 0 Example: 3.5
- `flightNumber` (string, required) — The alphanumeric flight code Example: BA2491A Pattern: ^[A-Z0-9]+$

### TravelLodgingHotel

The booked hotel details

- `name` (string, required) — The name of the hotel Example: The Plaza Hotel
- `country` (string, required) — The two-letter code of the country in which the hotel is located Example: US Pattern: ^\[A-Z]\$
- `city` (string, required) — The city in which the hotel is located Example: New York

### SafeMintRedeemTransaction

Transaction to be called.

- `data` (string, required) — The data to call this contract with, HEX encoded. The coinflow contract calls the "to" contract, contract pulls USDC from msg.sender, and transfers the NFT/item to the "receiver" address defined in the contract function arguments.
- `to` (string, required) — The merchant's whitelisted contract

### ReturnedTokenIdRedeemTransaction

Transaction to be called.

- `data` (string, required) — The data to call this contract with, HEX encoded. The coinflow contract calls the "to" contract, contract pulls USDC from msg.sender, and transfers the NFT/item to the "receiver" address defined in the contract function arguments.
- `to` (string, required) — The merchant's whitelisted contract

### KnownTokenIdRedeemTransaction

Transaction to be called.

- `data` (string, required) — The data to call this contract with, HEX encoded. The coinflow contract calls the "to" contract, contract pulls USDC from msg.sender, and transfers the NFT/item to the "receiver" address defined in the contract function arguments.
- `to` (string, required) — The merchant's whitelisted contract

### NormalRedeemTransaction

Transaction to be called.

- `data` (string, required) — The data to call this contract with, HEX encoded. The coinflow contract calls the "to" contract, contract pulls USDC from msg.sender, and transfers the NFT/item to the "receiver" address defined in the contract function arguments.
- `to` (string, required) — The merchant's whitelisted contract

### DecentRedeemCost

Amount of the token on the destination chain you will be receiving

- `isNative` (boolean, required) — Whether or not the token is the native token for the chain (ex: Ethereum - ETH, Polygon - POL). If native dstToken should be the 0 address (0x00...)
- `amount` (string, required) — This is the raw amount of the token ex: 50000000000000n

### ApplePayPaymentTokenPaymentMethodNetwork

A string, suitable for display, that is the name of the payment network backing the card.

- string
- enum
  - Allowed values: `Visa`

### ApplePayPaymentTokenPaymentDataHeader

- `transactionId` (string, required)
- `ephemeralPublicKey` (string, required)
- `publicKeyHash` (string, required)

### PhoneInfo

Phone information structure

- `countryCode` (string, required) — The country code (leading `+` is optional) Example: 42 Pattern: ^\+?[0-9]+$
- `phone` (string, required) — The phone number without the country code or hyphens Example: 2025550169 Pattern: ^[0-9]+$
- `carrier` (string, optional) — The mobile carrier Example: T-Mobile

### CartItemAddress

Address structure

- `country` (string, optional) — Country code specified as a two letter code according to ISO 3166 Alpha-2 Between 2 and 2 characters Example: US Pattern: ^\[A-Z]\$
- `state` (string, optional) — The state or province Example: PA
- `city` (string, optional) — The city or locality Example: Pittsburgh
- `street` (string, optional) — The street name Example: Baker St
- `postalCode` (string, optional) — The address postal code

### RecipientInfoWallet

The crypto wallet that will receive the funds

- `custodialType` (enum, required) — The type of the wallet Allowed values: custodial, nonCustodial, unknown Example: custodial
  - Allowed values: `custodial`, `nonCustodial`, `unknown`
- `blockchain` (string, required) — The blockchain on which the transaction was made Example: BTC Pattern: ^[A-Z0-9-]+$
- `address` (string, required) — The crypto wallet address that will receive the funds

## Examples

**Request**

```json
{
  "subtotal": {
    "cents": 1,
    "currency": "USD"
  },
  "applePayPayment": {
    "token": {
      "transactionIdentifier": "string",
      "paymentMethod": {
        "network": "Visa",
        "displayName": "string"
      },
      "paymentData": {
        "version": "string",
        "header": {
          "transactionId": "string",
          "ephemeralPublicKey": "string",
          "publicKeyHash": "string"
        },
        "signature": "string",
        "data": "string"
      }
    },
    "billingContact": {
      "givenName": "string",
      "familyName": "string",
      "addressLines": [
        "string"
      ]
    }
  }
}
```

**Response**

```json
{
  "paymentId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api-sandbox.coinflow.cash/api/checkout/v2/apple-pay/merchantId"

payload = {
    "subtotal": {
        "cents": 1,
        "currency": "USD"
    },
    "applePayPayment": {
        "token": {
            "transactionIdentifier": "string",
            "paymentMethod": {
                "network": "Visa",
                "displayName": "string"
            },
            "paymentData": {
                "version": "string",
                "header": {
                    "transactionId": "string",
                    "ephemeralPublicKey": "string",
                    "publicKeyHash": "string"
                },
                "signature": "string",
                "data": "string"
            }
        },
        "billingContact": {
            "givenName": "string",
            "familyName": "string",
            "addressLines": ["string"]
        }
    }
}
headers = {
    "x-coinflow-auth-session-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api-sandbox.coinflow.cash/api/checkout/v2/apple-pay/merchantId';
const options = {
  method: 'POST',
  headers: {'x-coinflow-auth-session-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"subtotal":{"cents":1,"currency":"USD"},"applePayPayment":{"token":{"transactionIdentifier":"string","paymentMethod":{"network":"Visa","displayName":"string"},"paymentData":{"version":"string","header":{"transactionId":"string","ephemeralPublicKey":"string","publicKeyHash":"string"},"signature":"string","data":"string"}},"billingContact":{"givenName":"string","familyName":"string","addressLines":["string"]}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.coinflow.cash/api/checkout/v2/apple-pay/merchantId"

	payload := strings.NewReader("{\n  \"subtotal\": {\n    \"cents\": 1,\n    \"currency\": \"USD\"\n  },\n  \"applePayPayment\": {\n    \"token\": {\n      \"transactionIdentifier\": \"string\",\n      \"paymentMethod\": {\n        \"network\": \"Visa\",\n        \"displayName\": \"string\"\n      },\n      \"paymentData\": {\n        \"version\": \"string\",\n        \"header\": {\n          \"transactionId\": \"string\",\n          \"ephemeralPublicKey\": \"string\",\n          \"publicKeyHash\": \"string\"\n        },\n        \"signature\": \"string\",\n        \"data\": \"string\"\n      }\n    },\n    \"billingContact\": {\n      \"givenName\": \"string\",\n      \"familyName\": \"string\",\n      \"addressLines\": [\n        \"string\"\n      ]\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-coinflow-auth-session-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.coinflow.cash/api/checkout/v2/apple-pay/merchantId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-coinflow-auth-session-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"subtotal\": {\n    \"cents\": 1,\n    \"currency\": \"USD\"\n  },\n  \"applePayPayment\": {\n    \"token\": {\n      \"transactionIdentifier\": \"string\",\n      \"paymentMethod\": {\n        \"network\": \"Visa\",\n        \"displayName\": \"string\"\n      },\n      \"paymentData\": {\n        \"version\": \"string\",\n        \"header\": {\n          \"transactionId\": \"string\",\n          \"ephemeralPublicKey\": \"string\",\n          \"publicKeyHash\": \"string\"\n        },\n        \"signature\": \"string\",\n        \"data\": \"string\"\n      }\n    },\n    \"billingContact\": {\n      \"givenName\": \"string\",\n      \"familyName\": \"string\",\n      \"addressLines\": [\n        \"string\"\n      ]\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.coinflow.cash/api/checkout/v2/apple-pay/merchantId")
  .header("x-coinflow-auth-session-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"subtotal\": {\n    \"cents\": 1,\n    \"currency\": \"USD\"\n  },\n  \"applePayPayment\": {\n    \"token\": {\n      \"transactionIdentifier\": \"string\",\n      \"paymentMethod\": {\n        \"network\": \"Visa\",\n        \"displayName\": \"string\"\n      },\n      \"paymentData\": {\n        \"version\": \"string\",\n        \"header\": {\n          \"transactionId\": \"string\",\n          \"ephemeralPublicKey\": \"string\",\n          \"publicKeyHash\": \"string\"\n        },\n        \"signature\": \"string\",\n        \"data\": \"string\"\n      }\n    },\n    \"billingContact\": {\n      \"givenName\": \"string\",\n      \"familyName\": \"string\",\n      \"addressLines\": [\n        \"string\"\n      ]\n    }\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.coinflow.cash/api/checkout/v2/apple-pay/merchantId', [
  'body' => '{
  "subtotal": {
    "cents": 1,
    "currency": "USD"
  },
  "applePayPayment": {
    "token": {
      "transactionIdentifier": "string",
      "paymentMethod": {
        "network": "Visa",
        "displayName": "string"
      },
      "paymentData": {
        "version": "string",
        "header": {
          "transactionId": "string",
          "ephemeralPublicKey": "string",
          "publicKeyHash": "string"
        },
        "signature": "string",
        "data": "string"
      }
    },
    "billingContact": {
      "givenName": "string",
      "familyName": "string",
      "addressLines": [
        "string"
      ]
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-coinflow-auth-session-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api-sandbox.coinflow.cash/api/checkout/v2/apple-pay/merchantId");
var request = new RestRequest(Method.POST);
request.AddHeader("x-coinflow-auth-session-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"subtotal\": {\n    \"cents\": 1,\n    \"currency\": \"USD\"\n  },\n  \"applePayPayment\": {\n    \"token\": {\n      \"transactionIdentifier\": \"string\",\n      \"paymentMethod\": {\n        \"network\": \"Visa\",\n        \"displayName\": \"string\"\n      },\n      \"paymentData\": {\n        \"version\": \"string\",\n        \"header\": {\n          \"transactionId\": \"string\",\n          \"ephemeralPublicKey\": \"string\",\n          \"publicKeyHash\": \"string\"\n        },\n        \"signature\": \"string\",\n        \"data\": \"string\"\n      }\n    },\n    \"billingContact\": {\n      \"givenName\": \"string\",\n      \"familyName\": \"string\",\n      \"addressLines\": [\n        \"string\"\n      ]\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-coinflow-auth-session-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "subtotal": [
    "cents": 1,
    "currency": "USD"
  ],
  "applePayPayment": [
    "token": [
      "transactionIdentifier": "string",
      "paymentMethod": [
        "network": "Visa",
        "displayName": "string"
      ],
      "paymentData": [
        "version": "string",
        "header": [
          "transactionId": "string",
          "ephemeralPublicKey": "string",
          "publicKeyHash": "string"
        ],
        "signature": "string",
        "data": "string"
      ]
    ],
    "billingContact": [
      "givenName": "string",
      "familyName": "string",
      "addressLines": ["string"]
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/checkout/v2/apple-pay/merchantId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```