Create a withdrawal
Create a PIX withdrawal to transfer BRL funds from your YuvexPay balance. Requires an idempotency key.
The PIX key type (CPF, CNPJ, e-mail, phone, or random key) is detected automatically from destination.pixKey — you do not need to declare it. INVALID_PIX_KEY covers format only. Whether the key exists on the PIX network is not checked before acceptance: depending on when the network rejects, a well-formed key that belongs to nobody surfaces either as a synchronous 400 PROVIDER_ERROR on this call or later as a WITHDRAWAL_FAILED webhook.
The creditor document sent to the PIX network is resolved in three steps, in order: (1) destination.recipientDocument when you send it; (2) the PIX key itself when destination.pixKey is a CPF or CNPJ key; (3) your own verified tax id — company CNPJ for business accounts, owner CPF for individual accounts. Step 3 is a fallback, not a default: if you pay a third party on an e-mail, phone or random key and omit destination.recipientDocument, the network is told your own document is the creditor, and the payout may be rejected downstream by the receiving institution.
Withdrawals may be blocked outside business hours or if your account has restrictions.
creditorDocumentSource is a dashboard-only field and is not accepted here: sending it returns 400 CREDITOR_DOCUMENT_SOURCE_NOT_SUPPORTED rather than being silently ignored. Use destination.recipientDocument to put a specific document on the payout.
Headers
A unique string to ensure the request is processed only once. Must be unique per request. Valid for 24 hours.
Request body
Response
Withdrawal created.
Example response
{
"withdrawal": {
"txId": "WIT1746280868443K3F9Q"
}
}Changes
Changed in 5 of the 13 revisions of this API.9913
- ▲
the
errorresponse's property type/format changed fromobject/tostring/for status409response-property-type-changed
- ●
removed the optional property
error/codefrom the response with the409statusresponse-optional-property-removed
- ●
removed the optional property
error/detailsfrom the response with the409statusresponse-optional-property-removed
- ●
removed the optional property
error/messagefrom the response with the409statusresponse-optional-property-removed
- ○
added the non-success response with the status
500response-non-success-status-added
- ○
added the optional property
codeto the response with the409statusresponse-optional-property-added
- ○
added the optional property
messageto the response with the409statusresponse-optional-property-added
- ○
added the optional property
statusCodeto the response with the409statusresponse-optional-property-added
- ▲
- ●
removed the optional property
withdrawal/errorMessagefrom the response with the201statusresponse-optional-property-removed
- ●
removed the optional property
withdrawal/pixKeyfrom the response with the201statusresponse-optional-property-removed
- ●
removed the optional property
withdrawal/pixKeyTypefrom the response with the201statusresponse-optional-property-removed
- ●
removed the optional property
withdrawal/processedAtfrom the response with the201statusresponse-optional-property-removed
- ○
added the new optional request property
destination/recipientDocumentnew-optional-request-property
- ○
added the non-success response with the status
503response-non-success-status-added
This revision also has 24 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ●
- ●
removed the request property
destination/recipientDocumentrequest-property-removed
- ●
- ▲
added the new required request property
destination/pixKeynew-required-request-property
- ▲
added the new required request property
destination/typenew-required-request-property
- ▲
removed the enum value
BOLETOof the request propertymethodrequest-property-enum-value-removed
- ▲
removed the enum value
CARDof the request propertymethodrequest-property-enum-value-removed
- ▲
removed the enum value
CRYPTO_LTCof the request propertymethodrequest-property-enum-value-removed
- ▲
removed the enum value
LTCof the request propertycurrencyrequest-property-enum-value-removed
- ▲
removed
subschema #1: PIX destinationsubschema #2: Crypto destinationfrom thedestinationrequest propertyoneOflistrequest-property-one-of-removed
- ▲
the
destinationrequest property type/format changed from/toobject/request-property-type-changed
- ●
removed the request property
idempotencyKeyrequest-property-removed
- ○
added the new optional request property
destination/recipientDocumentnew-optional-request-property
- ○
removed discriminator from
destinationrequest propertyrequest-property-discriminator-removed
- ○
added the optional property
withdrawal/currencyto the response with the201statusresponse-optional-property-added
- ○
added the optional property
withdrawal/errorMessageto the response with the201statusresponse-optional-property-added
- ○
added the optional property
withdrawal/paymentMethodto the response with the201statusresponse-optional-property-added
- ○
added the optional property
withdrawal/processedAtto the response with the201statusresponse-optional-property-added
- ▲
- ○
endpoint added
endpoint-added
This revision also has 8 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○