Accept payments

Payment links

Share a link that takes a payment, with no integration to build.

A payment link is a page that collects money. Send it to somebody and they pay it; each payment is an ordinary charge.

Selling on your own website? Checkout creates a page per order from your server, and sends the customer back to your site afterwards.

Key requirements

  • An API key with payments:write to create, disable and enable links, and payments:read to read them. Or a dashboard sign-in with permission to move money.
  • A test key's links are test links, which collect test money only.
  • One currency per link, fixed for the life of the link.

How it works

  1. You create a link: a title, a currency, and a fixed or open amount.
  2. You share its page, https://business.inversepay.app/pay/{slug}.
  3. The payer opens it, enters their number and approves the prompt.
  4. You receive charge.succeeded, the same as for a direct charge.

In the dashboard

  1. Sign in to the dashboard and open Payment links.
  2. Choose New payment link, fill in the title, currency and amount, and choose Create link.
  3. Copy the link and send it to your customer.

With an API key

A single-use link for one invoice
curl -X POST https://api.inversepay.app/api/b/v1/payment-links \
  -H "Authorization: Bearer $INVERSEPAY_TEST_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Invoice 1042",
    "currency": "RWF",
    "amount_type": "fixed",
    "amount_minor": 2500000,
    "usage": "single_use",
    "redirect_url": "https://example.com/thanks",
    "metadata": { "invoice": "INV-1042" }
  }'
201 Created
{
  "id": "7c2d…",
  "slug": "pl_abc123",
  "title": "Invoice 1042",
  "amount_type": "fixed",
  "amount_minor": 2500000,
  "currency": "RWF",
  "usage": "single_use",
  "state": "active",
  "redirect_url": "https://example.com/thanks",
  "expires_at": null,
  "payments": 0,
  "account": null,
  "is_test": true
}
Field
titlerequiredThe page's heading. Up to 140 characters.
currencyrequiredRWF or UGX.
amount_typeoptionalfixed (the default) charges amount_minor. open lets the payer choose.
amount_minorfixed onlyIn minor units: 25,000 RWF is 2500000. Refused on an open link.
min_amount_minor, max_amount_minoropen onlyBounds on what the payer may enter.
usageoptionalreusable (the default) keeps collecting; single_use closes after the first payment. Use single_use for one invoice.
expires_atoptionalRFC 3339, UTC. After it, the page refuses payment.
redirect_urloptionalWhere the payer goes after paying. Not proof of payment.
description, metadataoptionalShown under the title; and your own data, returned on every charge the link produces.
accountoptionalWhich of your accounts the link's payments settle into, acct_…. Omit it for your main account. It must hold the link's currency; a frozen account still receives.

Step 2 — Confirm the payment

Wait for charge.succeeded on your webhook endpoint, or list your charges with GET /charges. Your metadata comes back on the charge.

Arriving at redirect_url is not proof of payment. The payer's browser controls it.

state
activeAccepting payments.
paidA single_use link that has been paid.
expiredPast expires_at.
disabledTurned off. Turn it back on to collect again.

Turn a link off in the dashboard, or, once API keys can, with POST /payment-links/{id}/disable and /enable. Enabling does not revive an expired or paid link.

Webhooks

A link sends no events of its own. Each payment is a charge and sends the charge events: charge.created, then charge.succeeded or charge.failed.

Errors

Statuscode
400INVALID_LINKAn amount that does not fit amount_type, bounds the wrong way round, an expiry in the past, or a redirect that is not http(s).
403INSUFFICIENT_AUTHORITYThe key lacks the scope: payments:write to create, disable or enable, payments:read to read.
404LINK_NOT_FOUNDNo such link.
404ACCOUNT_NOT_FOUNDaccount names no account of yours in this key's mode.
409ACCOUNT_NOT_ACTIVEaccount is closed.
422CURRENCY_NOT_ACTIVATEDaccount does not hold the link's currency.

All codes are on Errors.

Testing

A link made with a sk_test_ key is a test link: its page says no real money moves, nobody's phone is prompted, and each payment is a test charge. A link made with a sk_live_ key collects real money.

Developer notes

  • One link, many charges. A reusable link produces a charge per payment; payments counts them.
  • The slug is the link. Anybody with it can pay; nobody with it can see your business's other links or payments.

What's next

On this page