Skip to main content
POST
Create Payment

Endpoint

Creates a new payment and returns a checkout URL where customers can complete the payment.

Request

Headers

Body Parameters

Example Request

Response

Success Response (200 OK)

Response Fields

Error Responses

400 Bad Request

Invalid parameters:
Common validation errors:
  • Amount less than 50 cents
  • Invalid currency (only USD supported)
  • Missing required fields
  • Invalid return_url format
  • Metadata exceeds 50 keys

401 Unauthorized

Invalid or missing API key:
Possible causes:
  • API key not provided in Authorization header
  • API key format is incorrect
  • API key doesn’t exist or was deleted
  • Shop is inactive

429 Too Many Requests

Rate limit exceeded:
See Rate Limits for details.

500 Internal Server Error

Server error:
If this persists, contact support.

Next Steps

After creating a payment:
  1. Redirect customer to checkout_url
  2. Customer completes payment on the white-labeled checkout page
  3. Customer redirected back to your return_url with payment ID:
  4. Webhook sent to your server with payment details (if configured)
  5. Verify payment status by retrieving the payment:

Implementation Examples

Node.js / Express

PHP

Python / Flask

Metadata Usage

Use metadata to attach custom data to payments. This data is returned in webhooks and when retrieving payments.

Best Practices

Metadata Limits

  • Maximum 50 keys per payment
  • Keys must be strings
  • Values must be strings, numbers, or booleans
  • Total metadata size limit: 5KB

Idempotency

Prevent duplicate payments by including an idempotency key:
Benefits:
  • Safe to retry failed requests
  • Prevents duplicate charges if request times out
  • Guarantees exactly-once payment creation
Keys expire after 24 hours.

Testing

Use real API keys to create test payments with small amounts ($0.50 minimum). See Testing Guide for details.

Retrieve Payment

Check payment status after creation

Webhook Overview

Get real-time payment notifications

Node.js Guide

Complete integration tutorial

Error Reference

Complete list of error codes