CreddotDocsCreddot Docs

Quickstart

Take your first test payment in about ten minutes.

This walks through the most common integration: your customer checks out on your site, pays on a Creddot hosted page, and comes back to your site while your server is told the order is paid.

Get your test keys

In the dashboard, open Settings, API Keys and Webhooks and create a test key with the collections:create and transactions:read permissions. You get two values:

  • an API key starting with ck_test_
  • an API secret, shown once. Store it in your server's environment, never in browser or mobile code.
.env
CREDDOT_API_KEY=ck_test_...
CREDDOT_API_SECRET=...

Create a checkout session

When the customer clicks Pay, your server creates a session for the order. Amounts are in kobo (minor units), so 250000 is ₦2,500.00.

curl https://api.creddot.com/api/v1/checkout/sessions \
  -H "x-api-key: $CREDDOT_API_KEY" \
  -H "x-api-secret: $CREDDOT_API_SECRET" \
  -H "x-idempotency-key: order-10042" \
  -H "content-type: application/json" \
  -d '{
    "amountMinor": "250000",
    "currency": "NGN",
    "reference": "ORDER-10042",
    "description": "Order 10042",
    "customerEmail": "ada@example.com",
    "redirectUrl": "https://yourshop.com/orders/10042/complete"
  }'

The response includes checkoutUrl. Redirect the customer there. The session can be paid once and expires after 30 minutes unless you set expiresAt.

{
  "id": "cmv8l2x9k0001s7...",
  "reference": "ORDER-10042",
  "amountMinor": "250000",
  "currency": "NGN",
  "checkoutUrl": "https://checkout.creddot.com/pl/cpl_...",
  "checkoutPath": "/pl/cpl_...",
  "expiresAt": "2026-11-02T12:30:00.000Z"
}

The customer pays

Creddot checkout shows card, bank transfer and USSD (whichever you have turned on). After a successful payment the customer is sent to your redirectUrl exactly as you gave it, so put your order id in that URL.

Confirm the payment on your server

Never fulfil an order just because the customer reached your return page. Confirm it with Creddot, either way works:

  • Webhook (recommended): Creddot sends transaction.success to your webhook URL. Its data.merchantReference is your ORDER-10042. See Webhooks.
  • Ask on your return page:
curl https://api.creddot.com/api/v1/checkout/sessions/ORDER-10042 \
  -H "x-api-key: $CREDDOT_API_KEY" \
  -H "x-api-secret: $CREDDOT_API_SECRET"

status is PAID once a payment succeeded, and payment holds its details. Check that amountMinor and currency match the order before you fulfil it.

Next steps

On this page