Skip to main content
POST
Adhere a customer to electronic presentment

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

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

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.

Body

application/json
holderId
string<uuid>
required

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

accounts
object[]
required
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

Response

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>
required
kind
enum<string>
required
Available options:
REGISTRATION,
ACCOUNTS_UPDATE,
EXCLUSION,
AGGREGATE_ADDITION,
AGGREGATE_REMOVAL,
ACCEPTANCE,
THIRD_PARTY_ADDITION,
THIRD_PARTY_REMOVAL
status
enum<string>
required
Available options:
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>