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.

How can I get paymentId?

How can I get paymentId?

CreoDev
Visitor
1 0 0

Hi,

I was working on Polling for checkout completion with the weburl. For this, the API accepts paymentId. But it's not available. How can I fetch the payment id?

Reply 1 (1)

Moira
Shopify Staff (Retired)
2118 231 343

Hey @CreoDev 

You would need to use Payment API in order to retrieve this data:

For example, 'GET /admin/api/2021-10/checkouts/{token}/payments/{payment_id}.json' would retrieve a single payment. 

Transactions API 

For example, `GET /admin/orders/#{order_id}/transactions.json` would return all transactions associated with the provided order id.

Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog