Saltar al contenido principal
POST
Adhere a customer to electronic presentment

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Encabezados

X-Organization-Id
string<uuid>
requerido
Idempotency-Key
string<uuid>
requerido

UUID. The same key with the same body returns the same 202 with the same requestId and never creates a second request; the same key with another body is refused. One exception: while the provider has not answered the request (the earlier answer was 202 PENDING because the provider did not answer after the request was sent), a retry with the same key and body sends the request again with the same requestId, which the provider deduplicates, and returns the 202 completed with the provider's answer (for an adhesion, the electronicPayerId). Once the provider has answered, retries return that 202 unchanged. The key is released only by a 503, when no attempt under it can have reached the provider.

Cuerpo

application/json
holderId
string<uuid>
requerido

Holder of the customer in the Midaz CRM. Every account in accounts must belong to this holder.

accounts
object[]
requerido
Required array length: 1 - 20 elements

Attestation of the customer's consent, collected by the institution. Sent on to whoever keeps it for the institution.

aggregates
object[]

Optional aggregates included with the adhesion. Requires capability ELECTRONIC_PAYER_AGGREGATES.

Maximum array length: 50

Respuesta

Accepted. The request was taken for processing. The outcome arrives as a webhook notice and at GET /v1/electronic-payers/requests/{requestId}. Without electronicPayerId, the provider has not answered yet: retry under the same Idempotency-Key to get it.

requestId
string<uuid>
requerido
kind
enum<string>
requerido
Opciones disponibles:
REGISTRATION,
ACCOUNTS_UPDATE,
EXCLUSION,
AGGREGATE_ADDITION,
AGGREGATE_REMOVAL,
ACCEPTANCE,
THIRD_PARTY_ADDITION,
THIRD_PARTY_REMOVAL
status
enum<string>
requerido
Opciones disponibles:
PENDING
electronicPayerId
string<uuid>

Absent only on an adhesion whose provider answer was not received; a retry with the same Idempotency-Key returns it, and GET /electronic-payers/requests/{requestId} reads the request meanwhile.

aggregateId
string<uuid>
thirdPartyId
string<uuid>