---
title: "Capture Payment"
method: POST
path: "/checkout/capture"
tags: ["checkout"]
---

# Capture Payment

`POST /checkout/capture`

If a payment has been created with authOnly=true, capture it using this endpoint.

## Headers

- `Authorization` string, required

## Request body

- CapturePaymentRequest — From T, pick a set of properties whose keys are in the union K
  - `paymentId` string, required — The ID of the payment that was created.
  - `subtotal` union, required
    - CurrencyCents
      - `cents` integer, required
      - `currency` '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', required
    - Cents
      - `cents` integer, required
    - TokenSubtotal
      - `address` string, required — The tokens address Solana - Token Mint Address Evm - Token Contract Address
      - `amount` union, required — Number of tokens
        - number, double
        - string
      - `decimals` number, double — Number of decimals for the token
  - `rent` CapturePaymentRequestRent — (Solana only) if your transaction requires a known amount of Rent to be paid, you can pass it here.
    - `lamports` union, required
      - string
      - number, double
  - `transactionData` union — (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 — (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.
      - `waitForHash` boolean — Whether the UI should wait for the transaction to be sent and the hash to be returned.
      - `transaction` SafeMintRedeemTransaction, required — 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
      - `type` 'safeMint', required
      - `nftContract` string
    - 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.
      - `waitForHash` boolean — Whether the UI should wait for the transaction to be sent and the hash to be returned.
      - `transaction` ReturnedTokenIdRedeemTransaction, required — 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
      - `type` 'returned', required
      - `nftContract` string
    - 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.
      - `waitForHash` boolean — Whether the UI should wait for the transaction to be sent and the hash to be returned.
      - `transaction` KnownTokenIdRedeemTransaction, required — 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
      - `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.
    - 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.
      - `waitForHash` boolean — Whether the UI should wait for the transaction to be sent and the hash to be returned.
      - `transaction` NormalRedeemTransaction, required — 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
    - TokenRedeem
      - `waitForHash` boolean — Whether the UI should wait for the transaction to be sent and the hash to be returned.
      - `type` 'token', required
      - `destination` string, required
    - DecentRedeem — If your contract exists on a chain supported by Decent, pass this object in order to call it.
      - `waitForHash` boolean — Whether the UI should wait for the transaction to be sent and the hash to be returned.
      - `type` 'decent', required
      - `dstChainId` number, 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
        - `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

## Response `200`

Ok

- CheckoutCapturePaymentResponse200
  - `jobId` union, required
    - number, double
    - string

---

[API](https://skmtc.net/coinflow/apis/api-reference.md) · [All operations](https://skmtc.net/coinflow/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coinflow/api-reference/revisions/3f6a046fbb34/schema)
