Integration flow
A deposit always follows the same sequence. Steps 1 and 2 can be cached briefly; step 2 should be repeated before each deposit because fees, availability and required fields can change.
Step by step
-
List countries.
GET /api/v1/pay-in/deposit-creation/countriesreturns the countries available to your account in the current environment. See Get countries. -
List payment methods.
POST /api/v1/pay-in/deposit-creation/available-payment-methodswith thecountryandamount. Each option gives you thepayment_methodcode, the fees, the total your customer pays, what is credited to you, and the customer fields required for that method (mandatory_fields,required_fields,document_types). See Get payment methods. -
Collect the customer’s data. Build your form from the chosen option’s required fields. See Payer data & documents.
-
Create the deposit.
POST /api/v1/pay-in/deposit-creationwith your uniqueexternal_identifierand, optionally, anIdempotency-Keyheader. See Create a deposit. -
Send your customer to pay. If the response carries a payment link (
data.details.paying.metadata.redirect_url), redirect your customer to it or open it in a new window. Otherwise, show the payment instructions. Card payments always use the Cashela-hosted payment page; see Card payments. -
Your customer pays before the link expires (
validity_period). Afterwards they return to yourredirect_url. -
Receive the notification. When the deposit reaches a final status, Cashela sends a signed
POSTto yournotification_url. Verify the signature, update your order, and answer2xx. See Webhooks. -
Reconcile. Read the deposit with
GET /api/v1/pay-in/transactions/{reference}whenever you need to confirm its status or amounts. See Get a deposit & statuses.
Deposit lifecycle
COMPLETED, DECLINED, CANCELLED, FAILED and REVERSED are final. See statuses for the full table.
Production checklist for this flow
- Call Get payment methods before each deposit; never hard-code method codes or fees.
- Store your
external_identifierbefore calling Create a deposit, so a retry uses the same one. - Verify every notification’s signature, and process each deposit’s final status only once.
- Treat the return to
redirect_urlas navigation only. - Reconcile money only on
COMPLETED(andREVERSED).