1Trust API
The 1Trust API has two products. Direct debit collects recurring payments from any Nigerian bank account: link a customer's account once, then charge any amount up to the limit. Identity verifies a customer's BVN or NIN. Each is switched on separately for your business.
All requests go to https://api.1trustmfb.com/v1 over HTTPS. Requests and responses are JSON. Amounts are in kobo (₦1 = 100 kobo).
How direct debit works
- Your server calls
POST /mandates. We register the mandate with the customer's bank. - We send the customer a hosted activation link by Resend email. The customer sends ₦50 from the mandated account to the
activation.pay_todestination and confirms the transfer; this acknowledgement is not proof of receipt. - We mark the mandate active only after provider status confirms the matching mandate/account, bank approval and advice sent. Check
is_chargeablebefore debiting; a six-hour cooling-off period applies after activation. - You call
POST /mandates/{code}/debitwhenever a payment is due. - We send
debit.successordebit.failed.
Authentication
Authenticate every request with your secret key in the Authorization header. Find your keys under API keys & webhooks in the dashboard.
Test keys start with sk_test_ and never move money. Live keys start with sk_live_ and move real money. Keep secret keys on your server only.
Authorization: Bearer sk_test_3b1f…c81e
Errors
Every response has a boolean status and a human-readable message. Failed requests also return an error.code you can branch on.
| HTTP | Meaning |
|---|---|
| 200 / 201 | Request succeeded |
| 400 | A field is missing or invalid |
| 401 | Missing or wrong secret key |
| 404 | Mandate or debit not found |
| 409 | Duplicate reference, or a second debit on the same day |
| 422 | The customer's bank declined the request (see error.code) |
| 5xx | Something went wrong on our side. Retry with the same reference. |
| error.code | What to do |
|---|---|
| missing_field | A required field is missing; error.field names it |
| invalid_phone | Phone must be 11 digits, starting with 0 |
| invalid_account_number | Account number must be 10 digits |
| invalid_email | Send a valid email address |
| invalid_reference | Use 1–50 letters, numbers, underscores or hyphens |
| already_debited_today | One debit per mandate per day. Try again tomorrow |
| customer_exists | A customer with this email is already saved; fetch it instead |
| customer_id_taken | Your customer ID is already used by another customer |
| live_not_enabled | Use your test keys until 1Trust approves Live |
| merchant_suspended | Contact 1Trust support |
| mandate_cooling_off | First charge is allowed 6 hours after activation |
| amount_below_minimum | Minimum debit is ₦500 |
| mandate_not_active | Wait for provider-confirmed activation and debit only when is_chargeable is true |
| amount_exceeds_mandate | Debit no more than the mandate amount |
| insufficient_funds | Retry on another day |
| account_name_mismatch | Check the account number and BVN belong to the same person |
| mandate_account_mismatch | The account or bank doesn't match the mandate |
| mandate_not_started | The mandate's start date is in the future. Charge on or after the start date. |
| limit_exceeded | On a debit: the customer's transfer limit or withdrawal frequency is reached. On mandate create: your daily mandate limit is reached; try tomorrow or contact 1Trust |
| status_unknown | The debit isn't confirmed yet. We check again and send a webhook; don't retry with a new reference |
| invalid_bvn | BVN must be 11 digits and exist |
| invalid_nin_sharecode | Ask the customer for a fresh ShareCode from the NINAuth app |
| consent_declined | The customer said no. Start a new verification if they change their mind |
| verification_unavailable | Temporarily unavailable. Retry in a few minutes; you aren't billed |
| consent_required | A BVN Full check needs the customer's consent. Request consent, or pass a consent_code |
| sandbox_limit_reached | Test mode only: the allowance of test checks against the real verification service is used up. Contact 1Trust |
| invalid_date | Send dates as YYYY-MM-DD (Lagos days, both ends included), with from on or before to |
| idempotency_key_reused | This Idempotency-Key was used with a different request. Use a new key |
| idempotency_in_progress | The first request with this key is still running. Retry shortly with the same key |
| delivery_in_progress | The webhook delivery is being sent right now. Check its status in a minute |
| conflict | The request clashed with another one at the same moment. Retry |
| rate_limited | Too many requests (for example, more than 10 test webhooks a minute). Wait and retry |
| module_not_enabled | This product isn't switched on for your business. Ask 1Trust to enable it |
{
"status": false,
"message": "Mandate is not active yet",
"error": {
"code": "mandate_not_active",
"field": null
}
}Pagination
List endpoints return 50 records per page by default. Pass page and per_page (up to 100). The response includes a meta object so you know when to stop.
{
"status": true,
"message": "Mandates retrieved",
"data": [
"…"
],
"meta": {
"total": 236,
"page": 2,
"per_page": 50,
"page_count": 5
}
}Rate limits
Each secret key can make up to 20 requests per second. Above that you get HTTP 429; wait a second and retry. Separately, each mandate defaults to one debit per Lagos calendar day. The mandate's max_debits_per_day controls the daily limit; Live limits above one are unavailable until provider support is confirmed.
Test mode
Use test keys to build your integration. Test mandates move to pending_activation straight away. Use these account numbers to trigger outcomes:
| Account number | Result |
|---|---|
| 0000000001 | Mandate activates after 60 seconds |
| 0000000002 | Mandate rejected: account name mismatch |
| 0000000003 | Debits fail with insufficient_funds |
| Any other | Stays pending until you choose Simulate ₦50 transfer in the dashboard |
List customers
Returns your customers, newest first, with how many mandates each has, what you have collected from them and their latest identity check.
Query
Search name, email, phone or your customer ID
Defaults 1 and 50; max 100
curl https://api.1trustmfb.com/v1/customers?q=zainab \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/customers?q=zainab", { method: "GET", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, }, }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/customers?q=zainab"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/customers?q=zainab",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json(){
"status": true,
"message": "Customers retrieved",
"data": [
{
"id": "cmuszz1wv000569urq2kfw9de",
"customer_id": "CUST-00931",
"name": "Zainab Abdullahi",
"email": "zainab.abdullahi@example.com",
"phone": "08023456789",
"address": "22 Gana Street, Maitama, Abuja",
"mandates": 1,
"active_mandates": 1,
"collected": 4500000,
"identity": {
"status": "verified",
"checked_at": "2026-10-01T08: 00: 02+01: 00"
},
"created_at": "2026-09-25T11: 30: 00+01: 00"
}
],
"meta": {
"total": 1,
"page": 1,
"per_page": 50,
"page_count": 1
}
}Create customer
Saves a customer so you can pick them when you create a mandate. Each email, and each of your customer IDs, can be used once per mode.
Body
Full name as on the bank account
Customer email
11-digit Nigerian phone number
Customer address
Your ID for this customer, up to 40 characters
Errors
409 customer_exists when the email is already saved, 409 customer_id_taken when your customer ID is already used.
curl -X POST https://api.1trustmfb.com/v1/customers \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "name": "Zainab Abdullahi", "email": "zainab.abdullahi@example.com", "phone": "08023456789", "address": "22 Gana Street, Maitama, Abuja", "customer_id": "CUST-00931" }'
const res = await fetch("https://api.1trustmfb.com/v1/customers", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Zainab Abdullahi", "email": "zainab.abdullahi@example.com", "phone": "08023456789", "address": "22 Gana Street, Maitama, Abuja", "customer_id": "CUST-00931" }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/customers"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "name" => "Zainab Abdullahi", "email" => "zainab.abdullahi@example.com", "phone" => "08023456789", "address" => "22 Gana Street, Maitama, Abuja", "customer_id" => "CUST-00931" ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/customers",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"name": "Zainab Abdullahi",
"email": "zainab.abdullahi@example.com",
"phone": "08023456789",
"address": "22 Gana Street, Maitama, Abuja",
"customer_id": "CUST-00931",
},
)
data = res.json(){
"status": true,
"message": "Customer created",
"data": {
"id": "cmuszz1wv000569urq2kfw9de",
"customer_id": "CUST-00931",
"name": "Zainab Abdullahi",
"email": "zainab.abdullahi@example.com",
"phone": "08023456789",
"address": "22 Gana Street, Maitama, Abuja",
"mandates": 0,
"active_mandates": 0,
"collected": 0,
"identity": null,
"created_at": "2026-09-25T11: 30: 00+01: 00"
}
}List banks
Returns banks whose customers can be debited by direct debit. Use the code as bank_code when creating a mandate.
curl https://api.1trustmfb.com/v1/banks \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/banks", { method: "GET", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, }, }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/banks"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/banks",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json(){
"status": true,
"message": "Banks retrieved",
"data": [
{
"code": "044",
"name": "Access Bank"
},
{
"code": "023",
"name": "Citibank Nigeria"
},
{
"code": "050",
"name": "Ecobank Nigeria"
},
{
"code": "070",
"name": "Fidelity Bank"
},
{
"code": "011",
"name": "First Bank of Nigeria"
},
{
"code": "214",
"name": "First City Monument Bank"
},
{
"code": "00103",
"name": "Globus Bank"
},
{
"code": "058",
"name": "Guaranty Trust Bank"
},
{
"code": "030",
"name": "Heritage Bank"
},
{
"code": "301",
"name": "Jaiz Bank"
},
{
"code": "082",
"name": "Keystone Bank"
},
{
"code": "076",
"name": "Polaris Bank"
},
{
"code": "105",
"name": "PremiumTrust Bank"
},
{
"code": "101",
"name": "Providus Bank"
},
{
"code": "221",
"name": "Stanbic IBTC Bank"
},
{
"code": "068",
"name": "Standard Chartered Bank"
},
{
"code": "232",
"name": "Sterling Bank"
},
{
"code": "100",
"name": "Suntrust Bank"
},
{
"code": "102",
"name": "Titan Bank"
},
{
"code": "032",
"name": "Union Bank of Nigeria"
},
{
"code": "033",
"name": "United Bank For Africa"
},
{
"code": "215",
"name": "Unity Bank"
},
{
"code": "035",
"name": "Wema Bank"
},
{
"code": "057",
"name": "Zenith Bank"
}
]
}Create mandate
For the recommended hosted-first flow, create the mandate with the customer's email. The customer enters their phone and bank details on the 1Trust activation page. Name and phone are optional for this flow. The email OTP confirms access to the email only; no SMS is sent and phone ownership/BVN linkage are not verified. Bank/account details and address are optional at creation. If you collect the account before creating the mandate, verify it with POST /mandates/verify-account and pass its returned account name with both bank code and account number.
activation_url as a bearer secret, send it over HTTPS, never log it, and let the customer complete the hosted flow.Body
Optional for hosted activation; otherwise supply the expected payer/account-holder name
Receives activation link and one-time email code
Optional for hosted activation; the payer enters it on the hosted page. No phone-ownership check is performed.
Collected on the hosted page if omitted
Your ID for this customer
Provide together with account_number for a prefilled account; omit both for hosted account choice. Live NDD supports only configured three-digit CBN codes.
10-digit NUBAN; provide together with bank_code or omit both for hosted account choice.
For a prefilled Live account, required: pass the exact name returned by POST /mandates/verify-account.
hosted (default) or merchant_managed for a payer-scoped UI session
Optional public HTTPS completion URL in Live; shown only after provider-confirmed linking and is not proof of activation
Most you can debit at once, in kobo (minimum ₦500)
Defaults to one. Live values above one require confirmed bank capability.
YYYY-MM-DD. Mandate stops after this date.
What the customer is paying for
Your unique ID for this mandate
curl -X POST https://api.1trustmfb.com/v1/mandates \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "customer": { "email": "zainab.abdullahi@example.com", "id": "CUST-00931" }, "max_amount": 4500000, "max_debits_per_day": 1, "end_date": "2027-09-30", "description": "Loan repayment", "reference": "MND-REF-00931" }'
const res = await fetch("https://api.1trustmfb.com/v1/mandates", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "customer": { "email": "zainab.abdullahi@example.com", "id": "CUST-00931" }, "max_amount": 4500000, "max_debits_per_day": 1, "end_date": "2027-09-30", "description": "Loan repayment", "reference": "MND-REF-00931" }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/mandates"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "customer" => [ "email" => "zainab.abdullahi@example.com", "id" => "CUST-00931" ], "max_amount" => 4500000, "max_debits_per_day" => 1, "end_date" => "2027-09-30", "description" => "Loan repayment", "reference" => "MND-REF-00931" ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/mandates",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"customer": {
"email": "zainab.abdullahi@example.com",
"id": "CUST-00931",
},
"max_amount": 4500000,
"max_debits_per_day": 1,
"end_date": "2027-09-30",
"description": "Loan repayment",
"reference": "MND-REF-00931",
},
)
data = res.json(){
"status": true,
"message": "Mandate created",
"data": {
"mandate_code": "MND_1052X7QA",
"status": "pending_activation",
"activation_url": "https://api.1trustmfb.com/activation/<one-time-token>",
"bank_code": null,
"account_number": null,
"activation": null
}
}Hosted customer activation
This is the recommended integration method: create a draft mandate on your server with the customer's email, then let the customer finish phone capture, bank selection, account verification, address capture and the ₦50 activation step on 1Trust's hosted page. 1Trust emails the link through Resend and returns the same one-time URL as a secure fallback. The customer enters the email OTP and reports when they have sent the transfer on the hosted page; your app does not collect the OTP or handle that acknowledgement.
Integration method
- Your backend creates the mandate with customer email, amount in kobo and end date; name and phone may be omitted. Omit bank/account/address to let the customer enter them securely on the hosted page. Include a stable
Idempotency-Keyfor safe retries. - 1Trust emails the customer an activation link. You may redirect to
activation_urlfor an immediate handoff. Treat it as a bearer secret; never log it, put it in analytics, or expose it in a URL query parameter. - The customer enters their BVN-linked phone number and receives a one-time code by email. No SMS is used. The email code confirms access to the activation email only; it does not prove phone ownership or BVN linkage.
- The customer selects a bank, enters a 10-digit account number, and sees the result of automatic Live EasyPay Name Enquiry. If no expected customer name was supplied, the verified account name becomes the customer name. Then they enter their address.
- After NDD returns one unambiguous destination, the customer sees the complete
activation.pay_tobank, account name, account number and ₦50 instructions. If any destination detail is missing, the page blocks payment acknowledgement and asks the customer to wait; 1Trust never substitutes the payer account or invents a destination. - The customer may acknowledge that they sent the transfer, but that acknowledgement is not proof of receipt. Process the mandate.active and other lifecycle webhooks idempotently or poll
GET /mandates/{mandate_code}. Bank approval and advice sent are separate milestones; debit only whenis_chargeableis true.
Merchant-managed alternative
Set activation_mode: "merchant_managed" to render your own UI. The browser exchanges the emailed one-time activation link at POST /activation/{token}/managed-session and uses only the returned 15-minute payer-scoped Bearer token against /activation/managed/*. Never place your merchant API key in browser code. OTP and account verification remain server-side at 1Trust; Test mode makes no NDD/EasyPay calls. An optional HTTPS return_url is displayed only after provider-confirmed linking; the return is not evidence of activation.
Recovery
Activation email delivery is asynchronous. The single-mandate retry endpoint queues another email and returns activation_url as a secure fallback. A still-valid link is reused; an expired link is rotated without discarding completed customer steps. A new email code can be requested from the OTP screen after the cooldown. The link expires after seven days.
Test mode
Test activation is local and deterministic. The hosted page returns test OTP 123456, makes no NDD/EasyPay calls, and completes the ₦50 step in the database. Live account verification uses EasyPay Name Enquiry; Live activation only succeeds after provider confirmation.
Supported live banks
NDD requires a three-digit CBN bank code. The public bank directory can include codes in other formats; 1Trust fails closed for a code NDD does not support and will not silently rewrite it. Confirm availability with 1Trust before asking a customer to continue.
Customer completion
The hosted page shows the customer's verified source account separately from the 1Trust activation destination. The customer sends ₦50 to the complete bank network destination, then acknowledges the transfer. This acknowledgement does not activate the mandate; NDD confirmation, advice sent, identity matching and the cooling-off period determine readiness.
const API = "https://api.1trustmfb.com/v1"; const secretKey = process.env.ONETRUST_SECRET_KEY; // server only type DebitScheduleInput = { amount: number; frequency: "DAILY" | "WEEKLY" | "MONTHLY"; startAt: string; endAt?: string }; type CreateMandateInput = { customer: { name?: string; email: string; phone?: string; id?: string }; max_amount: number; end_date: string; description?: string; reference?: string; idempotency_key: string; debitSchedule?: DebitScheduleInput; }; async function request(path: string, { method = "POST", body, idempotencyKey }: { method?: "GET" | "POST"; body?: unknown; idempotencyKey?: string } = {}): Promise<any> { const response = await fetch(API + path, { method, headers: { Authorization: `Bearer ${secretKey}`, ...(body ? { "Content-Type": "application/json" } : {}), ...(idempotencyKey ? { "Idempotency-Key": idempotencyKey } : {}), }, ...(body ? { body: JSON.stringify(body) } : {}), }); const result: any = await response.json(); if (!response.ok || !result.status) { throw new Error(result.error?.message || result.message || `1Trust request failed (${response.status})`); } return result.data; } export async function createHostedMandate(input: CreateMandateInput) { if (!input.idempotency_key) throw new Error("Provide a stable idempotency_key for this logical create request"); const mandate = await request("/mandates", { body: { customer: input.customer, // Hosted-first: omit bank_code, account_number, account_name and address. max_amount: input.max_amount, // kobo; minimum 50000 (₦500) max_debits_per_day: 1, // Optional; created atomically and held until provider-confirmed chargeability. ...(input.debitSchedule ? { debit_schedule: { amount: input.debitSchedule.amount, // kobo; minimum 50000 frequency: input.debitSchedule.frequency, // DAILY | WEEKLY | MONTHLY start_at: input.debitSchedule.startAt, // ISO-8601 timestamp ...(input.debitSchedule.endAt ? { end_at: input.debitSchedule.endAt } : {}), } } : {}), end_date: input.end_date, // YYYY-MM-DD description: input.description, reference: input.reference, }, idempotencyKey: input.idempotency_key, }); return { mandateCode: mandate.mandate_code, status: mandate.status, // pending_activation activationUrl: mandate.activation_url, // secret fallback; never log activation: mandate.activation, // may be null until ready }; } // Email is queued by 1Trust. Redirect only when your UI needs an immediate handoff. // Before charging later, fetch the mandate and require status === "active" and // chargeable_from <= the current time. The active webhook can trigger this check. export async function getMandateStatus(mandateCode: string) { return request("/mandates/" + encodeURIComponent(mandateCode), { method: "GET" }); } export async function createDebit(mandateCode: string, amount: number, reference: string) { const current = await getMandateStatus(mandateCode); if (current.status !== "active" || current.is_chargeable !== true) throw new Error("Mandate is not chargeable yet"); return request("/mandates/" + encodeURIComponent(mandateCode) + "/debit", { body: { amount, reference }, idempotencyKey: reference, }); } // For a pending mandate, retry queues another email and returns the safe fallback URL. export async function retryHostedActivation(mandateCode) { const mandate = await request("/mandates/" + encodeURIComponent(mandateCode) + "/retry-activation"); return mandate.activation_url; } }
# Create the mandate from your server. Keep the secret key server-side. # Reuse this Idempotency-Key only when retrying the same logical request. curl -sS https://api.1trustmfb.com/v1/mandates \ -H "Authorization: Bearer $ONETRUST_SECRET_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: mandate-customer-00931" \ -d '{"customer":{"name":"Zainab Abdullahi","email":"zainab@example.com","phone":"08023456789","id":"CUST-00931"},"max_amount":4500000,"max_debits_per_day":1,"end_date":"2027-09-30","description":"Loan repayment","reference":"MND-REF-00931"}'
// Call this from the customer browser only after receiving the emailed activation URL.
// Never place your merchant secret key in this code.
const linkToken = new URL(window.location.href).pathname.split("/").filter(Boolean).pop();
const sessionUrl = "https://api.1trustmfb.com/activation/" + encodeURIComponent(linkToken) + "/managed-session";
const sessionResponse = await fetch(sessionUrl, { method: "POST" });
if (!sessionResponse.ok) throw new Error("Activation session could not be started");
const session = await sessionResponse.json();
const headers = { Authorization: "Bearer " + session.access_token, "Content-Type": "application/json" };
const state = await fetch("https://api.1trustmfb.com/activation/managed/session/state", { headers }).then(r => r.json());
// Submit each customer step to /activation/managed/session/phone, /otp,
// /account, /address and /payment with this short-lived token. Do not log it.
// Check the mandate via your server/webhook; browser redirects are not proof.
{
"status": true,
"message": "Mandate created",
"data": {
"mandate_code": "MND_1052X7QA",
"status": "pending_activation",
"activation_mode": "hosted",
"activation_url": "https://api.1trustmfb.com/activation/<one-time-token>",
"activation": null,
"is_chargeable": false,
"chargeability_reason": "Waiting for final bank confirmation",
"reference": "MND-REF-00931"
}
}List mandates
Returns your mandates, newest first.
Query
pending_activation, active, cancelled, expired or rejected
Filter by customer email
Created between these dates
Defaults 1 and 50; max 100
curl https://api.1trustmfb.com/v1/mandates?status=active&per_page=20 \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/mandates?status=active&per_page=20", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`,
},
});
const data = await res.json();$ch = curl_init("https://api.1trustmfb.com/v1/mandates?status=active&per_page=20");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"),
"Content-Type: application/json",
],
]);
$data = json_decode(curl_exec($ch), true);import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/mandates?status=active&per_page=20",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json()Fetch mandate
Returns one mandate with its current status and, if still pending, the activation instructions.
Mandate statuses
| Status | Meaning |
|---|---|
| pending_activation | Activation is still being completed or confirmed; the customer may need to send the ₦50 transfer, or the bank may still need to approve the mandate and send advice. |
| active | The provider confirmed activation. Debit only when is_chargeable is true; the six-hour cooling-off period may still be in progress. |
| rejected | Bank declined, often a BVN or name mismatch |
| expired | No ₦50 transfer within 7 days |
| cancelled | Stopped by you or the customer |
| completed | End date passed |
curl https://api.1trustmfb.com/v1/mandates/MND_1052X7QA \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/mandates/MND_1052X7QA", { method: "GET", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, }, }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/mandates/MND_1052X7QA"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/mandates/MND_1052X7QA",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json()Pause or resume a mandate
Pausing suspends the mandate so no debits can go through. Call POST /mandates/{mandate_code}/resume to make it active again. Neither call needs a body.
curl -X POST https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/pause \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/pause", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, }, }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/pause"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/pause",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json()Cancel mandate
Stops all future debits. This can't be undone. Create a new mandate to start again.
Stored for your records
curl -X POST https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/cancel \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "reason": "Customer closed account" }'
const res = await fetch("https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/cancel", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "reason": "Customer closed account" }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/cancel"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "reason" => "Customer closed account" ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/cancel",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"reason": "Customer closed account",
},
)
data = res.json()Debit mandate
Charges only a provider-confirmed active mandate when is_chargeable is true; the six-hour cooling-off period must have elapsed. Amount: ₦500 up to the mandate's max. Set allow_partial: true to accept a lower amount only when the bank confirms it; the collected amount must be at least ₦500. The response reports requested, collected and remaining amounts, and does not automatically retry the remainder. Live use is disabled until partial collection is configured for 1Trust's production NDD profile and operations enable the Live gate. Test mode includes a deterministic partial-result fixture on account ending 0004. The default limit is one debit per mandate per Lagos day; max_debits_per_day can raise it in Test, while Live remains one unless provider support is explicitly enabled. The default fee is ₦100 platform fee + 7.5% VAT (₦107.50); an explicitly configured percentage-with-cap policy calculates its percentage on the gross debit, rounds half-up to kobo, applies the cap, then adds VAT. Confirmed responses and webhooks include fee/VAT/net based on the amount actually collected. Payout is at 3:00pm the same day (debits before 2:00pm) or 9:00am the next business day. Results arrive via debit.success, debit.partial or debit.failed.
Requested amount in kobo; at least ₦500 and within the mandate cap.
Accept a bank-confirmed lower collection; default false. No automatic retry of the remainder.
Your unique reference. Reuse it with the same amount and partial option to retry safely.
Up to 50 characters. Defaults to your business name + "via 1Trust".
curl -X POST https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/debit \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "amount": 4500000, "allow_partial": true, "reference": "ORD_7H2KD91Q", "narration": "October instalment" }'
const res = await fetch("https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/debit", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "amount": 4500000, "allow_partial": true, "reference": "ORD_7H2KD91Q", "narration": "October instalment" }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/debit"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "amount" => 4500000, "allow_partial" => true, "reference" => "ORD_7H2KD91Q", "narration" => "October instalment" ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/debit",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"amount": 4500000,
"allow_partial": True,
"reference": "ORD_7H2KD91Q",
"narration": "October instalment",
},
)
data = res.json(){
"status": true,
"message": "Debit successful",
"data": {
"reference": "ORD_7H2KD91Q",
"mandate_code": "MND_1052X7QA",
"amount": 3000000,
"requested_amount": 4500000,
"allow_partial": true,
"platform_fee": 10000,
"vat": 750,
"fee": 10750,
"fee_model": "FLAT",
"net": 4489250,
"status": "partial",
"narration": "October instalment",
"session_id": "999999260925100455123456789012",
"created_at": "2026-10-01T09: 12: 44+01: 00",
"remaining_amount": 1500000
}
}Retry activation
For a pending_activation mandate: resends the ₦50 instructions to the customer and rechecks its status. Pass mandate_codes to POST /mandates/retry-activation to retry many at once.
curl -X POST https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/retry-activation \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/retry-activation", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, }, }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/retry-activation"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/mandates/MND_1052X7QA/retry-activation",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json()Debit schedules
Let 1Trust trigger recurring daily, weekly or monthly debit occurrences for a mandate. You may create a schedule atomically in POST /mandates with debit_schedule, or add one later with the endpoint below. Create-time schedules start as pending_activation and do not run until NDD confirms the matching mandate is active, advice is sent, and cooling-off has ended. If activation is late, at most one overdue occurrence runs; missed periods are skipped rather than burst-charged. The minimum stays ₦500, each amount must remain within the mandate cap, and the mandate daily limit still applies. Live schedules with a daily limit above one remain blocked unless 1Trust has confirmed provider support.
Create after activation
POST /mandates/{mandate_code}/schedules with amount in kobo, frequency (DAILY, WEEKLY, MONTHLY), start_at ISO timestamp, and optional end_at.
Manage
Use GET /mandates/{mandate_code}/schedules, GET /debit-schedules/{id}, PATCH /debit-schedules/{id} to reschedule or pause/resume, and DELETE /debit-schedules/{id} to cancel. Each occurrence is idempotent. A transfer with unknown status is queried; it is never blindly sent again. Only a definitive insufficient-funds outcome may get a delayed retry.
Track
Schedule responses include recent occurrence status: pending activation, queued, processing, succeeded, failed or unknown. The resulting debit remains available through the regular debit APIs and webhooks.
Collection analytics
Returns mode-scoped collection and mandate metrics for the authenticated merchant. It defaults to the last 30 Lagos calendar days. Pass from and to as YYYY-MM-DD; ranges are inclusive and limited to 366 days.
Money values are in kobo. Includes gross collected, fees, VAT, merchant net, activation and first-debit conversion, average time to activation, and successful, failed and processing debit counts.
curl https://api.1trustmfb.com/v1/analytics?from=2026-09-08&to=2026-10-07 \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/analytics?from=2026-09-08&to=2026-10-07", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`,
},
});
const data = await res.json();$ch = curl_init("https://api.1trustmfb.com/v1/analytics?from=2026-09-08&to=2026-10-07");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"),
"Content-Type: application/json",
],
]);
$data = json_decode(curl_exec($ch), true);import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/analytics?from=2026-09-08&to=2026-10-07",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json(){
"status": true,
"message": "Analytics retrieved",
"data": {
"mode": "TEST",
"from": "2026-09-07T23: 00: 00.000Z",
"to": "2026-10-07T22: 59: 59.999Z",
"debits": {
"count": 12,
"successful": 10,
"failed": 1,
"processing": 1
},
"gross_collected": 1200000,
"fees": 100000,
"vat": 7500,
"merchant_net": 1092500,
"mandates": {
"created": 8,
"activated": 6,
"activation_conversion": 0.75,
"first_debit": 5,
"first_debit_conversion": 0.625,
"average_time_to_activation_seconds": 4200
}
}
}Fetch debit
Returns a debit by your reference. Use it to confirm the result if you missed a webhook. List all debits with GET /debits, which takes the same filters as List mandates.
curl https://api.1trustmfb.com/v1/debits/ORD_7H2KD91Q \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/debits/ORD_7H2KD91Q", { method: "GET", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, }, }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/debits/ORD_7H2KD91Q"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/debits/ORD_7H2KD91Q",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json()List payouts
Two payouts each business day, minus fees: 3:00pm for debits made between 2:00am and 1:59pm, and 9:00am the next business day for the rest. Weekend debits are paid Monday 9:00am. Each payout lists the debits it covers.
{
"status": true,
"message": "Payouts retrieved",
"data": [
{
"id": "PO_20260926",
"date": "2026-09-26",
"debits": 3,
"collected": 21500000,
"fees": 32250,
"amount": 21467750,
"status": "paid",
"account": {
"bank_code": "058",
"account_number": "0123456780"
}
}
]
}Transfers
Send money from your 1Trust balance to any Nigerian bank account. The flow matches Paystack Transfers, so existing code ports with a base URL and key change.
- Fund your balance. In Settings → Transfers, choose Settle to: Transfers wallet. Each direct debit settlement then lands in your balance instead of your bank account. In test mode, use
POST /wallet/simulate_settlement. - Save a recipient with
POST /transferrecipient. We confirm the account name with the bank. - Send with
POST /transfer. Amount + fee + VAT are held at once. - Confirm: with OTP on, finalize with the emailed code. With an approval URL set, we POST the transfer to you first; reply 200 to approve, 400 to reject.
- Get the result by webhook:
transfer.success,transfer.failedortransfer.reversed.
| Status | Meaning |
|---|---|
| otp | Waiting for your code (30 minutes, then abandoned) |
| received | Sent to your approval URL |
| pending | On its way. Money stays held until a final answer; it is never refunded on a guess. |
| success | Paid |
| failed | Not paid; amount + fee + VAT refunded |
| reversed | Paid, then returned by the recipient bank; everything refunded |
| abandoned · blocked · rejected | OTP not confirmed · approval URL didn't answer · approval URL said no. Refunded. |
Fees
₦10 up to ₦5,000; ₦25 from ₦5,001 to ₦50,000; ₦50 above ₦50,000, plus 7.5% VAT on the fee. Withdrawals to your settlement account are free. fees_breakdown lists each line.
Limits
₦1 to ₦5,000,000 per transfer and ₦20,000,000 a day by default; 100 items per bulk batch, one batch every 5 seconds; 100 transfer requests a minute. Live transfers are accepted only from your whitelisted IP addresses.
Test mode
No money moves. Account 0000000000 succeeds, 0000000001 fails (invalid_account), 0000000002 stays pending for 2 minutes then succeeds, 0000000003 succeeds then is reversed. Any bank code from the list works. Test responses include test_otp so you can finalize without email.
List banks
Banks you can send to. Use code as bank_code. cbn_code is the 3-digit alias, also accepted.
curl https://api.1trustmfb.com/v1/banks?use=transfer \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/banks?use=transfer", { method: "GET", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, }, }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/banks?use=transfer"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/banks?use=transfer",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json(){
"status": true,
"message": "Banks retrieved",
"data": [
{
"name": "Access Bank",
"code": "000014",
"cbn_code": "044",
"slug": "access-bank",
"active": true
}
]
}Resolve account
Returns the account name for an account number and bank.
10 digits
From List banks
curl https://api.1trustmfb.com/v1/bank/resolve?account_number=0123456789&bank_code=000014 \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/bank/resolve?account_number=0123456789&bank_code=000014", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`,
},
});
const data = await res.json();$ch = curl_init("https://api.1trustmfb.com/v1/bank/resolve?account_number=0123456789&bank_code=000014");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"),
"Content-Type: application/json",
],
]);
$data = json_decode(curl_exec($ch), true);import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/bank/resolve?account_number=0123456789&bank_code=000014",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json(){
"status": true,
"message": "Account number resolved",
"data": {
"account_number": "0123456789",
"account_name": "ADA OBI",
"bank_code": "000014",
"bank_name": "Access Bank"
}
}Create recipient
Saves a beneficiary. The same account again returns the saved recipient. Also: POST /transferrecipient/bulk (up to 100), GET /transferrecipient, GET, PUT (name, description) and DELETE (sets inactive) on /transferrecipient/{id_or_code}.
nuban
Defaults to the account name
10 digits
From List banks
curl -X POST https://api.1trustmfb.com/v1/transferrecipient \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "type": "nuban", "name": "Ada Obi", "account_number": "0123456789", "bank_code": "000014", "currency": "NGN" }'
const res = await fetch("https://api.1trustmfb.com/v1/transferrecipient", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "type": "nuban", "name": "Ada Obi", "account_number": "0123456789", "bank_code": "000014", "currency": "NGN" }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/transferrecipient"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "type" => "nuban", "name" => "Ada Obi", "account_number" => "0123456789", "bank_code" => "000014", "currency" => "NGN" ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/transferrecipient",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"type": "nuban",
"name": "Ada Obi",
"account_number": "0123456789",
"bank_code": "000014",
"currency": "NGN",
},
)
data = res.json(){
"status": true,
"message": "Transfer recipient created successfully",
"data": {
"recipient_code": "RCP_1i2k27vk4suemug",
"type": "nuban",
"name": "Ada Obi",
"currency": "NGN",
"active": true,
"details": {
"account_number": "0123456789",
"account_name": "ADA OBI",
"bank_code": "000014",
"bank_name": "Access Bank"
}
}
}Initiate transfer
Holds amount + fee + VAT from your balance and starts the transfer. Retrying with the same reference and body returns the same transfer; a different body is 409 duplicate_reference.
balance
Kobo, ₦1 minimum
recipient_code
16–50: a–z, 0–9, - and _
Up to 50 characters; shown to the recipient
Errors: insufficient_balance, invalid_recipient, limit_exceeded, duplicate_reference, transfers_disabled, ip_not_whitelisted, wallet_frozen.
curl -X POST https://api.1trustmfb.com/v1/transfer \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "source": "balance", "amount": 2000000, "recipient": "RCP_1i2k27vk4suemug", "reference": "rent_october_2026_0001", "reason": "October rent" }'
const res = await fetch("https://api.1trustmfb.com/v1/transfer", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "source": "balance", "amount": 2000000, "recipient": "RCP_1i2k27vk4suemug", "reference": "rent_october_2026_0001", "reason": "October rent" }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/transfer"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "source" => "balance", "amount" => 2000000, "recipient" => "RCP_1i2k27vk4suemug", "reference" => "rent_october_2026_0001", "reason" => "October rent" ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/transfer",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"source": "balance",
"amount": 2000000,
"recipient": "RCP_1i2k27vk4suemug",
"reference": "rent_october_2026_0001",
"reason": "October rent",
},
)
data = res.json(){
"status": true,
"message": "Transfer requires OTP to continue",
"data": {
"transfer_code": "TRF_1ptvuv321ahaa7q",
"reference": "rent_october_2026_0001",
"amount": 2000000,
"currency": "NGN",
"status": "otp",
"fee_charged": 2688,
"fees_breakdown": [
{
"type": "transfer_fee",
"amount": 2500
},
{
"type": "vat",
"amount": 188
},
{
"type": "stamp_duty",
"amount": 0
}
],
"total_debit": 2002688,
"recipient": {
"recipient_code": "RCP_1i2k27vk4suemug",
"name": "Ada Obi",
"details": {
"account_number": "0123456789",
"account_name": "ADA OBI",
"bank_code": "000014",
"bank_name": "Access Bank"
}
},
"session": {
"id": null
}
}
}Finalize transfer
Confirms a transfer (or a bulk batch, using its BCH_ code) with the emailed code. Codes last 10 minutes and allow 5 tries; POST /transfer/resend_otp sends a new one. Turn OTP off with POST /transfer/disable_otp then /transfer/disable_otp_finalize; back on with /transfer/enable_otp.
curl -X POST https://api.1trustmfb.com/v1/transfer/finalize_transfer \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "transfer_code": "TRF_1ptvuv321ahaa7q", "otp": "928783" }'
const res = await fetch("https://api.1trustmfb.com/v1/transfer/finalize_transfer", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "transfer_code": "TRF_1ptvuv321ahaa7q", "otp": "928783" }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/transfer/finalize_transfer"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "transfer_code" => "TRF_1ptvuv321ahaa7q", "otp" => "928783" ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/transfer/finalize_transfer",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"transfer_code": "TRF_1ptvuv321ahaa7q",
"otp": "928783",
},
)
data = res.json()Bulk transfer
Up to 100 transfers in one call. Each item gets its own reference, hold and webhook; items that can't be created come back with an error and are not charged. With OTP on, confirm the whole batch once with its batch_code.
curl -X POST https://api.1trustmfb.com/v1/transfer/bulk \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "source": "balance", "transfers": [ { "amount": 250000, "recipient": "RCP_1i2k27vk4suemug", "reference": "salary_oct_2026_ada01", "reason": "October salary" } ] }'
const res = await fetch("https://api.1trustmfb.com/v1/transfer/bulk", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "source": "balance", "transfers": [ { "amount": 250000, "recipient": "RCP_1i2k27vk4suemug", "reference": "salary_oct_2026_ada01", "reason": "October salary" } ] }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/transfer/bulk"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "source" => "balance", "transfers" => [{"amount":250000,"recipient":"RCP_1i2k27vk4suemug","reference":"salary_oct_2026_ada01","reason":"October salary"}] ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/transfer/bulk",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"source": "balance",
"transfers": [{"amount":250000,"recipient":"RCP_1i2k27vk4suemug","reference":"salary_oct_2026_ada01","reason":"October salary"}],
},
)
data = res.json()Fetch and verify
GET /transfer/{id_or_code} or GET /transfer/verify/{reference} returns the transfer with its timeline, session.id once sent, and gateway_response. GET /transfer lists them (filters: status, recipient, from, to).
curl https://api.1trustmfb.com/v1/transfer/verify/rent_october_2026_0001 \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/transfer/verify/rent_october_2026_0001", { method: "GET", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, }, }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/transfer/verify/rent_october_2026_0001"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/transfer/verify/rent_october_2026_0001",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json()Balance and ledger
GET /balance returns your available balance. GET /balance/ledger lists every settlement, transfer, withdrawal, fee, VAT, refund, reversal and adjustment with the balance after it. GET /wallet adds pending, status and where settlements go.
{
"status": true,
"message": "Balances retrieved",
"data": [
{
"currency": "NGN",
"balance": 23167170,
"pending": 0
}
]
}Withdraw
Sends money from your balance to your settlement account on file. Same states and webhooks as a transfer (type is withdrawal); free by default.
curl -X POST https://api.1trustmfb.com/v1/wallet/withdraw \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "amount": 5000000, "reference": "withdraw_oct_2026_0001" }'
const res = await fetch("https://api.1trustmfb.com/v1/wallet/withdraw", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "amount": 5000000, "reference": "withdraw_oct_2026_0001" }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/wallet/withdraw"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "amount" => 5000000, "reference" => "withdraw_oct_2026_0001" ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/wallet/withdraw",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"amount": 5000000,
"reference": "withdraw_oct_2026_0001",
},
)
data = res.json()Settle to wallet
destination: bank (default) or wallet. Applies from the next settlement cycle; a cycle in progress is never split. Changes through the API are confirmed to you by email.
curl -X PUT https://api.1trustmfb.com/v1/settlement/destination \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "destination": "wallet" }'
const res = await fetch("https://api.1trustmfb.com/v1/settlement/destination", { method: "PUT", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "destination": "wallet" }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/settlement/destination"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "destination" => "wallet" ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.put(
"https://api.1trustmfb.com/v1/settlement/destination",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"destination": "wallet",
},
)
data = res.json()Identity verification
Verify who a customer is with their BVN or NIN. Choose a check:
| Check | What you send | What you get |
|---|---|---|
| BVN · Full | BVN | The customer approves first (OTP, USSD or face). Then: name, date of birth, gender, phone and photo. |
| BVN · Match | BVN + the details you hold | Yes/no for each detail. No approval step. |
| NIN · Full | NIN ShareCode | Name, date of birth, gender, phone and photo. The ShareCode is the customer's consent. |
| NIN · Match | ShareCode + the details you hold | Yes/no for each detail. |
What your customer needs
| Check | Customer does |
|---|---|
| BVN · Full | Approves when we ask (OTP, USSD or face) by the consent link. If they already approved and have a consent code, send it as consent_code and we verify at once. |
| NIN | Opens the NINAuth app (Play Store or App Store), signs in with their NIN and generates a 6-character ShareCode for you. |
You are billed only for checks that return a result: verified, partial_match, or failed with details_do_not_match. A customer's approval for BVN · Full stays valid until consent_expires_at, so repeat checks don't ask again.
Test numbers
| BVN | Result |
|---|---|
| 22222222222 | Verifies (Full: after you choose Simulate consent) |
| 22222222223 | Customer declines consent |
| 22222222224 | Match: phone doesn't match |
| Any test BVN + consent code 4878BF48BD6FD92C | Full: verifies at once |
| ShareCode 000000 | NIN: fails with invalid_nin_sharecode; any other ShareCode verifies |
Start verification
For BVN · Full without a consent_code, the verification starts as awaiting_consent. With customer_present: true you get a consent_url to send the customer to; otherwise we email them a link. You get verification.verified when it completes. Every other check returns its result straight away.
Body
bvn or nin
full or match
11-digit BVN, or the 6-character NIN ShareCode
Where we send the consent link
11-digit Nigerian phone number
BVN · Full only. Default true
Where the customer lands after approving. Defaults to your setting
BVN · Full. The customer already approved and gave you a code: we skip the request and verify at once
NIN only, required. Why you need the data, e.g. financialProducts, creditBackgroundCheck, insurance, employmentRecruitment. Default financialProducts
Required for Match
YYYY-MM-DD. Required for Match
male or female. Required for Match
curl -X POST https://api.1trustmfb.com/v1/verifications \ -H "Authorization: Bearer sk_test_3b1f…c81e" \ -H "Content-Type: application/json" \ -d '{ "type": "bvn", "method": "full", "number": "22222222222", "customer": { "name": "Zainab Abdullahi", "email": "zainab.abdullahi@example.com", "phone": "08023456789" }, "customer_present": true }'
const res = await fetch("https://api.1trustmfb.com/v1/verifications", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "type": "bvn", "method": "full", "number": "22222222222", "customer": { "name": "Zainab Abdullahi", "email": "zainab.abdullahi@example.com", "phone": "08023456789" }, "customer_present": true }), }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/verifications"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "type" => "bvn", "method" => "full", "number" => "22222222222", "customer" => [ "name" => "Zainab Abdullahi", "email" => "zainab.abdullahi@example.com", "phone" => "08023456789" ], "customer_present" => true ]), ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/verifications",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
json={
"type": "bvn",
"method": "full",
"number": "22222222222",
"customer": {
"name": "Zainab Abdullahi",
"email": "zainab.abdullahi@example.com",
"phone": "08023456789",
},
"customer_present": True,
},
)
data = res.json(){
"status": true,
"message": "Consent requested",
"data": {
"id": "VER_3112KQD",
"type": "bvn",
"method": "full",
"status": "awaiting_consent",
"customer": {
"name": "Zainab Abdullahi",
"email": "zainab.abdullahi@example.com",
"phone": "08023456789"
},
"number_last4": "2222",
"consent_url": "https://verify.1trustmfb.com/c/ver_3112kqd",
"fee": null,
"created_at": "2026-10-03T09: 12: 44+01: 00"
}
}Fetch verification
Returns one verification with its result. photo_url is signed and expires after 15 minutes.
Statuses
| Status | Meaning |
|---|---|
| awaiting_consent | Waiting for the customer to approve |
| verified | Record found; all details match |
| partial_match | Some details don't match. See match |
| failed | No detail matched, or the number is invalid. See error.code |
| consent_declined | Customer said no |
| expired | No approval within 24 hours |
curl https://api.1trustmfb.com/v1/verifications/VER_3112KQD \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/verifications/VER_3112KQD", { method: "GET", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, }, }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/verifications/VER_3112KQD"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/verifications/VER_3112KQD",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json(){
"status": true,
"message": "Verification retrieved",
"data": {
"id": "VER_3112KQD",
"type": "bvn",
"method": "full",
"status": "verified",
"result": {
"first_name": "Zainab",
"middle_name": "Hadiza",
"last_name": "Abdullahi",
"dob": "1993-04-18",
"gender": "female",
"phone": "08023456789",
"photo_url": "https://files.1trustmfb.com/v/VER_3112KQD.jpg?exp=900"
},
"number_last4": "2222",
"consent_expires_at": "2026-11-02T23: 59: 59+01: 00",
"billable": true,
"completed_at": "2026-10-03T09: 14: 10+01: 00"
}
}{
"status": true,
"message": "Verification complete",
"data": {
"id": "VER_3115PLM",
"type": "bvn",
"method": "match",
"status": "partial_match",
"match": {
"first_name": true,
"middle_name": true,
"last_name": true,
"dob": true,
"gender": true,
"phone": false
},
"billable": true
}
}List verifications
Newest first.
Query
Any status above
bvn or nin
Created between these dates
Defaults 1 and 50; max 100
curl https://api.1trustmfb.com/v1/verifications?status=verified&type=bvn \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/verifications?status=verified&type=bvn", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`,
},
});
const data = await res.json();$ch = curl_init("https://api.1trustmfb.com/v1/verifications?status=verified&type=bvn");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"),
"Content-Type: application/json",
],
]);
$data = json_decode(curl_exec($ch), true);import os, requests
res = requests.get(
"https://api.1trustmfb.com/v1/verifications?status=verified&type=bvn",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json()Resend consent link
For an awaiting_consent verification: emails the customer a fresh link.
curl -X POST https://api.1trustmfb.com/v1/verifications/VER_3112KQD/resend \
-H "Authorization: Bearer sk_test_3b1f…c81e"const res = await fetch("https://api.1trustmfb.com/v1/verifications/VER_3112KQD/resend", { method: "POST", headers: { Authorization: `Bearer ${process.env.ONETRUST_SECRET_KEY}`, }, }); const data = await res.json();
$ch = curl_init("https://api.1trustmfb.com/v1/verifications/VER_3112KQD/resend"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("ONETRUST_SECRET_KEY"), "Content-Type: application/json", ], ]); $data = json_decode(curl_exec($ch), true);
import os, requests
res = requests.post(
"https://api.1trustmfb.com/v1/verifications/VER_3112KQD/resend",
headers={"Authorization": f"Bearer {os.environ['ONETRUST_SECRET_KEY']}"},
)
data = res.json()Webhooks
We send a POST to your webhook URL whenever a mandate, debit or verification changes. Reply with HTTP 200 within 10 seconds. We retry failed deliveries up to 5 times over 24 hours.
| Event | Sent when |
|---|---|
| mandate.created | Mandate registered |
| mandate.authorized | Provider status indicates customer authorization. |
| mandate.bank_approved | Provider reports bank approval; this alone does not make the mandate chargeable. |
| mandate.advice_sent | Provider reports mandate advice sent; check the mandate status and is_chargeable. |
| mandate.active | Provider confirms an active mandate. Wait until is_chargeable is true (including the six-hour cooling-off) before debiting. |
| mandate.rejected | Bank declined the mandate |
| mandate.expired | No activation within 7 days |
| mandate.expiring | Mandate is within 30 days of its end date |
| mandate.cancelled | Mandate stopped |
| debit.success | Money collected |
| debit.failed | Debit declined, with a reason |
| payout.paid | Settlement sent to your bank account or wallet |
| transfer.success | Transfer paid |
| transfer.failed | Transfer not paid (also abandoned, blocked, rejected); refunded |
| transfer.reversed | Paid, then returned by the recipient bank; refunded |
| wallet.settlement.credited | A settlement landed in your balance |
| wallet.withdrawal.success | Withdrawal paid |
| wallet.withdrawal.failed | Withdrawal not paid; refunded |
| balance.low | Balance at or below your warning or critical level |
| verification.consent_granted | Customer approved a BVN · Full check |
| verification.verified | Result ready (verified or partial match) |
| verification.failed | Failed, declined or expired |
{
"event": "mandate.active",
"data": {
"mandate_code": "MND_1052X7QA",
"status": "active",
"account_number": "0145678923",
"bank_code": "058",
"amount": 4500000,
"reference": "CUST-00931",
"activated_at": "2026-09-25T11: 42: 10+01: 00",
"is_chargeable": false,
"chargeable_from": "2026-09-25T17: 42: 10+01: 00"
}
}Verify signatures
Every webhook carries an x-1trust-signature header: an HMAC-SHA512 of the raw request body, keyed with the webhook signing secret (starts with whsec_, shown once when you save the webhook URL). Compute it yourself and reject the request if it doesn't match.
To also reject replays, use x-1trust-signature-v2: the HMAC-SHA512 of {x-1trust-timestamp}.{raw body}. Reject it when the timestamp is more than 5 minutes old. Each event also has a stable x-1trust-event-id across retries, so you can ignore duplicates.
import crypto from "node:crypto"; app.post("/webhooks/1trust", express.raw({ type: "*/*" }), (req, res) => { const hash = crypto .createHmac("sha512", process.env.ONETRUST_WEBHOOK_SECRET) .update(req.body) .digest("hex"); if (hash !== req.headers["x-1trust-signature"]) return res.sendStatus(401); const event = JSON.parse(req.body); // handle event.event, e.g. "debit.success" res.sendStatus(200); });
$body = file_get_contents("php://input"); $hash = hash_hmac("sha512", $body, getenv("ONETRUST_WEBHOOK_SECRET")); if (!hash_equals($hash, $_SERVER["HTTP_X_1TRUST_SIGNATURE"] ?? "")) { http_response_code(401); exit; } $event = json_decode($body, true); http_response_code(200);