Create Transfer
curl --request POST \
--url https://api.sandbox.wepayout.com.br/v2/payout/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_id": 123,
"amount": 123,
"invoice": "<string>",
"beneficiary": {
"name": "<string>",
"document": {
"type": "<string>",
"number": "<string>"
}
},
"notification_url": "<string>",
"pix": {
"pix_key": "<string>",
"ispb": "<string>",
"bank_branch": "<string>",
"bank_branch_digit": "<string>",
"account": "<string>",
"account_digit": "<string>",
"account_type": "<string>"
}
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/payout/transfers"
payload = {
"merchant_id": 123,
"amount": 123,
"invoice": "<string>",
"beneficiary": {
"name": "<string>",
"document": {
"type": "<string>",
"number": "<string>"
}
},
"notification_url": "<string>",
"pix": {
"pix_key": "<string>",
"ispb": "<string>",
"bank_branch": "<string>",
"bank_branch_digit": "<string>",
"account": "<string>",
"account_digit": "<string>",
"account_type": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_id: 123,
amount: 123,
invoice: '<string>',
beneficiary: {name: '<string>', document: {type: '<string>', number: '<string>'}},
notification_url: '<string>',
pix: {
pix_key: '<string>',
ispb: '<string>',
bank_branch: '<string>',
bank_branch_digit: '<string>',
account: '<string>',
account_digit: '<string>',
account_type: '<string>'
}
})
};
fetch('https://api.sandbox.wepayout.com.br/v2/payout/transfers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.wepayout.com.br/v2/payout/transfers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_id' => 123,
'amount' => 123,
'invoice' => '<string>',
'beneficiary' => [
'name' => '<string>',
'document' => [
'type' => '<string>',
'number' => '<string>'
]
],
'notification_url' => '<string>',
'pix' => [
'pix_key' => '<string>',
'ispb' => '<string>',
'bank_branch' => '<string>',
'bank_branch_digit' => '<string>',
'account' => '<string>',
'account_digit' => '<string>',
'account_type' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.wepayout.com.br/v2/payout/transfers"
payload := strings.NewReader("{\n \"merchant_id\": 123,\n \"amount\": 123,\n \"invoice\": \"<string>\",\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"notification_url\": \"<string>\",\n \"pix\": {\n \"pix_key\": \"<string>\",\n \"ispb\": \"<string>\",\n \"bank_branch\": \"<string>\",\n \"bank_branch_digit\": \"<string>\",\n \"account\": \"<string>\",\n \"account_digit\": \"<string>\",\n \"account_type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.wepayout.com.br/v2/payout/transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_id\": 123,\n \"amount\": 123,\n \"invoice\": \"<string>\",\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"notification_url\": \"<string>\",\n \"pix\": {\n \"pix_key\": \"<string>\",\n \"ispb\": \"<string>\",\n \"bank_branch\": \"<string>\",\n \"bank_branch_digit\": \"<string>\",\n \"account\": \"<string>\",\n \"account_digit\": \"<string>\",\n \"account_type\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/payout/transfers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_id\": 123,\n \"amount\": 123,\n \"invoice\": \"<string>\",\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"notification_url\": \"<string>\",\n \"pix\": {\n \"pix_key\": \"<string>\",\n \"ispb\": \"<string>\",\n \"bank_branch\": \"<string>\",\n \"bank_branch_digit\": \"<string>\",\n \"account\": \"<string>\",\n \"account_digit\": \"<string>\",\n \"account_type\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 98765,
"source_wallet_id": "wallet-uuid-source",
"destination_wallet_id": "wallet-uuid-destination",
"amount": 10000,
"currency": "BRL",
"description": "Transfer between accounts",
"status": {
"id": 1,
"name": "Completed"
},
"external_id": "TRANSFER-001",
"created_at": "2024-06-13T11:00:00.000000Z",
"updated_at": "2024-06-13T11:00:00.000000Z"
}
{
"message": "Insufficient balance"
}
Payout
Create Transfer
Create a new payout transfer to an external beneficiary via PIX
POST
/
v2
/
payout
/
transfers
Create Transfer
curl --request POST \
--url https://api.sandbox.wepayout.com.br/v2/payout/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant_id": 123,
"amount": 123,
"invoice": "<string>",
"beneficiary": {
"name": "<string>",
"document": {
"type": "<string>",
"number": "<string>"
}
},
"notification_url": "<string>",
"pix": {
"pix_key": "<string>",
"ispb": "<string>",
"bank_branch": "<string>",
"bank_branch_digit": "<string>",
"account": "<string>",
"account_digit": "<string>",
"account_type": "<string>"
}
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/payout/transfers"
payload = {
"merchant_id": 123,
"amount": 123,
"invoice": "<string>",
"beneficiary": {
"name": "<string>",
"document": {
"type": "<string>",
"number": "<string>"
}
},
"notification_url": "<string>",
"pix": {
"pix_key": "<string>",
"ispb": "<string>",
"bank_branch": "<string>",
"bank_branch_digit": "<string>",
"account": "<string>",
"account_digit": "<string>",
"account_type": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_id: 123,
amount: 123,
invoice: '<string>',
beneficiary: {name: '<string>', document: {type: '<string>', number: '<string>'}},
notification_url: '<string>',
pix: {
pix_key: '<string>',
ispb: '<string>',
bank_branch: '<string>',
bank_branch_digit: '<string>',
account: '<string>',
account_digit: '<string>',
account_type: '<string>'
}
})
};
fetch('https://api.sandbox.wepayout.com.br/v2/payout/transfers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.wepayout.com.br/v2/payout/transfers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_id' => 123,
'amount' => 123,
'invoice' => '<string>',
'beneficiary' => [
'name' => '<string>',
'document' => [
'type' => '<string>',
'number' => '<string>'
]
],
'notification_url' => '<string>',
'pix' => [
'pix_key' => '<string>',
'ispb' => '<string>',
'bank_branch' => '<string>',
'bank_branch_digit' => '<string>',
'account' => '<string>',
'account_digit' => '<string>',
'account_type' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.wepayout.com.br/v2/payout/transfers"
payload := strings.NewReader("{\n \"merchant_id\": 123,\n \"amount\": 123,\n \"invoice\": \"<string>\",\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"notification_url\": \"<string>\",\n \"pix\": {\n \"pix_key\": \"<string>\",\n \"ispb\": \"<string>\",\n \"bank_branch\": \"<string>\",\n \"bank_branch_digit\": \"<string>\",\n \"account\": \"<string>\",\n \"account_digit\": \"<string>\",\n \"account_type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.wepayout.com.br/v2/payout/transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_id\": 123,\n \"amount\": 123,\n \"invoice\": \"<string>\",\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"notification_url\": \"<string>\",\n \"pix\": {\n \"pix_key\": \"<string>\",\n \"ispb\": \"<string>\",\n \"bank_branch\": \"<string>\",\n \"bank_branch_digit\": \"<string>\",\n \"account\": \"<string>\",\n \"account_digit\": \"<string>\",\n \"account_type\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/payout/transfers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_id\": 123,\n \"amount\": 123,\n \"invoice\": \"<string>\",\n \"beneficiary\": {\n \"name\": \"<string>\",\n \"document\": {\n \"type\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"notification_url\": \"<string>\",\n \"pix\": {\n \"pix_key\": \"<string>\",\n \"ispb\": \"<string>\",\n \"bank_branch\": \"<string>\",\n \"bank_branch_digit\": \"<string>\",\n \"account\": \"<string>\",\n \"account_digit\": \"<string>\",\n \"account_type\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 98765,
"source_wallet_id": "wallet-uuid-source",
"destination_wallet_id": "wallet-uuid-destination",
"amount": 10000,
"currency": "BRL",
"description": "Transfer between accounts",
"status": {
"id": 1,
"name": "Completed"
},
"external_id": "TRANSFER-001",
"created_at": "2024-06-13T11:00:00.000000Z",
"updated_at": "2024-06-13T11:00:00.000000Z"
}
{
"message": "Insufficient balance"
}
Request Body
Merchant ID of the account creating the payout. Required when there is more than one account under your umbrella (sellers).Example:
123The payout amount in decimal format.Example:
150.75Unique invoice identifier for this transfer.Example:
PEDIDO-12345URL where webhook notifications will be sent.Max length:
255 charactersExample: https://meusite.com/webhookPIX payment information. Use either
pix_key OR bank account details.Show PIX Object
Show PIX Object
PIX key (CPF, CNPJ, email, phone, or random key). Use this for payments via PIX key.Note: When using
pix_key, bank account fields are not required.Bank ISPB code. Required when using bank account details.
Bank branch number. Required when using bank account details.
Bank branch digit. Required when using bank account details.
Bank account number. Required when using bank account details.
Bank account digit. Required when using bank account details.
Account type. Required when using bank account details.Allowed values:
CHECKING, SAVINGSRequest Examples
PIX Key
cURL - PIX Key
curl --request POST \
--url https://api.sandbox.wepayout.com.br/v2/payout/transfers \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"merchant_id": 123,
"amount": 150.75,
"invoice": "PEDIDO-12345",
"beneficiary": {
"name": "João da Silva",
"document": {
"type": "CPF",
"number": "12345678901"
}
},
"notification_url": "https://meusite.com/webhook",
"pix": {
"pix_key": "joao@email.com"
}
}'
Bank Account Details
cURL - Bank Account
curl --request POST \
--url https://api.sandbox.wepayout.com.br/v2/payout/transfers \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"merchant_id": 123,
"amount": 2500.00,
"invoice": "FATURA-98765",
"beneficiary": {
"name": "Maria Oliveira",
"document": {
"type": "CPF",
"number": "98765432100"
}
},
"notification_url": "https://meusite.com/webhook",
"pix": {
"ispb": "00000000",
"bank_branch": "1234",
"bank_branch_digit": "1",
"account": "987654",
"account_digit": "0",
"account_type": "CHECKING"
}
}'
{
"id": 98765,
"source_wallet_id": "wallet-uuid-source",
"destination_wallet_id": "wallet-uuid-destination",
"amount": 10000,
"currency": "BRL",
"description": "Transfer between accounts",
"status": {
"id": 1,
"name": "Completed"
},
"external_id": "TRANSFER-001",
"created_at": "2024-06-13T11:00:00.000000Z",
"updated_at": "2024-06-13T11:00:00.000000Z"
}
{
"message": "Insufficient balance"
}
Related Resources
Create Payment
Create an external payout payment
Get Balance
Check your wallet balance before creating transfers
Was this page helpful?
⌘I

