CreddotDocsCreddot Docs

Test mode

Build and test every flow with test keys and simulated outcomes.

Requests made with a ck_test_ key run in test mode. Test mode has its own wallet, customers, payment links and transactions, completely separate from live. Nothing in test mode moves real money.

Finishing test payments

In test mode, payments are not settled by a real bank, so you decide the outcome. Give your test key the sandbox:simulate permission, then complete the transaction:

curl -X POST https://api.creddot.com/api/v1/sandbox/transactions/{transactionId}/complete \
  -H "x-api-key: $CREDDOT_API_KEY" \
  -H "x-api-secret: $CREDDOT_API_SECRET" \
  -H "x-idempotency-key: complete-{transactionId}" \
  -H "content-type: application/json" \
  -d '{ "status": "SUCCESS" }'

Use "FAILED" to test your failure handling. Completing a test transaction runs the same steps as a real one: balances update, the checkout session closes, and your webhook receives transaction.success or transaction.failed.

Where to find the transactionId:

  • Checkout sessions: GET /checkout/sessions/{your reference} returns the latest payment.id once the customer has started paying.
  • Collections and payouts: it is in the creation response as transactionId.

Simulating a bank transfer into a dedicated account

To test money arriving in a dedicated collection account, list your accounts with GET /virtual-accounts, then:

curl -X POST https://api.creddot.com/api/v1/sandbox/virtual-accounts/{id}/transfers \
  -H "x-api-key: $CREDDOT_API_KEY" \
  -H "x-api-secret: $CREDDOT_API_SECRET" \
  -H "x-idempotency-key: transfer-001" \
  -H "content-type: application/json" \
  -d '{ "amountMinor": "500000", "reference": "BANK-TRANSFER-001", "senderName": "Ada Okafor" }'

Trying requests in these docs

Every page in the API reference has a Try it panel. Paste a test key and secret to send real requests to your test account. Requests go through the docs server only to get past browser restrictions; live keys are refused there.

On this page