Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Create Payout Transaction

Create Payout Transaction

Execute a payout by providing beneficiary details along with a valid quotation. This endpoint debits your account and initiates the transfer to the recipient through the selected payer network.


Overview

The transaction endpoint:

  • Uses a previously created quotation for locked rates
  • Validates all beneficiary and sender KYC data
  • Initiates the money transfer through the payer network
  • Returns transaction details for tracking
  • Sends webhook notifications for status updates

Prerequisites:

  1. Create a quotation using Create Quotation
  2. Ensure sufficient balance in your account
  3. Have all beneficiary details ready

Endpoint

POST /api/v1/pay-out/transaction

Authentication: Basic Auth (Business Key + Business Secret)

Base URLs:

  • Sandbox: https://sandbox-api.cashela.com
  • Production: https://api.cashela.com

Required Headers

Authorization: Basic <base64_encoded_credentials>
Content-Type: application/json
Accept: application/json
Idempotency-Key: <uuid-v4>

Request Parameters

Body Parameters

ParameterTypeRequiredDescription
quotation_idstringYesQuotation ID from Create Quotation. Must not be expired.
payer_idintegerYesPayer/bank ID from quotation’s payers_available array or Get Payers.
external_identifierstringYesYour unique reference for this transaction. Used for idempotency and reconciliation. Max 255 characters.
credit_party_identifierobjectYesBeneficiary bank/account details. Required fields vary by payer.
senderobjectYesSender (originator) KYC information.
beneficiaryobjectYesBeneficiary (recipient) KYC information.
purpose_of_remittancestringYesStandardized reason for transfer. See Purpose Codes.
callback_urlstringYesHTTPS webhook URL for transaction status updates.

Credit Party Identifier (Bank Account Details)

FieldTypeRequiredDescription
bank_account_numberstringYesBeneficiary’s bank account number.
branch_numberstringConditionalBank branch/routing code. Required for some countries.
bank_account_typestringConditionalAccount type: CHECKING, SAVINGS. Required for some countries.
swift_codestringConditionalSWIFT/BIC code for international transfers.
ibanstringConditionalIBAN for European transfers.

Sender Object (Originator KYC)

FieldTypeRequiredDescription
first_namestringYesSender’s legal first name.
last_namestringYesSender’s legal last name.
codestringYesSender’s ID document number.
date_of_birthstringYesDate of birth in YYYY-MM-DD format.
addressstringYesFull address including city and state.
country_idstringYesISO 3-letter country code (e.g., USA).
emailstringYesValid email address.
msisdnstringYesPhone number in E.164 format (e.g., +1234567890).

Beneficiary Object (Recipient KYC)

FieldTypeRequiredDescription
first_namestringYesBeneficiary’s legal first name.
last_namestringYesBeneficiary’s legal last name.
document_numberstringYesBeneficiary’s ID document number.
country_idstringYesISO 3-letter country code (e.g., BRA).
emailstringConditionalEmail address. Required for some corridors.
msisdnstringConditionalPhone number in E.164 format. Required for some corridors.
bank_idstringConditionalBank identifier code. Required for some countries.

Purpose Codes

Use one of the following standardized purpose codes:

CodeDescription
FAMILY_SUPPORTFamily maintenance/support
EDUCATIONEducation expenses
MEDICALMedical expenses
TRAVELTravel expenses
SAVINGSPersonal savings
SALARYSalary payment
GOODS_SERVICESPayment for goods or services
INVESTMENTInvestment purposes
LOAN_REPAYMENTLoan repayment
OTHEROther purposes

Example Request

Terminal window
curl -X POST "https://api.cashela.com/api/v1/pay-out/transaction" \
-H "Authorization: Basic $(echo -n 'your_business_key:your_business_secret' | base64)" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Idempotency-Key: c3d4e5f6-a7b8-9012-cdef-34567890abcd" \
-d '{
"quotation_id": "qtn_01HJ3KBCD8E9F0G1H2I3J4K5L6",
"payer_id": 45,
"external_identifier": "PAYOUT-2025-00123",
"credit_party_identifier": {
"bank_account_number": "01236523256333349",
"branch_number": "0001",
"bank_account_type": "CHECKING"
},
"sender": {
"first_name": "John",
"last_name": "Doe",
"code": "ID123456789",
"date_of_birth": "1980-01-15",
"address": "123 Main Street, New York, NY 10001",
"country_id": "USA",
"email": "john.doe@example.com",
"msisdn": "+12125551234"
},
"beneficiary": {
"first_name": "Maria",
"last_name": "Silva",
"document_number": "12345678901",
"country_id": "BRA",
"email": "maria.silva@example.com",
"msisdn": "+5511999999999",
"bank_id": "033"
},
"purpose_of_remittance": "FAMILY_SUPPORT",
"callback_url": "https://yourdomain.com/webhooks/payout"
}'

Response Format

Success Response (201 Created)

{
"success": true,
"data": {
"id": "payout_01HJ3KBCD8E9F0G1H2I3J4K5L6",
"reference": "CSH-PAYOUT-20250202-00001234",
"external_identifier": "PAYOUT-2025-00123",
"status": "PROCESSING",
"status_message": "Transaction submitted for processing",
"quotation_id": "qtn_01HJ3KBCD8E9F0G1H2I3J4K5L6",
"source": {
"amount": 1000.00,
"currency": "USD",
"country": "USA"
},
"destination": {
"amount": 5416.96,
"currency": "BRL",
"country": "BRA"
},
"payer": {
"id": 45,
"name": "BANCO SANTANDER BRASIL S.A",
"code": "santander_br",
"currency": "BRL",
"country": "BRA"
},
"fee": {
"amount": 15.00,
"currency": "USD"
},
"fx_rate": 5.41696,
"sender": {
"first_name": "John",
"last_name": "Doe",
"country_id": "USA"
},
"beneficiary": {
"first_name": "Maria",
"last_name": "Silva",
"country_id": "BRA"
},
"purpose_of_remittance": "FAMILY_SUPPORT",
"estimated_delivery": "2025-02-03T18:00:00Z",
"created_at": "2025-02-02T12:56:04.000Z",
"updated_at": "2025-02-02T12:56:04.000Z"
},
"message": "Payout transaction created successfully"
}

Response Parameters

FieldTypeDescription
idstringUnique Cashela transaction ID. Use for tracking and support.
referencestringCashela reference number for reconciliation.
external_identifierstringYour transaction reference echoed back.
statusstringCurrent transaction status. See Transaction Statuses.
status_messagestringHuman-readable status description.
quotation_idstringID of the quotation used for this transaction.
sourceobjectSource amount, currency, and country.
destinationobjectDestination amount, currency, and country.
payerobjectPayer/provider details used for this transfer.
feeobjectTransaction fee charged.
fx_ratenumberExchange rate applied.
senderobjectSender details (abbreviated).
beneficiaryobjectBeneficiary details (abbreviated).
purpose_of_remittancestringPurpose code submitted.
estimated_deliverystringISO 8601 timestamp of expected delivery.
created_atstringISO 8601 timestamp of transaction creation.
updated_atstringISO 8601 timestamp of last status update.

Transaction Statuses

StatusDescriptionWebhook Event
PENDINGTransaction created, awaiting processingpayout.created
PROCESSINGTransaction being processed by payerpayout.processing
SUBMITTEDTransaction submitted to payer networkpayout.submitted
COMPLETEDFunds delivered to beneficiarypayout.completed
FAILEDTransaction failedpayout.failed
CANCELLEDTransaction cancelledpayout.cancelled
REFUNDEDFunds returned to your accountpayout.refunded

Webhook Events

Your callback_url receives real-time status updates:

{
"id": "evt_01HJ3KBCD8E9F0G1H2I3J4K5L6",
"type": "payout.completed",
"created_at": "2025-02-03T15:30:00Z",
"data": {
"object": {
"id": "payout_01HJ3KBCD8E9F0G1H2I3J4K5L6",
"external_identifier": "PAYOUT-2025-00123",
"status": "COMPLETED",
"reference": "CSH-PAYOUT-20250202-00001234",
"destination": {
"amount": 5416.96,
"currency": "BRL"
},
"completed_at": "2025-02-03T15:30:00Z"
}
}
}

Error Responses

HTTP StatusError CodeDescription
400INVALID_INPUTMalformed request or invalid JSON
401UNAUTHORIZEDInvalid API credentials
403FORBIDDENIP not allowlisted
403INSUFFICIENT_FUNDSAccount balance too low
404QUOTATION_NOT_FOUNDInvalid or expired quotation_id
404PAYER_NOT_FOUNDInvalid payer_id
409IDEMPOTENCY_CONFLICTSame key used with different request
409QUOTATION_ALREADY_USEDQuotation already used for another transaction
422QUOTATION_EXPIREDQuotation rate lock has expired
422VALIDATION_ERRORKYC or field validation failed
422COMPLIANCE_HOLDTransaction held for compliance review
429RATE_LIMITEDToo many requests

Best Practices

  1. Always use a valid quotation – Create a quotation immediately before the transaction to ensure the rate is current
  2. Validate beneficiary details – Ensure all bank account details are correct before submission
  3. Handle all status transitions – Implement webhook handlers for all status types
  4. Store transaction IDs – Keep both your external_identifier and Cashela’s id for reconciliation
  5. Implement retry logic – Use exponential backoff for transient errors
  6. Test in sandbox – Verify all flows work correctly before production