What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shop Pay Installments - JSON

Shop Pay Installments - JSON

SmeadDev
Shopify Partner
51 2 15

When a customer pays for an order using the Shop Pay Installments option, the Transactions JSON segment has a significantly different structure than with orders without this payment option.

 

For example, the Order-->Transactions-->Receipt JSON structure looks completely different between order types. For Shop Pay, it looks like this:

 

"receipt": {
"created": "2022-03-02T19:37:00Z",
"fee_refunded": 129,
"currency": "USD",
"amount": 2195,
"reference_id": "1234567",
"type": "refund",
"id": "ABCDEFGHIJKL119"
},

 

This is the pattern I am seeing with these types of orders, so I could be mistaken.

 

If this is the case, why are these segments so different? This makes it unnecessarily difficult if we have to watch for the payment gateway type and deserialize the JSON into a completely different object type.

Reply 1 (1)

SmeadDev
Shopify Partner
51 2 15

In addition, I also see the order_adjustments segment under the refund JSON empty for Shop Pay orders but not for regular orders.

 

Any insight into the reasoning and/or other JSON differences between these two order types would be appreciated.