Reputation: 61
receive a payment by API and check if it has already been paid or not, from coinbase commerce,
I already consume the coinbase commerce API I only need to check if it has been paid or not from my client side. I just need to check if the transaction has been completed successfully or if it has failed
Upvotes: 0
Views: 472
Reputation: 875
I recommend you use the webhooks to trigger a request back to your server. These webhooks can be configured to run on any successful payment, and you can create an endpoint on your server to check whether the payment has been completed and process it accordingly.
The flow could be as shown below:
This is an example as to how you could safely check that a payment is completed.
Upvotes: 0