---
title: "Sign x402 payment via end user Solana account"
method: POST
path: "/v2/embedded-wallet-api/end-users/{userId}/solana/sign/x402-payment"
tags: ["End User Accounts"]
---

# Sign x402 payment via end user Solana account

`POST /v2/embedded-wallet-api/end-users/{userId}/solana/sign/x402-payment`

## Request

- Base URL: `https://api.cdp.coinbase.com/platform`
- URL: `https://api.cdp.coinbase.com/platform/v2/embedded-wallet-api/end-users/{userId}/solana/sign/x402-payment`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Signs an x402 payment payload using the end user's given Solana account.
Accepts the full x402 payment required response body from a resource server plus an index into the accepts array selecting which payment option to sign. The paymentRequired envelope's x402Version, resource, and extensions are carried through into the signed payment payload; only the selected accept entry becomes paymentPayload.accepted.
Returns a signed payment payload that can be base64-encoded and sent in the PAYMENT-SIGNATURE header of the resource request.
If acceptsIndex is out of range for paymentRequired.accepts, or the selected accept is not a Solana network payment option, the request fails with 422.

## Path parameters

- `userId` string, required

## Query parameters

- `projectID` string

## Headers

- `X-Wallet-Auth` string
- `X-Idempotency-Key` string
- `X-Developer-Auth` string

## Request body

- object
  - `paymentRequired` X402PaymentRequired, required: The complete x402 payment required response body from the resource server. Top-level fields (x402Version, resource, error, extensions) are preserved in the signed payment payload; acceptsIndex selects which entry from accepts is signed as paymentPayload.accepted.
    - `x402Version` 1 | 2, required: The x402 protocol version.
    - `accepts` X402PaymentRequirements[], required: The list of payment options the resource server accepts. At least one option must be present.
      - union: The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.
        - intersection
          - [`X402V2PaymentRequirements`](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57/schema?at=%2Fcomponents%2Fschemas%2Fx402V2PaymentRequirements)
        - intersection
          - [`X402V1PaymentRequirements`](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57/schema?at=%2Fcomponents%2Fschemas%2Fx402V1PaymentRequirements)
    - `resource` X402ResourceInfo: Optional metadata about the resource being paid for.
      - `url` string: The URL of the resource.
      - `description` string: A human-readable description of the resource.
      - `mimeType` string: The MIME type of the resource response.
    - `error` string: An optional error message from the resource server describing why payment is required.
    - `extensions` object: Optional protocol extensions. Unknown keys are forwarded as-is into the signed payment payload.
  - `acceptsIndex` integer, required: Zero-based index into paymentRequired.accepts selecting which payment option to sign. Must be less than the length of accepts. The entry at this index must be a Solana network payment option for this endpoint.
  - `address` string, required: The base58 encoded address of the end user's Solana account to sign with.
  - `walletSecretId` string: Required when not using delegated signing. The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.

## Response `200`

Successfully signed x402 payment payload.

- object
  - `paymentPayload` union, required: The signed x402 payment payload. Base64-encode this and send it in the PAYMENT-SIGNATURE header of the resource request.
    - intersection
      - [`X402V2PaymentPayload`](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57/schema?at=%2Fcomponents%2Fschemas%2Fx402V2PaymentPayload)
    - intersection
      - [`X402V1PaymentPayload`](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57/schema?at=%2Fcomponents%2Fschemas%2Fx402V1PaymentPayload)

## Other responses

- `400`: Invalid request.
- `401`: Unauthorized.
- `402`: A payment method is required to complete this operation.
- `403`: The request was rejected due to a delegation issue. The errorType field indicates the specific reason.
- `404`: Solana account not found.
- `409`: The resource already exists.
- `422`: Semantically invalid request. The idempotency key was reused with a different payload, acceptsIndex is out of range for paymentRequired.accepts, or the selected accept is not a Solana network payment option.
- `500`: Internal server error.
- `502`: Bad gateway.
- `503`: Service unavailable.

## Changes

- **2026-12-01** `06cb41a4fb57`: 10 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 `401`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `402`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `403`
  - …6 more
- **2026-10-16** `ff3c1fdef902`: 11 warning, 1 info
  - added the new `eip155:143` enum value to the `paymentPayload/allOf[#/components/schemas/x402PaymentPayload]/oneOf[subschema #1: x402V2PaymentPayload]/accepted/network/allOf[#/components/schemas/X402V2Network]/` response property for the response status `200`
  - 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 `401`
  - added the new `entity_not_configured_for_top_up` enum value to the `errorType` response property for the response status `402`
  - …8 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/changes/v2/embedded-wallet-api/end-users/:userId/solana/sign/x402-payment/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)
