CoinBase Commerce, add check for expired payment requests
J
Joshua Artman
If a Coinbase payment is approved or declined Coinbase sends an update back to Cart and the payment gets updated in Cart, but if the customer never gets around to completing the payment, the payment state in Cart indefinitely stays at Pending.
It seems like Cart should check back with the CoinBase Commerce API after a certain amount of time for an updated status, rather than just indefinitely staying in a pending state.
Here is the info from the Coinbase docs about checking the status using the order code returned when the request is made: https://docs.cdp.coinbase.com/commerce-onchain/reference/returns-the-charge-with-the-order-code
You can check the timeline variable in the response for an "EXPIRED" event. Example JSON of expired order: https://api.commerce.coinbase.com/charges/8766HKAC
Log In