I am experiencing an issue with how to set webhook in coinbase commerce API to receive updates about my accounts’ different situations on my server. also, how can I check the charge status which is created? I know that the charge status is one of the following
New
Pending
Completed
Expired
Unresolved
Resolved
Cancelled
Pending Refund
Refunded
but I do not know how to check it through api,
Or is it good to check through the timeline?
Coinbase Commerce sends webhook events whenever a charge is created, confirmed, or fails. To subscribe to Webhooks, please follow below steps:
Navigate to your Settings page within Coinbase Commerce.
Add an endpoint to the Webhook subscriptions section.
Click Add an endpoint to add the URL where you’d like to receive webhooks.
You will be prompted to enter the endpoint URL (https only) where you would like to receive Webhooks. You can choose to be notified of all events or only the subset you care about. For more details refer to the document here: Using Commerce API Webhooks | Coinbase Cloud
To your query on how to check the charge status - Once a charge, or request for payment, is created, Coinbase starts monitoring these unique addresses on the respective networks to detect any inbound payments. Each charge has an associated payment status.