Onboard a Customer
Walk through creating a verified Organization Customer and linking the payment methods you need for later lending or collection flows.
1. Create the Customer
Call POST /customers with BVN, international phone, and email. Names come from the BVN identity fetch — do not send them yourself. The same organization plus BVN combination is idempotent.
curl https://api.aellaapp.com/customers \
-X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"bvn":"22122212221","phone":"+2348012345678","email":"john.doe@example.com"}'
Save data.id — every later step uses this Customer id.
2. Start a card link
Call POST /customers/{customerId}/cards. When the response status is pending, send the Customer to data.metadata.authorization_url.
3. Confirm the card
Prefer webhooks: customer.card.link.successful and customer.card.link.failed. You can also poll GET /customers/{customerId}/cards.
4. Start a direct debit link
Call POST /customers/{customerId}/direct-debits with account_number and bank_id. Show data.metadata.instruction to the Customer so they can confirm the mandate.
5. Confirm the direct debit
Listen for customer.direct_debit.link.successful, customer.direct_debit.link.failed, or customer.direct_debit.link.deleted. Polling GET /customers/{customerId}/direct-debits works while you wait.
What's next
- Offer financing with Offer Debt as a Service at Checkout
- Collect repeat payments with Collect Recurring Payments
- Full parameter tables on the Customers reference