How to get the order_num or checkout id related to a payment id in a payment app

SeQura
Shopify Partner
10 0 3

Hi,

 

   I'm developing a payments app, to offer BNPL-like payment options in shopify.

 

   I've managed to complete the payment process but I can't see how to get either the order_num or the checkout id related to the payment.

 

   It is important in our case to have this information so that we can explain to the shopper what the shopper is paying for, in future installments.

 

   For partial return we would need it too so that we can know which items have been returned.

 

Any idea how to get it?

 

Thanks!

Seguimos trabajando en ser tu solución de pagos preferida 🙂 Cualquier cosa que necesites no dudes en contactarnos enviando un email a sat@sequra.es
¡Gracias por tu confianza!
El equipo de SeQura
Replies 3 (3)

EddieLuong
Shopify Partner
39 1 20

@SeQura Do you figure out the way to get it?

I have the same problem. Is there anyone can help? Thanks

SeQura
Shopify Partner
10 0 3

No, I didn't get a direct way to have it.
While I figure it out I've created a private app in the merchant with read_order scope. I use this access to query graphQL api for the order with the same checkout_token that we recieve at the payment endpoint, last part in the cancel url. From there I can get the order_num, checkout_id ....

With the order Id, I can get then using the REST Api all the order details.

Seguimos trabajando en ser tu solución de pagos preferida 🙂 Cualquier cosa que necesites no dudes en contactarnos enviando un email a sat@sequra.es
¡Gracias por tu confianza!
El equipo de SeQura
EddieLuong
Shopify Partner
39 1 20

Yes. Thanks for your sharing.

With checkout_token, i found out another way that no need to create a new private app.

We can use the webhook orders/create that would be called when an order is created and it would return checkout_token. So, we can map this to the one that we receive from cancel url.