To accept USSD payments through Paystack, initialize an NGN transaction with the ussd channel enabled. The checkout page shows a bank-specific USSD code. The customer dials the code on their phone, confirms the payment via USSD prompts, and Paystack fires a charge.success webhook. USSD works on feature phones without internet, making it accessible to customers without smartphones.
USSD (Unstructured Supplementary Service Data) is a protocol that lets mobile phones communicate with a service provider through short codes. Nigerian banks use USSD to let customers perform banking operations (check balance, transfer money, pay bills) by dialing codes from any phone.
When a customer selects USSD at Paystack checkout:
charge.success webhookThis works on any phone. No smartphone, no app, no internet connection needed. Just the ability to make a phone call. This makes USSD the most accessible payment channel for reaching customers in areas with limited smartphone penetration or unreliable data connectivity.
var response = await fetch('https://api.paystack.co/transaction/initialize', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.PAYSTACK_SECRET_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'customer@example.com',
amount: 500000, // 5,000 NGN
currency: 'NGN',
channels: ['ussd'],
callback_url: 'https://yoursite.com/payment/callback',
}),
});
var data = await response.json();
// Redirect to data.data.authorization_url
Paystack's checkout page handles bank selection, USSD code generation, and the waiting screen while the customer dials and confirms. The checkout updates automatically when the payment is confirmed.
Get weekly developer tips
Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.
No spam. Unsubscribe anytime.
For custom checkout flows, use the Charge API with a USSD object:
async function chargeViaUssd(email, amount, bankType) {
var response = await fetch('https://api.paystack.co/charge', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.PAYSTACK_SECRET_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: email,
amount: amount,
currency: 'NGN',
ussd: {
type: bankType, // e.g., '737' for GTBank
},
}),
});
var data = await response.json();
// data.data.status will be 'pay_offline'
// data.data.display_text contains the USSD code to show the customer
return {
status: data.data.status,
ussdCode: data.data.display_text,
reference: data.data.reference,
};
}
// Usage
var result = await chargeViaUssd('customer@example.com', 500000, '737');
// Show result.ussdCode to the customer
// e.g., "Dial *737*000*5000# on your phone to complete payment"
Bank type codes vary. Common ones include 737 for GTBank, 966 for Zenith, 770 for Fidelity, and 919 for UBA. Check the Paystack documentation for the full list of supported bank types.
USSD sessions have timeouts. If the customer does not complete the USSD flow within the bank's timeout window (typically 1-2 minutes after dialing), the session expires and the payment fails.
Each bank also sets per-transaction limits for USSD payments. These limits are typically lower than card or bank transfer limits. For example, a bank might allow USSD transactions up to 100,000 NGN. If your transaction exceeds the bank's USSD limit, the payment will fail even if the customer has sufficient funds.
To handle this:
USSD payments involve the customer switching between your checkout (on their phone browser or computer) and their phone's dialer. Make this transition smooth:
For mobile web checkouts, the customer is already on their phone. They can copy the code, switch to the dialer, dial it, and switch back. Some checkout implementations add a tap-to-dial link that opens the dialer directly.
USSD is most valuable when your customer base includes people who:
If your audience is primarily urban professionals with smartphones, card and bank transfer may be sufficient. If you serve a broader Nigerian population including rural areas and older demographics, USSD can significantly increase your payment completion rate.
For the full overview of all payment channels and how to choose between them, see payment channels overview.
KES 2,999
The definitive guide to building payment systems with Paystack — from your first transaction to production-grade payment infrastructure across Africa. 9 modules, 47 lessons. Free preview available.
Start Paystack Course