Skip to content

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

Idempotency

Requests that move money can be retried safely: Cashela never executes the same operation twice for the same identifier.

The rules

  • Every operation carries your own unique identifier, external_identifier. Store it before you call the API.
  • You may also send an Idempotency-Key header. Use a stable value per operation.
  • Keys are scoped to your credentials and environment.
You repeat the request with…Result
The same identifier and the same bodyThe original result is returned. Nothing happens twice.
The same identifier and a different body409. Pay-In adds code: PARTNER_PAYIN_IDEMPOTENCY_CONFLICT; Pay-Out answers with a message only.

By product

  • Pay-In: without an Idempotency-Key, the external_identifier is the key; a failed creation is replayed with the same answer. See Idempotency and safe retries.
  • Pay-Out: the key is your external_identifier (an Idempotency-Key header is stored and echoed back). Repeating the same quotation payload with the same external_identifier returns the existing quotation; repeating the same transaction payload returns the existing transaction. An expired quotation is not executed again. See the Pay-Out guide.

When to retry

SituationRetry?
Timeout, connection error, 500, 503Yes, with the same identifier and the same body.
422 validation errorNo: fix the request.
409No: read the code and the transaction.
429Yes, after Retry-After seconds.