Hello, I am facing an issue wherein I am not unable to get a Payment ID through Shopify's GET Transaction API
GET API: https://{{store-name}}.myshopify.com/admin/api/2020-10/orders/5021064200357/transactions.json
Response:
{
"transactions": [
{
"id": 5930788323493,
"order_id": 5021064200357,
"kind": "sale",
"gateway": "Razorpay",
"status": "success",
"message": null,
"created_at": "2023-03-16T00:37:37+05:30",
"test": false,
"authorization": "order_LRuRageikTISbl|pay_LRuSN6BTqivghg",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2023-03-16T00:37:37+05:30",
"device_id": null,
"error_code": null,
"source_name": "3579543553",
"receipt": {},
"amount": "1257.75",
"currency": "INR",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/5930788323493"
}
]
}
If we see here, the payment gateway used here is Razorpay, however, still, the Payment_id which exists in the receipt key is null or empty. Now If I try to call the same API with another order, I do get Payment_id in the response.
Response:
{
"transactions": [
{
"id": 5930770661541,
"order_id": 5021050601637,
"kind": "sale",
"gateway": "Razorpay Secure",
"status": "success",
"message": null,
"created_at": "2023-03-16T00:23:16+05:30",
"test": false,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2023-03-16T00:23:16+05:30",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {
"payment_id": "nIMwivjebHvn8L8lwX83H9mJz"
},
"amount": "1166.75",
"currency": "INR",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/5930770661541"
}
]
}
Here if we see the payment gateway is the same but still in one order we are getting payment_id but in another order we are not getting any payment_id, can anyone please explain why this is happening?