Create a payment session
Changed onCreates a payment session that defines what is being paid — amount, asset, and target. Optionally configure execution behavior, expiry deadlines, redirect URLs, and metadata.
If expiry deadlines are omitted, sensible defaults are applied (1 day for authorization, 7 days for capture, 30 days for refund). Expiries must be in ascending order — see the expiries object for details and constraints.
Returns the session in created status. Next step: call one of the authorization endpoints (wallet or Coinbase) to authorize the payment.
Request
- Base URL: https://api.cdp.coinbase.com/platform
- URL: https://api.cdp.coinbase.com/platform/v2/payment-sessions
- Auth: HTTP bearer
Headers
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
Example request
{
"amount": "1.00",
"asset": "usd",
"target": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"network": "base"
},
"expiries": {
"authorizationExpiresAt": "2025-12-31T23:59:59.000Z",
"captureExpiresAt": "2026-01-15T23:59:59.000Z",
"refundExpiresAt": "2026-02-15T23:59:59.000Z"
},
"redirect": {
"failureUrl": "https://merchant.example.com/payment/failed",
"successUrl": "https://merchant.example.com/payment/success"
},
"externalReferenceId": "merchant-order-abc123",
"customerDisplay": {
"merchantName": "Acme Store",
"displayAmount": {
"amount": "1.37",
"currency": "cad"
}
},
"metadata": {
"customer_id": "cust_12345",
"order_reference": "order-67890"
},
"compliance": {
"buyer": {
"name": "John Doe",
"address": {
"line1": "123 Market St",
"city": "San Francisco",
"state": "CA",
"postCode": "94105",
"countryCode": "US"
}
}
}
}Response
Successfully created payment session.
Example response
{
"paymentSessionId": "paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"entityId": "entity_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"amount": "1.00",
"asset": "usdc",
"target": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"network": "base"
},
"autoCapture": false,
"expiries": {
"authorizationExpiresAt": "2025-12-31T23:59:59.000Z",
"captureExpiresAt": "2026-01-15T23:59:59.000Z",
"refundExpiresAt": "2026-02-15T23:59:59.000Z"
},
"status": "created",
"balances": {
"capturable": "0",
"captured": "0",
"refundable": "0",
"refunded": "0"
},
"url": "https://payments.coinbase.com/payment-sessions/paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"x402Url": "https://api.cdp.coinbase.com/platform/v2/payment-sessions/paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad/authorizations/x402",
"redirect": {
"failureUrl": "https://merchant.example.com/payment/failed",
"successUrl": "https://merchant.example.com/payment/success"
},
"customerDisplay": {
"merchantName": "Acme Store",
"displayAmount": {
"amount": "1.37",
"currency": "cad"
}
},
"externalReferenceId": "merchant-order-abc123",
"metadata": {
"customer_id": "cust_12345",
"order_reference": "order-67890"
},
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:05:00.000Z"
}Changes
- warning
added the new
incompatible_event_typesenum value to theresponse property for the response status - warning
added the new
incompatible_event_typesenum value to theresponse property for the response status - warning
added the new
incompatible_event_typesenum value to theresponse property for the response status - warning
added the new
incompatible_event_typesenum value to theresponse property for the response status - warning
added the new
incompatible_event_typesenum value to theresponse property for the response status - warning
added the new
invalid_webhook_headersenum value to theresponse property for the response status - warning
added the new
invalid_webhook_headersenum value to theresponse property for the response status - warning
added the new
invalid_webhook_headersenum value to theresponse property for the response status - warning
added the new
invalid_webhook_headersenum value to theresponse property for the response status - warning
added the new
invalid_webhook_headersenum value to theresponse property for the response status - warning
added the new
invalid_webhook_urlenum value to theresponse property for the response status - warning
added the new
invalid_webhook_urlenum value to theresponse property for the response status - warning
added the new
invalid_webhook_urlenum value to theresponse property for the response status - warning
added the new
invalid_webhook_urlenum value to theresponse property for the response status - warning
added the new
invalid_webhook_urlenum value to theresponse property for the response status - warning
added the new
mandate_action_pendingenum value to theresponse property for the response status - warning
added the new
mandate_action_pendingenum value to theresponse property for the response status - warning
added the new
mandate_action_pendingenum value to theresponse property for the response status - warning
added the new
mandate_action_pendingenum value to theresponse property for the response status - warning
added the new
mandate_action_pendingenum value to theresponse property for the response status - warning
added the new
mandate_canceledenum value to theresponse property for the response status - warning
added the new
mandate_canceledenum value to theresponse property for the response status - warning
added the new
mandate_canceledenum value to theresponse property for the response status - warning
added the new
mandate_canceledenum value to theresponse property for the response status - warning
added the new
mandate_canceledenum value to theresponse property for the response status - warning
added the new
mandate_expiredenum value to theresponse property for the response status - warning
added the new
mandate_expiredenum value to theresponse property for the response status - warning
added the new
mandate_expiredenum value to theresponse property for the response status - warning
added the new
mandate_expiredenum value to theresponse property for the response status - warning
added the new
mandate_expiredenum value to theresponse property for the response status - warning
added the new
mandate_invalid_statusenum value to theresponse property for the response status - warning
added the new
mandate_invalid_statusenum value to theresponse property for the response status - warning
added the new
mandate_invalid_statusenum value to theresponse property for the response status - warning
added the new
mandate_invalid_statusenum value to theresponse property for the response status - warning
added the new
mandate_invalid_statusenum value to theresponse property for the response status - warning
added the new
mandate_policy_violationenum value to theresponse property for the response status - warning
added the new
mandate_policy_violationenum value to theresponse property for the response status - warning
added the new
mandate_policy_violationenum value to theresponse property for the response status - warning
added the new
mandate_policy_violationenum value to theresponse property for the response status - warning
added the new
mandate_policy_violationenum value to theresponse property for the response status - warning
added the new
mandate_revokedenum value to theresponse property for the response status - warning
added the new
mandate_revokedenum value to theresponse property for the response status - warning
added the new
mandate_revokedenum value to theresponse property for the response status - warning
added the new
mandate_revokedenum value to theresponse property for the response status - warning
added the new
mandate_revokedenum value to theresponse property for the response status - warning
added the new
solanaenum value to the////////response property for the response status - warning
added the new
solanaenum value to the////////////response property for the response status - warning
added the new
solanaenum value to the////////response property for the response status - warning
added the new
solanaenum value to the////////response property for the response status - warning
added the new
solanaenum value to the//////////response property for the response status - warning
added the new
solanaenum value to the////////response property for the response status - warning
added the new
solana-devnetenum value to the////////response property for the response status - warning
added the new
solana-devnetenum value to the////////////response property for the response status - warning
added the new
solana-devnetenum value to the////////response property for the response status - warning
added the new
solana-devnetenum value to the////////response property for the response status - warning
added the new
solana-devnetenum value to the//////////response property for the response status - warning
added the new
solana-devnetenum value to the////////response property for the response status - warning
added the new
subscription_limit_exceededenum value to theresponse property for the response status - warning
added the new
subscription_limit_exceededenum value to theresponse property for the response status - warning
added the new
subscription_limit_exceededenum value to theresponse property for the response status - warning
added the new
subscription_limit_exceededenum value to theresponse property for the response status - warning
added the new
subscription_limit_exceededenum value to theresponse property for the response status
- warning
- warning
added the new
mfa_challenge_not_foundenum value to theresponse property for the response status - warning
added the new
mfa_challenge_not_foundenum value to theresponse property for the response status - warning
added the new
mfa_challenge_not_foundenum value to theresponse property for the response status - warning
added the new
mfa_challenge_not_foundenum value to theresponse property for the response status - warning
added the new
mfa_challenge_not_foundenum value to theresponse property for the response status - warning
added the new
operation_in_progressenum value to theresponse property for the response status - warning
added the new
operation_in_progressenum value to theresponse property for the response status - warning
added the new
operation_in_progressenum value to theresponse property for the response status - warning
added the new
operation_in_progressenum value to theresponse property for the response status - warning
added the new
operation_in_progressenum value to theresponse property for the response status
- warning