Pay-ins and checkout
A checkout is one payment you want: we host the page, your customer pays by bank transfer, card or Paygent.
POST/v1/checkouts| Field | |
|---|---|
amount | Kobo, at least 100 (₦1). Required. |
reference | Your order number. Letters, numbers and . _ - : / |
description | Shown to the customer |
email, name | The customer (or customer: { email, name, phone }) |
channels | bank_transfer, card: leave out for both |
redirect_url | Where the customer goes after paying |
metadata | Up to 20 keys of your own, sent back in webhooks |
expires_in_minutes | 10 minutes to 7 days |
The reply has id, checkout_url (our page), paygent_url (see below) and status. Paygent wallet users and their AI agents can pay the same checkout: see AI agents paying you.
After the payment
- We send
charge.successwith the payment. Read it withGET/v1/payments/:id. - The money is in your
pendingbalance until it settles, thenavailable:GET/v1/balance. - A second payment for a checkout already paid is kept and marked; refund it from the dashboard or the API.
A Pay with Paygent button on your own checkout
Keep your own checkout page and add a button for Paygent wallet users. Link it to the checkout's paygent_url: the customer pays on Paygent's page with their PIN (or approves their AI agent's payment) and comes back to your redirect_url. You get charge.success as for any payment, with no fee.
<script src="https://business.paygenthq.ai/paygent-button.js" async></script>
<a data-paygent-button href="PAYGENT_URL">Pay with Paygent</a>The script only draws the button: it reads nothing on your page, sends nothing and sets no cookies. In test mode paygent_url is our hosted page, where Pay with Paygent (test mode) pays it.
Payment links and products
A payment link is a page anyone can pay, again and again or once: POST/v1/payment_links with name and amount (leave out amount to let the customer type it), or product from POST/v1/products. Add single_use: true for one payment.
paygent