Skip to main content
  • Production: https://api.paymnt.cloud
  • Sandbox: https://sandbox.paymnt.cloud
You can also use the API reference tab with Try it. Enter your api-key once, and requests will use it automatically.

Prerequisites

  • A secret API key (server-side only). See Authentication.
  • Optional: x-profile-id if profiles are enabled.
  • Use Sandbox during integration; switch to Production with the same code.

1) Base URL and headers

Base URL: https://sandbox.paymnt.cloud
Headers:
  api-key: <YOUR_SECRET_KEY>
  x-profile-id: <pro_...>      # optional
  Idempotency-Key: <uuid-v4>   # recommended for POST/PUT/PATCH

2) Create a payment

Send the minimal request your use case requires. Refer to the API reference for available fields.
curl -X POST "https://sandbox.paymnt.cloud/payments" \
  -H "Content-Type: application/json" \
  -H "api-key: <YOUR_SECRET_KEY>" \
  -H "Idempotency-Key: 3b8f2c34-0a7a-4a2f-9a62-5d0f2a33e6f1" \
  -d '{
    "amount": 1000,
    "currency": "USD",
    "description": "Order #1001"
  }'
Check the response and keep the payment_id for the next steps.

3) Confirm (if your flow requires it)

If your integration uses a two-step flow or needs an explicit confirmation:
curl -X POST "https://sandbox.paymnt.cloud/payments/{payment_id}/confirm" \
  -H "api-key: <YOUR_SECRET_KEY>"
For SCA/3DS flows, follow 3DS & SCA and verify the final status before fulfilling.

4) Capture or void (for auth-then-capture flows)

Capture a previously authorized payment (full or partial):
curl -X POST "https://sandbox.paymnt.cloud/payments/{payment_id}/capture" \
  -H "Content-Type: application/json" \
  -H "api-key: <YOUR_SECRET_KEY>" \
  -H "Idempotency-Key: <uuid-v4>" \
  -d '{ "amount_to_capture": 1000 }'
To cancel an authorization instead of capturing, see Capture & Void.

5) Issue a refund

Create a refund for a payment:
curl -X POST "https://sandbox.paymnt.cloud/refunds" \
  -H "Content-Type: application/json" \
  -H "api-key: <YOUR_SECRET_KEY>" \
  -H "Idempotency-Key: <uuid-v4>" \
  -d '{
    "payment_id": "pay_123",
    "amount": 1000,
    "reason": "requested_by_customer"
  }'
See Create & List Refunds for parameters and pagination.
Use webhooks to keep your system in sync (e.g., succeeded, failed, refunded):
  • Expose a secure endpoint (e.g., /webhooks/payments)
  • Verify signatures; retry on 5xx
  • Apply idempotent updates using the event id
Start with Webhooks — Overview and Signing & Retries.

7) Testing


Production readiness checklist