Skip to content

Quickstart

This takes a mobile money collection from nothing to a completed payment in the sandbox. No real money moves. Everything here works the same way against api.paysigna.com when you are ready.

You need a test secret key. Get one from the merchant portal at app.paysigna.com under Developers → API keys, in the Test environment. It looks like psg_test_7hQ2mKpR9fL3xW8v_….

Terminal window
curl https://sandbox.paysigna.com/v1/balances \
-H "Authorization: Bearer psg_test_7hQ2mKpR9fL3xW8v_…"

A 200 with your balances means the key is good. A 401 means the key is wrong or revoked; a 403 with environment_mismatch means you are holding a live key against the sandbox host, or the reverse.

A mobile money charge names the customer’s network. Send its code in momo_network — mtn, telecel or airteltigo in Ghana. Codes are case-insensitive and resolve within your account’s country, so there is nothing to look up first.

If you want the full list, or prefer to store ids:

Terminal window
curl https://sandbox.paysigna.com/v1/reference/momo-networks \
-H "Authorization: Bearer psg_test_…"

Each entry has a code and an id. Either works: send momo_network with the code, or momo_network_id with the id — one of the two, not both, or the request is refused with 422 invalid_field. Bank charges and payouts work the same way with bank (the code from /v1/reference/banks) or bank_id. There are also reference lists for currencies and countries.

The Idempotency-Key is required on this call. Generate a fresh UUID per payment attempt and keep it — if this request times out, you resend it with the same key and get the original answer rather than a second charge.

Terminal window
curl https://sandbox.paysigna.com/v1/charges \
-H "Authorization: Bearer psg_test_…" \
-H "Idempotency-Key: 7c9e6679-7425-40de-944b-e07fc1f90ae7" \
-H "Content-Type: application/json" \
-d '{
"amount": 15000,
"currency": "GHS",
"channel": "mobile_money",
"momo_network": "mtn",
"customer": {
"identifier": "0541234567",
"name": "Ama Mensah"
},
"reference": "order-1043",
"description": "Order 1043"
}'

Every field a charge accepts is in the reference.

amount is minor units: 15000 is GHS 150.00. There is no decimal form of an amount anywhere in this API.

On a mobile-money charge, customer.identifier must be a phone number:

  • 9 to 15 digits, such as 0244123456 or 233244123456;
  • digits only, apart from +, spaces, -, . and brackets;
  • at most 20 characters as sent, so send 233244123456 rather than a spaced-out form.

Anything else is refused with 422 invalid_field on customer.identifier.

Put whatever amount and whatever mobile number you like in it. The sandbox has no amount ceiling and no list of approved test numbers or cards, so you can rehearse with the figures your product actually charges. To make this charge fail instead, add "metadata": { "sandbox_outcome": "insufficient_funds" } — the full list is in Sandbox and testing.

The response:

{
"id": "txn_01JB3K2N8QZX4V7M9P0R5T6W8Y",
"object": "charge",
"status": "awaiting_action",
"reference": "PSG-4K2N8QZX",
"your_reference": "order-1043",
"amount": 15000,
"currency": "GHS",
"customer_amount": 15000,
"merchant_amount": 14700,
"fee": { "platform": 300, "tax": 0, "commission": 0, "bearer": "merchant" },
"channel": "mobile_money",
"customer": { "masked": "054****567", "name": "Ama Mensah" },
"action": { "type": "prompt" },
"created_at": "2026-10-05T14:21:03Z",
"expires_at": "2026-10-05T14:36:03Z"
}

Three things to read carefully:

  • status is awaiting_action, and that is success. The customer has something to do: usually a prompt on their handset. Most charges return pending or awaiting_action and complete asynchronously. Do not treat the absence of succeeded as a failure — this is the single most common first-integration bug. The same goes for an HTTP 202 with status: "pending": the partner didn’t answer in time, the charge exists, and a retry with the same Idempotency-Key returns it rather than charging again. Charges, payouts and refunds all behave this way. See errors.
  • action.type tells you what the customer has to do. prompt means it is on their phone and you wait. 3ds_redirect or hosted_checkout come with a url you send their browser to. otp means you ask them for a one-time code — see A charge with a one-time code. Handle all of them, even for mobile money. Which one you get depends on the payment partner the charge was routed to, so an MTN charge can ask for an SMS code rather than show a prompt. See Payment partners and your customer.
  • merchant_amount is what lands in your balance — amount minus the fees you bear. Reconcile against this, not against amount.

fee.commission is a fee you accepted for a company that referred you — usually 0. It follows bearer exactly as platform does: when your customers bear fees it is added to customer_amount, and when you do it is taken out of merchant_amount.

Store the id against your order now, before you do anything else. It is how every later message about this payment identifies itself.

What POST /v1/charges needs depends on channel. Every create also needs an Idempotency-Key header.

Field mobile_money bank card
amount, currency, channel, customer Required Required Required
customer.identifier Required: the number, 9 to 15 digits (at most 20 characters as sent) Required: the account number Optional. The card is entered on the partner’s page. Leave it out and the email, lower-cased, stands in for it.
customer.email Optional Optional Required: it identifies the card payer
send_receipt Optional: true or false for this payment. Leave it out to use your account’s setting. See Receipts. Same Same
customer.name Optional Optional Optional
customer.id Optional: links the charge to one of your existing customers. It does not replace identifier or email; send those as well. Same Same
momo_network or momo_network_id Required, exactly one Refused Not used
bank or bank_id Refused Required, exactly one Not used
return_url Not used Only if the partner returns a redirect Send it: where the partner’s page sends the customer back
callback_url Optional, HTTPS only Same Same
reference, description, fee_bearer, metadata Optional Optional Optional

callback_url is stored and returned to you, and nothing is sent to it. Partners always send their callbacks to PaySigna, and you hear about the result from your webhook. fee_bearer is honoured only if your account allows choosing it per payment. A required field that is missing is refused with 422 missing_field, naming the field.

PaySigna sends the payer’s receipt, under your name. It looks the same whichever partner carried the payment. The partner is given the payer’s email when there is one. Without one, the partner gets an address that stands for that payer and is never shared with another payer. PaySigna asks its partners to turn off their own customer emails where they can.

A receipt is emailed only when all of these are true:

  • the payment succeeded. Nothing is sent for a payment that fails, expires or is still pending;
  • the payment has the payer’s email (customer.email, or the one they typed on the payment page);
  • send_receipt is true, or you left it out and your account has Email payers a receipt on. That’s under Settings → Checkout branding, and it’s off by default. send_receipt: false always wins.

The email’s subject is “Receipt: {amount} to {your name}”. It shows the amount paid, what it was paid with, the reference, the time (UTC), the description, and your branding name and support email or phone. It never names the partner. Test payments get receipts too, with the usual test branding.

The address must be a single plain email address with a dotted domain, such as [email protected]. A malformed one is skipped without telling you: no receipt is sent, and the payment still goes ahead.

Invoices and subscriptions send their own receipts, so their charges never send this one.

There are no card-number fields in this API, and your server never handles a card. The customer types it on the payment partner’s own secure page (Paystack, PaySwitch or Hubtel). PaySigna never sees card numbers either.

  1. Live: your account must be enabled for card. Card collections are a per-channel capability, switched on by us when you go live. Without it a live key is refused with 403 capability_disabled. Test keys are not checked; see Going live.

  2. Create the charge with channel: "card", customer.email and return_url:

    Terminal window
    curl https://sandbox.paysigna.com/v1/charges \
    -H "Authorization: Bearer psg_test_…" \
    -H "Idempotency-Key: $(uuidgen)" \
    -H "Content-Type: application/json" \
    -d '{
    "amount": 15000,
    "currency": "GHS",
    "channel": "card",
    "customer": { "email": "[email protected]", "name": "Ama Mensah" },
    "return_url": "https://your-shop.example.com/orders/1043"
    }'
  3. In live, the response is awaiting_action with action.type hosted_checkout (or 3ds_redirect, handled the same way) and an action.url. Send the customer’s browser there with a full-page redirect, not an iframe. The customer should see the partner’s address in the address bar, and a checkout page may refuse to load inside a frame.

  4. The customer pays on the partner’s page, then the partner sends them back to your return_url.

  5. Arriving at return_url is not success. The customer may have cancelled, the card may have been declined, or the address may have been typed by hand. Show “checking your payment” and wait for the collection.succeeded or collection.failed webhook, or read the charge with GET /v1/charges/{id}.

  6. The charge ends succeeded, failed, cancelled or expired. An expired collection can still become succeeded if the partner later confirms the customer paid; see Webhooks. A succeeded card charge also leaves a reusable card authorisation behind, which is what lets a subscription renew on the stored card.

Errors worth handling:

  • 422 missing_field on customer.email: “A card charge needs the customer’s email address: it identifies the payer, and any receipt you send goes to it.”
  • 403 capability_disabled: card is not enabled on your live account.
  • 409 unpriced_combination: no card fee is configured for you. Tell us.
  • 503 no_route_available: no card partner is available right now. Retry with backoff, using the same Idempotency-Key.

Fees first: POST /v1/fees/quote accepts channel: "card" for collections. A card payout is refused with 422 unsupported, because payouts go only to mobile money or a bank account.

Without your own checkout: the hosted pay page and payment links offer Card whenever the link or session includes it. The customer goes to the partner’s page and comes back to the pay page, which waits for the result. On a payment session, the email can come from the session, or from customer.email on POST /v1/checkout/sessions/{id}/confirm (used only when the session has none). A card payment needs it from one of the two.

Some collections are confirmed by a one-time code from the customer: some bank collections, and mobile money when the partner carrying it asks for one. On MTN the code comes by SMS. On Telecel the customer dials *110# and generates a voucher. The partner decides, not the channel, so build this step for mobile money too. The charge comes back awaiting_action with action.type otp:

"action": {
"type": "otp",
"message": "Enter the code shown in your bank's authenticator app.",
"expires_at": "2026-10-17T10:15:00Z",
"resendable": false,
"attempts_remaining": 5,
"input": "code"
}
Field What it means
message Where the customer finds the code: sent by SMS, emailed, shown in their bank’s app, or generated by dialling *110# on Telecel. Safe to show as it is.
expires_at When the partner stops accepting a code for this step, where it says.
resendable The code can be sent again with POST /v1/charges/{id}/otp/resend. False for a code the customer reads from an app, and for a mobile-money code: if it didn’t arrive, start a new charge.
attempts_remaining Wrong codes allowed before the charge fails.
input What the customer types. code: the one-time code. For added security, some payment partners ask instead for phone (the phone number linked to the payment, 7 to 15 digits with an optional leading +) or birthday (their date of birth, sent as YYYY-MM-DD). Draw the field to match. Send the value as code either way. It shares the same attempts.

Ask the customer for the code and send it from your server:

Terminal window
curl https://sandbox.paysigna.com/v1/charges/$CHARGE_ID/otp \
-H "Authorization: Bearer psg_test_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "code": "123456" }'

Both code endpoints are server-side only, need the collection.create scope and an Idempotency-Key, and answer with the charge as it now stands. A retry with the same key replays the first answer rather than sending the code again; a rejected code releases the key, so the retry with the customer’s corrected code can reuse it.

Keep going while action.type is otp. The answer is usually processing, and the charge then settles like any other. But it can ask for another code, with a new message. The first payment from an Ecobank account works this way: an enrolment code emailed to the customer, then a payment code from their authenticator app.

Answer What to do
422 otp_rejected The code was wrong or expired. The detail says how many attempts are left, and the charge is still waiting: ask again.
422 otp_attempts_exceeded Five wrong codes. The charge has failed and nothing was taken; start a new payment.
409 otp_not_awaited The charge is not waiting for a code. Read it.
409 request_in_progress Another code for this charge is being checked. Wait for that answer.
422 unsupported On resend: this code cannot be sent again.
504 partner_timeout We do not know whether the code went through. Do not resend it: the charge resolves through polling and the webhook.

On a hosted checkout page, the payer enters the code on the page and you do none of this. On your own checkout page, built on a payment session, the browser sends the code itself — see One-time codes on your own checkout page. In the sandbox, use the test accounts for one-time codes.

The status change arrives as a webhook. Register the URL once — this is setup, not per-payment:

Terminal window
curl https://sandbox.paysigna.com/v1/webhook-endpoints \
-H "Authorization: Bearer psg_test_…" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.example.com/paysigna/webhooks",
"subscribed_events": ["collection.succeeded", "collection.failed", "collection.expired"],
"description": "Order status"
}'

Subscribe explicitly, as above. An empty subscribed_events means every event type, which costs you deliveries and us retries for events you ignore.

The URL must be HTTPS and publicly routable — loopback and private addresses are refused, because our delivery workers run inside our own network. For local development use a tunnel.

When the customer approves, you get a POST to that URL. Verify the signature before you trust a byte of it, then enqueue and return quickly — we count a response slower than your timeout_seconds (default 10) as a failed attempt.

{
"id": "evt_01JB3K2P4RT7YV9X1Z3B5D7F9H",
"object": "event",
"type": "collection.succeeded",
"resource_type": "collection",
"resource_id": "txn_01JB3K2N8QZX4V7M9P0R5T6W8Y",
"sequence": 48213,
"created_at": "2026-10-05T14:22:41Z",
"data": { "...": "the transaction, as in step 3" }
}

Deduplicate on id — delivery is at-least-once by design. Record the highest sequence you have processed; a gap in it means a lost event, and you can ask for exactly the missing range later.

Webhooks has the verification code and the full argument for why it is shaped the way it is. Do not skip it.

Terminal window
curl https://sandbox.paysigna.com/v1/charges/txn_01JB3K2N8QZX4V7M9P0R5T6W8Y \
-H "Authorization: Bearer psg_test_…"

Use this to answer a question about a specific payment — a customer asking, a webhook you think you missed, a reconciliation run. Do not poll every open transaction on a timer: it burns your rate limit and still tells you later than the webhook does.

Create, receive, read. A payout is the same three steps pointed the other way, and names the network or bank the same way a charge does:

Terminal window
curl https://sandbox.paysigna.com/v1/payouts \
-H "Authorization: Bearer psg_test_…" \
-H "Idempotency-Key: 3b1f8e2a-9c4d-4e7f-8a6b-2d5c0e9f1a73" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"currency": "GHS",
"channel": "mobile_money",
"momo_network": "mtn",
"recipient": { "identifier": "0541234567", "name": "Ama Mensah" },
"reference": "refund-order-1043"
}'

For a bank payout, set "channel": "bank" and send "bank" with the bank’s code from /v1/reference/banks?payout_only=true (or bank_id with its id), and the account number as the recipient’s identifier. A payout is paid out of your balance, so collect in the sandbox first. You always pay a payout’s fee, on top of the amount, whatever your account’s fee bearer: the recipient receives exactly amount. A refund is POST /v1/refunds against a charge. All fields: create a payout, create a refund.

A payout to a mistyped number goes to whoever holds it, and it cannot be recalled. POST /v1/name-enquiries asks the bank or network for the name on the account before you pay. It needs a secret key with verification.create.

Terminal window
curl https://sandbox.paysigna.com/v1/name-enquiries \
-H "Authorization: Bearer psg_test_…" \
-H "Content-Type: application/json" \
-d '{
"channel": "mobile_money",
"account_number": "0541234567",
"momo_network": "mtn",
"expected_name": "Ama Mensah"
}'
{
"object": "name_enquiry",
"channel": "mobile_money",
"account_number": "0541234567",
"account_name": "AMA MENSAH",
"matches": true,
"fee_minor": 0,
"fee_currency": "GHS"
}

account_name is the holder as the bank or network holds it, usually in capitals. matches appears only when you send expected_name, and ignores case, punctuation, word order and middle initials.

An enquiry may carry a fee, set on your pricing plan — fee_minor in fee_currency, your settlement currency; 0 when enquiries are free. Only an enquiry that returned a name is charged, and the fee comes out of your available balance. It is checked before the partner is asked: if your balance cannot cover it, the request is refused with 402 insufficient_funds and nothing is asked. The fee is taken when the partner is asked and given back (a reversing fee journal) if no name comes back, so your balance may dip for a moment. For a bank account, send "bank" (or bank_id) instead of the network. If no partner can enquire on that bank or network, the request is refused with 422 invalid_request; if the partner does not answer, 503 partner_unavailable. A test key asks only test partners and a live key only live ones. The full fields are in the reference.

POST /v1/fees/quote tells you what a charge or a payout would cost, without creating it. Use it to show your customer the fee, or to decide whether to go ahead. Nothing is written and no money moves, so it takes no Idempotency-Key.

Terminal window
curl https://sandbox.paysigna.com/v1/fees/quote \
-H "Authorization: Bearer psg_test_…" \
-H "Content-Type: application/json" \
-d '{
"direction": "collection",
"amount": 10000,
"currency": "GHS",
"channel": "mobile_money",
"momo_network": "mtn"
}'
{
"object": "fee_quote",
"direction": "collection",
"channel": "mobile_money",
"currency": "GHS",
"amount": 10000,
"fee": { "platform": 245, "tax": 0, "commission": 0, "total": 245, "bearer": "merchant" },
"customer_amount": 10000,
"merchant_amount": 9755,
"environment": "test",
"quoted_at": "2026-10-17T10:04:12Z"
}
Field What to send
direction collection to price a charge, payout to price a payout.
amount, currency As on the charge or payout. For a payout, amount is what the recipient receives.
channel mobile_money, bank or card. Card is for collections only. A card payout is refused with 422 unsupported.
momo_network / momo_network_id, bank / bank_id Optional. Name the network or bank when you know it. The quote is then routed exactly as the transaction would be.
fee_bearer Collections only, and only if your account allows choosing it per transaction, as on a charge. Leave it out to use your account’s setting.

The answer gives the fees exactly as they would appear on the transaction. fee.total is platform + tax + commission. A collection shows customer_amount and merchant_amount. A payout shows debited instead, which is the amount plus the fee taken from your balance, and its commission is always 0.

The quote goes through the same routing and pricing as a real charge or payout. That covers your plan or negotiated rate, minimum and maximum fees, tax, commission and who bears the fee. A charge created straight after with the same inputs carries the same figures.

What the key needs:

  • A secret key, with collection.create to quote a collection or payout.create to quote a payout.
  • The same checks as the transaction itself. A channel your live account is not enabled for is 403 capability_disabled. Your account’s verification is checked on a live key. An amount above the key’s per-transaction limit is 422 amount_too_large.

The risk screen does not run on a quote, so a quote doesn’t use up any limits.

Other errors:

  • 422 for an unsupported currency or channel.
  • 409 unpriced_combination when no fee is configured for that combination.
  • 503 no_route_available, which is worth retrying with backoff.

All fields: quote fees.

Next:

  • Authentication — scopes, key types, and what to do about rotation before it surprises you.
  • Idempotency — the rules, and what a retry actually does.
  • Errors — the codes worth branching on.
  • Going live — what has to be true before a psg_live_… key works.