API Errors
The CDP API v2 uses conventional HTTP response codes to indicate the success or failure of an API request. In general:-
Codes in the
2xxrange indicate success -
Codes in the
4xxrange indicate an error that failed given the information provided (e.g., a required parameter was omitted) -
Codes in the
5xxrange indicate an error on CDP’s backend servers.5xxerrors are not a guarantee of failure; there’s always the chance that the operation may have succeeded in our back-end. Therefore, your application should treat the operation’s status as unknown.
errorType: A machine-readable error codeerrorMessage: A human-readable message providing more detailcorrelationId: A unique identifier for the request that can help with debuggingerrorLink: A link to detailed documentation about the specific error type
HTTP 400
Invalid request
This error occurs when the request is malformed or contains invalid data, including issues with the request body, query parameters, path parameters, or headers. Steps to resolve:- Check all required fields and parameters are present
- Ensure request body (if applicable) follows the correct schema
- Verify all parameter formats match the API specification:
- Query parameters
- Path parameters
- Request headers
- Validate any addresses, IDs, or other formatted strings meet requirements
- Missing required parameters
- Invalid parameter types or formats
- Malformed JSON in request body
- Invalid enum values
Transfer-specific validation errors
The following transfer validation scenarios returnerrorType: "invalid_request". Use the errorMessage field to identify the specific case.
Example 1:
Unsupported tos language
A submitted Terms of Service acceptance used alanguage that is not published for the referenced versionId.
Steps to resolve:
- Read
Customer.requirements.tos.tosVersions[]and find the entry whoseversionIdmatches your acceptance. - Choose a
languagefrom that entry’slanguageslist (BCP 47 tags). - Retry with
tosAcceptances[].languageset to a supported tag.
Mandate expired
This error occurs when the mandate is past itsexpiresAt and can no longer be used.
Authorization, approve a mandate, and get wallet approval options return this error.
Steps to resolve:
- Create a new mandate if the customer should continue
- Do not retry the request against the expired mandate
Malformed transaction
This error occurs when the transaction data provided is not properly formatted or is invalid. Steps to resolve:- Verify transaction encoding:
- EVM networks: Check RLP encoding is correct
- Solana: Validate base64 encoding
- Ensure all required transaction fields are present
- Validate transaction parameters are within acceptable ranges
- Check that the transaction type is supported on the target network
- Invalid hex encoding for EVM transactions
- Missing required transaction fields
- Incorrect parameter formats
- Unsupported transaction types
- Network-specific transaction format mismatches
Invalid signature
This error occurs when the signature provided for the given user operation is invalid. Steps to resolve:- Verify the signature was generated by the correct owner account
- Ensure the signature corresponds to the exact user operation hash
- Check that the signature format matches the expected format
- Confirm you’re using the correct network for the Smart Account
- Using wrong owner account to sign
- Signing modified/incorrect user operation data
- Malformed signature encoding
- Network mismatch between signature and broadcast
Policy in use
This error occurs when trying to delete a Policy that is currently in use by at least one project or account. Steps to resolve:- Update project or accounts to remove references to the Policy in question.
- Retry your delete request.
Invalid sql query
This error occurs when the SQL query is invalid or not allowed. Common causes:- Using non-SELECT SQL statements (INSERT, UPDATE, DELETE, etc.)
- Invalid table or column names
- Syntax errors in SQL query
- Query exceeds character limit
- Too many JOIN operations
Invalid webhook url
The webhook target URL did not pass scheme, host, address, or endpoint checks. Steps to resolve:- Verify
target.urluses HTTPS and responds to HEAD requests with a 200. - Confirm the endpoint is reachable and responds without a server error, then retry.
Invalid webhook headers
One or more custom webhook target headers have invalid names or values, duplicate names with different capitalization, or names reserved for delivery metadata and HTTP routing. Steps to resolve:- Check
target.headersfor invalid names, values, and case-insensitive duplicates. - Remove blocked headers such as
Cookie,Host, andX-Webhook-*, then retry.
Incompatible event types
TheeventTypes in a webhook subscription belong to different scopes that cannot be combined in a single subscription.
Steps to resolve:
- Group
eventTypesby compatible label requirements. - Create a separate webhook subscription for each group.
Subscription limit exceeded
The project or entity has reached the maximum number of webhook subscriptions allowed (100). Steps to resolve:- Delete any webhook subscriptions that are no longer needed.
- Retry creating the subscription.
Unknown
Example 1:Otp verification code invalid
This error occurs when the OTP code submitted to complete a verification is incorrect or has expired (the 10-minute OTP window has elapsed). Steps to resolve:- Ask the user to re-enter the code.
- If the OTP window has expired, start a new verification flow.
Otp verification invalid
This error occurs when the verification record exists but is not in a usable state for the requested operation. Common causes:- The verification is still pending (OTP not yet submitted successfully).
- The verification has been revoked.
- The verification channel does not match the expected field (
smsVerificationIdoremailVerificationId).
- Complete a new verification flow and retry.
Network not tradable
This error occurs when the selected asset cannot be purchased on the selected network in the user’s location. Steps to resolve:- Verify the asset is tradable on the selected network
- Check the user’s location to ensure it is allowed to purchase the asset on the selected network
- Users in NY are not allowed to purchase USDC on any network other than Ethereum
Guest permission denied
This error occurs when the user is not allowed to complete onramp transactions as a guest. Steps to resolve:- Redirect the user to create a Coinbase account to buy and send crypto.
Guest region forbidden
This error occurs when guest onramp transactions are not allowed in the user’s region. Steps to resolve:- Redirect the user to create a Coinbase account to buy and send crypto.
Phone number verification expired
This error occurs when the user’s phone number verification has expired. Use of guest Onramp requires the user’s phone number to be verified every 60 days. Steps to resolve:- Re-verify the user’s phone number via OTP.
- Retry the request with the phoneNumberVerifiedAt field set to new verification timestamp.
Otp verification expired
ThesmsVerificationId or emailVerificationId provided has expired.
Verification IDs are valid for 60 days after successful OTP submission.
Steps to resolve:
- Complete a new verification flow for the user.
- Use the new verification ID when creating orders.
Otp verification required
An SMS or email verification ID is required on order creation but none was provided. Steps to resolve:- Verify the user’s phone number and email before creating an order.
- Pass the returned verification IDs as
smsVerificationIdandemailVerificationIdwhen creating orders.
Otp verification destination mismatch
ThephoneNumber or email on the order does not match the destination that was verified.
Steps to resolve:
- Ensure the
phoneNumberoremailfield on the order matches thedestinationused during verification. - If the value changed, complete a new verification for the updated phone number or email.
HTTP 401
Unauthorized
This error occurs when authentication fails. Steps to resolve:- Verify your CDP API credentials:
- Check that your API key is valid
- Check that your Wallet Secret is properly configured
- Validate JWT token:
- Not expired
- Properly signed
- Contains required claims
- Check request headers:
- Authorization header present
- X-Wallet-Auth header included when required
HTTP 402
Payment required
This error occurs when an x402 payment is required to access the requested resource. Steps to resolve:- Include a valid x402 payment header in your request
- Ensure the payment meets the resource’s pricing requirements
Payment method required
This error occurs when a payment method is required to complete the requested operation but none is configured or available. Steps to resolve:- Add a valid payment method to your account using the CDP Portal
- Ensure your payment method is valid and not expired
- No payment method configured on the account
- Payment method is expired
HTTP 403
Customer not authorized
This error occurs when the customer is not currently authorized for one or more capabilities required to perform the requested action. This can happen at any point in the customer’s lifecycle and may or may not be resolvable by the developer. The response includes anunauthorizedCapabilities field listing the
capability code(s) that were not authorized on this request.
Steps to resolve:
- Fetch the customer with
GET /v2/customers/{customerId}and inspect therequirementsfield. Ifrequirements.dueis non-empty, submit the listed fields viaPUT /v2/customers/{customerId}and retry. - If
requirements.dueis empty, no further action is available — the customer is not currently eligible for this action.
Forbidden
This error occurs when you don’t have permission to access the resource. Steps to resolve:- Verify your permissions to access the resource
- Ensure that you are the owner of the requested resource
Entity not configured for top up
This error occurs when Top-Up is disabled for the entity or required Top-Up configuration is missing or invalid. Steps to resolve:- Contact support or your Coinbase representative to enable Top-Up or correct the entity’s Top-Up configuration
Delegation not found
This error occurs when a delegated signing operation is attempted but no active delegation grant exists for the end user (or account). Steps to resolve:- Create a delegation grant using
createDelegationForEndUser(user-scoped) orcreateDelegationForEndUserAccount(account-scoped) before calling the signing or sending operation - If you previously created a grant, it may have expired or been revoked —
in those cases you would receive a
delegation_expiredordelegation_revokederror instead - For account-scoped grants, verify the address in the request matches the granted address (EVM addresses are compared case-insensitively; Solana addresses must match exactly)
Delegation expired
This error occurs when the delegation grant used for signing has expired. Delegation grants have a limited lifetime set at creation. Steps to resolve:- Create a new delegation grant using
createDelegationForEndUserorcreateDelegationForEndUserAccount - Retry the signing operation with the new grant active
- Consider creating grants with a longer TTL if expiry is frequent
Delegation revoked
This error occurs when the delegation grant has been explicitly revoked. Steps to resolve:- Create a new delegation grant using
createDelegationForEndUserorcreateDelegationForEndUserAccount - Confirm with the end user before recreating, since revocation is typically intentional
Delegation not authorized
This error occurs when a delegation grant exists but does not authorize the requested operation. Steps to resolve:- For account-scoped grants, verify the signing address matches the address the grant was created for
- Check that the operation is permitted for delegated signing on your project
- Create a grant with the correct scope if needed
Delegation not enabled
This error occurs when delegated signing is attempted on a project that has not enabled the feature. Steps to resolve:- Enable delegated signing in your project configuration via the CDP Portal
- Contact support if you believe delegated signing should already be enabled for your project
HTTP 404
Not found
This error occurs when the resource specified in your request doesn’t exist or you don’t have access to it. Steps to resolve:- Verify the resource ID/address/account exists
- Check your permissions to access the resource
- Ensure you’re using the correct network/environment
- Confirm the resource hasn’t been deleted
- Mistyped addresses
- Accessing resources from the wrong CDP project
- Resource was deleted or hasn’t been created yet
Otp verification not found
The provided SMS or email verification ID does not correspond to any verification record. Steps to resolve:- Ensure you are passing the correct verification ID as
smsVerificationIdoremailVerificationId. - If the issue persists, complete a new verification flow.
HTTP 408
Timed out
This error occurs when a request exceeds the maximum allowed processing time. Steps to resolve:- Break down large requests into smaller chunks (if applicable)
- Implement retry logic with exponential backoff
- Use streaming endpoints for large data sets
HTTP 409
Account not ready
This error occurs when an operation is attempted on an account that is still being provisioned. Steps to resolve:- Wait a few moments and retry the request
- If the error persists, the account may still be completing setup — retry with exponential backoff
Mandate action pending
This error occurs when an approval or revocation is already in progress for the mandate. Get wallet approval options, approve a mandate, get wallet revocation options, revoke a mandate, and authorize a payment session with a mandate all return this while an action is in flight. Steps to resolve:- Wait for the in-flight approval or revocation to succeed or fail
- Check the mandate
status, then retry the request
Already exists
This error occurs when trying to create a resource that already exists. Steps to resolve:- Check if the resource exists before creation
- Use GET endpoints to verify resource state
- Use unique identifiers/names for resources
HTTP 422
Idempotency error
This error occurs when an idempotency key is reused with different parameters. Steps to resolve:- Generate a new UUID v4 for each unique request
- Only reuse idempotency keys for exact request duplicates
- Track used keys within your application
Payment session already authorized
This error occurs when attempting to authorize a payment session that has already been authorized. Steps to resolve:- Check the payment session status — it is already authorized
- Proceed to capture, void, or other post-authorization actions as needed
Mandate invalid status
This error occurs when the mandate’s status does not satisfy the operation, and a more specific code does not apply.errorMessage names the status the
operation expected.
Check the specific codes first: mandate_canceled, mandate_revoked,
mandate_expired, and mandate_action_pending.
Approve a mandate and get wallet approval options require created or
approval_failed after those checks. approval_succeeded,
revocation_failed, and any other remaining status return this. Authorize a
payment session requires approval_succeeded.
Revoke a mandate and get wallet revocation options return this when
approvedAt was never set, so no spending allowance exists. That is separate
from mandate_revoked, which applies only after revokedAt is set.
Steps to resolve:
- Read
errorMessagefor the status this operation requires - Move the mandate to that status, or create a new mandate
Mandate canceled
This error occurs whencanceledAt is set. Authorization, approve a mandate,
and get wallet approval options return this. If revokedAt is also set, those
operations return mandate_revoked instead.
Steps to resolve:
- Create a new mandate if the customer should continue
- Do not retry the request against the canceled mandate
Mandate revoked
This error occurs when the mandate’s on-chain spending allowance has been removed (revokedAt is set, status revocation_succeeded).
Authorization, approve a mandate, and get wallet approval options return this
when revokedAt is set, including when canceledAt is also set. Get wallet
revocation options and revoke a mandate also return this when the allowance
was already removed. Cancel a mandate returns this: a fully revoked mandate
cannot be canceled. Canceling an already-canceled mandate is a no-op and
returns the mandate.
Steps to resolve:
- Create a new mandate if the customer should continue
- Do not retry the request against the revoked mandate
Mandate policy violation
This error occurs only when the request breaches the mandate policy: the charge exceedsmaxPerAuthorization or maxPerPeriod, or an approval is rejected
because the payer’s available balance is below minSetupBalance.
Steps to resolve:
- Lower the charge, raise the mandate policy, or fund the payer above
minSetupBalance - Retry the request
Invalid request
This error occurs when the request is malformed or contains invalid data, including issues with the request body, query parameters, path parameters, or headers. Steps to resolve:- Check all required fields and parameters are present
- Ensure request body (if applicable) follows the correct schema
- Verify all parameter formats match the API specification:
- Query parameters
- Path parameters
- Request headers
- Validate any addresses, IDs, or other formatted strings meet requirements
- Missing required parameters
- Invalid parameter types or formats
- Malformed JSON in request body
- Invalid enum values
Transfer-specific validation errors
The following transfer validation scenarios returnerrorType: "invalid_request". Use the errorMessage field to identify the specific case.
Example 1:
HTTP 429
Rate limit exceeded
This error occurs when you’ve exceeded the API rate limits. Steps to resolve:- Implement exponential backoff
- Cache responses where possible
- Wait for rate limit window to reset
Faucet limit exceeded
This error occurs when you’ve exceeded the faucet request limits. Steps to resolve:- Wait for the time window to reset
- Use funds more efficiently in your testing
Guest transaction limit
This error occurs when the user has reached the weekly guest onramp transaction limit. Steps to resolve:- Inform the user they have reached their weekly limit and will have to wait until next week.
Guest transaction count
This error occurs when the user has reached the lifetime guest onramp transaction count limit. Steps to resolve:- Redirect the user to create a Coinbase account to buy and send crypto.
HTTP 499
Client closed request
This error occurs when the client closes the connection before the server can send a response. Common causes:- The client timed out waiting for the server response
- The client application was terminated during a pending request
- Network interruption caused the client connection to drop
- Increase client-side timeout settings if applicable
- Implement retry logic with exponential backoff for long-running queries
- Consider optimizing the request to reduce server processing time
HTTP 500
Internal server error
This indicates an unexpected error that occurred on the CDP servers. Important: If you encounter this error, please note that your operation’s status should be treated as unknown by your application, as it could have been a success within the CDP back-end. Steps to resolve:- Retry your request after a short delay
- If persistent, contact CDP support with:
- Your correlation ID
- Timestamp of the error
- Request details
- Consider implementing retry logic with an exponential backoff
HTTP 502
Bad gateway
This error occurs when the CDP API is unable to connect to the backend service. Steps to resolve:- Retry your request after a short delay
- If persistent, contact CDP support with:
- The timestamp of the error
- Request details
- Consider implementing retry logic with an exponential backoff
HTTP 503
Service unavailable
This error occurs when the CDP API is temporarily unable to handle requests due to maintenance or high load. Steps to resolve:- Retry your request after a short delay
- If persistent, contact CDP support with:
- The timestamp of the error
- Request details
- Consider implementing retry logic with an exponential backoff
Endpoint unavailable
This error occurs when a specific endpoint has been temporarily disabled by an operator (e.g. a kill switch). The CDP API as a whole is still healthy; only this endpoint is unavailable. Distinct fromservice_unavailable, which indicates the API itself is down.
Re-enabling is a manual operator action, so the endpoint may remain unavailable for an extended period.
Steps to resolve:
- Check the CDP status page for an active incident.
- If persistent, contact CDP support with:
- The timestamp of the error
- Request details
HTTP 504
Timed out
This error occurs when a request exceeds the maximum allowed processing time. Steps to resolve:- Break down large requests into smaller chunks (if applicable)
- Implement retry logic with exponential backoff
- Use streaming endpoints for large data sets
Network Errors
Network errors occur when there is a problem establishing or maintaining a connection to the CDP API at the network layer. These errors are distinct from API service errors - they indicate that your request never reached the CDP API or was blocked before it could be processed.Understanding Network Errors
When you encounter a network error via the CDP SDK, you’ll receive aNetworkError object with:
statusCode: Always 0 (indicating no HTTP response was received)errorType: Specific type of network errorerrorMessage: Human-readable descriptionnetworkDetails: Additional information including:code: Technical error codemessage: Original error messageretryable: Whether the operation should be retried
Types of Network Errors
1. IP Blocked (network_ip_blocked)
Your IP address has been blocked at the gateway level.
Common causes:
- Geographic restrictions.
- Rate limiting at infrastructure level.
- Security policies or DDoS protection.
- Corporate firewall/proxy restrictions.
- Verify you’re not accessing from a restricted region.
- Check if you’re behind a VPN or proxy that might be blocked.
- Contact CDP support on Discord if you believe this is in error.
- This error is not retryable.
2. Connection Failed (network_connection_failed)
Unable to establish a connection to the CDP API.
Common causes:
- CDP API is temporarily unavailable. Check the CDP Status Page for any ongoing issues.
- Network connectivity issues.
- Firewall blocking outbound HTTPS connections.
- Incorrect API endpoint configuration.
- Check your internet connection.
- Verify firewall settings allow HTTPS traffic to
api.cdp.coinbase.com. - Ensure you’re using the correct API endpoint.
- This error is retryable. Retry the request with exponential backoff.
3. Timeout (network_timeout)
The request took too long and was terminated.
Common causes:
- Network congestion.
- Slow internet connection.
- Increase timeout settings if consistently timing out.
- This error is retryable. Retry the request with exponential backoff.
4. DNS Failure (network_dns_failure)
Unable to resolve the CDP API domain name.
Common causes:
- DNS configuration issues.
- Network connectivity problems.
- DNS server unavailable.
- Incorrect API endpoint URL.
- Check your DNS settings.
- Verify network connectivity with
nslookup api.cdp.coinbase.com. - Try using a different DNS server (e.g., 8.8.8.8).
- Ensure the API URL is correct.
- This error is not retryable until DNS is fixed.
Handling Network Errors in Code
Best Practices
- Implement Retry Logic: For retryable errors, use exponential backoff:
- Log Network Errors: Always log network errors with full details for debugging.
- Monitor Patterns: Track network errors to identify patterns (time of day, specific operations, etc.).
- Have Fallback Strategies: Consider implementing fallback mechanisms for critical operations.
Troubleshooting Checklist
- Verify internet connectivity.
- Check if you’re behind a proxy or VPN.
- Ensure firewall allows HTTPS traffic to
api.cdp.coinbase.com. - Verify you’re not in a restricted geographic region.
- Check DNS resolution:
nslookup api.cdp.coinbase.com. - Test with
curlor similar:curl -I https://api.cdp.coinbase.com/platform. - Check if the issue is consistent or intermittent.
Getting Help
If you continue to experience network errors after following this guide:-
Collect error details including:
- Full error message and type.
- Network details from the error.
- Time and frequency of occurrence.
- Your network configuration (proxy, VPN, region).
- Contact CDP support on Discord with this information.
- Check the CDP Status Page for any ongoing issues.