I’m trying to integrate Coinbase Commerce API for crypto payment in a project. The API documentation is not complete enough for the complexity of the charge response data considering its behavior along the status updates. For example, timeline status value format is not informed as well as the format of the data within the payments array which makes the transaction flow harder to understand and therefore to integrate in the code. There is also a problem that Coinbase Commerce API does not have a sandbox to test transactions which makes it even even worse.
Assuming the following scenario:
- User starts a purchase in the store in a value of 1000 USD
- The store retrieves the hosted_url to the user
- The user makes a payment of 400 USD
- Later, the user makes a payment of 800 USD (total of 1200 USD)
- And then for some reason he makes a payment of 1000 USD (total of 2200 USD)
If I, the programmer, make a request to show the charge response how would the response JSON value look like?
And if in the period between the charge creation and the payment, the charge value in crypto currency fluctuates, how can I know in the response the original crypto value expected?
Thanks in advance.