Payouts
Authorize payout
Authorize Payout
POST
/
v1.1
/
payout
/
authorize
/
{tid}
/
{authorizationCode}
Authorize payout
curl --request POST \
--url https://api.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode} \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-token: <x-api-token>'import requests
url = "https://api.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}"
headers = {
"x-api-key": "<x-api-key>",
"x-api-token": "<x-api-token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'x-api-token': '<x-api-token>'}
};
fetch('https://api.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}', 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.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-api-token: <x-api-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-token", "<x-api-token>")
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.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}")
.header("x-api-key", "<x-api-key>")
.header("x-api-token", "<x-api-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-token"] = '<x-api-token>'
response = http.request(request)
puts response.read_body{
"message": "success",
"status": 0,
"tid": 49916,
"uuid": "1e637332-b2dd-3d3a-b76c-03e5bcb1dd0a",
"response": {
"response": {
"endToEndId": "E710278662021052700421198558814A",
"pagador": {
"conta": {
"agencia": "0000",
"banco": "000",
"bancoNome": "PAYMEE BRASIL",
"numero": "000000-0",
"tipo": "ContaCorrente"
},
"ispb": "00000000",
"pessoa": {
"documento": "00000000000",
"nome": "JOHN DOE",
"nomeFantasia": null,
"tipoDocumento": "CPF"
}
},
"pagamentoId": "2d18f284-19fc-4434-887d-765b6b1a44ec",
"recebedor": {
"conta": {
"agencia": "0000",
"banco": "000",
"bancoNome": "PAYMEE BRASIL",
"numero": "00000-5",
"tipo": "ContaCorrente"
},
"ispb": "00000000",
"pessoa": {
"documento": "28683892000191",
"nome": "PAYMEE BRASIL SERVICOS DE PAGAMENTOS S.A",
"nomeFantasia": "PAYMEE",
"tipoDocumento": "CNPJ"
}
}
}
}
}{
"errorCount": 1,
"errors": [
{
"field": "token",
"message": "invalid authorization token"
}
],
"message": "field validation failure",
"status": -1
}{
"errorCount": 1,
"errors": [
{
"error": "Forbidden",
"message": "Access Denied"
}
],
"message": "field validation failure",
"status": -1
}Headers
Example:
"your-x-api-key"
Example:
"your-x-api-token"
Previous
Cancel a payoutBefore we start, there are some important notes:
1. the transactions should have **PENDING** status and not marked as **IN PROCESSING**
Next
⌘I
Authorize payout
curl --request POST \
--url https://api.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode} \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-token: <x-api-token>'import requests
url = "https://api.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}"
headers = {
"x-api-key": "<x-api-key>",
"x-api-token": "<x-api-token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'x-api-token': '<x-api-token>'}
};
fetch('https://api.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}', 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.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-api-token: <x-api-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-token", "<x-api-token>")
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.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}")
.header("x-api-key", "<x-api-key>")
.header("x-api-token", "<x-api-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paymee.com.br/v1.1/payout/authorize/{tid}/{authorizationCode}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-token"] = '<x-api-token>'
response = http.request(request)
puts response.read_body{
"message": "success",
"status": 0,
"tid": 49916,
"uuid": "1e637332-b2dd-3d3a-b76c-03e5bcb1dd0a",
"response": {
"response": {
"endToEndId": "E710278662021052700421198558814A",
"pagador": {
"conta": {
"agencia": "0000",
"banco": "000",
"bancoNome": "PAYMEE BRASIL",
"numero": "000000-0",
"tipo": "ContaCorrente"
},
"ispb": "00000000",
"pessoa": {
"documento": "00000000000",
"nome": "JOHN DOE",
"nomeFantasia": null,
"tipoDocumento": "CPF"
}
},
"pagamentoId": "2d18f284-19fc-4434-887d-765b6b1a44ec",
"recebedor": {
"conta": {
"agencia": "0000",
"banco": "000",
"bancoNome": "PAYMEE BRASIL",
"numero": "00000-5",
"tipo": "ContaCorrente"
},
"ispb": "00000000",
"pessoa": {
"documento": "28683892000191",
"nome": "PAYMEE BRASIL SERVICOS DE PAGAMENTOS S.A",
"nomeFantasia": "PAYMEE",
"tipoDocumento": "CNPJ"
}
}
}
}
}{
"errorCount": 1,
"errors": [
{
"field": "token",
"message": "invalid authorization token"
}
],
"message": "field validation failure",
"status": -1
}{
"errorCount": 1,
"errors": [
{
"error": "Forbidden",
"message": "Access Denied"
}
],
"message": "field validation failure",
"status": -1
}
