Direct Payment

This page documents the CoinPay payment API directly, for integrators not using one of the official SDKs (PHP, Laravel, Go). The official SDKs wrap exactly this contract.

Base URL

Create a Payment

Send a POST request to create a new payment. amount is in US dollars.

FieldRequiredDescription
amountYesPayment amount, in US dollars.
redirect_urlYesWhere the payer is sent after the payment flow completes.
client_ref_idYesYour own reference id for this payment (order id, invoice id, etc.).
payer_identityNoPayer's email address or phone number.
nameNoPayer's name.
descriptionNoA short description of what's being paid for.
national_codeNoPayer's national identification code, if your flow requires it.

On success, the response includes the URL to redirect the payer to and a transaction id to track this payment:

Redirect the payer to the returned url directly - it is already the full checkout page URL, no further construction needed. Store transaction_id to check the payment's status later.

Check Payment Status

Send a GET request with the transaction_id to check on a previously created payment.

Note the endpoint shape: this is the bare base URL with transaction_id as a query parameter, not a path such as /payment/ID/status. That's the actual, confirmed behavior of the API today - if it looks unusual, it is, but it's what every current integration (including this documentation) is built against.

The response reports the current status along with confirmation details once available:

FieldDescription
statusCurrent payment status.
amountThe payment amount.
transaction_idThe id you received when creating the payment.
reasonFailure reason, when status indicates a failure. Empty otherwise.
transaction_hashThe on-chain transaction hash, once available.
networkThe blockchain network the payment was made on.

Real-Time Updates

Rather than polling the status endpoint, configure a webhook to be notified as soon as a payment's status changes - see Authentication for how to verify that a webhook request genuinely came from CoinPay.