Payment Sessions

Capture a payment session

Changed on

Captures authorized funds. The session must have a positive capturable balance and the captureExpiresAt deadline must not have passed.

This is an asynchronous operation. The capture is returned in pending status and transitions to succeeded or failed.

Multiple partial captures are allowed. If amount is omitted, the full remaining capturable amount is captured.

post/v2/payment-sessions/{paymentSessionId}/captures

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP bearer

Path parameters

paymentSessionId, string required

The ID of the payment session, a UUID prefixed by paymentSession_.

Example:paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad

The unique identifier of the payment session.

Headers

X-Idempotency-Key, string

An optional string request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our Idempotency docs for more information on using idempotency keys.

Request body

CreateCaptureRequest required

A request to create a capture for a payment session.

amount, string

A decimal representation of the amount to capture, denominated in the session's asset. If omitted, the full remaining capturable amount is captured.

finalCapture, boolean required

When true, this capture is treated as the final one for the authorization. Any remaining capturable balance is released back to the payer immediately after the capture settles. When false, the remaining capturable balance stays held and is available for subsequent partial captures (subject to captureExpiresAt). Has no effect if amount equals the full capturable balance, since no remaining balance exists to release.

metadata, Metadata

Optional metadata as key-value pairs. Use this to store additional structured information on a resource, such as customer IDs, order references, or any application-specific data. Up to 10 key/value pairs may be provided. Keys and values are both strings. Keys must be ≤ 40 characters; values must be ≤ 500 characters.

externalReferenceId, string

An optional merchant-provided internal identifier for this manual capture, from the merchant's own system—not visible to the payer.

customerDisplay, OperationCustomerDisplay

Optional customer-facing display data for this manual capture, shown to the payer. Falls back to the session's orderCode when referenceCode is omitted.

Example request

{
  "amount": "1.00",
  "finalCapture": true
}

Response

Successfully created capture.

Capture required

A collection of authorized funds. Multiple partial captures are allowed up to the authorized amount. Each capture settles funds to the merchant's target.

captureId, string

The unique identifier of the capture.

paymentSessionId, string

The ID of the payment session this capture belongs to.

status, 'pending' | 'succeeded' | 'failed'

The current status of the capture.

amount, string

A decimal representation of the captured amount, denominated in the session's asset.

finalCapture, boolean required

When true, this capture is treated as the final one for the authorization. Any remaining capturable balance is released back to the payer immediately after the capture settles. When false, the remaining capturable balance stays held and is available for subsequent partial captures (subject to captureExpiresAt). Has no effect if amount equals the full capturable balance, since no remaining balance exists to release.

error, PaymentError

An error that occurred during a payment operation.

metadata, Metadata

Optional metadata as key-value pairs. Use this to store additional structured information on a resource, such as customer IDs, order references, or any application-specific data. Up to 10 key/value pairs may be provided. Keys and values are both strings. Keys must be ≤ 40 characters; values must be ≤ 500 characters.

externalReferenceId, string

A merchant-provided internal identifier for this capture, from the merchant's own system—not visible to the payer. A manual capture uses the caller-provided value; an auto-capture reuses the authorization's value and omits it when the authorization omitted it. It never falls back to PaymentSession.externalReferenceId.

customerDisplay, OperationCustomerDisplay

Customer-facing display data for this capture, shown to the payer. A manual capture falls back to the session's orderCode when referenceCode is omitted; an auto-capture reuses the authorization's referenceCode.

onchainTransactions, OnchainTransaction[]

The onchain transactions associated with this capture.

createdAt, string date-time

The UTC ISO 8601 timestamp at which the capture was created.

updatedAt, string date-time

The UTC ISO 8601 timestamp at which the capture was last updated.

Example response

{
  "captureId": "capture_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
  "paymentSessionId": "paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
  "status": "succeeded",
  "amount": "1.00",
  "finalCapture": true,
  "onchainTransactions": [
    {
      "transactionHash": "0xdef456abc789012345678901234567890abcdef1234567890abcdef12345678",
      "network": "base"
    }
  ],
  "metadata": {
    "customer_id": "cust_12345"
  },
  "createdAt": "2025-06-15T12:20:00.000Z",
  "updatedAt": "2025-06-15T12:21:00.000Z"
}

Changes

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    3 more changes in this revision