Skip to content

Instantly share code, notes, and snippets.

@jamesmorgan
Created February 19, 2018 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmorgan/552346299879aeee900a3d10d5a36f0b to your computer and use it in GitHub Desktop.
Save jamesmorgan/552346299879aeee900a3d10d5a36f0b to your computer and use it in GitHub Desktop.
example coinbase commerce product purchase webhook payload
{
"attempt_number": 5,
"event": {
"created_at": "2018-02-16T08:50:20Z",
"data": {
"id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "Test",
"status": "NEW",
"pricing": {
"BCH": {
"price": {
"amount": "0.00023605",
"currency": "BCH"
},
"exchange_rate": "1059.110421625297517851071064264"
},
"BTC": {
"price": {
"amount": "0.00003552",
"currency": "BTC"
},
"exchange_rate": "7038.772951377082624957497449847"
},
"ETH": {
"price": {
"amount": "0.000381000",
"currency": "ETH"
},
"exchange_rate": "655.577042955910687974611810042"
},
"LTC": {
"price": {
"amount": "0.00163393",
"currency": "LTC"
},
"exchange_rate": "153.005638671653632551286410518"
}
},
"product": {
"id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"resource": "product",
"resource_path": "/products/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
},
"donation": false,
"logo_url": "https://res.cloudinary.com/commerce/image/upload/v1518701466/uhfjucbumndwylffc0qc.png",
"metadata": {
"name": "Jimmy",
"email": "test@test.com"
},
"resource": "charge",
"created_at": "2018-02-16T08:50:20Z",
"expires_at": "2018-02-16T09:05:20Z",
"order_code": "ABCDEG123",
"description": "test",
"local_price": {
"amount": "0.25",
"currency": "GBP"
},
"confirmed_at": null,
"failure_body": null,
"failure_title": null,
"resource_path": "/charges/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"failure_reason": null,
"payment_receivers": [
{
"id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"address": "0x12343526789547896548965",
"currency": "ETH",
"payments": []
},
{
"id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"address": "1212jh21gb3jh1g2j1g2jh1gj12hg1j2",
"currency": "BTC",
"payments": []
},
{
"id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"address": "asmdnasdasjkdhkajshdakjshdkashdakjshdaks",
"currency": "BCH",
"payments": []
},
{
"id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"address": "asdlkajsldkjasldjalsdkjalsdjalk",
"currency": "LTC",
"payments": []
}
],
"shopify_redirect_url": null,
"third_party_provider": null,
"primary_payment_value": null,
"local_primary_payment_value": null
},
"id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"resource": "event",
"resource_path": "/events/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "charge:created"
},
"id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"resource": "webhook-delivery",
"resource_path": "/webhook-deliveries/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"scheduled_for": "2018-02-16T08:55:04Z",
"webhook_subscriber": {
"id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"resource": "webhook-subscriber",
"resource_path": "/webhook-subscribers/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment