Skip to main content
GET
Retrieve Payment

Endpoint

Retrieves the current status and details of a payment by its ID.

Request

Headers

Path Parameters

Example Request

Response

Success Response (200 OK)

Pending Payment

Completed Payment

Failed Payment

Refunded Payment

Response Fields

Payment Statuses

Error Responses

401 Unauthorized

Invalid or missing API key:

404 Not Found

Payment doesn’t exist or doesn’t belong to your shop:
Possible causes:
  • Payment ID is incorrect
  • Payment belongs to a different shop
  • Payment was deleted (rare)

429 Too Many Requests

Rate limit exceeded:

Use Cases

1. Verify Payment After Return URL

When customer returns to your site after payment:

2. Check Payment Status in Webhook

Verify payment details when webhook is received:

3. Poll Payment Status

For synchronous payment verification (not recommended - use webhooks instead):
Polling is inefficient and can hit rate limits. Use webhooks for real-time notifications instead.

Implementation Examples

Node.js / Express

PHP

Python / Flask

Best Practices

1. Use Webhooks Instead of Polling

Webhooks provide instant notifications when payment status changes:

2. Verify Payment Belongs to Your Shop

The API only returns payments for your shop, but double-check in production:

3. Handle All Statuses

Don’t assume payments are always completed:

4. Cache Payment Data

Reduce API calls by caching payment data:

Testing

Test payment retrieval with real payment IDs from your shop. See Testing Guide for details.

Create Payment

Create a new payment

Webhook Events

Get real-time payment updates

Payment Concepts

Understand payment lifecycle

Error Reference

Complete list of error codes