Hello
I am in the process of migrating merchatns from my old HPSDK to the new payment app, as per Shopify request.
After migration, when merchant queries order using Order API they are missing many fields.
Here is a new payment app request sample:
{
"transactions": [
{
"id": 5469825925308,
"order_id": 4441294635196,
"kind": "authorization",
"gateway": "AZUL",
"status": "success",
"message": null,
"created_at": "2022-07-16T01:27:51-04:00",
"test": false,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2022-07-16T01:27:51-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {
"payment_id": "nVstiNotYjU7atS9hVZqoOkuG"
},
"amount": "1.01",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/5469825925308"
},
{
"id": 5477225169084,
"order_id": 4441294635196,
"kind": "capture",
"gateway": "AZUL",
"status": "success",
"message": null,
"created_at": "2022-07-21T17:40:44-04:00",
"test": false,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 5469825925308,
"processed_at": "2022-07-21T17:40:44-04:00",
"device_id": null,
"error_code": null,
"source_name": "1830279",
"receipt": {
"capture_id": "043L5lGOJ-u2T_DOzl8PuT_F"
},
"amount": "1.01",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/5477225169084"
}
]
}
And here is an old sample:
{
"transactions": [
{
"id": 3402328768665,
"order_id": 2765947109529,
"kind": "authorization",
"gateway": "azul",
"status": "success",
"message": "Completed",
"created_at": "2020-09-23T13:37:15-04:00",
"test": false,
"authorization": "389267-10718542-00-541547******6113",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2020-09-23T13:37:15-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {
"x_account_id": "39034870014",
"x_amount": "1.17",
"x_currency": "DOP",
"x_gateway_reference": "389267-10718542-00-541547******6113",
"x_reference": "14846586519705",
"x_result": "completed",
"x_test": "false",
"x_timestamp": "2020-09-23T17:37:13.8830857-04:00",
"x_transaction_type": "authorization",
"x_signature": "d33687e8ed0df2d506618f3fdb9a8a12d9d674bb43d8239582e919db68f8c83c"
},
"amount": "1.17",
"currency": "DOP",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/3402328768665"
},
{
"id": 3402330341529,
"order_id": 2765947109529,
"kind": "capture",
"gateway": "azul",
"status": "error",
"message": "Failed to execute capture on the gateway",
"created_at": "2020-09-23T13:37:54-04:00",
"test": false,
"authorization": "389267-10718542-00-541547******6113",
"location_id": null,
"user_id": null,
"parent_id": 3402328768665,
"processed_at": "2020-09-23T13:37:54-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"amount": "1.17",
"currency": "DOP",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/3402330341529"
},
{
"id": 5459978256572,
"order_id": 2765947109529,
"kind": "capture",
"gateway": "azul",
"status": "pending",
"message": "Transaction pending",
"created_at": "2022-07-08T11:00:10-04:00",
"test": false,
"authorization": "389267-10718542-00-541547******6113",
"location_id": null,
"user_id": null,
"parent_id": 3402328768665,
"processed_at": "2022-07-08T11:00:10-04:00",
"device_id": null,
"error_code": null,
"source_name": "1830279",
"receipt": {},
"amount": "1.17",
"currency": "DOP",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/5459978256572"
},
{
"id": 5459978748092,
"order_id": 2765947109529,
"kind": "capture",
"gateway": "azul",
"status": "failure",
"message": null,
"created_at": "2022-07-08T11:00:17-04:00",
"test": false,
"authorization": "389267-10718542-00-541547******6113",
"location_id": null,
"user_id": null,
"parent_id": 5459978256572,
"processed_at": "2022-07-08T11:00:17-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {
"x_account_id": "39034870014",
"x_reference": "5459978256572",
"x_currency": "DOP",
"x_test": "false",
"x_amount": "1.17",
"x_result": "failed",
"x_shopify_order_id": "2765947109529",
"x_transaction_type": "capture",
"x_gateway_reference": "389267-10718542-00-541547******6113",
"x_timestamp": "2022-07-08T15:00:06.8933957-04:00",
"x_signature": "96c351bf2a3b585ccdbcb2357877932124819e39234d5ce7ba71ab7727f5772b"
},
"amount": "1.17",
"currency": "DOP",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/5459978748092"
}
]
}
Please note that on the old requests the field receipt has “gateway_reference” which contains info that we send on the payment app/gatewat and also the field AUTHORIZATION which has the same value.
on the new requests, using orders on the payment app, the receipt field only has one field within it and the authorization field is empy.
Maybe there is some missing mapping between payment apps processes orders and these api.
the api used by mercant is this one, url is just a sample:
azul-pruebas.myshopify.com/admin/api/2022-10/orders/4441294635196.json