Skip to content

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

Get a deposit & statuses

Get a deposit

Reads one of your deposits: its status, amounts, payer, payment details, card and reversals. Use it to confirm a notification, to recover after a timeout, or to reconcile.

GET/api/v1/pay-in/transactions/{reference}
AuthenticationHTTP Basic (api_key:api_secret)
Moves moneyNo
{reference}The deposit’s reference, your external_identifier, or the deposit id.
Terminal window
curl https://sandbox-api.cashela.com/api/v1/pay-in/transactions/210000000000 \
-u "$CASHELA_API_KEY:$CASHELA_API_SECRET" \
-H "Accept: application/json"

Response 200

The same deposit object Create a deposit returns. Example of a completed card deposit charged in USD (values illustrative):

{
"success": true,
"data": {
"id": "1048577",
"reference": "210000000001",
"external_identifier": "order-2026-0002",
"status": "COMPLETED",
"status_message": null,
"details": {
"invoice_number": "INV-0002",
"invoice_description": "Order 2026-0002",
"invoice_country": "MEX",
"invoice_currency": "MXN",
"invoice_rate": 18.44,
"invoice_fee": 0,
"invoice_tax": 0,
"invoice_amount": 92.18,
"customer": { "first_name": "María", "last_name": "Pérez", "email": "maria.perez@example.com" },
"paying": { "method": "Credit Card", "code": "international-credit-debit-card-visa", "name": "international-credit-debit-card-visa" },
"charged_amount": 5,
"charged_currency": "USD"
},
"card": { "network": "visa", "last4": "4242" },
"reversals": { "refunds": [], "disputes": [] }
},
"message": "…"
}
FieldDescription
statusSee Deposit statuses.
details.invoice_*The invoice your customer saw. For card options charged in USD, this is the local-currency estimate.
details.charged_amount, details.charged_currencyWhat your customer was actually charged. Same figure as amount / currency in the notification. For card options charged in USD, this is the USD amount.
cardnetwork and last4 of the card that paid, or null.
reversals.refunds[]Voids and refunds of the deposit: intent (void/refund), amount, reason, status, requested_at, processed_at…
reversals.disputes[]Card disputes on the deposit, if any.

A deposit of another account and an unknown reference both answer 404.

Deposit statuses

StatusFinalMeaning
ONHOLDNoCreated, about to be sent to the payment network.
PROCESSINGNoWaiting for your customer to pay. A card deposit stays here while your customer retries after a declined card.
INREVIEWNoThe customer’s document could not be verified automatically; the deposit waits for a manual review, without a payment link.
COMPLETEDYesPaid. The net amount is credited to your Cashela account.
DECLINEDYesThe payment was rejected. Nothing was charged.
CANCELLEDYesCancelled, or expired before it was paid. Nothing was charged.
FAILEDYesThe deposit could not be created with the payment network. Nothing was charged.
REVERSEDYesA COMPLETED card deposit whose money went back in full: a full void, a full refund, or partial refunds adding up to the full amount.

Good to know:

  • A deposit that expires is reported as CANCELLED. There is no EXPIRED status.
  • A partial refund leaves the deposit COMPLETED; its detail is in reversals.refunds.
  • Notifications are sent when a deposit reaches COMPLETED, DECLINED or CANCELLED, and again when a void or refund reverses it (REVERSED, or COMPLETED after a partial refund). See Webhooks.
  • Reconcile money only on COMPLETED and REVERSED.

Voids and refunds (card deposits)

You can give the money of a card deposit back to the card through the API. Voids and refunds are available for card deposits only; any other deposit is refused with 422 and nothing moves.

EndpointWhenAmount
POST /api/v1/pay-in/transactions/{reference}/voidBefore the card charge settlesAlways the full amount
POST /api/v1/pay-in/transactions/{reference}/refundAfter the card charge settlesFull (no amount) or partial (amount)

Both move money, are idempotent, and are limited to 12 requests per minute.

Request body (optional)

FieldTypeDescription
reasonstring (≤ 255)Your reason, kept with the record.
amountstringRefund only. Partial amount of the principal, as a decimal string with up to two decimals (for example "2.50"). Must not be 0. Omit it for a full refund. Ignored on a void.
Terminal window
curl -X POST https://sandbox-api.cashela.com/api/v1/pay-in/transactions/210000000001/refund \
-u "$CASHELA_API_KEY:$CASHELA_API_SECRET" \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{ "reason": "Customer returned the item", "amount": "2.50" }'

Response 200

{
"success": true,
"data": {
"reference": "210000000001",
"intent": "refund",
"processor": { "status": "…" },
"wallet": { "status": "…", "reversed": "2.50" },
"notification": { "status": "queued" }
},
"message": "…"
}

wallet.reversed is the amount taken back from your Cashela balance, as a decimal string. notification.status tells you whether the notification was queued.

Fees on voids and refunds

  • Full void or full refund: the whole charge goes back to the card. Cashela keeps its fee, so the amount taken back from your Cashela balance is the principal plus the Cashela fee: you absorb the fee. If your available balance does not cover it, the difference is recovered from your next settlements.
  • Partial refund: the card gets back the amount you refund; the fee is kept.
  • Your commercial agreement with Cashela may set other terms.

Rules and errors

HTTPCodeWhen
403PARTNER_PAYIN_REFUNDS_DISABLEDCard voids and refunds are temporarily not available. Nothing moved; retry later or contact support.
409PARTNER_PAYIN_PARTIAL_REFUND_DECLINEDThe card processor did not accept the partial refund. A partial refund needs a settled charge: retry after settlement, or void instead.
409PARTNER_PAYIN_DEPOSIT_ALREADY_REVERSEDVoid of a deposit already fully reversed. Nothing moves and no notification is sent.
409PARTNER_PAYIN_REFUND_IN_PROGRESSAnother refund of this deposit is in progress. Retry shortly.
409PARTNER_PAYIN_DEPOSIT_CHARGED_BACKThe deposit was charged back; it cannot be refunded.
422PARTNER_PAYIN_REVERSAL_NOT_SUPPORTEDThe deposit is not a card deposit. Nothing moves. Contact support for other methods.
422PARTNER_PAYIN_REFUND_EXCEEDS_ORIGINALThe refund would exceed what is left refundable (partials never exceed the principal), or the deposit is already fully reversed.
422PARTNER_PAYIN_REFUND_PARTIALLY_REFUNDEDA full refund after a partial one. Refund the remaining amount explicitly with amount.
422PARTNER_PAYIN_INVALID_REVERSAL_AMOUNTThe amount is not positive.
422PARTNER_PAYIN_PARTIAL_REFUND_UNSUPPORTEDA partial refund is not supported for this deposit.
404—Unknown reference, or a deposit of another account.

After a full reversal the deposit reads REVERSED; after a partial refund it stays COMPLETED. In both cases you receive a notification with X-Cashela-Event set to partner.payin.transaction.voided or partner.payin.transaction.refunded.