Pagamentos
Para mais detalhes, acessar a open api
Url dos ambientes abaixo
- Sandbox: https://api.sandbox.wepayout.com.br
 - Produção: https://api.wepayout.com.br
 
Atenção
Para utilizar esses endpoints é necessário ter uma API KEY.
Pagamento por Transferência eletrônica(TED)
endpoint: /v1/payout/payments
método: POST
Exemplo de payload e Response esperado
{
  "amount": 1000.0,
  "merchant_id": 0,
  "custom_code": "YOURAPPCODE",
  "notification_url": "https://teste.requestcatcher.com/",
  "beneficiary": {
    "name": "The Name",
    "bank_code": "147",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client's name",
  "website": "Your client's website"
}
{
  "id": 111111,
  "amount": 1000.0,
  "source_currency": "USD",
  "source_amount": 250,
  "custom_code": "YOURAPPCODE",
  "authentication_code": "8132F296ECE9271E97A776777",
  "payment_type": "T",
  "rejection_description": "Rejected by bank",
  "notification_url": "https://your.endpoint.to.update",
  "beneficiary": {
    "name": "The Name",
    "pix_key": "userpixkey@user.com",
    "bank_code": "147",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf",
    "birthdate": "1970-01-01",
    "phone": "5541987456321",
    "city": "Curitiba",
    "postal_code": "80200-100",
    "province_code": "PR",
    "address": "Rua a Número 10"
  },
  "remitter": {
    "name": "The remitter's name",
    "birthdate": "1970-01-01",
    "country": "USA"
  },
  "status": {
    "id": 1,
    "name": "Received"
  },
  "paid_at": "2020-01-01 23:59:59",
  "created_at": "2020-01-01 23:59:59",
  "updated_at": "2020-01-01 23:59:59",
  "description": "Payment description",
  "currency": "BRL"
}
Exemplos de código
- NodeJs
 - Python
 - Java
 - PHP
 
var axios = require('axios');
var data = JSON.stringify({
  "amount": 1000.0,
  "custom_code": "YOURAPPCODE",
  "notification_url": "https://test.requestcatcher.com/",
  "beneficiary": {
    "name": "The Name",
    "bank_code": "147",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client's name",
  "website": "Your client's website"
});
var config = {
  method: 'post',
  url: 'api.sandbox.wepayout.com.br/v1/payout/payments',
  headers: { 
    'Authorization': 'Bearer YOUR_KEY', 
    'Content-Type': 'application/json'
  },
  data : data
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests
import json
url = "api.sandbox.wepayout.com.br/v1/payout/payments"
payload = json.dumps({
  "amount": 1000.0,
  "custom_code": "YOURAPPCODE",
  "notification_url": "https://test.requestcatcher.com/",
  "beneficiary": {
    "name": "The Name",
    "bank_code": "147",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client's name",
  "website": "Your client's website"
})
headers = {
  'Authorization': 'Bearer YOUR_KEY',
  'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
class ExempleClass {
    public static void main(String args[]) {
        OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\r\n  \"amount\": 1000,\r\n  \"custom_code\": \"YOURAPPCODE\",\r\n  \"notification_url\": \"https://test.requestcatcher.com/\",\r\n  \"beneficiary\": {\r\n    \"name\": \"The Name\",\r\n    \"bank_code\": \"147\",\r\n    \"bank_branch\": \"0000\",\r\n    \"bank_branch_digit\": \"1\",\r\n    \"account\": \"1030000\",\r\n    \"account_digit\": \"1\",\r\n    \"account_type\": \"CHECKING\",\r\n    \"document\": \"12533009091\",\r\n    \"document_type\": \"cpf\"\r\n  },\r\n  \"legal_entity_name\": \"Your client's name\",\r\n  \"website\": \"Your client's website\"\r\n}");
        Request request = new Request.Builder()
        .url("api.sandbox.wepayout.com.br/v1/payout/payments")
        .method("POST", body)
        .addHeader("Authorization", "Bearer YOUR_KEY")
        .addHeader("Content-Type", "application/json")
        .build();
        Response response = client.newCall(request).execute();
  }
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'api.sandbox.wepayout.com.br/v1/payout/payments',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "amount": 1000.0,
  "custom_code": "YOURAPPCODE",
  "notification_url": "https://test.requestcatcher.com/",
  "beneficiary": {
    "name": "The Name",
    "bank_code": "147",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client\'s name",
  "website": "Your client\'s website"
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer YOUR_KEY',
    'Content-Type: application/json'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Pagamentos por chave pix
endpoint: /v1/payout/payments
método: POST
Exemplo de payload e Response esperado
{
  "amount": 1000.0,
  "merchant_id":0,
  "custom_code": "test",
  "notification_url": "https://test.requestcatcher.com/",
  "beneficiary": {
    "name": "The Name",
    "pix_key": "userpixkey@user.com",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client's name",
  "website": "Your client's website",
  "instant_payment": 1
}
{
    "id": 0,
    "origin_payment_id": null,
    "amount": "R$ 1.000,00",
    "source_currency": "BRL",
    "source_amount": null,
    "custom_code": "PIXTEST1122",
    "authentication_code": null,
    "rejection_description": "",
    "notification_url": "https://test.requestcatcher.com/",
    "status": {
        "id": 7,
        "name": "Aguardando"
    },
    "paid_at": null,
    "created_at": "2022-06-21 11:24:00",
    "description": null,
    "currency": "BRL",
    "beneficiary": {
        "name": "The Name",
        "document_type": "cpf",
        "email": null,
        "document": "12533009091",
        "birthdate": null,
        "city": null,
        "postal_code": null,
        "province_code": null,
        "address": null,
        "pix_key": "userpixkey@user.com",
        "bank_branch": null,
        "bank_branch_digit": null,
        "account": null,
        "account_digit": null,
        "account_type": "",
        "bank_code": null,
        "bank_name": null
    },
    "payment_type": "P",
    "merchant": {
        "id": 100,
        "name": "test",
        "type": "u"
    },
    "exchange_rate": null,
    "locked": null,
    "file_code": null
}
Exemplos de código
- NodeJs
 - Python
 - Java
 - PHP
 
var axios = require('axios');
var data = JSON.stringify({
  "amount": 1000.0,
  "merchant_id": 0,
  "custom_code": "test",
  "notification_url": "https://test.requestcatcher.com/",
  "beneficiary": {
    "name": "The Name",
    "pix_key": "userpixkey@user.com",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client's name",
  "website": "Your client's website",
  "instant_payment": 1
});
var config = {
  method: 'post',
  url: 'https://api.sandbox.wepayout.co/v1/payout/payments',
  headers: { 
    'Authorization': 'Bearer YOUR_KEY', 
    'Content-Type': 'application/json'
  },
  data : data
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests
import json
url = "https://api.sandbox.wepayout.co/v1/payout/payments"
payload = json.dumps({
  "amount": 1000.0,
  "merchant_id": 0,
  "custom_code": "TEST",
  "notification_url": "https://test.requestcatcher.com/",
  "beneficiary": {
    "name": "The Name",
    "pix_key": "userpixkey@user.com",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client's name",
  "website": "Your client's website",
  "instant_payment": 1
})
headers = {
  'Authorization': 'Bearer YOUR_KEY',
  'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
class ExempleClass {
    public static void main(String args[]) {
        OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\r\n  \"amount\": 1000,\r\n  \"merchant_id\":0,\r\n  \"custom_code\": \"TEST\",\r\n  \"notification_url\": \"https://test.requestcatcher.com/\",\r\n  \"beneficiary\": {\r\n    \"name\": \"The Name\",\r\n    \"pix_key\": \"userpixkey@user.com\",\r\n    \"document\": \"12533009091\",\r\n    \"document_type\": \"cpf\"\r\n  },\r\n  \"legal_entity_name\": \"Your client's name\",\r\n  \"website\": \"Your client's website\",\r\n  \"instant_payment\": 1\r\n}");
        Request request = new Request.Builder()
        .url("https://api.staging.wepayout.co/v1/payout/payments")
        .method("POST", body)
        .addHeader("Authorization", "Bearer YOUR_KEY")
        .addHeader("Content-Type", "application/json")
        .build();
        Response response = client.newCall(request).execute();
  }
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sandbox.wepayout.co/v1/payout/payments',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "amount": 1000.0,
  "merchant_id":0,
  "custom_code": "test",
  "notification_url": "https://test.requestcatcher.com/",
  "beneficiary": {
    "name": "The Name",
    "pix_key": "userpixkey@user.com",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client\'s name",
  "website": "Your client\'s website",
  "instant_payment": 1
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer YOUR_KEY',
    'Content-Type: application/json'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Pagamentos por chave pix com dados bancários
endpoint: /v1/payout/payments
método: POST
Exemplo de payload e Response esperado
{
  "amount": 1000.0,
  "merchant_id":0,
  "custom_code": "teste",
  "notification_url": "https://your.endpoint.to.update",
  "beneficiary": {
    "name": "The Name",
    "bank_code": "104",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client's name",
  "website": "Your client's website",
  "instant_payment": 1
}
{
    "id": -1,
    "origin_payment_id": null,
    "amount": "R$ 1.000,00",
    "source_currency": "BRL",
    "source_amount": null,
    "custom_code": "teste",
    "authentication_code": null,
    "rejection_description": "",
    "notification_url": "https://your.endpoint.to.update",
    "status": {
        "id": 7,
        "name": "Aguardando"
    },
    "paid_at": null,
    "created_at": "2022-06-21 12:49:06",
    "description": null,
    "currency": "BRL",
    "beneficiary": {
        "name": "The Name",
        "document_type": "cpf",
        "email": null,
        "document": "12533009091",
        "birthdate": null,
        "city": null,
        "postal_code": null,
        "province_code": null,
        "address": null,
        "pix_key": null,
        "bank_branch": "0000",
        "bank_branch_digit": "1",
        "account": "1030000",
        "account_digit": "1",
        "account_type": "CHECKING",
        "bank_code": "104",
        "bank_name": "104 - CAIXA ECONOMICA FEDERAL                                     "
    },
    "payment_type": "P",
    "merchant": {
        "id": 100,
        "name": "Eliel F Canivarolli",
        "type": "u"
    },
    "exchange_rate": null,
    "locked": null,
    "file_code": null
}
Exemplos de código
- NodeJs
 - Python
 - Java
 - PHP
 
var axios = require('axios');
var data = JSON.stringify({
  "amount": 1000.0,
  "merchant_id": 0,
  "custom_code": "test",
  "notification_url": "https://your.endpoint.to.update",
  "beneficiary": {
    "name": "The Name",
    "bank_code": "104",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client's name",
  "website": "Your client's website",
  "instant_payment": 1
});
var config = {
  method: 'post',
  url: 'https://api.sandbox.wepayout.co/v1/payout/payments',
  headers: { 
    'Authorization': 'Bearer YOUR_KEY', 
    'Content-Type': 'application/json'
  },
  data : data
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests
import json
url = "https://api.sandbox.wepayout.co/v1/payout/payments"
payload = json.dumps({
  "amount": 1000.0,
  "merchant_id": 0,
  "custom_code": "test",
  "notification_url": "https://your.endpoint.to.update",
  "beneficiary": {
    "name": "The Name",
    "bank_code": "104",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client's name",
  "website": "Your client's website",
  "instant_payment": 1
})
headers = {
  'Authorization': 'Bearer YOUR_KEY',
  'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
class ExempleClass {
    public static void main(String args[]) {
        OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\r\n  \"amount\": 1000,\r\n  \"merchant_id\":0,\r\n  \"custom_code\": \"test\",\r\n  \"notification_url\": \"https://your.endpoint.to.update\",\r\n  \"beneficiary\": {\r\n    \"name\": \"The Name\",\r\n    \"bank_code\": \"104\",\r\n    \"bank_branch\": \"0000\",\r\n    \"bank_branch_digit\": \"1\",\r\n    \"account\": \"1030000\",\r\n    \"account_digit\": \"1\",\r\n    \"account_type\": \"CHECKING\",\r\n    \"document\": \"12533009091\",\r\n    \"document_type\": \"cpf\"\r\n  },\r\n  \"legal_entity_name\": \"Your client's name\",\r\n  \"website\": \"Your client's website\",\r\n  \"instant_payment\": 1\r\n}");
        Request request = new Request.Builder()
        .url("https://api.sandbox.wepayout.co/v1/payout/payments")
        .method("POST", body)
        .addHeader("Authorization", "Bearer YOUR_KEY")
        .addHeader("Content-Type", "application/json")
        .build();
        Response response = client.newCall(request).execute();
  }
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sandbox.wepayout.co/v1/payout/payments',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "amount": 1000.0,
  "merchant_id":0,
  "custom_code": "test",
  "notification_url": "https://your.endpoint.to.update",
  "beneficiary": {
    "name": "The Name",
    "bank_code": "104",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf"
  },
  "legal_entity_name": "Your client\'s name",
  "website": "Your client\'s website",
  "instant_payment": 1
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer YOUR_KEY',
    'Content-Type: application/json'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Pagamentos para remittence
endpoint: /v1/payout/payments
método: POST
Exemplo de payload e Response esperado
{
    "source_currency": "USD",
    "amount": 1000.0,
    "merchant_id":0,
    "custom_code": "test",
    "notification_url": "https://your.endpoint.to.update",
    "beneficiary": {
        "name": "The Name",
        "bank_code": "104",
        "bank_branch": "0000",
        "bank_branch_digit": "1",
        "account": "1030000",
        "account_digit": "1",
        "account_type": "CHECKING",
        "document": "12533009091",
        "document_type": "cpf",
        "birthdate": "1970-01-01",
        "phone": "5541987456321",
        "city": "Curitiba",
        "postal_code": "80200-100",
        "province_code": "PR",
        "address": "Rua a Número 10"
    },
    "legal_entity_name": "M0005",
    "website": "site.com.br",
    "description": "Test M0005",
    "remitter": {
        "name": "The remitter's name",
        "birthdate": "1970-01-01",
        "country": "USA"
    }
}
{
    "id": -1,
    "origin_payment_id": null,
    "amount": "R$ 1.000,00",
    "source_currency": "BRL",
    "source_amount": null,
    "custom_code": "test",
    "authentication_code": null,
    "rejection_description": "",
    "notification_url": "https://your.endpoint.to.update",
    "status": {
        "id": 7,
        "name": "Aguardando"
    },
    "paid_at": null,
    "created_at": "2022-06-21 13:07:15",
    "description": "Test M0005",
    "currency": "BRL",
    "beneficiary": {
        "name": "The Name",
        "document_type": "cpf",
        "email": null,
        "document": "12533009091",
        "birthdate": null,
        "city": null,
        "postal_code": null,
        "province_code": null,
        "address": null,
        "pix_key": null,
        "bank_branch": "0000",
        "bank_branch_digit": "1",
        "account": "1030000",
        "account_digit": "1",
        "account_type": "CHECKING",
        "bank_code": "104",
        "bank_name": "104 - CAIXA ECONOMICA FEDERAL                                     "
    },
    "payment_type": "T",
    "merchant": {
        "id": 100,
        "name": "Eliel F Canivarolli",
        "type": "u"
    },
    "exchange_rate": null,
    "locked": null,
    "file_code": null
}
Exemplos de código
- NodeJs
 - Python
 - Java
 - PHP
 
var axios = require('axios');
var data = JSON.stringify({
  "source_currency": "USD",
  "amount": 1000.0,
  "merchant_id": 0,
  "custom_code": "test",
  "notification_url": "https://your.endpoint.to.update",
  "beneficiary": {
    "name": "The Name",
    "bank_code": "104",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf",
    "birthdate": "1970-01-01",
    "phone": "5541987456321",
    "city": "Curitiba",
    "postal_code": "80200-100",
    "province_code": "PR",
    "address": "Rua a Número 10"
  },
  "legal_entity_name": "M0005",
  "website": "site.com.br",
  "description": "Test M0005",
  "remitter": {
    "name": "The remitter's name",
    "birthdate": "1970-01-01",
    "country": "USA"
  }
});
var config = {
  method: 'post',
  url: 'https://api.sandbox.wepayout.co/v1/payout/payments',
  headers: { 
    'Authorization': 'Bearer YOUR_KEY', 
    'Content-Type': 'application/json'
  },
  data : data
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests
import json
url = "https://api.sandbox.wepayout.co/v1/payout/payments"
payload = json.dumps({
  "source_currency": "USD",
  "amount": 1000.0,
  "merchant_id": 0,
  "custom_code": "test",
  "notification_url": "https://your.endpoint.to.update",
  "beneficiary": {
    "name": "The Name",
    "bank_code": "104",
    "bank_branch": "0000",
    "bank_branch_digit": "1",
    "account": "1030000",
    "account_digit": "1",
    "account_type": "CHECKING",
    "document": "12533009091",
    "document_type": "cpf",
    "birthdate": "1970-01-01",
    "phone": "5541987456321",
    "city": "Curitiba",
    "postal_code": "80200-100",
    "province_code": "PR",
    "address": "Rua a Número 10"
  },
  "legal_entity_name": "M0005",
  "website": "site.com.br",
  "description": "Test M0005",
  "remitter": {
    "name": "The remitter's name",
    "birthdate": "1970-01-01",
    "country": "USA"
  }
})
headers = {
  'Authorization': 'Bearer 87ab5869cb180c09b1422bbd8a3dd89f492f6f0c26c1c8a6b86845f6577f10cc',
  'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
class ExempleClass {
    public static void main(String args[]) {
        OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\r\n    \"source_currency\": \"USD\",\r\n    \"amount\": 1000,\r\n    \"merchant_id\":0,\r\n    \"custom_code\": \"test\",\r\n    \"notification_url\": \"https://your.endpoint.to.update\",\r\n    \"beneficiary\": {\r\n        \"name\": \"The Name\",\r\n        \"bank_code\": \"104\",\r\n        \"bank_branch\": \"0000\",\r\n        \"bank_branch_digit\": \"1\",\r\n        \"account\": \"1030000\",\r\n        \"account_digit\": \"1\",\r\n        \"account_type\": \"CHECKING\",\r\n        \"document\": \"12533009091\",\r\n        \"document_type\": \"cpf\",\r\n        \"birthdate\": \"1970-01-01\",\r\n        \"phone\": \"5541987456321\",\r\n        \"city\": \"Curitiba\",\r\n        \"postal_code\": \"80200-100\",\r\n        \"province_code\": \"PR\",\r\n        \"address\": \"Rua a Número 10\"\r\n    },\r\n    \"legal_entity_name\": \"M0005\",\r\n    \"website\": \"site.com.br\",\r\n    \"description\": \"Test M0005\",\r\n    \"remitter\": {\r\n        \"name\": \"The remitter's name\",\r\n        \"birthdate\": \"1970-01-01\",\r\n        \"country\": \"USA\"\r\n    }\r\n}");
        Request request = new Request.Builder()
        .url("https://api.sandbox.wepayout.co/v1/payout/payments")
        .method("POST", body)
        .addHeader("Authorization", "Bearer YOUR_KEY")
        .addHeader("Content-Type", "application/json")
        .build();
        Response response = client.newCall(request).execute();
  }
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sandbox.wepayout.co/v1/payout/payments',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "source_currency": "USD",
    "amount": 1000.0,
    "merchant_id":0,
    "custom_code": "test",
    "notification_url": "https://your.endpoint.to.update",
    "beneficiary": {
        "name": "The Name",
        "bank_code": "104",
        "bank_branch": "0000",
        "bank_branch_digit": "1",
        "account": "1030000",
        "account_digit": "1",
        "account_type": "CHECKING",
        "document": "12533009091",
        "document_type": "cpf",
        "birthdate": "1970-01-01",
        "phone": "5541987456321",
        "city": "Curitiba",
        "postal_code": "80200-100",
        "province_code": "PR",
        "address": "Rua a Número 10"
    },
    "legal_entity_name": "M0005",
    "website": "site.com.br",
    "description": "Test M0005",
    "remitter": {
        "name": "The remitter\'s name",
        "birthdate": "1970-01-01",
        "country": "USA"
    }
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer YOUR_KEY',
    'Content-Type: application/json'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Webhook
Pagamento Atualizado
Quando o pagamento tem o status alterado, um post é disparado com um payload para a url do atributo notification_url que foi informado durante a criação do pagamento.
Todos os webhooks de pagamentos são assinados com um hash sha256 fornecido no cabeçalho Authorization.
O hash é enviado como uma Bearer token, ex: Bearer {hash}. Para validar a assinatura você precisa concatenar os campos custom_code, currency e amount do pagamento com a APIKey
usada para criar os pagamentos, e fazer o hash dessa string usando o algoritmo sha256.
Por exemplo: CustomCodeBRL1000.00APIKEY
{
   "property":"Payment",
   "property_id":1359280,
   "date":"2022-06-21 13:28:42",
   "custom_code":"TEST1327",
   "batch_code":null,
   "status_id":3,
   "status":"Pago",
   "description":"",
   "instructions":[
      
   ],
   "currency":"BRL",
   "amount":"1000.00"
}