v1

latestOpenAPI 3.0.02026-08-0696238481.7 KB
Payments

Manually capture a payment session

Call this endpoint to capture funds you have previously authorized on a payment session. You can only call this endpoint when the payment session is in status Approved and its captureFlow value is Manual.

post/payment-sessions/{paymentSessionId}/captures

Path parameters

paymentSessionIdstring required
Example:ps_01FCTS1XMKH9FF43CAFA4CXT3P

Payment Id to update

Headers

Accountstring
Example:ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327

The linked accountId (use this when operating on payments related to a linked account)

Request body

amountinteger nullable

The amount to capture in minor digits. This must be <= to the amount already authorised on the payment. If you don't supply this then we will capture the full amount. Note: typically any remainder will be reversed/refunded to the customer on the same day, however not all acquirers support this and will instead return the remainder once the initial authorization has expired (e.g. after 7 days).

captureType'Final' | 'NotFinal' nullable

The type of capture. Typically only used for payments that support multi-capture. Once Final, any remaining uncaptured amount will be marked as void within 7 days. Note that if your account or the chosen payment does not support multi-capture then this field will be ignored.

platformFeeinteger nullable

The amount (if any) that will be taken and applied to the platform account. This cannot be greater than the amount to capture. Supply this if you also are supplying the "Account" header and want to take a fee from that account as part of this capture. If not supplied this defaults to the platformFee used when creating the payment session (if any) but still cannot be greater than the amount to capture here.

Example request

{
  "amount": 500,
  "captureType": "Final",
  "platformFee": 50,
  "splits": {
    "items": [
      {
        "accountId": "ac_b83f2653-06d7-44a9-a548-5825e8186004",
        "amount": 50,
        "description": "2 x The Selfish Gene",
        "fee": {
          "amount": 50
        },
        "metadata": {
          "productId": "123",
          "productTitle": "The Selfish Gene"
        }
      }
    ]
  },
  "settings": {
    "platform": {
      "paymentFees": {
        "interchange": {
          "bookTo": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"
        },
        "network": {
          "bookTo": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"
        },
        "miscPassThrough": {
          "bookTo": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327"
        }
      }
    }
  }
}

Response

Capture request successfully accepted (Pending / Succeeded / Failed). If the status is Pending then the transaction will be completed asynchronously. Listen to the PaymentSession.captured event on your webhook to be notified of the outcome.

idstring

The unique identifier for the transaction

paymentSessionIdstring

The unique paymentSessionId that this transaction relates to

amountinteger

The amount of the transaction in minor digits

currencystring

The ISO currency code

type'Authorization' | 'Void' | 'Capture' | 'Refund' | 'Chargeback' | 'ChargebackReversal'
status'Pending' | 'Failed' | 'Succeeded'
refundedAmountinteger nullable

The amount of the transaction that has been refunded, in minor digits.

platformFeeinteger nullable

Only supplied for 'capture' transactions. The amount of the capture that will be taken and applied to the platform account, in minor digits.

platformFeeRefundedAmountinteger nullable

Only supplied for 'capture' transactions. The amount of the capture that has been refunded to the platform account, in minor digits.

processingFeeinteger nullable

This field is now deprecated. Please use the /balance-transactions endpoint to see the fees paid on these transactions.

The processing fee that was taken for this transaction.

reasonstring nullable

An optional reason to describe this transaction. Typically used for refunds whereby the reason for the refund is recorded.

captureType'Final' | 'NotFinal' nullable

Only supplied for 'capture' transactions. The type of capture. Typically only used for payments that support multi-capture. Once Final, any remaining uncaptured amount will be marked as void within 7 days.

createdTimestampinteger

The epoch timestamp (seconds) when the transaction was initiated

lastUpdatedTimestampinteger

The epoch timestamp (seconds) when the transaction was last updated

Example response

{
  "id": "txn_01FCTS1XMKH9FF43CAFA4CXT3P_01FCTS1XMKH9FF43CAFA4CXT3P",
  "paymentSessionId": "ps_01FCTS1XMKH9FF43CAFA4CXT3P",
  "amount": 250,
  "currency": "GBP",
  "type": "Capture",
  "status": "Succeeded",
  "refundedAmount": 50,
  "platformFee": 50,
  "platformFeeRefundedAmount": 50,
  "processingFee": 7,
  "reason": "Requested by the customer",
  "captureType": "Final",
  "paymentMethod": {
    "type": "Card",
    "tokenizedDetails": {
      "id": "pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ",
      "stored": true
    },
    "card": {
      "scheme": "Mastercard",
      "last4": "4242",
      "binDetails": {
        "issuer": "Ryft Bank Ltd",
        "issuerCountry": "GB",
        "fundingType": "Debit",
        "productType": "Consumer"
      }
    },
    "wallet": {
      "type": "ApplePay"
    },
    "billingAddress": {
      "firstName": "Nathan",
      "lastName": "Jones",
      "lineOne": "123 Test Street",
      "lineTwo": "456 Lane",
      "city": "Manchester",
      "country": "GB",
      "postalCode": "SP4 7DE",
      "region": "NY"
    },
    "checks": {
      "avsResponseCode": "Y",
      "cvvResponseCode": "M"
    }
  },
  "splitPaymentDetail": {
    "items": [
      {
        "id": "sp_01FCTS1XMKH9FF43CAFA4CXT3P",
        "accountId": "ac_b83f2653-06d7-44a9-a548-5825e8186004",
        "amount": 50,
        "fee": {
          "amount": 50
        },
        "description": "2 x The Selfish Gene",
        "metadata": {
          "productId": "123",
          "productDescription": "The Selfish Gene"
        }
      }
    ]
  },
  "processingDetail": {
    "issuerResponseCode": "00",
    "authorizationCode": "123456",
    "acquirerReferenceNumber": "12093810928309123"
  },
  "inPersonDetail": {
    "terminalDetail": {
      "id": "tml_01FCTS1XMKH9FF43CAFA4CXT3P"
    }
  },
  "createdTimestamp": 1470989538,
  "lastUpdatedTimestamp": 1470989538
}