Order Webhook Payment info

Highlighted
Tourist
7 0 0

Hi guys,

 

I am trying to crate endpoint for the Orders Webhook, specially orders/paid topic. How can I get information about payment? In standard Order endpoint you get information about transactions (I suppose these are payment/balance transactions), however this field is missing in Webhook.

I would like to clarify the behaviour of this orders/paid topic. When I receive data for this topic, order is fully paid? There is no way to get order partially paid? So when order is $19.99 or 19.99EUR, I may consider this amount to be fully paid? And store particular amount (19.99) and currency ($ or EUR) in my system as "paid amount"?

Thanks!

0 Likes
Highlighted
Shopify Partner
520 38 109

If you look at the reference documentation, I believe the orders/paid webhook will pass a complete dataset out. There's a sample webhook response provided, which includes all of these fields --> https://shopify.dev/docs/admin-api/rest/reference/events/webhook

0 Likes
Highlighted
Tourist
7 0 0

Thanks Greg! Which field you think I should refer to? Payload of Webhook Orders/Paid does not contain transactions.

However, I see there another Event: OrderTransaction, topic: order_transactions/create, which may be what I am looking for.

 

There is lack of description what particular Event should stand for. Can someone from Shopify team confirm this is the way?

 

Thanks!

0 Likes
Highlighted
Shopify Partner
520 38 109

If you look at the API documentation (https://shopify.dev/docs/admin-api/rest/reference/events/webhook), there's a sample response. Shown below. This appears to correlate to a new order's payment transaction being collected. So I'd likely assume that this would contain what you are looking for. But like you said, having some confirmation from a Shopify staffer would seal the deal!

{
  "id": 120560818172775265,
  "order_id": 820982911946154508,
  "kind": "authorization",
  "gateway": "visa",
  "status": "success",
  "message": null,
  "created_at": "2020-07-29T19:03:38-04:00",
  "test": false,
  "authorization": "1001",
  "location_id": null,
  "user_id": null,
  "parent_id": null,
  "processed_at": null,
  "device_id": null,
  "receipt": {
  },
  "error_code": null,
  "source_name": "web",
  "amount": "403.00",
  "currency": null,
  "admin_graphql_api_id": "gid:\/\/shopify\/OrderTransaction\/120560818172775265",
  "payment_details": {
    "credit_card_bin": null,
    "avs_result_code": null,
    "cvv_result_code": null,
    "credit_card_number": "•••• •••• •••• 1234",
    "credit_card_company": "Visa"
  }
}

  

0 Likes