Bolrach Pay

Bolrach Pay takes card and bank payments for a business's own site or app. The server holds a secret key and calls one API, the buyer pays on a page we host, and the server reads the result back before anything ships. This page goes from a new key to a settled test payment.

Base URL https://api.bolrachpay.comSpec openapi.json

Before you start

Sign in at bolrach.com with Authvio, open Pay and set up the business. Test mode works straight away. Live payments open once Authvio has checked the owner and the business, and payouts need a bank account in the business's own name. The Activation tab in Pay shows which of those steps are done.

1. Make a test key

In Developers > API keys, choose New API key. Give it a name that says what uses it, tick Pay with both of its permissions (payments:read and payments:write) and leave the mode on Test. Pay asks for a fresh sign-in before it makes the key. It is shown once, so it goes into the server's secrets straight away. We keep only a hash.

export BOLRACH_KEY=bk_test_...   # from Developers > API keys, shown once

A test key starts bk_test_ and a live one bk_live_. Keys made before the move to one key system start sk_test_ or sk_live_ and keep working. The key decides the mode: nothing in a request body can turn a test key into a live one. A live payments key can only be made once the business is verified.

2. Check the key

curl -s https://api.bolrachpay.com/v1/me \
  -H "Authorization: Bearer $BOLRACH_KEY"

# {"companyId":"...","env":"test","scopes":["payments:read","payments:write"]}

A missing or revoked key gets 401. A key without the permission a route needs gets 403, and the message names the scope it lacks.

4. A payment from your server

When the merchant's own site sells something, its server creates a payment intent for the order and sends the buyer to its checkout_url. The Idempotency-Key header is required. Save one key per payment attempt before sending the request, and send the same key again if the response is lost. The replay returns the first result instead of a second charge.

curl -s -X POST https://api.bolrachpay.com/v1/payment_intents \
  -H "Authorization: Bearer $BOLRACH_KEY" \
  -H "Idempotency-Key: order-1042-payment-1" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "120000",
    "currency": "NGN",
    "return_url": "https://merchant.example/orders/1042",
    "description": "Order 1042",
    "client_reference_id": "order-1042",
    "customer": { "email": "buyer@example.com" }
  }'

The answer carries id, status and checkout_url. After paying, the buyer comes back to the return_url. Treat that visit as a hint only, and read the payment from the server:

curl -s https://api.bolrachpay.com/v1/payment_intents/$PAYMENT_INTENT_ID \
  -H "Authorization: Bearer $BOLRACH_KEY"

Ship when status is succeeded and the amount, currency and mode match the order you saved. If you would rather we host a fuller checkout page, with the buyer's details and a choice of method, use a hosted checkout session instead.

A payment needs a processor for its currency in that mode, and which currencies your business can take depends on the country it is registered in. Try each currency in test mode before you offer it to buyers, and show an error rather than fulfil an order whose payment could not be confirmed.

5. See what happened

curl -s https://api.bolrachpay.com/v1/payments \
  -H "Authorization: Bearer $BOLRACH_KEY"

Every figure comes from a double-entry ledger, so a payment, its fee and its refund always add up. To hear about a payment the moment it settles, add a webhook endpoint.

Next

  • Hosted checkout: send the buyer to a page we host, then confirm the order on your server.
  • Webhooks: signed events, and how a server checks the signature before it trusts one.
  • Refunds: full and partial refunds, retries and what each status means.
  • Test mode and test cards: a test card for each outcome, plus Nigerian test bank accounts for payouts.

Every endpoint with its parameters: the Bolrach Pay API reference. Machine-readable: https://api.bolrachpay.com/v1/openapi.json.