Paystack Direct Debit: When and How to Use It
Paystack direct debit allows you to charge a customer bank account directly on a recurring basis after the customer authorizes a mandate. The mandate specifies the amount and frequency. Once authorized, you can initiate debits without the customer taking action each time. It is suitable for subscription billing, loan repayments, and recurring collections where card expiry is a problem.
What Is Direct Debit?
Direct debit is a payment method where you (the merchant) pull money from a customer's bank account. Unlike a bank transfer where the customer pushes money to you, direct debit gives you the ability to initiate the charge on your end.
The customer authorizes this upfront by creating a "mandate": a formal agreement that says "I authorize [Your Business] to debit my account at [Bank] for [Amount] every [Frequency]." Once the mandate is active, you can initiate debits according to the agreed schedule without the customer taking any action.
Direct debit is different from other Paystack payment channels:
- Card payments: You charge a card. Cards expire, get lost, or get replaced. Direct debit from a bank account avoids these issues because bank accounts rarely change.
- Bank transfer: The customer pushes money to a temporary account. You wait for them to act. Direct debit lets you pull without waiting.
- USSD: The customer dials a code. Direct debit requires no customer action after the initial mandate.
The result is the most hands-off recurring payment method available: set it up once, charge on schedule, and the money arrives without the customer doing anything.
When to Use Direct Debit
Direct debit makes sense when the payment is recurring, predictable, and the customer relationship is ongoing:
Subscription billing
Monthly SaaS subscriptions, media subscriptions, or membership fees. Card-based recurring billing fails when cards expire. Direct debit from a bank account does not have this problem.
Loan repayments
Lending platforms need reliable, automated collections. Direct debit lets you pull the repayment on the due date without depending on the borrower to remember and act.
Insurance premiums
Monthly or quarterly insurance payments that need to arrive on time to keep coverage active.
Savings and investment contributions
Automated savings apps that pull a fixed amount weekly or monthly from the customer account.
Utility and service bills
Internet service providers, co-working spaces, or any service with regular billing.
Direct debit is not ideal for one-time payments, variable-amount charges where the amount changes unpredictably, or transactions where the customer expects to control exactly when payment happens.
Initiating Debits
Once a mandate is active, you can initiate debits according to the agreed schedule. Each debit is a separate transaction that references the mandate.
// Initiate a direct debit charge
async function chargeDirectDebit(mandateRecord) {
var response = await fetch('https://api.paystack.co/direct_debit/charge', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.PAYSTACK_SECRET_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
mandate: mandateRecord.mandate_id,
amount: mandateRecord.amount,
reference: 'dd_' + mandateRecord.user_id + '_' + new Date().toISOString().slice(0, 7),
}),
});
var data = await response.json();
return data;
}
// Scheduled job: run on the 1st of each month
async function processMonthlyDebits() {
var activeMandates = await db.mandates.findAll({
where: { status: 'active' },
});
for (var i = 0; i < activeMandates.length; i++) {
var mandate = activeMandates[i];
try {
var result = await chargeDirectDebit(mandate);
console.log('Debit initiated for mandate: ' + mandate.mandate_id);
} catch (err) {
console.log('Debit failed for mandate: ' + mandate.mandate_id);
console.log('Error: ' + err.message);
}
}
}
Direct debit charges are not instant. The debit is initiated, and it takes time for the bank to process and confirm. You receive a webhook when the debit is confirmed or when it fails. Do not grant value based on the initiation alone. Wait for the confirmation webhook.
Handling Failures and Reversals
Direct debits can fail or be reversed for several reasons:
- Insufficient funds: The customer bank account does not have enough money. The debit fails.
- Mandate revoked: The customer contacted their bank and cancelled the mandate. Future debits will fail.
- Account closed: The customer closed their bank account.
- Bank processing error: The bank had a technical issue processing the debit.
- Customer dispute: The customer contested the debit with their bank, and the bank reversed it.
// Webhook handler for direct debit events
app.post('/webhooks/paystack', function(req, res) {
res.sendStatus(200);
var event = req.body;
if (event.event === 'charge.success') {
// Direct debit confirmed
handleSuccessfulDebit(event.data);
}
if (event.event === 'charge.failed') {
// Direct debit failed
var reason = event.data.gateway_response;
handleFailedDebit(event.data, reason);
}
// Handle mandate-specific events if available
if (event.event === 'mandate.revoked') {
handleMandateRevocation(event.data);
}
});
async function handleFailedDebit(data, reason) {
var mandate = await db.mandates.findByReference(data.reference);
// Update the mandate status
await db.mandates.update(mandate.id, {
last_failure_reason: reason,
consecutive_failures: mandate.consecutive_failures + 1,
});
// After 3 consecutive failures, notify the customer to update their mandate
if (mandate.consecutive_failures + 1 >= 3) {
await notifyCustomerMandateIssue(mandate.user_id);
}
}
Direct Debit vs Card Billing
Both direct debit and card-based recurring billing (using saved authorization codes) achieve the same goal: charge the customer periodically without their active involvement. Here is how they compare:
| Factor | Direct Debit | Card Billing |
|---|---|---|
| Payment source | Bank account | Debit/credit card |
| Expiry risk | Low (accounts rarely change) | High (cards expire every 2-5 years) |
| Setup friction | Higher (mandate authorization) | Lower (one card payment) |
| Processing speed | Slower (bank processing) | Faster (instant or near-instant) |
| Customer base | Anyone with a bank account | Only cardholders |
| Availability | Limited to supported banks | All Paystack-supported cards |
In markets where card penetration is low but bank account ownership is high, direct debit can reach more customers. In markets where customers are accustomed to card payments, card billing is simpler to set up and faster to process.
Many businesses use both: card billing as the default and direct debit as an option for customers who prefer it or do not have cards.
Communicating with Customers
Direct debit involves pulling money from someone's account. Clear communication is not optional. Here is what to communicate at each stage:
- Before mandate creation: Explain what direct debit is, how much will be charged, and how often. Get explicit consent.
- During authorization: Tell the customer what to expect from their bank (an SMS, an app notification) and what to do (approve the mandate).
- Before each debit: Send a reminder 2-3 days before the debit date. "Your monthly subscription of NGN 10,000 will be debited on July 1."
- After each debit: Send a receipt. "NGN 10,000 has been debited from your account for your July subscription."
- On failure: Notify immediately. "We could not process your July payment. Please ensure sufficient funds in your account."
- On cancellation: Confirm that the mandate has been cancelled and no further debits will occur.
Customers who feel informed about charges are far less likely to dispute them. Customers who see unexpected debits go to their bank and reverse them, which costs you time and money.
Key Takeaways
- ✓Direct debit charges a customer bank account directly, bypassing cards entirely. No card expiry, no card replacement, no CVV.
- ✓The customer must authorize a mandate before you can charge their account. This authorization typically involves the customer approving through their bank.
- ✓Direct debit is best for recurring payments: subscriptions, loan repayments, insurance premiums, and scheduled savings.
- ✓Settlement timelines for direct debit may differ from card payments. Plan your cash flow accordingly.
- ✓Direct debit availability depends on your Paystack account type and the customer bank. Not all banks support it.
- ✓Always handle failed debits gracefully. Bank accounts can have insufficient funds, mandates can be revoked, and debits can be reversed.
Frequently Asked Questions
- Which banks support Paystack direct debit?
- Direct debit availability depends on your Paystack account type and the specific banks that have enabled the feature. Not all banks support direct debit mandates. Check with Paystack support or your dashboard for the current list of supported banks.
- Can the customer cancel a direct debit mandate?
- Yes. The customer can cancel the mandate through their bank at any time. When this happens, all future debit attempts will fail. Your system should handle mandate revocation gracefully and notify the customer to set up an alternative payment method.
- How long does it take for a direct debit to settle?
- Direct debit settlement timelines depend on the bank and Paystack processing. They are generally slower than card payments. Plan your cash flow assuming direct debits may take longer to settle than card transactions.
- Can I change the amount of a direct debit mandate?
- Mandate terms (amount, frequency) are typically fixed at creation. To change the amount, you would generally need to cancel the existing mandate and create a new one with the updated amount. The customer would need to authorize the new mandate.
- Is direct debit available outside Nigeria?
- Direct debit availability varies by Paystack market. It is most commonly available in Nigeria. For other markets (Ghana, South Africa, Kenya), check with Paystack support for current availability.
Ready to build real-world apps?
Join the McTaba Labs full-stack marathon (4 months full-time · 6 months part-time). Learn M-Pesa, USSD, and WhatsApp engineering while shipping 8 production apps.
Apply to the McTaba Marathon