Overview
If you operate as a payment aggregator — accepting payments on behalf of multiple merchants, franchises, or clients — branches are how you represent each of your customers inside CeyPay. Create one branch per customer. Pass that branch’sid in every payment, payment link, or direct debit contract you create for them. CeyPay ties all transactions to the branch, giving you clean per-customer reporting without managing separate merchant accounts.
How It Works
Create a branch for each customer
Call Store the returned
POST /v1/branch once per customer. Use a code that maps to your own internal customer ID so you can look it up later.id — you will use it as branchId in every subsequent request for this customer.Pass branchId when creating payments
Include
branchId in each payment, payment link, or direct debit contract you create for the customer.Branch Lifecycle
| Event | Action |
|---|---|
| Customer onboards | POST /v1/branch — create the branch |
| Customer details change | PATCH /v1/branch/:id — update name, phone, etc. |
| Customer offboards | DELETE /v1/branch/:id — deactivates the branch, preserves all payment history |
Deleting a branch is a soft deactivation. All historical transactions remain accessible and continue to be reportable by
branchId.Recommended Conventions
Mapcode to your internal customer ID. The code field is unique per merchant and searchable. Setting it to your own customer ID (e.g., CUST-00142) lets you look up the branch without storing CeyPay’s UUID in your own database.
Create the branch before the first transaction. You cannot assign a branchId retroactively to existing payments.
One branch per customer, not per transaction. Branches represent customers, not individual orders. Reuse the same branchId for all transactions belonging to the same customer.
Related Documentation
- Branch API - Full endpoint reference
- Payments - Create and manage payments
- Payment Links - Generate shareable payment links
- Direct Debit - Recurring and on-demand charges