Skip to main content

Payments

For more details, access the open api

Url of the environments

Attention

To use these endpoints you need a API KEY.

get the crendential

Eletronic Transfer (TED)

endpoint: /v1/payout/payments

method: POST

Samples of payload and Response

Payload
{
"amount": 1000,
"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"
}

Response
{
"id": 111111,
"amount": 1000,
"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"
}

Samples codes

var axios = require('axios');
var data = JSON.stringify({
"amount": 1000,
"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);
});

Instant payment (PIX) with pix key

endpoint: /v1/payout/payments

method: POST

Sample payload and Response

Sample payload
{
"amount": 1000,
"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
}
Sample Response
{
"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
}

Samples codes

var axios = require('axios');
var data = JSON.stringify({
"amount": 1000,
"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);
});

Instant payment (PIX) with bank details

endpoint: /v1/payout/payments

method: POST

Sample payload and Response

Sample payload
{
"amount": 1000,
"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
}
Sample response
{
"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
}

Samples codes

var axios = require('axios');
var data = JSON.stringify({
"amount": 1000,
"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);
});

Remittance operation

endpoint: /v1/payout/payments

method: POST

Sample payload and Response

Sample payload
{
"source_currency": "USD",
"amount": 1000,
"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"
}
}
Sample response
{
"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
}

Sample Codes

var axios = require('axios');
var data = JSON.stringify({
"source_currency": "USD",
"amount": 1000,
"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);
});

Webhook

Receive payment's status updates

All payments webhooks are signed with an sha256 hash provided in the x-webhook-wpo-signature header. The hash is sent as a Bearer token. eg.: Bearer {hash} To validate the signature you must concatenate the payment custom_code, currency, amount and your APIKey used to create the payments and hash this string using the sha256 algorithm.

For example: CustomCodeBRL1000.00APIKEY

Sample payload
{
"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"
}