---
title: "Void a payment session"
method: POST
path: "/v2/payment-sessions/{paymentSessionId}/voids"
tags: ["Payment Sessions"]
---

# Void a payment session

`POST /v2/payment-sessions/{paymentSessionId}/voids`

## Request

- Base URL: `https://api.cdp.coinbase.com/platform`
- URL: `https://api.cdp.coinbase.com/platform/v2/payment-sessions/{paymentSessionId}/voids`
- Auth: HTTP bearer

Releases all remaining capturable funds back to the payer. The session must have a positive `capturable` balance.

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

After voiding, no further captures can be made. Unlike **Cancel**, which works before authorization, void works after authorization.

## Path parameters

- `paymentSessionId` string, required: The ID of the payment session, a UUID prefixed by `paymentSession_`.

## Headers

- `X-Idempotency-Key` string

## Request body

- CreateVoidRequest: A request to create a void for a payment session. A void releases all remaining capturable funds back to the payer, including after partial refunds as long as a capturableAmount remains.
  - `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 void, from the merchant's own system—not visible to the payer.
  - `customerDisplay` OperationCustomerDisplay: Optional customer-facing display data for this void, shown to the payer. Falls back to the session's `orderCode` when `referenceCode` is omitted.
    - `referenceCode` string: A short customer-facing reference code for this payment operation.

## Response `200`

Successfully created void.

- Void: A release of uncaptured authorized funds back to the payer. Voids release all remaining capturable funds in a single operation, including after partial refunds as long as a capturableAmount remains.
  - `voidId` string: The unique identifier of the void.
  - `paymentSessionId` string: The ID of the payment session this void belongs to.
  - `status` 'pending' | 'succeeded' | 'failed': The current status of the void.
  - `amount` string: A decimal representation of the voided amount, denominated in the session's `asset`.
  - `error` PaymentError: An error that occurred during a payment operation.
    - `code` string: A machine-readable error code.
    - `message` string: A human-readable description of the error.
    - `occurredAt` string, date-time: The UTC ISO 8601 timestamp at which the error occurred.
  - `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 void, from the merchant's own system—not visible to the payer. Present only when supplied on the create void request.
  - `customerDisplay` OperationCustomerDisplay: Customer-facing display data for this void, shown to the payer. Present when supplied on the create void request or when the session's `orderCode` fallback applies; otherwise omitted.
    - `referenceCode` string: A short customer-facing reference code for this payment operation.
  - `onchainTransactions` OnchainTransaction[]: The onchain transactions associated with this void.
    - `transactionHash` string, required: The blockchain transaction hash.
    - `network` 'arbitrum' | 'arbitrum-sepolia' | 'avalanche' | 'base' | 'base-sepolia' | 'ethereum' | 'ethereum-sepolia' | 'optimism' | 'optimism-sepolia' | 'polygon' | 'polygon-amoy' | 'solana' | 'solana-devnet', required: The blockchain network the transaction occurred on.
  - `createdAt` string, date-time: The UTC ISO 8601 timestamp at which the void was created.
  - `updatedAt` string, date-time: The UTC ISO 8601 timestamp at which the void was last updated.

## Other responses

- `400`: Invalid request.
- `404`: Payment session not found.
- `422`: Idempotency key conflict.
- `500`: Internal server error.
- `502`: Bad gateway.
- `503`: Service unavailable.

## Changes

- **2026-12-01** `06cb41a4fb57`: 6 warning
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `400`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `404`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `422`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `500`
  - …2 more
- **2026-10-16** `ff3c1fdef902`: 6 warning
  - added the new `entity_not_configured_for_top_up` enum value to the `errorType` response property for the response status `400`
  - added the new `entity_not_configured_for_top_up` enum value to the `errorType` response property for the response status `404`
  - added the new `entity_not_configured_for_top_up` enum value to the `errorType` response property for the response status `422`
  - added the new `entity_not_configured_for_top_up` enum value to the `errorType` response property for the response status `500`
  - …2 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/changes/v2/payment-sessions/:paymentSessionId/voids/post.md)

---

[API](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis.md) - [All operations](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57?raw)
