Criar intenção
curl --request POST \
--url https://sandbox.brlp.io/api/v1/cashin/intent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<unknown>",
"quoteId": "<unknown>",
"customer": "<unknown>",
"additionalInfo": "<unknown>",
"expiresIn": "<unknown>",
"webhookUrl": "<unknown>",
"comment": "<unknown>"
}
'import requests
url = "https://sandbox.brlp.io/api/v1/cashin/intent"
payload = {
"amount": "<unknown>",
"quoteId": "<unknown>",
"customer": "<unknown>",
"additionalInfo": "<unknown>",
"expiresIn": "<unknown>",
"webhookUrl": "<unknown>",
"comment": "<unknown>"
}
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({
amount: '<unknown>',
quoteId: '<unknown>',
customer: '<unknown>',
additionalInfo: '<unknown>',
expiresIn: '<unknown>',
webhookUrl: '<unknown>',
comment: '<unknown>'
})
};
fetch('https://sandbox.brlp.io/api/v1/cashin/intent', 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://sandbox.brlp.io/api/v1/cashin/intent",
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([
'amount' => '<unknown>',
'quoteId' => '<unknown>',
'customer' => '<unknown>',
'additionalInfo' => '<unknown>',
'expiresIn' => '<unknown>',
'webhookUrl' => '<unknown>',
'comment' => '<unknown>'
]),
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://sandbox.brlp.io/api/v1/cashin/intent"
payload := strings.NewReader("{\n \"amount\": \"<unknown>\",\n \"quoteId\": \"<unknown>\",\n \"customer\": \"<unknown>\",\n \"additionalInfo\": \"<unknown>\",\n \"expiresIn\": \"<unknown>\",\n \"webhookUrl\": \"<unknown>\",\n \"comment\": \"<unknown>\"\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://sandbox.brlp.io/api/v1/cashin/intent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<unknown>\",\n \"quoteId\": \"<unknown>\",\n \"customer\": \"<unknown>\",\n \"additionalInfo\": \"<unknown>\",\n \"expiresIn\": \"<unknown>\",\n \"webhookUrl\": \"<unknown>\",\n \"comment\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.brlp.io/api/v1/cashin/intent")
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 \"amount\": \"<unknown>\",\n \"quoteId\": \"<unknown>\",\n \"customer\": \"<unknown>\",\n \"additionalInfo\": \"<unknown>\",\n \"expiresIn\": \"<unknown>\",\n \"webhookUrl\": \"<unknown>\",\n \"comment\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"error": null,
"data": {
"intentId": "cashin_ab12",
"correlationID": "cashin_ab12",
"status": "ACTIVE",
"valueCents": 10000,
"brCode": "00020101...",
"qrCodeImage": "https://..."
}
}Autorizações
JWT issued by POST /api/v1/auth/token - JWT emitido por POST /api/v1/auth/token
Cabeçalhos
Corpo
number (optional). Amount in BRL. Inherited from the quote snapshot when quoteId is provided. - Valor em BRL; herdado do snapshot da cotação quando quoteId é informado.
string (opcional). Vincula a intent a uma cotacao previa (POST /cashin/quote). Quando presente, amount e herdado do snapshot e o destino da entrega (destinationWallet) tambem vem do snapshot.
object (opcional). Dados do customer Woovi { name?, taxID?, email?, phone? }. Quando omitido, a cobranca nao vincula um pagador (identificado no momento do Pix).
array (optional). Up to 10 { key, value } items shown on the charge. - Até 10 itens { key, value } exibidos na cobrança.
number (optional). Charge expiry in seconds (minimum 60). Overrides CASHIN_CHARGE_EXPIRES_IN. - Expiração da cobrança em segundos (mínimo 60). Override do CASHIN_CHARGE_EXPIRES_IN.
string (optional). Partner webhook for CASHIN_COMPLETED / CASHIN_EXPIRED. - Webhook do parceiro para CASHIN_COMPLETED / CASHIN_EXPIRED.
string (optional). Comment shown on the QR Code (up to 140 characters). - Comentário exibido no QR Code (até 140 caracteres).
curl --request POST \
--url https://sandbox.brlp.io/api/v1/cashin/intent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<unknown>",
"quoteId": "<unknown>",
"customer": "<unknown>",
"additionalInfo": "<unknown>",
"expiresIn": "<unknown>",
"webhookUrl": "<unknown>",
"comment": "<unknown>"
}
'import requests
url = "https://sandbox.brlp.io/api/v1/cashin/intent"
payload = {
"amount": "<unknown>",
"quoteId": "<unknown>",
"customer": "<unknown>",
"additionalInfo": "<unknown>",
"expiresIn": "<unknown>",
"webhookUrl": "<unknown>",
"comment": "<unknown>"
}
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({
amount: '<unknown>',
quoteId: '<unknown>',
customer: '<unknown>',
additionalInfo: '<unknown>',
expiresIn: '<unknown>',
webhookUrl: '<unknown>',
comment: '<unknown>'
})
};
fetch('https://sandbox.brlp.io/api/v1/cashin/intent', 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://sandbox.brlp.io/api/v1/cashin/intent",
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([
'amount' => '<unknown>',
'quoteId' => '<unknown>',
'customer' => '<unknown>',
'additionalInfo' => '<unknown>',
'expiresIn' => '<unknown>',
'webhookUrl' => '<unknown>',
'comment' => '<unknown>'
]),
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://sandbox.brlp.io/api/v1/cashin/intent"
payload := strings.NewReader("{\n \"amount\": \"<unknown>\",\n \"quoteId\": \"<unknown>\",\n \"customer\": \"<unknown>\",\n \"additionalInfo\": \"<unknown>\",\n \"expiresIn\": \"<unknown>\",\n \"webhookUrl\": \"<unknown>\",\n \"comment\": \"<unknown>\"\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://sandbox.brlp.io/api/v1/cashin/intent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<unknown>\",\n \"quoteId\": \"<unknown>\",\n \"customer\": \"<unknown>\",\n \"additionalInfo\": \"<unknown>\",\n \"expiresIn\": \"<unknown>\",\n \"webhookUrl\": \"<unknown>\",\n \"comment\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.brlp.io/api/v1/cashin/intent")
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 \"amount\": \"<unknown>\",\n \"quoteId\": \"<unknown>\",\n \"customer\": \"<unknown>\",\n \"additionalInfo\": \"<unknown>\",\n \"expiresIn\": \"<unknown>\",\n \"webhookUrl\": \"<unknown>\",\n \"comment\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"error": null,
"data": {
"intentId": "cashin_ab12",
"correlationID": "cashin_ab12",
"status": "ACTIVE",
"valueCents": 10000,
"brCode": "00020101...",
"qrCodeImage": "https://..."
}
}