Skip to main content
POST
Return a Transfer

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. The tenantId is derived from the bearer token or authenticated request context and is not supplied through X-Organization-Id.

Headers

X-Organization-Id
string<uuid>
required

Midaz organization scope for the request, used for downstream CRM, Fees, and Midaz calls. Required on org-scoped transfer routes in every deployment mode; a missing or non-UUID value returns 400. This is not the tenant identifier — tenantId is derived from the bearer JWT or authenticated context, never from this header. Background workers (TED IN poller, reconciliation) have no request header and, in single-tenant mode, fall back to the deployment's ORGANIZATION_ID env.

X-Idempotency
string
required

Required idempotency key for safe retries. Use a UUID v4 or a unique business identifier, made of letters, digits, ., _, and -. If the same key is sent again and the original request was already processed, the cached response is returned.

See Retries and idempotency for details.

Maximum string length: 255
Pattern: ^[a-zA-Z0-9._-]+$

Path Parameters

transferId
string<uuid>
required

The unique identifier of the TED IN or P2P to return.

Body

application/json

The reference of your system for this return. Required when the token belongs to an application.

externalReference
string

The reference of your system for this return. The plugin records it on the return and in its audit, and sends it back in the answer. Required when the token belongs to an application. Do not put personal data in it.

Maximum string length: 128
Pattern: ^[A-Za-z0-9._:/-]{1,128}$
Example:

"crm-ticket-88231"

Response

Indicates that the return was created. The body depends on type: TED_OUT for the return of a TED IN, P2P for the return of a P2P.

The return of a TED IN.

transferId
string<uuid>

The return, a new TED_OUT transfer.

Example:

"9b2f1c7e-4d3a-4f1e-9c2b-7a6d5e4f3a21"

originalTransferId
string<uuid>

The TED IN that this return sends back.

Example:

"660e8400-e29b-41d4-a716-446655440002"

type
enum<string>
Available options:
TED_OUT
Example:

"TED_OUT"

status
enum<string>

The final status arrives later.

Available options:
PROCESSING
Example:

"PROCESSING"

reconciliationStatus
enum<string>

Present when nothing proves whether the STR0010 left. Reconciliation then decides.

Available options:
AWAITING
Example:

"AWAITING"

amount
number<decimal>

The gross amount of the TED IN, sent in the STR0010. It is not the net amount credited to the recipient.

Example:

1500

returnReasonCode
string

The return reason code sent in the STR0010. Always 70.

Example:

"70"

controlNumber
string

The control number (NumCtrlIF) of the STR0010 sent.

Example:

"20261014a1b2c3d4e5f6"

originalClearingControlNumber
string

The STR control number (NumCtrlSTR) of the original STR0008.

Example:

"STR20261013033030760"

requestedVia
enum<string>

The channel that the token names.

Available options:
user,
application,
unknown
Example:

"application"

externalReference
string

The externalReference of the request, when one was sent.

Example:

"crm-ticket-88231"

createdAt
string<date-time>
Example:

"2026-10-14T15:30:00Z"