Checkout
Checkout creates a hosted payment page. You redirect the customer to its url, and IntaSend
shows the payment methods enabled on your account for that currency.
Checkout is authenticated with your publishable key, so you can call it from your frontend or your server.
curl -X POST https://api.intasend.com/api/v1/checkout/ \
-H "X-IntaSend-Public-API-Key: ISPubKey_test_xxxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 1500,
"currency": "KES",
"email": "[email protected]",
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "254712345678",
"api_ref": "order-123",
"redirect_url": "https://example.com/thank-you"
}'
{
"id": "0b7d…",
"url": "https://sandbox.intasend.com/checkout/0b7d…/express/",
"signature": "eyJ…",
"amount": 1500,
"currency": "KES",
"paid": false
}
Redirect the customer to url. After they pay, they are sent to redirect_url.
Request
| Field | Required | Description |
|---|---|---|
amount | Yes | Amount to charge, up to 2 decimal places. Minimum 0.10. |
currency | No | KES (default), USD, EUR, GBP, UGX, TZS, RWF, CDF. UGX and TZS amounts must be between 500 and 5,000,000. |
email, first_name, last_name, phone_number | No | Prefills the customer's details. Names are max 45 characters. |
country, address, city, state, zipcode | No | Billing address (card payments). country is ISO-2. |
api_ref | No | Your reference (letters, numbers, -, _, : and spaces, max 140 characters) |
unique_api_ref | No | true returns the existing checkout for this api_ref instead of creating a new one |
redirect_url | No | Where the customer goes after paying |
wallet_id | No | Wallet to credit. Defaults to your settlement wallet for the currency. |
host | No | Your site's URL. Defaults to the caller's IP address. |
channel | No | Where the checkout comes from: WEBSITE (default), WOOCOMMERCE, SHOPIFY, WORDPRESS, BUBBLE or MOBILE. With WOOCOMMERCE, the result is also posted to {host}/wc-api/intasend_webhook/. With SHOPIFY, it is posted to the IntaSend Shopify app. |
is_mobile | No | true when the checkout is opened from a mobile app |
mobile_tarrif, card_tarrif, bank_tarrif | No | Who pays the M-Pesa/mobile money, card and PesaLink fees. See Fees. |
bitcoin_tarrif, pyusd_tarrif, ach_tarrif, transfi_tarrif | No | Who pays the crypto (Bitcoin), PYUSD, ACH and TransFi fees: BUSINESS-PAYS (default) or CUSTOMER-PAYS |
public_key | No | Your publishable key, if you can't send the X-IntaSend-Public-API-Key header |
method is ignored. The customer picks the method on the page.
Fees
Each tariff field takes BUSINESS-PAYS (the fee is deducted from what you receive) or
CUSTOMER-PAYS (the fee is added to what the customer pays). See Who pays the fees.
For checkout, mobile_tarrif, card_tarrif and bank_tarrif currently follow the default tariff
in your dashboard's payment settings, and the values you send are overridden. To change who pays these fees on checkout, change that setting.
Methods shown
The page shows the methods enabled on your account:
| Currency | Methods |
|---|---|
| KES | M-Pesa, card, Apple Pay, Google Pay, PesaLink, crypto |
| USD / EUR / GBP | Card, Apple Pay, Google Pay, crypto |
| UGX | MTN, Airtel |
| TZS | M-Pesa TZ, Tigo Pesa, Airtel, HaloPesa |
Confirming payment
Don't treat a redirect to redirect_url as proof of payment. Instead, confirm with one of these:
- the
collection_eventwebhook (recommended), or - payment status using the invoice ID.