Commerce API Webhook Fields and Events
Fields
Webhook fields are:
Field | Type | Description |
---|---|---|
id | number | Delivery attempt number |
scheduled_for | timestamp | Delivery schedule time |
event | hash | Corresponding event object |
Events
Availble webhook events are:
Event | Description |
---|---|
charge:created | New charge is created |
charge:confirmed | Charge has been confirmed and the associated payment is completed |
charge:failed | Charge failed to complete |
charge:delayed | Charge received a payment after it had been expired |
charge:pending | Charge has been detected but has not been confirmed yet |
charge:resolved | Charge has been resolved |
Example of a webhook payload
{
"id": 1,
"scheduled_for": "2017-01-31T20:50:02Z",
"event": {
"id": "24934862-d980-46cb-9402-43c81b0cdba6",
"resource": "event",
"type": "charge:created",
"api_version": "2018-03-22",
"created_at": "2017-01-31T20:49:02Z",
"data": {
"code": "66BEOV2A",
"name": "The Sovereign Individual",
"description": "Mastering the Transition to the Information Age",
"hosted_url": "https://commerce.coinbase.com/charges/66BEOV2A",
"created_at": "2017-01-31T20:49:02Z",
"expires_at": "2017-01-31T21:49:02Z",
"timeline": [
{
"time": "2017-01-31T20:49:02Z",
"status": "NEW"
}
],
"metadata": {},
"pricing_type": "no_price",
"payments": [],
"addresses": {
"bitcoin": "mymZkiXhQNd6VWWG7VGSVdDX9bKmviti3U",
"ethereum": "0x419f91df39951fd4e8acc8f1874b01c0c78ceba6"
}
}
}
}
See Also: