Checkout API
Use the Seev API or SDK to initiate payments programmatically and embed checkout into your own product.
⬡ API product
Requires developer access and an API keyThe Checkout API is how developers integrate Seev's payment gateway directly into their own application. Your server creates a checkout session, the customer completes payment on Seev's hosted page, and your server verifies the result — all without you building or hosting a payment form.
Before you use the Checkout API, open the Developer Dashboard, accept the developer terms, select Checkout API as a product, and generate an API key. Don't have an API key yet? Start with the API Keys guide.
Who it's for
The Checkout API is the right choice if:
- You are building a web or mobile app and need payments as part of your own product flow
- You need to pass order data programmatically — line items, customer info, discount, tax
- You want to control the redirect and run your own post-payment logic (update a database, send confirmation emails, provision access)
- You're building a platform or marketplace where multiple merchants or customers transact through your app
- You need webhook notifications and programmatic access to transaction history
If you just need to send someone a link or sell a product without writing code, use Payment Links or the Storefront instead.
API key requirement
Checkout API requests must be authenticated with a Checkout API key from the same environment you are using.
| Environment | Key to use |
|---|---|
| Sandbox | A sandbox Checkout API key for testing. |
| Production | A production Checkout API key after your account is approved for live mode. |
If you generate keys for multiple products, make sure you use the key created for Checkout API. Product keys are scoped to their own Seev services.
How it works
Your server Seev API Customer
│ │ │
│── Seev.charge() ──▶│ │
│◀── checkoutUrl ────│ │
│ │ │
│─── redirect ───────────────────────▶ │
│ │◀── pays ─────────│
│ │── redirect ─────▶│
│ │ (to redirectUrl)│
│◀── session_id ─────────────────────── │
│ │ │
│── Seev.callback() ▶│ │
│◀── result ─────────│ │
│ │ │
│─── fulfil order ───────────────────▶ │- Your server calls
Seev.charge()with the customer and order details. - Seev returns a
checkoutUrl— redirect the customer there. - The customer selects a payment channel (card, mobile money, bank transfer, crypto) and completes payment.
- Seev redirects the customer back to your
redirectUrlwith asession_idquery parameter. - Your server calls
Seev.callback()to verify the result before fulfilling the order.
Create a checkout session
import Seev from '@seev/sdk';
const charge = await Seev.charge({
type: 'checkout',
recipient: {
name: 'Jane Doe',
email: 'jane@example.com',
phone: '+233501234567',
},
amount: 10000, // in smallest currency unit — 10000 = GHS 100.00
currency: 'GHS',
channels: ['card', 'mobile_money', 'bank', 'crypto'],
redirectUrl: 'https://yourapp.com/payment/callback',
});
// Redirect the customer
res.redirect(charge.checkoutUrl);Pass items instead of amount to have Seev total the order automatically:
const charge = await Seev.charge({
type: 'checkout',
recipient: { name: 'Jane Doe', email: 'jane@example.com' },
items: [
{ name: 'Widget Pro', quantity: 2, price: 5000 },
{ name: 'Shipping', quantity: 1, price: 1500 },
],
discount: 10, // percentage
tax: 2.5, // percentage
currency: 'GHS',
redirectUrl: 'https://yourapp.com/payment/callback',
});charge, err := seevpay.Charge(seevpay.ChargeRequest{
Type: "checkout",
Recipient: seevpay.Recipient{
Name: "Jane Doe",
Email: "jane@example.com",
Phone: "+233501234567",
},
Amount: seevpay.Int64Ptr(10000),
Currency: "GHS",
Channels: []string{"card", "mobile_money", "bank", "crypto"},
RedirectURL: "https://yourapp.com/payment/callback",
})
if err != nil {
// handle error
}
http.Redirect(w, r, charge.CheckoutURL, http.StatusSeeOther)Charge parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | "checkout" | ✓ | Always "checkout" for this flow. |
recipient.name | string | ✓ | Customer's full name. |
recipient.email | string | ✓ | Customer's email address. |
recipient.phone | string | Customer's phone number. Required if mobile_money is in channels. | |
amount | number | ✓ (or items) | Amount in the smallest currency unit (e.g. pesewas for GHS). |
items | array | ✓ (or amount) | Line items — Seev calculates the total. |
currency | string | ✓ | ISO 4217 currency code (e.g. GHS, USD). |
channels | string[] | Subset of card, mobile_money, bank, crypto. Defaults to all enabled. | |
discount | number | Discount percentage applied to the subtotal. | |
tax | number | Tax percentage applied after discount. | |
redirectUrl | string | ✓ | Where to send the customer after payment. |
idempotencyKey | string | Unique key to prevent duplicate charges on retry. See Idempotency. | |
metadata | object | Arbitrary key-value pairs stored with the transaction. |
Verify the payment
Always verify the payment on your server before fulfilling the order. The redirect alone is not proof of payment — it can be triggered manually by anyone with your redirectUrl.
After the customer is redirected back, your callback route receives a session_id query parameter. Verify it:
// GET /payment/callback?session_id=checkout_xyz
const session = await Seev.callback();
if (session.isSuccessful()) {
// Safe to fulfil the order
await fulfillOrder(session.reference);
res.redirect('/order/confirmed');
} else {
// Payment failed, cancelled, or is pending
res.redirect('/order/failed');
}| Property / Method | Description |
|---|---|
session.isSuccessful() | true if the payment completed successfully |
session.id | The checkout session ID |
session.status | Raw status string (success, failed, pending) |
session.reference | Transaction reference for your records |
session.getSession() | Full session object from the API |
For webhook-based verification (recommended for fulfilment), see Webhooks.
Supported payment channels
By default, all channels enabled on your account are shown at checkout. Pass a channels array to restrict the options shown to the customer.
| Value | Channel |
|---|---|
card | Visa, Mastercard, Verve |
mobile_money | MTN MoMo, Telecel Cash, Airtel Money |
bank | Bank transfer via virtual account |
crypto | USDT, USDC, BTC, ETH |
See Payment Channels for the full list of supported providers and countries.