Skip to content

Quick start

This takes about five minutes. Everything happens in test mode: no money moves.

  1. Get your test keys.

    Sign up at the dashboard. Your test keys are issued straight away, before any business checks, and shown on the next screen. Copy the secret key (sk_test_…).

    The secret key is shown only once. If you did not save it, open Developers → API keys and press Roll secret key to get a new one.

    Put it in an environment variable, not in your code:

    Terminal window
    export NABLR_SECRET_KEY=sk_test_your_key_here
  2. Check the key works.

    Terminal window
    curl https://pwn-api.142-93-42-70.sslip.io/v1/whoami \
    -H "Authorization: Bearer $NABLR_SECRET_KEY"

    You get back your business name and "mode": "test".

  3. Initialise a payment.

    From your server, create a ₦5,000 payment for order 1042. Amounts are in kobo, so ₦5,000.00 is 500000.

    initialise.sh
    #!/usr/bin/env bash
    # Start a ₦5,000 payment for order 1042.
    # Run: NABLR_SECRET_KEY=sk_test_… bash initialise.sh order_1042
    REFERENCE="${1:-order_1042}"
    curl -sS https://pwn-api.142-93-42-70.sslip.io/v1/payments \
    -H "Authorization: Bearer $NABLR_SECRET_KEY" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: ${REFERENCE}_attempt_1" \
    -d '{
    "amount": 500000,
    "currency": "NGN",
    "reference": "'"$REFERENCE"'",
    "customer": { "email": "ada@example.com", "name": "Ada Obi" },
    "callback_url": "https://shop.example/thanks",
    "metadata": { "order_id": 1042 }
    }'

    The response is the payment, in pending, with a checkout_url:

    {
    "data": {
    "id": "pay_01M3XX8ERVFWYRPQA68NCA8FQ3",
    "object": "payment",
    "reference": "order_1042",
    "status": "pending",
    "mode": "test",
    "amount": 500000,
    "currency": "NGN",
    "fee": 7500,
    "fee_bearer": "merchant",
    "charged_amount": 500000,
    "net": 492500,
    "checkout_url": "https://pwn-checkout.142-93-42-70.sslip.io/c/ck_test_by1k2G3kGkaUO5UMHGYUAWqZAha3uAM8pozrWeozlcq",
    "checkout_token": "ck_test_by1k2G3kGkaUO5UMHGYUAWqZAha3uAM8pozrWeozlcq",
    "expires_at": "2026-10-02T09:56:25Z",
    "created_at": "2026-10-02T08:56:25Z"
    },
    "meta": { "request_id": "01a0fbd4-3b18-7181-9149-8dbcae100085" }
    }

    (Some fields are left out here. The reference lists them all.)

    Run it again with the same reference and you get the same payment back, because the Idempotency-Key is the same. A new order needs a new reference.

  4. Pay it.

    Open checkout_url in your browser. Choose Card and enter:

    Card numberExpiryCVV
    4084 0840 8408 4081any future dateany 3 digits

    The checkout says Payment successful and, because you sent a callback_url, sends you on to https://shop.example/thanks?reference=order_1042.

    Test mode lists cards and amounts for every other outcome.

  5. Verify it.

    Never trust the redirect alone: anyone can type that URL. Ask the API.

    verify.sh
    #!/usr/bin/env bash
    # Check a payment before you give value.
    # Run: NABLR_SECRET_KEY=sk_test_… bash verify.sh order_1042
    REFERENCE="${1:-order_1042}"
    curl -sS "https://pwn-api.142-93-42-70.sslip.io/v1/payments/$REFERENCE" \
    -H "Authorization: Bearer $NABLR_SECRET_KEY"
    # Give value only if data.status is "succeeded" and data.amount and
    # data.currency are what you charged.

    The payment is now succeeded, with the channel the customer used and the card’s authorization (brand and last four digits only).