/ developers
Public documentationMerchant sign in
IDEAPAY API

Build payments
into your business.

A clear interface between your business and IdeaPay. Start with merchant authentication, retrieve your transactions, and prepare your integration for hosted checkout.

FORMATJSON over HTTP(S)
AUTHENTICATION4 merchant credentials
ACCESSPublic docs · private data
Sandbox bank registration, verified status lookup and full refunds are implemented. Live processing and embedded fields remain disabled. See the availability guide below.
01 / CONNECT

Authenticate your merchant backend

IdeaPay automatically issues an API access code, terminal ID, salt, and token when you open your merchant workspace. Find them under Developers → API credentials → Sandbox. All four values must belong to the same active set.

FieldTypeDescription
AuthorizationheaderRequired. Bearer followed by your IdeaPay token.
X-IdeaPay-Access-CodeheaderRequired. Your IdeaPay API access code.
X-IdeaPay-Terminal-IDheaderRequired. Your IdeaPay terminal identifier, not a bank credential.
X-IdeaPay-SaltheaderRequired. The static salt issued with the same set; not a per-request nonce.
Authentication headers
Authorization: Bearer YOUR_IDEAPAY_TOKEN
X-IdeaPay-Access-Code: YOUR_ACCESS_CODE
X-IdeaPay-Terminal-ID: YOUR_TERMINAL_ID
X-IdeaPay-Salt: YOUR_SALT
X-IdeaPay-Environment: sandbox

Keep credentials in server environment variables. Make API calls from your backend, not browser or mobile code. Normal dashboard reads mask secrets; authenticated owners can reveal and copy them. Revoked sets cannot authenticate.

Merchants receive only IdeaPay credentials. Belize Bank credentials are never included in merchant requests or documentation examples.
02 / CONFIGURE

Keep sandbox and live separate

Sandbox

Build and verify

Automatically issued credentials support transaction reads. No charge is made by the documentation or request builder.

Live credentials available

Production access

Live credentials are automatically issued separately from sandbox. Live processing requires an active merchant and matching Live credentials. Send X-IdeaPay-Environment: live for live reads; sandbox is the default. Each environment rejects the other’s credentials and reads only its own payment records.

Base URL

Use https://api.ideapay.bz for merchant integrations. Complete IdeaPay credentials route requests to the IdeaPay backend; existing legacy clients retain their separate credential contract. Never combine the two credential schemes. Internal portal/admin calls use a separate backend address.

API configuration
IDEAPAY_BASE_URL=https://api.ideapay.bz
# Set credentials privately in your own server environment.
# Never paste real secrets into a public documentation console.

Amounts and currency

Payment amounts are integer minor units. For BZD, 10000 represents BZ$100.00. Do not use floating-point values as financial records.

03 / PAYMENTS

List merchant payments

GET/paymentsAvailable · both environments

Return payments scoped to your authenticated merchant, newest first. No customer or merchant records are accessible without valid credentials. An account with no recorded payments returns an empty list.

FieldTypeDescription
limitinteger · optionalPage size, default 20. Values are bounded to 1–100; use a whole number.
afterstring · optionalPass next_cursor from the preceding response. Omit on the first page.
cURL · server-side request
curl --request GET \
  "$IDEAPAY_BASE_URL/payments?limit=20" \
  --header "Authorization: Bearer $IDEAPAY_TOKEN" \
  --header "X-IdeaPay-Access-Code: $IDEAPAY_ACCESS_CODE" \
  --header "X-IdeaPay-Terminal-ID: $IDEAPAY_TERMINAL_ID" \
  --header "X-IdeaPay-Salt: $IDEAPAY_SALT"
200 · empty account response
{
  "data": [],
  "has_more": false,
  "next_cursor": null
}

Payment fields

FieldTypeDescription
idstringIdeaPay payment identifier.
referencestringRecorded merchant order reference.
amountintegerPayment amount in minor currency units.
currencystringRecorded currency; the current workspace uses BZD.
statusstringRecorded payment outcome; separate from bank settlement and merchant payout.
created_atstringRecorded creation timestamp.

Pagination metadata includes has_more and next_cursor. These examples describe the implemented read endpoint; they do not imply that bank payment creation is active.

CHECKOUT / ORDER PREVIEW

Create an IdeaPay checkout session

Send this request from your server using all four IdeaPay credentials. It creates a 15-minute order session with server-calculated fees, not a bank payment. Live processing is enabled for approved merchants using their Live credential set. Sessions open IdeaPay checkout with secure card fields for their assigned environment.

Create checkout session
POST $IDEAPAY_BASE_URL/checkout-sessions
Content-Type: application/json
Authorization: Bearer YOUR_IDEAPAY_TOKEN
X-IdeaPay-Access-Code: YOUR_ACCESS_CODE
X-IdeaPay-Terminal-ID: YOUR_TERMINAL_ID
X-IdeaPay-Salt: YOUR_SALT
X-IdeaPay-Environment: sandbox

{
  "amount": 5000,
  "currency": "BZD",
  "reference": "YOUR_ORDER_REFERENCE",
  "description": "Your order description"
}

The response includes checkout_url, session_token, environment, expiresAt, processingAvailable, and quote. The quote records the order amount, final customer amount, bank fee, IdeaPay fee, transaction settlement fee, and merchant net in integer cents. Merchant overrides take precedence over the global default. Rates are snapshotted for the session.

Redirect your customer to checkout_url. The session token is a short-lived access credential in the URL fragment. Do not log or publish it. Never place merchant credentials or card details in a checkout link. Each creation request produces a new session; it does not reserve or charge funds.

Redirect the customer to checkout_url; the IdeaPay checkout UI manages its private session reads, cancellation and payment submission. Do not call private portal session routes on the public merchant API. Live processing requires an active merchant and matching Live credentials. No card data is accepted by IdeaPay.

There is a per-merchant limit of 30 new sessions per minute; excess requests return 429. Invalid requests return 400, missing fees return 409, and unsupported fee calculations return 422.

View checkout design preview
04 / CHECKOUT

Create a sandbox payment

POST/paymentsSandbox only

Send all four IdeaPay credentials from your backend, X-IdeaPay-Environment: sandbox, and an Idempotency-Key of 8–100 letters, digits or ._:-. The amount is the merchant’s sale amount in BZD cents. IdeaPay calculates the final customer charge from assigned fees. Do not send card numbers, expiry dates or CVVs.

Create sandbox payment
POST $IDEAPAY_BASE_URL/payments
Content-Type: application/json
Idempotency-Key: YOUR_UNIQUE_ORDER_ATTEMPT
Authorization: Bearer YOUR_IDEAPAY_TOKEN
X-IdeaPay-Access-Code: YOUR_ACCESS_CODE
X-IdeaPay-Terminal-ID: YOUR_TERMINAL_ID
X-IdeaPay-Salt: YOUR_SALT
X-IdeaPay-Environment: sandbox

{ "amount": 5000, "currency": "BZD", "reference": "YOUR_ORDER", "description": "Your order" }

The response includes the IdeaPay payment id, sale_amount, final amount, status, registration state and checkout_url. Send the customer to the IdeaPay-domain checkout_url. Secure card fields load directly from the bank within IdeaPay checkout. Registration alone does not charge a card. Canonical IdeaPay routes have no /v1 prefix. Legacy integrations remain available under their existing credential contract.

Reuse the same idempotency key for the same request. A conflicting payload returns 409. If registration has an unknown outcome, do not create a replacement with a new key; operator reconciliation is required. Live requests require a matching Live credential set and an active merchant account.

Read and verify

GET /payments/ID returns your recorded payment. POST /payments/ID/refresh performs an authoritative bank lookup; send no body. Match fulfillment to succeeded, not a browser redirect or successful registration. A bank-verified deposit is still separate from merchant payout settlement.

Full refund

POST /payments/ID/refunds accepts an independent Idempotency-Key and JSON containing amount equal to the full customer charge. Only verified, unrefunded payments without a payout allocation are supported. Partial refunds are disabled. Full refunds use the environment of the original verified payment. Unknown refund outcomes must be verified, never blindly retried. Refund fee retention and bank costs require a separate commercial policy.

Sandbox and Live use separate bank-hosted secure fields inside IdeaPay checkout. Sandbox activity never contributes to real available balances. The bank callback /payments/notify is for provider notifications and does not accept merchant card data.
05 / EVENTS

Verify signed webhook deliveries

Configure an enabled public HTTPS endpoint in your merchant workspace, generate its signing secret, and use Send endpoint test. Endpoint tests use endpoint.test. Verified sandbox payments can also publish payment.succeeded, payment.failed and payment.refunded events. Delivery history and manual retries are available in Event logs.

FieldTypeDescription
IdeaPay-Signatureheadert=<Unix seconds>,v1=<HMAC-SHA256 hex digest>.
IdeaPay-Event-IdheaderStable event identifier. Use it to deduplicate retries.
Content-Typeheaderapplication/json. Signature verification uses the exact raw body.
Node.js · signature verification core
import { createHmac, timingSafeEqual } from 'node:crypto';

export function validSignature(rawBody, header, secret) {
  const parts = Object.fromEntries(
    header.split(',').map(part => part.trim().split('='))
  );
  if (!/^\d+$/.test(parts.t || '') ||
      !/^[a-f0-9]{64}$/i.test(parts.v1 || '')) return false;
  const timestamp = Number(parts.t);
  if (!Number.isSafeInteger(timestamp) ||
      Math.abs(Date.now() / 1000 - timestamp) > 300) return false;
  const expected = createHmac('sha256', secret)
    .update(parts.t + '.').update(rawBody).digest();
  const received = Buffer.from(parts.v1, 'hex');
  return received.length === expected.length &&
    timingSafeEqual(expected, received);
}
// Persist event IDs to prevent processing the same event twice.
// Use a trusted, bounded raw-body reader in your server framework.

Return a 2xx status to acknowledge delivery. Endpoint tests require HTTPS on port 443 and public IPv4 DNS. Requests time out after eight seconds and do not follow redirects. Failed deliveries support manual retries, capped at ten attempts. Payment-event deliveries are queued for background retries with backoff; the maintenance worker runs every five minutes. Endpoint tests retain their manual retry controls.

06 / HANDLE RESULTS

Errors you can act on

Error responses use a JSON object with an error message. Do not parse the human-readable message to decide payment success.

FieldTypeDescription
400Invalid requestFor example, an invalid pagination cursor.
401Authentication failedMissing, mismatched, invalid, or revoked credentials.
403Access deniedA protected workspace action or request origin was rejected.
413Request too largeA dashboard configuration request exceeded its body limit.
503Service unavailableBank processing is disconnected or required backend access is unavailable.
401 · example response
{ "error": "All four IdeaPay credential fields are required." }

Payment creation requires an Idempotency-Key, and each merchant order reference is unique. A new key cannot create a replacement for an existing order reference. Checkout session creation has its own documented limit.

07 / TRY THE SHAPE

Build a transaction-list request

Adjust pagination and copy the generated command to run on your own backend. This public page does not collect merchant credentials or send API requests.

Generated cURL request
curl --request GET \
  "$IDEAPAY_BASE_URL/payments?limit=20" \
  --header "Authorization: Bearer $IDEAPAY_TOKEN" \
  --header "X-IdeaPay-Access-Code: $IDEAPAY_ACCESS_CODE" \
  --header "X-IdeaPay-Terminal-ID: $IDEAPAY_TERMINAL_ID" \
  --header "X-IdeaPay-Salt: $IDEAPAY_SALT"
08 / ROADMAP

Know what is available

FieldTypeDescription
Checkout sessionsAvailable · sandbox checkoutExpiring order previews, authoritative fee quotes, and cancellation. Both environments use bank-hosted fields inside IdeaPay checkout.
Merchant credentialsAvailableAutomatic sandbox and live issuance and owner-only reveal/copy.
Transaction readsAvailableAuthenticated merchant-scoped GET endpoint.
Webhook endpoint testsAvailableSigned test events, verified sandbox payment events, delivery history and retries.
Hosted checkout & paymentsSandboxSeparate Sandbox and Live adapters; production requires approved merchant credentials.
Refunds & captureFull refundsFull refund endpoint available in both environments; partial refunds and separate capture remain unsupported.
Settlements & payoutsDashboard / operator backendMerchant reporting and operator records; no public transfer API.
Live credentialsAvailableIssued independently of payment processing readiness.

Ready to connect your business?

Sign in to access your private IdeaPay credentials.

Open merchant workspace