Adicionar conta bancária
curl --request POST \
--url https://api.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"bankCode": "341",
"agencyNumber": "1234",
"accountNumber": "123456",
"accountDigit": "7",
"type": "conta_corrente",
"legalName": "minhalojinha",
"documentNumber": "12345678909",
"documentType": "cpf"
}
'import requests
url = "https://api.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts"
payload = {
"bankCode": "341",
"agencyNumber": "1234",
"accountNumber": "123456",
"accountDigit": "7",
"type": "conta_corrente",
"legalName": "minhalojinha",
"documentNumber": "12345678909",
"documentType": "cpf"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankCode: '341',
agencyNumber: '1234',
accountNumber: '123456',
accountDigit: '7',
type: 'conta_corrente',
legalName: 'minhalojinha',
documentNumber: '12345678909',
documentType: 'cpf'
})
};
fetch('https://api.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts', 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.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts",
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([
'bankCode' => '341',
'agencyNumber' => '1234',
'accountNumber' => '123456',
'accountDigit' => '7',
'type' => 'conta_corrente',
'legalName' => 'minhalojinha',
'documentNumber' => '12345678909',
'documentType' => 'cpf'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts"
payload := strings.NewReader("{\n \"bankCode\": \"341\",\n \"agencyNumber\": \"1234\",\n \"accountNumber\": \"123456\",\n \"accountDigit\": \"7\",\n \"type\": \"conta_corrente\",\n \"legalName\": \"minhalojinha\",\n \"documentNumber\": \"12345678909\",\n \"documentType\": \"cpf\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"bankCode\": \"341\",\n \"agencyNumber\": \"1234\",\n \"accountNumber\": \"123456\",\n \"accountDigit\": \"7\",\n \"type\": \"conta_corrente\",\n \"legalName\": \"minhalojinha\",\n \"documentNumber\": \"12345678909\",\n \"documentType\": \"cpf\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bankCode\": \"341\",\n \"agencyNumber\": \"1234\",\n \"accountNumber\": \"123456\",\n \"accountDigit\": \"7\",\n \"type\": \"conta_corrente\",\n \"legalName\": \"minhalojinha\",\n \"documentNumber\": \"12345678909\",\n \"documentType\": \"cpf\"\n}"
response = http.request(request)
puts response.read_body{}{
"message": "Invalid request",
"code": "bad_request",
"details": {}
}{
"message": "Invalid request",
"code": "bad_request",
"details": {}
}{
"message": "Invalid request",
"code": "bad_request",
"details": {}
}{
"message": "Invalid request",
"code": "bad_request",
"details": {}
}{
"message": "Invalid request",
"code": "bad_request",
"details": {}
}Contas Bancárias
Adicionar conta bancária
Para alterar a conta bancária principal de um recebedor, você deve adicionar uma nova conta bancária para ele usando esse endpoint.
POST
/
recipients
/
{recipientId}
/
bank-accounts
Adicionar conta bancária
curl --request POST \
--url https://api.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"bankCode": "341",
"agencyNumber": "1234",
"accountNumber": "123456",
"accountDigit": "7",
"type": "conta_corrente",
"legalName": "minhalojinha",
"documentNumber": "12345678909",
"documentType": "cpf"
}
'import requests
url = "https://api.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts"
payload = {
"bankCode": "341",
"agencyNumber": "1234",
"accountNumber": "123456",
"accountDigit": "7",
"type": "conta_corrente",
"legalName": "minhalojinha",
"documentNumber": "12345678909",
"documentType": "cpf"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankCode: '341',
agencyNumber: '1234',
accountNumber: '123456',
accountDigit: '7',
type: 'conta_corrente',
legalName: 'minhalojinha',
documentNumber: '12345678909',
documentType: 'cpf'
})
};
fetch('https://api.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts', 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.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts",
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([
'bankCode' => '341',
'agencyNumber' => '1234',
'accountNumber' => '123456',
'accountDigit' => '7',
'type' => 'conta_corrente',
'legalName' => 'minhalojinha',
'documentNumber' => '12345678909',
'documentType' => 'cpf'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts"
payload := strings.NewReader("{\n \"bankCode\": \"341\",\n \"agencyNumber\": \"1234\",\n \"accountNumber\": \"123456\",\n \"accountDigit\": \"7\",\n \"type\": \"conta_corrente\",\n \"legalName\": \"minhalojinha\",\n \"documentNumber\": \"12345678909\",\n \"documentType\": \"cpf\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"bankCode\": \"341\",\n \"agencyNumber\": \"1234\",\n \"accountNumber\": \"123456\",\n \"accountDigit\": \"7\",\n \"type\": \"conta_corrente\",\n \"legalName\": \"minhalojinha\",\n \"documentNumber\": \"12345678909\",\n \"documentType\": \"cpf\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conta.paybeehive.com.br/v1/recipients/{recipientId}/bank-accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bankCode\": \"341\",\n \"agencyNumber\": \"1234\",\n \"accountNumber\": \"123456\",\n \"accountDigit\": \"7\",\n \"type\": \"conta_corrente\",\n \"legalName\": \"minhalojinha\",\n \"documentNumber\": \"12345678909\",\n \"documentType\": \"cpf\"\n}"
response = http.request(request)
puts response.read_body{}{
"message": "Invalid request",
"code": "bad_request",
"details": {}
}{
"message": "Invalid request",
"code": "bad_request",
"details": {}
}{
"message": "Invalid request",
"code": "bad_request",
"details": {}
}{
"message": "Invalid request",
"code": "bad_request",
"details": {}
}{
"message": "Invalid request",
"code": "bad_request",
"details": {}
}Authorizations
basicAuthapiKeyAuth
Basic Authorization usando SECRET_KEY como usuário e "x" como senha.
Path Parameters
Body
application/json
Código do banco.
Example:
"341"
Número da agência.
Example:
"1234"
Número da conta.
Example:
"123456"
Dígito da conta.
Example:
"7"
Tipo da conta.
Available options:
conta_corrente, conta_poupanca Example:
"conta_corrente"
Razão social / nome do titular da conta bancária.
Maximum string length:
50Example:
"minhalojinha"
CPF/CNPJ do titular da conta bancária (normalmente o mesmo do recebedor).
Example:
"12345678909"
Tipo do documento do titular.
Available options:
cpf, cnpj Example:
"cpf"
Response
Conta bancária adicionada ao recebedor
The response is of type object.
⌘I