BitPays Docs

🇨🇴 BitPays Colombia API — COP

Collect and disburse in Colombia over Bre-B QR (EMV copia e cola). The contract is identical to every other BitPays market — one base URL, one bearer token, the same webhook envelope. Only the currency, method and checkout differ.

At a glance

Country codeCO
CurrencyCOP ($)
MethodsBANK
RailBre-B QR (EMV copia e cola)
AmountsWhole pesos, integer — 80000 means COP 80 000. Decimals are rejected.
LimitsInteger only — decimals are rejected. Platform range 4,000–20,000,000 COP per order; per-merchant limits may be lower.

Environments

Productionhttps://api.bitpays.live
Staging (pre-production)https://api.staging.bitpays.live
Path prefix/v1 on every endpoint
Content typeapplication/json

Staging is not a sandbox. Staging is a pre-production environment connected to live payment channels. Transactions initiated in staging may move real money. Do not use staging for test payments or payouts.

Staging has its own database and its own API keys; production keys do not work there. Treat every staging transaction as real money unless BitPays has confirmed in writing that your staging account is routed to the simulated channel described below.

Simulated channel (only when enabled for your staging account)

BitPays can route a staging account to a simulated channel. It is not on by default and is configured per account — ask support whether it applies to yours before relying on it. When it is in use for Colombia, no request leaves the platform: the simulated channel returns a clearly-marked placeholder payload that is not a payable Bre-B code.

On that simulated channel the result is chosen by the last two digits of the whole amount, so every branch is reproducible on demand:

Amount ends inResultUse it to test
…11failedFailure handling and the payment.failed webhook
…22stays pendingTimeout / expiry handling and polling
anything elsesuccessThe happy path and the payment.success webhook

Webhooks are not simulated separately: the platform status pipeline drives the transition, so the simulated channel exercises your real webhook endpoint and signature verification.

Authentication

Exchange your API keys for a bearer token, then send it on every request. Tokens last 1 hour.

curl -s -X POST https://api.bitpays.live/v1/auth/token \
  -H 'Content-Type: application/json' \
  -d '{"client_id":"YOUR_CLIENT_ID","client_secret":"YOUR_CLIENT_SECRET"}'

Create a payment

Send an X-Idempotency-Key on every create. Retrying with the same key returns the original order instead of creating a second one.

curl -s -X POST https://api.bitpays.live/v1/payin/create \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'X-Idempotency-Key: co-order-1001' \
  -d '{
    "merchant_order_id": "ORDER-1001",
    "amount": 80000,
    "currency": "COP",
    "method": "BANK",
    "customer": { "name": "Test Customer", "email": "test@example.com" },
    "return_url": "https://your-site.com/thanks"
  }'

The Colombia checkout

The provider returns a Bre-B QR payload. The cashier renders it as a QR plus a copy-and-paste string the customer pays from their bank app.

Payment status

curl -s https://api.bitpays.live/v1/payin/status/ORDER_ID \
  -H 'Authorization: Bearer $TOKEN'

Treat the webhook as the source of truth and this endpoint as reconciliation. Never mark an order paid because a checkout page or a payment app merely opened.

Webhooks

BitPays POSTs a signed JSON envelope to your configured URL on every final state (payment.success, payment.failed, payout.success, payout.failed). Verify the HMAC signature header before trusting the body, respond 2xx quickly, and make your handler idempotent on delivery_id — retries use exponential backoff.

Payouts

curl -s -X POST https://api.bitpays.live/v1/payout/create \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'X-Idempotency-Key: co-payout-1001' \
  -d '{
    "merchant_payout_id": "PO-1001",
    "amount": 100,
    "currency": "COP",
    "method": "BANK",
    "beneficiary": { "name": "Jane Doe", "account_number": "ACCOUNT_NUMBER" }
  }'

Payout availability for Colombia depends on your contract — confirm with support before building against it.

Order statuses

StatusMeaning
createdOrder accepted, customer has not paid
pendingAwaiting the customer or the rail
processingThe provider is settling it
successPaid and confirmed — safe to fulfil
failedNot paid
expiredThe payment window elapsed

Errors & limits

Every error returns a JSON body with success: false, a stable code and a human message. Branch on code, never on the message text.

Retry only on 5xx. A 4xx says the request or the account configuration has to change first, so retrying it unchanged will fail the same way every time.

HTTPcodeWhat it means
422INVALID_REQUESTValidation failed. details holds the messages per field, and issues[] gives a machine-readable code for each one.
422ROUTE_NOT_CONFIGUREDNo payment route is enabled on your account for this currency and method. Permanent until support enables that market — do not retry.
422AMOUNT_OUTSIDE_LIMITSNo available channel accepts this amount. Try a different amount.
403PAYIN_DISABLEDCollections are switched off for your account.
409DUPLICATE_ORDERThat merchant_order_id already exists.
409IDEMPOTENCY_CONFLICTThe same X-Idempotency-Key was reused with a different body.
503PAYMENT_TEMPORARILY_UNAVAILABLEEvery channel for this request is down or at capacity. Retry shortly — this is not a decline.
503PROVIDER_ERROR and similarThe upstream bank or acquirer rejected the attempt. See reason below.

When a create fails at the provider, the response carries what we know, so you do not have to open a ticket to find out why:

reasonThe upstream rejection, in plain text, with credentials removed. Present only when the provider told us something useful.
order_idThe order we created and then marked FAILED. Quote this to support, or read it back from the status endpoint.
merchant_order_idYour own reference for the same order.
retryabletrue when the failure looked transient. Absent when we could not tell.

Rate limits apply per IP, and you should whitelist your server IP before going live in production.

Amount limits

Three things bound an amount, in this order:

Currency bandA wide sanity range per currency. For COP the API rejects anything outside it with AMOUNT_BELOW_MINIMUM or AMOUNT_ABOVE_MAXIMUM.
Your account limitsThe per-merchant minimum and maximum set for you. This is the one that usually applies — ask support to change it.
Channel limitsEach payment channel has its own range. If an amount falls outside every available channel you get 422 AMOUNT_OUTSIDE_LIMITS.

Full multi-country reference: /docs