Call the API
Render the Apple Pay button
Listen to events and update transaction status
Error Code | Description |
---|---|
ERROR_CODE_INIT | The payment link is no longer valid, call the Create Onramp Order endpoint to create a new one. |
ERROR_CODE_GUEST_APPLE_PAY_NOT_SUPPORTED | The user’s browser or device does not support Apple Pay. |
ERROR_CODE_GUEST_APPLE_PAY_NOT_SETUP | The user has not set up Apple Pay on their device. Prompt the user to setup Apple Pay then try again. |
Error Code | Description |
---|---|
ERROR_CODE_GUEST_CARD_SOFT_DECLINED | The user was declined by the bank. Please contact your bank or try again with a different debit card. Users attempting to use Apple Cash will also get this error, but we cannot distinguish it from other bank decline cases. |
ERROR_CODE_GUEST_INVALID_CARD | Invalid card or billing address. |
ERROR_CODE_GUEST_CARD_INSUFFICIENT_BALANCE | The debit card has an insufficient balance to process the transaction. |
ERROR_CODE_GUEST_CARD_HARD_DECLINED | The transaction was declined by the issuing bank of the card. |
ERROR_CODE_GUEST_CARD_RISK_DECLINED | The transaction was flagged by our risk rules and is unable to proceed. |
ERROR_CODE_GUEST_REGION_MISMATCH | The region the user is located in is not supported. |
ERROR_CODE_GUEST_PERMISSION_DENIED | The user has been blocked from using onramp. |
ERROR_CODE_GUEST_CARD_PREPAID_DECLINED | The user tried to pay with a prepaid debit card, which is unsupported. |
ERROR_CODE_GUEST_TRANSACTION_LIMIT | This transaction would exceed the user’s weekly transaction limit. |
ERROR_CODE_GUEST_TRANSACTION_COUNT | This transaction would exceed the user’s lifetime transaction count limit (currently 15). |
onramp_api.commit_success
message, the webview will poll our transaction status API automatically and report success or failure via the following two events.Error Code | Description |
---|---|
ERROR_CODE_GUEST_TRANSACTION_BUY_FAILED | We were unable to complete the crypto purchase, likely due to a failed risk check. The user’s card will not be charged. |
ERROR_CODE_GUEST_TRANSACTION_SEND_FAILED | We were unable to send the funds to the user’s destination address, the user’s card will be refunded. |
ERROR_CODE_GUEST_TRANSACTION_TRANSACTION_FAILED | An internal error has occurred in Coinbase services, the Onramp team will be automatically notified to investigate. |
ERROR_CODE_GUEST_TRANSACTION_AVS_VALIDATION_FAILED | We were unable to process the transaction due to failure to validate the user’s billing address. Ask the user to verify their billing address with the bank card. The user’s card will not be charged. |
partnerUserRef
parameter in your call to the Create Onramp Order API
with the string sandbox-
. Doing so will result in your Apple Pay transaction always succeeding, but your debit card will never be charged.