Shop Pay Installments - JSON

SmeadDev
Shopify Partner
49 2 14

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
49 2 14

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.