Create new PIX withdrawal request
POST/api/withdraw
Creates a new withdrawal request using PIX as the payment method.
<hr>
PS 1.: Withdrawals that repeat the same payload will always return pending status and with the ID of the first accepted withdrawal. Only the first request will be executed.
Example:
Request 1:
<pre\>{
"value": 1,
"type_key_pix": "cpf",
"key": "99999999999",
"description": "Payment to client",
"client_name": "John",
"client_email": "client@email.com",
"client_document": "99999999999",
"merchant_id": "3debefce-06ae-4eb9-adad-50443a5efd31"
}</pre\>
Response 1:
<pre\>{
"status": "pending",
"message": "Saque pendente.",
"transaction_uuid": "ccc54036-d3b0-598c-a9e1-b7c6c2ff8791"
}</pre\>
Request 2:
<pre\>{
"value": 1,
"type_key_pix": "cpf",
"key": "99999999999",
"description": "Payment to client",
"client_name": "John",
"client_email": "client@email.com",
"client_document": "99999999999",
"merchant_id": "3debefce-06ae-4eb9-adad-50443a5efd31"
}</pre\>
Response 2:
<pre\>{
"status": "pending",
"message": "Saque pendente.",
"transaction_uuid": "ccc54036-d3b0-598c-a9e1-b7c6c2ff8791"
}</pre\>
<hr>
PS 2.: Withdrawals that repeat the same CPF, value and PIX key will be considered duplications. Only the first withdrawal request will be made and the others return with a failure status with the transaction_uuid field = NULL.
Example:
Response
<pre\>{
"status": "failed",
"message": "Falha de saque duplicado, mesmo valor, mesma chave PIX e mesmo CPF.",
"transaction_uuid": "null"
}</pre\>
<hr>
PS 3.: The same merchant ID, regardless of other changes to the payload, will always return the data from the first accepted request.
Request 1:
<pre\>{
"value": 1,
"type_key_pix": "cpf",
"key": "99999999999",
"description": "Payment to client",
"client_name": "John",
"client_email": "client@email.com",
"client_document": "99999999999",
"merchant_id": "3debefce-06ae-4eb9-adad-50443a5efd31"
}</pre\>
Response 1:
<pre\>{
"status": "pending",
"message": "Saque pendente.",
"transaction_uuid": "ccc54036-d3b0-598c-a9e1-b7c6c2ff8791"
}</pre\>
Request 2:
<pre\>{
"value": 2.35,
"type_key_pix": "cpf",
"key": "99999999999",
"description": "Payment to client",
"client_name": "John",
"client_email": "client@email.com",
"client_document": "99999999999",
"merchant_id": "3debefce-06ae-4eb9-adad-50443a5efd31"
}</pre\>
Response 2:
<pre\>{
"status": "pending",
"message": "Saque pendente.",
"transaction_uuid": "ccc54036-d3b0-598c-a9e1-b7c6c2ff8791"
}</pre\>
Request
- application/json
Body
required
value doublerequired
Value to be paid
type_key_pix type_key_pix (string)required
Possible values: [cpf
, cnpj
, email
, phone
, evp
]
PIX key type
key key (string)required
PIX key
description description (string)required
Description of the payment
client_name client_name (string)required
Client's name
client_email client_email (string)required
Client's email
client_document client_document (string)required
Client's document (CPF or CNPJ)
merchant_id merchant_id (string)required
Merchant's ID for conciliation
Responses
- 200
- 400
- 401
- 403
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
status status (string)
Possible values: [pending
, failed
]
Transaction's status
message message (string)
Payment's description
transaction_uuid transaction_uuid (string)
Transaction's UUID
{
"status": "pending",
"message": "Withdrawal payment done",
"transaction_uuid": "7da0c9af-215e-4625-b484-b8cfc87aaa09"
}
Bad Request
Unauthenticated
- application/json
- Schema
- Example (from schema)
Schema
message message (integer)
Response 401
{
"message": "Invalid x-api-key"
}
Forbidden
Loading...