Learn how to receive Pix payments using Dynamic QR Codes on the Stark Bank platform.
A Dynamic QR Code (also called a Dynamic BR Code) is a Pix QR Code whose payment information is fetched in real time. This means you can set amounts, add tags, and control expiration — all from a single generated code.
When someone scans and pays your QR Code, Stark Bank automatically creates a Deposit in your account. You can track deposits via webhooks or by querying the API.
For a complete Pix QR Code solution with built-in conciliation, check the Invoice Get Started.
NOTE: Read Core Concepts before continuing this guide.
For each environment (Sandbox or Production):
1. Create an account at Stark Bank.
2. Create a webhook with the following subscription to receive events at your desired URL:
deposit
2.1. Via Internet Banking:
Integrations > Webhook > New Webhook
2.2. Via API:
Use the POST /webhook route to create the webhook
The QR Code payment flow works in three steps:
1. Create a Dynamic BR Code: Your server calls the Stark Bank API to generate a QR Code with the desired amount, expiration, and optional tags or rules.
2. Display the QR Code: Use the returned pictureUrl to display the QR Code image to your customer
3. Copy and Paste the QR Code: Use the id to allow your customer to copy and paste it and pay the QR Code in their bank account
4. Receive the Deposit: Once the customer pays, Stark Bank creates a Deposit in your account. The deposit's tags field will contain "dynamic-brcode/{uuid}" linking it back to the original QR Code for easy reconciliation.
The Sandbox environment simulates the full QR Code payment flow — creation, payment, and deposit — without real money. Use it to test your integration before going live.
Sandbox vs Production: Stark Bank uses separate workspaces for each environment, each with its own URL and API keys. Changes in one environment don't affect the other.
If you don't have a Sandbox workspace yet, create one here:
A Dynamic BR Code is a simple Pix QR Code that allows your customer to pay it once. It allows you to set amounts, expiration times, tags, and payer restrictions. Unlike static QR Codes, the payment information is fetched in real time when the payer scans it.
amount
Amount in cents to be received. Example: 100 (R$1.00).
expiration
Time in seconds from creation until expiration. After expiration, the QR Code cannot be paid. Default: 3600 (1 hour).
pictureUrl
URL of the QR Code image. Display this to your customer so they can scan it.
tags
Tags associated with the Dynamic BR Code. Useful for organizing and filtering.
rules
List of rules for modifying Dynamic BR Code behavior (e.g., restricting which tax IDs can pay).
uuid
Unique UUID for the Dynamic BR Code. Used to retrieve the QR Code and to link it to the resulting Deposit.
created
Creation datetime. Example: "2020-04-23T23:00:00.000000+00:00".
updated
Last update datetime. Example: "2020-04-23T23:00:00.000000+00:00".
To generate a QR Code, create a Dynamic BR Code with the desired amount in cents (4000 = R$40,00).
The response includes a pictureUrl you can display to your customer and a uuid you can use for reconciliation.
import starkbank
from datetime import datetime
brcodes = starkbank.dynamicbrcode.create([
starkbank.DynamicBrcode(
amount=4000
)
])
for brcode in brcodes:
print(brcode)
const starkbank = require('starkbank');
(async() => {
let brcodes = await starkbank.dynamicBrcode.create([{
amount: 4000
}]);
for (let brcode of brcodes) {
console.log(brcode);
}
})();
use StarkBank\DynamicBrcode;
$brcodes = DynamicBrcode::create([
new DynamicBrcode([
"amount" => 4000
])
]);
foreach ($brcodes as $brcode) {
print_r($brcode);
}
import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
List<DynamicBrcode> brcodes = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("amount", 4000);
brcodes.add(new DynamicBrcode(data));
brcodes = DynamicBrcode.create(brcodes);
for (DynamicBrcode brcode : brcodes) {
System.out.println(brcode);
}
require('starkbank')
brcodes = StarkBank::DynamicBrcode.create(
[
StarkBank::DynamicBrcode.new(
amount: 4000
)
]
)
brcodes.each do |brcode|
puts brcode
end
brcode = StarkBank.DynamicBrcode.create!(
[
%StarkBank.DynamicBrcode{
amount: 4000
}
]
) |> IO.inspect()
using System;
using System.Collections.Generic;
List<StarkBank.DynamicBrcode> brcodes = StarkBank.DynamicBrcode.Create(
new List<StarkBank.DynamicBrcode> {
new StarkBank.DynamicBrcode(
amount: 4000
)
}
);
foreach (StarkBank.DynamicBrcode brcode in brcodes)
{
Console.WriteLine(brcode);
}
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/dynamicbrcode"
"time"
)
func main() {
due := time.Now().Add(time.Hour * 24)
brcodes, err := dynamicbrcode.Create(
[]dynamicbrcode.DynamicBrcode{
{
Amount: 4000
},
}, nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
for _, brcode := range brcodes {
fmt.Printf("%+v", brcode)
}
}
Not yet available. Please contact us if you need this SDK.
curl --location --request POST '{{baseUrl}}/v2/dynamic-brcode'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
--header 'Content-Type: application/json'
--data-raw '{
"brcodes": [
{
"amount": 4000
}
]
}'
DynamicBrcode(
amount=4000,
created=2023-02-06 21:15:00.118056,
expiration=1428 days, 21:33:09,
id=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/80b0688d05934971a6b8ecd86cde69f25204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***630461C9,
picture_url=https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
tags=[],
rules=[],
updated=2023-02-06 21:15:00.449696,
uuid=80b0688d05934971a6b8ecd86cde69f2
)
DynamicBrcode {
id: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47',
amount: 4000,
expiration: 123456789,
tags: [ ],
uuid: '80b0688d05934971a6b8ecd86cde69f2',
pictureUrl: 'https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png',
updated: '2023-02-06T21:17:30.977004+00:00',
created: '2023-02-06T21:17:30.625913+00:00'
}
StarkBank\DynamicBrcode Object
(
[id] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47
[amount] => 4000
[expiration] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 0
[h] => 0
[i] => 0
[s] => 123456789
[f] => 0
[invert] => 0
[days] =>
[from_string] =>
)
[tags] => Array
(
)
[uuid] => 80b0688d05934971a6b8ecd86cde69f2
[pictureUrl] => https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
[updated] => DateTime Object
(
[date] => 2023-02-06 21:23:50.776494
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-02-06 21:23:50.435531
[timezone_type] => 1
[timezone] => +00:00
)
)
DynamicBrcode({
"amount": 4000,
"expiration": 123456789,
"tags": [],
"uuid": "80b0688d05934971a6b8ecd86cde69f2",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"updated": "2023-02-06T21:30:36.688229+00:00",
"created": "2023-02-06T21:30:36.372956+00:00",
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/8411cece3387471ea7f2636b618c37fb5204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304556B"
})
dynamicbrcode(
id: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9,
amount: 4000,
expiration: 123456789,
tags: [],
uuid: 80b0688d05934971a6b8ecd86cde69f2,
picture_url: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
created: 2023-02-06T21:39:47+00:00,
updated: 2023-02-06T21:39:47+00:00
)
%StarkBank.DynamicBrcode{
id: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
uuid: "80b0688d05934971a6b8ecd86cde69f2",
amount: 4000,
expiration: 123456789,
picture_url: "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
created: ~U[2023-02-06 18:36:18.116976Z],
updated: ~U[2023-02-06 18:36:18.116976Z]
}
DynamicBrcode(
ID: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Expiration: 123456789,
Tags: { },
Amount: 4000,
Uuid: 80b0688d05934971a6b8ecd86cde69f2,
PictureUrl: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
Created: 06/02/2023 18:45:08,
Updated: 06/02/2023 18:45:08
)
{
Id:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Uuid:80b0688d05934971a6b8ecd86cde69f2
Amount:4000
Expiration:123456789
Tags:[]
PictureUrl:https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
Created:2023-02-06 19:54:54.16799 +0000 +0000
Updated:2023-02-06 19:54:54.24204 +0000 +0000
}
Not yet available. Please contact us if you need this SDK.
{
"brcodes": [
{
"amount": 4000,
"created": "2023-02-06T21:49:19.660252+00:00",
"expiration": 123456789,
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"tags": [],
"rules": [],
"updated": "2023-02-06T21:49:19.987058+00:00",
"uuid": "80b0688d05934971a6b8ecd86cde69f2"
}
],
"message": "Brcode(s) successfully created"
}
By default, a Dynamic BR Code expires in 1 hour (3600 seconds). You can customize this by passing the expiration parameter in seconds.
After the QR Code expires, it can no longer be paid.
import starkbank
from datetime import datetime
brcodes = starkbank.dynamicbrcode.create([
starkbank.DynamicBrcode(
amount=4000,
expiration=123456789
)
])
for brcode in brcodes:
print(brcode)
const starkbank = require('starkbank');
(async() => {
let brcodes = await starkbank.dynamicBrcode.create([{
amount: 4000,
expiration: 123456789
}]);
for (let brcode of brcodes) {
console.log(brcode);
}
})();
use StarkBank\DynamicBrcode;
$brcodes = DynamicBrcode::create([
new DynamicBrcode([
"amount" => 4000,
"expiration" => 123456789
])
]);
foreach ($brcodes as $brcode) {
print_r($brcode);
}
import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
List<DynamicBrcode> brcodes = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("amount", 4000);
data.put("expiration", 123456789);
brcodes.add(new DynamicBrcode(data));
brcodes = DynamicBrcode.create(brcodes);
for (DynamicBrcode brcode : brcodes) {
System.out.println(brcode);
}
require('starkbank')
brcodes = StarkBank::DynamicBrcode.create(
[
StarkBank::DynamicBrcode.new(
amount: 4000,
expiration: 123456789
)
]
)
brcodes.each do |brcode|
puts brcode
end
brcode = StarkBank.DynamicBrcode.create!(
[
%StarkBank.DynamicBrcode{
amount: 4000,
expiration: 123456789
}
]
) |> IO.inspect()
using System;
using System.Collections.Generic;
List<StarkBank.DynamicBrcode> brcodes = StarkBank.DynamicBrcode.Create(
new List<StarkBank.DynamicBrcode> {
new StarkBank.DynamicBrcode(
amount: 4000,
expiration: 123456789
)
}
);
foreach (StarkBank.DynamicBrcode brcode in brcodes)
{
Console.WriteLine(brcode);
}
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/dynamicbrcode"
"time"
)
func main() {
due := time.Now().Add(time.Hour * 24)
brcodes, err := dynamicbrcode.Create(
[]dynamicbrcode.DynamicBrcode{
{
Amount: 4000,
Expiration: 123456789
},
}, nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
for _, brcode := range brcodes {
fmt.Printf("%+v", brcode)
}
}
Not yet available. Please contact us if you need this SDK.
curl --location --request POST '{{baseUrl}}/v2/dynamic-brcode'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
--header 'Content-Type: application/json'
--data-raw '{
"brcodes": [
{
"amount": 4000,
"expiration": 1234567890
}
]
}'
DynamicBrcode(
amount=4000,
created=2023-02-06 21:15:00.118056,
expiration=1428 days, 21:33:09,
id=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/80b0688d05934971a6b8ecd86cde69f25204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***630461C9,
picture_url=https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
tags=[],
updated=2023-02-06 21:15:00.449696,
uuid=80b0688d05934971a6b8ecd86cde69f2
)
DynamicBrcode {
id: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47',
amount: 4000,
expiration: 123456789,
tags: [],
uuid: '80b0688d05934971a6b8ecd86cde69f2',
pictureUrl: 'https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png',
updated: '2023-02-06T21:17:30.977004+00:00',
created: '2023-02-06T21:17:30.625913+00:00'
}
StarkBank\DynamicBrcode Object
(
[id] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47
[amount] => 4000
[expiration] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 0
[h] => 0
[i] => 0
[s] => 123456789
[f] => 0
[invert] => 0
[days] =>
[from_string] =>
)
[tags] => Array
(
)
[uuid] => 80b0688d05934971a6b8ecd86cde69f2
[pictureUrl] => https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
[updated] => DateTime Object
(
[date] => 2023-02-06 21:23:50.776494
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-02-06 21:23:50.435531
[timezone_type] => 1
[timezone] => +00:00
)
)
DynamicBrcode({
"amount": 4000,
"expiration": 123456789,
"tags": [],
"uuid": "80b0688d05934971a6b8ecd86cde69f2",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"updated": "2023-02-06T21:30:36.688229+00:00",
"created": "2023-02-06T21:30:36.372956+00:00",
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/8411cece3387471ea7f2636b618c37fb5204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304556B"
})
dynamicbrcode(
id: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9,
amount: 4000,
expiration: 123456789,
tags: [],
uuid: 80b0688d05934971a6b8ecd86cde69f2,
picture_url: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
created: 2023-02-06T21:39:47+00:00,
updated: 2023-02-06T21:39:47+00:00
)
%StarkBank.DynamicBrcode{
id: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
uuid: "80b0688d05934971a6b8ecd86cde69f2",
amount: 4000,
expiration: 123456789,
picture_url: "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
created: ~U[2023-02-06 18:36:18.116976Z],
updated: ~U[2023-02-06 18:36:18.116976Z]
}
DynamicBrcode(
ID: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Expiration: 123456789,
Tags: {},
Amount: 4000,
Uuid: 80b0688d05934971a6b8ecd86cde69f2,
PictureUrl: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
Created: 06/02/2023 18:45:08,
Updated: 06/02/2023 18:45:08
)
{
Id:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Uuid:80b0688d05934971a6b8ecd86cde69f2
Amount:4000
Expiration:123456789
Tags:[]
PictureUrl:https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
Created:2023-02-06 19:54:54.16799 +0000 +0000
Updated:2023-02-06 19:54:54.24204 +0000 +0000
}
Not yet available. Please contact us if you need this SDK.
{
"brcodes": [
{
"amount": 4000,
"created": "2023-02-06T21:49:19.660252+00:00",
"expiration": 123456789,
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"tags": [],
"updated": "2023-02-06T21:49:19.987058+00:00",
"uuid": "80b0688d05934971a6b8ecd86cde69f2"
}
],
"message": "Brcode(s) successfully created"
}
Tags help you organize and filter your QR Codes. Add any labels that make sense for your business — for example, an order ID or customer reference.
All tags are automatically converted to lowercase.
import starkbank
from datetime import datetime
brcodes = starkbank.dynamicbrcode.create([
starkbank.DynamicBrcode(
amount=4000,
tags=["order/123", "customer/456"]
)
])
for brcode in brcodes:
print(brcode)
const starkbank = require('starkbank');
(async() => {
let brcodes = await starkbank.dynamicBrcode.create([{
amount: 4000,
tags: ["order/123", "customer/456"]
}]);
for (let brcode of brcodes) {
console.log(brcode);
}
})();
use StarkBank\DynamicBrcode;
$brcodes = DynamicBrcode::create([
new DynamicBrcode([
"amount" => 4000,
"tags" => [
"order/123",
"customer/456"
]
])
]);
foreach ($brcodes as $brcode) {
print_r($brcode);
}
import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
List<DynamicBrcode> brcodes = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("amount", 4000);
data.put("tags", new String[]{"order/123", "customer/456"});
brcodes.add(new DynamicBrcode(data));
brcodes = DynamicBrcode.create(brcodes);
for (DynamicBrcode brcode : brcodes) {
System.out.println(brcode);
}
require('starkbank')
brcodes = StarkBank::DynamicBrcode.create(
[
StarkBank::DynamicBrcode.new(
amount: 4000,
tags: ["order/123", "customer/456"],
)
]
)
brcodes.each do |brcode|
puts brcode
end
brcode = StarkBank.DynamicBrcode.create!(
[
%StarkBank.DynamicBrcode{
amount: 4000,
tags: [
"order/123",
"customer/456"
]
}
]
) |> IO.inspect()
using System;
using System.Collections.Generic;
List<StarkBank.DynamicBrcode> brcodes = StarkBank.DynamicBrcode.Create(
new List<StarkBank.DynamicBrcode> {
new StarkBank.DynamicBrcode(
amount: 4000,
tags: new List { "order/123", "customer/456" },
)
}
);
foreach (StarkBank.DynamicBrcode brcode in brcodes)
{
Console.WriteLine(brcode);
}
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/dynamicbrcode"
"time"
)
func main() {
due := time.Now().Add(time.Hour * 24)
brcodes, err := dynamicbrcode.Create(
[]dynamicbrcode.DynamicBrcode{
{
Amount: 4000,
Tags: []string{"order/123", "customer/456"},
},
}, nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
for _, brcode := range brcodes {
fmt.Printf("%+v", brcode)
}
}
Not yet available. Please contact us if you need this SDK.
curl --location --request POST '{{baseUrl}}/v2/dynamic-brcode'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
--header 'Content-Type: application/json'
--data-raw '{
"brcodes": [
{
"amount": 4000,
"tags": [
"order%2F123",
"customer%2F456"
]
}
]
}'
DynamicBrcode(
amount=4000,
created=2023-02-06 21:15:00.118056,
expiration=1428 days, 21:33:09,
id=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/80b0688d05934971a6b8ecd86cde69f25204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***630461C9,
picture_url=https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
tags=["order/123", "customer/456"],
rules=[],
updated=2023-02-06 21:15:00.449696,
uuid=80b0688d05934971a6b8ecd86cde69f2
)
DynamicBrcode {
id: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47',
amount: 4000,
expiration: 123456789,
tags: [ "order/123", "customer/456" ],
uuid: '80b0688d05934971a6b8ecd86cde69f2',
pictureUrl: 'https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png',
updated: '2023-02-06T21:17:30.977004+00:00',
created: '2023-02-06T21:17:30.625913+00:00'
}
StarkBank\DynamicBrcode Object
(
[id] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47
[amount] => 4000
[expiration] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 0
[h] => 0
[i] => 0
[s] => 123456789
[f] => 0
[invert] => 0
[days] =>
[from_string] =>
)
[tags] => Array
(
[0] => order/123
[1] => customer/456
)
[uuid] => 80b0688d05934971a6b8ecd86cde69f2
[pictureUrl] => https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
[updated] => DateTime Object
(
[date] => 2023-02-06 21:23:50.776494
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-02-06 21:23:50.435531
[timezone_type] => 1
[timezone] => +00:00
)
)
DynamicBrcode({
"amount": 4000,
"expiration": 123456789,
"tags": ["order/123", "customer/456"],
"uuid": "80b0688d05934971a6b8ecd86cde69f2",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"updated": "2023-02-06T21:30:36.688229+00:00",
"created": "2023-02-06T21:30:36.372956+00:00",
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/8411cece3387471ea7f2636b618c37fb5204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304556B"
})
dynamicbrcode(
id: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9,
amount: 4000,
expiration: 123456789,
tags: ["order/123", "customer/456"],
uuid: 80b0688d05934971a6b8ecd86cde69f2,
picture_url: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
created: 2023-02-06T21:39:47+00:00,
updated: 2023-02-06T21:39:47+00:00
)
%StarkBank.DynamicBrcode{
id: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
uuid: "80b0688d05934971a6b8ecd86cde69f2",
amount: 4000,
expiration: 123456789,
tags: ["order/123", "customer/456"]
picture_url: "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
created: ~U[2023-02-06 18:36:18.116976Z],
updated: ~U[2023-02-06 18:36:18.116976Z]
}
DynamicBrcode(
ID: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Expiration: 123456789,
Tags: { "order/123", "customer/456" },
Amount: 4000,
Uuid: 80b0688d05934971a6b8ecd86cde69f2,
PictureUrl: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
Created: 06/02/2023 18:45:08,
Updated: 06/02/2023 18:45:08
)
{
Id:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Uuid:80b0688d05934971a6b8ecd86cde69f2
Amount:4000
Expiration:123456789
Tags:[order/123 customer/456]
PictureUrl:https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
Created:2023-02-06 19:54:54.16799 +0000 +0000
Updated:2023-02-06 19:54:54.24204 +0000 +0000
}
Not yet available. Please contact us if you need this SDK.
{
"brcodes": [
{
"amount": 4000,
"created": "2023-02-06T21:49:19.660252+00:00",
"expiration": 123456789,
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"tags": [
"order/123",
"customer/456"
],
"rules": [],
"updated": "2023-02-06T21:49:19.987058+00:00",
"uuid": "80b0688d05934971a6b8ecd86cde69f2"
}
],
"message": "Brcode(s) successfully created"
}
You can restrict who can pay a QR Code by passing rules. The allowedTaxIds rule limits payment to specific CPFs or CNPJs.
If anyone other than the allowed payers tries to scan and pay, the transaction will be rejected.
import starkbank
from datetime import datetime
brcodes = starkbank.dynamicbrcode.create([
starkbank.DynamicBrcode(
amount=4000,
rules=[
{
"key": "allowedTaxIds",
"value": [
"012.345.678-90",
"45.059.493/0001-73"
]
}
],
)
])
for brcode in brcodes:
print(brcode)
const starkbank = require('starkbank');
(async() => {
let brcodes = await starkbank.dynamicBrcode.create([{
amount: 4000,
rules: [
new starkbank.dynamicBrcode.Rule({
key: "allowedTaxIds",
value: ["012.345.678-90", "45.059.493/0001-73"]
})
]
}]);
for (let brcode of brcodes) {
console.log(brcode);
}
})();
use StarkBank\DynamicBrcode;
$brcodes = DynamicBrcode::create([
new DynamicBrcode([
"amount" => 4000,
"rules" => [
new DynamicBrcode\Rule([
"key" => "allowedTaxIds",
"value" => [
"012.345.678-90",
"45.059.493/0001-73"
]
])
],
])
]);
foreach ($brcodes as $brcode) {
print_r($brcode);
}
import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
List<DynamicBrcode.Rule> rule = new ArrayList<>();
rule.add(new DynamicBrcode.Rule(
"allowedTaxIds",
new String[]{
"012.345.678-90",
"45.059.493/0001-73"
}
));
List<DynamicBrcode> brcodes = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("amount", 4000);
data.put("rules", rule);
brcodes.add(new DynamicBrcode(data));
brcodes = DynamicBrcode.create(brcodes);
for (DynamicBrcode brcode : brcodes) {
System.out.println(brcode);
}
require('starkbank')
brcodes = StarkBank::DynamicBrcode.create(
[
StarkBank::DynamicBrcode.new(
amount: 4000,
rules: [
StarkBank::DynamicBrcode::Rule.new(
key: 'allowedTaxIds',
value: ['012.345.678-90', '45.059.493/0001-73']
)
]
)
]
)
brcodes.each do |brcode|
puts brcode
end
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/dynamicbrcode"
"time"
)
func main() {
due := time.Now().Add(time.Hour * 24)
rule := []rule.Rule{
{
Key: "allowedTaxIds",
Value: []string{"012.345.678-90", "45.059.493/0001-73"},
},
}
brcodes, err := dynamicbrcode.Create(
[]dynamicbrcode.DynamicBrcode{
{
Amount: 4000,
Rules: rule,
},
}, nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
for _, brcode := range brcodes {
fmt.Printf("%+v", brcode)
}
}
curl --location --request POST '{{baseUrl}}/v2/dynamic-brcode'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
--header 'Content-Type: application/json'
--data-raw '{
"brcodes": [
{
"amount": 4000,
"rules": [
{
"key": "allowedTaxIds",
"value": [
"012.345.678-90",
"45.059.493/0001-73"
]
}
]
}
]
}'
DynamicBrcode(
amount=4000,
created=2023-02-06 21:15:00.118056,
expiration=1428 days, 21:33:09,
id=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/80b0688d05934971a6b8ecd86cde69f25204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***630461C9,
picture_url=https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
tags=[],
rules=[
Rule(
key=allowedTaxIds,
value=[
'012.345.678-90',
'45.059.493/0001-73'
]
)
],
updated=2023-02-06 21:15:00.449696,
uuid=80b0688d05934971a6b8ecd86cde69f2
)
DynamicBrcode {
id: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47',
amount: 4000,
expiration: 123456789,
tags: [ ],
rules: [
{
key: 'allowedTaxIds',
value: [ '012.345.678-90', '45.059.493/0001-73' ]
}
],
uuid: '80b0688d05934971a6b8ecd86cde69f2',
pictureUrl: 'https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png',
updated: '2023-02-06T21:17:30.977004+00:00',
created: '2023-02-06T21:17:30.625913+00:00'
}
StarkBank\DynamicBrcode Object
(
[id] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47
[amount] => 4000
[expiration] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 0
[h] => 0
[i] => 0
[s] => 123456789
[f] => 0
[invert] => 0
[days] =>
[from_string] =>
)
[tags] => Array
(
)
[rules] => Array
(
[0] => Array
(
[key] => allowedTaxIds
[value] => Array
(
[0] => 012.345.678-90
[1] => 45.059.493/0001-73
)
)
)
[uuid] => 80b0688d05934971a6b8ecd86cde69f2
[pictureUrl] => https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
[updated] => DateTime Object
(
[date] => 2023-02-06 21:23:50.776494
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-02-06 21:23:50.435531
[timezone_type] => 1
[timezone] => +00:00
)
)
DynamicBrcode({
"amount": 4000,
"expiration": 123456789,
"tags": [],
"rules": [
{
key: "allowedTaxIds",
value: ["012.345.678-90", "45.059.493/0001-73"]
}
],
"uuid": "80b0688d05934971a6b8ecd86cde69f2",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"updated": "2023-02-06T21:30:36.688229+00:00",
"created": "2023-02-06T21:30:36.372956+00:00",
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/8411cece3387471ea7f2636b618c37fb5204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304556B"
})
dynamicbrcode(
id: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9,
amount: 4000,
expiration: 123456789,
tags: [],
rules: [
(
key: allowedTaxIds,
value: [012.345.678-90, 45.059.493/0001-73]
)
],
uuid: 80b0688d05934971a6b8ecd86cde69f2,
picture_url: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
created: 2023-02-06T21:39:47+00:00,
updated: 2023-02-06T21:39:47+00:00
)
{
Id:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Uuid:80b0688d05934971a6b8ecd86cde69f2
Amount:4000
Expiration:123456789
Tags:[]
Rule:[map[key:AllowedTaxIds value:[012.345.678-90 45.059.493/0001-73]]]
PictureUrl:https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
Created:2023-02-06 19:54:54.16799 +0000 +0000
Updated:2023-02-06 19:54:54.24204 +0000 +0000
}
{
"brcodes": [
{
"amount": 4000,
"created": "2023-02-06T21:49:19.660252+00:00",
"expiration": 123456789,
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"tags": [],
"rules": [
{
"key": "allowedTaxIds",
"value": [
"012.345.678-90",
"45.059.493/0001-73"
]
}
],
"updated": "2023-02-06T21:49:19.987058+00:00",
"uuid": "80b0688d05934971a6b8ecd86cde69f2"
}
],
"message": "Brcode(s) successfully created"
}
You can list all Dynamic BR Codes that match your filters. Use the after and before parameters to filter by creation date.
import starkbank
brcodes = starkbank.dynamicbrcode.query(
after="2023-02-01",
before="2023-02-28",
)
for brcode in brcodes:
print(brcode)
const starkbank = require('starkbank');
(async() => {
let brcodes = await starkbank.dynamicBrcode.query({
after: '2023-02-01',
before: '2023-02-28',
});
for await (let brcode of brcodes) {
console.log(brcode);
}
})();
use StarkBank\DynamicBrcode;
$brcodes = iterator_to_array(
DynamicBrcode::query([
"after" => "2023-02-01",
"before" => "2023-02-28",
])
);
foreach ($brcodes as $brcode) {
print_r($brcode);
}
import com.starkbank.*;
import com.starkbank.utils.Generator;
import java.util.HashMap;
HashMap<String, Object> params = new HashMap<>();
params.put("after", "2023-02-01");
params.put("before", "2023-02-28");
Generator<DynamicBrcode> brcodes = DynamicBrcode.query(params);
for (DynamicBrcode brcode : brcodes){
System.out.println(brcode);
}
require('starkbank')
brcodes = StarkBank::DynamicBrcode.query(
after: '2023-02-01',
before: '2023-02-28'
)
brcodes.each do |brcode|
puts brcode
end
brcodes = StarkBank.DynamicBrcode.query!(
after: "2023-02-01",
before: "2023-02-28"
) |> Enum.take(1) |> IO.inspect
IEnumerable<StarkBank.DynamicBrcode> brcodes = StarkBank.DynamicBrcode.Query(
after: new DateTime(2023, 2, 1),
before: new DateTime(2023, 2, 28)
);
foreach (StarkBank.DynamicBrcode brcode in brcodes)
{
Console.WriteLine(brcode);
}
package main
import (
"fmt"
"time"
"github.com/starkbank/sdk-go/starkbank/dynamicbrcode"
)
func main() {
var params = map[string]interface{}{}
params["after"] = time.Date(2023, 2, 1, 0, 0, 0, 0, time.UTC)
params["before"] = time.Date(2023, 2, 28, 0, 0, 0, 0, time.UTC)
brcodes, errorChannel := dynamicbrcode.Query(params, nil)
loop:
for {
select {
case err := <-errorChannel:
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
case brcode, ok := <-brcodes:
if !ok {
break loop
}
fmt.Printf("%+v", brcode)
}
}
}
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/dynamic-brcode?after=2023-02-01&before=2023-02-28'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
DynamicBrcode(
amount=4000,
created=2023-02-06 21:15:00.118056,
expiration=123456789,
id=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/80b0688d05934971a6b8ecd86cde69f25204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***630461C9,
picture_url=https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
tags=["order/123", "customer/456"],
updated=2023-02-06 21:15:00.449696,
uuid=80b0688d05934971a6b8ecd86cde69f2
)
DynamicBrcode {
id: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47',
amount: 4000,
expiration: 123456789,
tags: [ "order/123", "customer/456" ],
uuid: '80b0688d05934971a6b8ecd86cde69f2',
pictureUrl: 'https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png',
updated: '2023-02-06T21:17:30.977004+00:00',
created: '2023-02-06T21:17:30.625913+00:00'
}
StarkBank\DynamicBrcode Object
(
[id] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47
[amount] => 4000
[expiration] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 0
[h] => 0
[i] => 0
[s] => 123456789
[f] => 0
[invert] => 0
[days] =>
[from_string] =>
)
[tags] => Array
(
[0] => order/123
[1] => customer/456
)
[uuid] => 80b0688d05934971a6b8ecd86cde69f2
[pictureUrl] => https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
[updated] => DateTime Object
(
[date] => 2023-02-06 21:23:50.776494
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-02-06 21:23:50.435531
[timezone_type] => 1
[timezone] => +00:00
)
)
DynamicBrcode({
"amount": 4000,
"expiration": 123456789,
"tags": ["order/123", "customer/456"],
"uuid": "80b0688d05934971a6b8ecd86cde69f2",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"updated": "2023-02-06T21:30:36.688229+00:00",
"created": "2023-02-06T21:30:36.372956+00:00",
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/8411cece3387471ea7f2636b618c37fb5204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304556B"
})
dynamicbrcode(
id: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9,
amount: 4000,
expiration: 123456789,
tags: ["order/123", "customer/456"],
uuid: 80b0688d05934971a6b8ecd86cde69f2,
picture_url: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
created: 2023-02-06T21:39:47+00:00,
updated: 2023-02-06T21:39:47+00:00
)
%StarkBank.DynamicBrcode{
id: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
uuid: "80b0688d05934971a6b8ecd86cde69f2",
amount: 4000,
expiration: 123456789,
picture_url: "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
created: ~U[2023-02-06 18:36:18.116976Z]
updated: ~U[2023-02-06 18:36:18.116976Z]
}
DynamicBrcode(
ID: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Expiration: 123456789,
Tags: { "order/123", "customer/456" },
Amount: 4000,
Uuid: 80b0688d05934971a6b8ecd86cde69f2,
PictureUrl: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
Created: 06/02/2023 18:45:08,
Updated: 06/02/2023 18:45:08,
)
{
Id:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Uuid:80b0688d05934971a6b8ecd86cde69f2
Amount:4000
Expiration:123456789
Tags:[order/123 customer/456]
PictureUrl:https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
Created:2023-02-06 19:54:54.16799 +0000 +0000
Updated:2023-02-06 19:54:54.24204 +0000 +0000
}
Not yet available. Please contact us if you need this SDK.
{
"brcodes": [
{
"amount": 4000,
"created": "2023-02-06T21:49:19.660252+00:00",
"expiration": 123456789,
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"tags": [
"order/123",
"customer/456"
],
"updated": "2023-02-06T21:49:19.987058+00:00",
"uuid": "80b0688d05934971a6b8ecd86cde69f2"
}
],
"cursor": "CkwKFAoHY3JlYXRlZBIJCNyR8Ibwgf0CEjBqFGl-YXBpLW1zLWRlcG9zaXQtc2J4chgLEgtEZXBvc2l0UnVsZRiAgIDYr9DSCAwYACAB"
}
You can retrieve a Dynamic BR Code by its uuid to check its current amount, or any other attribute.
import starkbank
brcode = starkbank.dynamicbrcode.get("80b0688d05934971a6b8ecd86cde69f2")
print(brcode)
const starkbank = require('starkbank');
(async() => {
let brcode = await starkbank.dynamicBrcode.get('80b0688d05934971a6b8ecd86cde69f2');
console.log(brcode);
})();
use StarkBank\DynamicBrcode;
$brcode = DynamicBrcode::get("80b0688d05934971a6b8ecd86cde69f2");
print_r($brcode);
import com.starkbank.*;
DynamicBrcode brcode = DynamicBrcode.get("80b0688d05934971a6b8ecd86cde69f2");
System.out.println(brcode);
require('starkbank')
brcode = StarkBank::DynamicBrcode.get('80b0688d05934971a6b8ecd86cde69f2')
puts brcode
brcode = StarkBank.DynamicBrcode.get!("80b0688d05934971a6b8ecd86cde69f2")
|> IO.inspect
using System;
StarkBank.DynamicBrcode brcode = StarkBank.DynamicBrcode.Get("80b0688d05934971a6b8ecd86cde69f2");
Console.WriteLine(brcode);
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/brcode"
)
func main() {
brcode, err := brcode.Get("80b0688d05934971a6b8ecd86cde69f2", nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
fmt.Printf("%+v", brcode)
}
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
DynamicBrcode(
amount=4000,
created=2023-02-06 21:15:00.118056,
expiration=1428 days, 21:33:09,
id=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/80b0688d05934971a6b8ecd86cde69f25204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***630461C9,
picture_url=https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
tags=["order/123", "customer/456"],
updated=2023-02-06 21:15:00.449696,
uuid=80b0688d05934971a6b8ecd86cde69f2
)
DynamicBrcode {
id: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47',
amount: 4000,
expiration: 123456789,
tags: [ "order/123", "customer/456" ],
uuid: '80b0688d05934971a6b8ecd86cde69f2',
pictureUrl: 'https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png',
updated: '2023-02-06T21:17:30.977004+00:00',
created: '2023-02-06T21:17:30.625913+00:00'
}
StarkBank\DynamicBrcode Object
(
[id] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47
[amount] => 4000
[expiration] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 0
[h] => 0
[i] => 0
[s] => 123456789
[f] => 0
[invert] => 0
[days] =>
[from_string] =>
)
[tags] => Array
(
[0] => order/123
[1] => customer/456
)
[uuid] => 80b0688d05934971a6b8ecd86cde69f2
[pictureUrl] => https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
[updated] => DateTime Object
(
[date] => 2023-02-06 21:23:50.776494
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-02-06 21:23:50.435531
[timezone_type] => 1
[timezone] => +00:00
)
)
DynamicBrcode({
"amount": 4000,
"expiration": 123456789,
"tags": ["order/123", "customer/456"],
"uuid": "80b0688d05934971a6b8ecd86cde69f2",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"updated": "2023-02-06T21:30:36.688229+00:00",
"created": "2023-02-06T21:30:36.372956+00:00",
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/8411cece3387471ea7f2636b618c37fb5204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304556B"
})
dynamicbrcode(
id: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9,
amount: 4000,
expiration: 123456789,
tags: ["order/123", "customer/456"],
uuid: 80b0688d05934971a6b8ecd86cde69f2,
picture_url: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
created: 2023-02-06T21:39:47+00:00,
updated: 2023-02-06T21:39:47+00:00
)
%StarkBank.DynamicBrcode{
id: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
uuid: "80b0688d05934971a6b8ecd86cde69f2",
amount: 4000,
expiration: 123456789,
picture_url: "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
created: ~U[2023-02-06 18:36:18.116976Z]
updated: ~U[2023-02-06 18:36:18.116976Z]
}
DynamicBrcode(
ID: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Expiration: 123456789,
Tags: { "order/123", "customer/456" },
Amount: 4000,
Uuid: 80b0688d05934971a6b8ecd86cde69f2,
PictureUrl: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png,
Created: 06/02/2023 18:45:08,
Updated: 06/02/2023 18:45:08,
)
{
Id:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9
Uuid:80b0688d05934971a6b8ecd86cde69f2
Amount:4000
Expiration:123456789
Tags:[order/123 customer/456]
PictureUrl:https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png
Created:2023-02-06 19:54:54.16799 +0000 +0000
Updated:2023-02-06 19:54:54.24204 +0000 +0000
}
Not yet available. Please contact us if you need this SDK.
{
"brcode": {
"amount": 4000,
"created": "2023-02-06T21:49:19.660252+00:00",
"expiration": 123456789,
"id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9",
"pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png",
"tags": [
"order/123",
"customer/456"
],
"updated": "2023-02-06T21:49:19.987058+00:00",
"uuid": "80b0688d05934971a6b8ecd86cde69f2"
}
}
A Deposit is automatically created when someone pays your Dynamic BR Code. It represents the Pix payment received in your Stark Bank account.
Each Deposit created from a QR Code payment will have a tag in the format "dynamic-brcode/{uuid}", where {uuid} is the UUID of the Dynamic BR Code that was paid. Use this tag to match deposits to the original QR Codes.
Each deposit has a status that can change over time according to its life cycle:
| Status | Description |
|---|---|
| Created | You received a deposit in your account. |
| Voided | You fully returned the deposit. |
Every time either you or Stark Bank makes a change to a Deposit, we create a Log. Logs are pretty useful for understanding the life cycle of each Deposit and the changes that happened to it. Here you can see the flow of possible logs:
A Deposit can be either partially or fully reversed back to its payer. Multiple reversals can be made for the same deposit and each time, the following flow of logs will occur:
| Log type | Status | Description |
|---|---|---|
| Created | Created | The Deposit was successfully received in your Stark Bank account. |
| Credited | Created | The Deposit payment was credited to your account. |
| Voided | Voided | The Deposit was fully returned. |
| Reversing | Created | A reversal for the Deposit is being processed. |
| Sending | Created | The reversal is being sent to the banking network. |
| Sent | Created | The reversal was sent to the banking network. |
| Failed | Created | The reversal failed. |
| Reversed | Created | The Deposit was partially or fully reversed to the payer. |
| Refunded | Created | The reversal was refunded back to you after failing. |
id
Unique id for the deposit.
amount
Deposit amount in cents.
name
Payer full name.
taxId
Payer CPF or CNPJ.
bankCode
Payer bank code or ISPB.
branchCode
Payer bank branch.
accountNumber
Payer bank account number.
accountType
Payer bank account type.
type
Type of the deposit.
fee
Fee charged in cents.
tags
Tags associated with the deposit. QR Code payments include a tag like "dynamic-brcode/{uuid}".
transactionIds
Ledger transaction IDs linked to the deposit.
status
Current deposit status. Options: "created", "void".
created
Creation datetime. Example: "2020-04-23T23:00:00.000000+00:00".
updated
Last update datetime. Example: "2020-04-23T23:00:00.000000+00:00".
You can list and filter deposits to find payments received from your QR Codes.
Use the tags parameter to filter deposits by a specific Dynamic BR Code UUID — for example, filtering by "dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2" will return only the deposit created when that QR Code was paid.
import starkbank
deposits = starkbank.deposit.query(
after="2020-11-01",
before="2020-11-30"
)
for deposit in deposits:
print(deposit)
const starkbank = require('starkbank');
(async() => {
let deposits = await starkbank.deposit.query({
after: '2020-11-01',
before: '2020-11-30'
});
for await (let deposit of deposits) {
console.log(deposit);
}
})();
use StarkBank\Deposit;
$deposits = iterator_to_array(
Deposit::query([
"after" => "2020-11-01T18:00:00.000000+00:00",
"before" => "2020-11-30T18:00:00.000000+00:00"
])
);
foreach ($deposits as $deposit) {
print_r($deposit);
}
import com.starkbank.*;
import com.starkbank.utils.Generator;
import java.util.HashMap;
HashMap<String, Object> params = new HashMap<>();
params.put("after", "2020-11-01");
params.put("before", "2020-11-30");
Generator<Deposit> deposits = Deposit.query(params);
for (Deposit deposit : deposits){
System.out.println(deposit);
}
require('starkbank')
require('date')
deposits = StarkBank::Deposit.query(
after: '2020-11-01',
before: '2020-11-30'
)
deposits.each do |deposit|
puts deposit
end
deposits = StarkBank.Deposit.query!(
after: "2020-11-01",
before: "2020-11-30"
)
for deposit <- deposits do
deposit |> IO.inspect
end
using System;
using System.Collections.Generic;
IEnumerable<StarkBank.Deposit> deposits = StarkBank.Deposit.Query(
after: new DateTime(2020, 11, 1),
before: new DateTime(2020, 11, 30)
);
foreach (StarkBank.Deposit deposit in deposits)
{
Console.WriteLine(deposit);
}
package main
import (
"fmt"
"time"
"github.com/starkbank/sdk-go/starkbank/deposit"
)
func main() {
var params = map[string]interface{}{}
params["after"] = time.Date(2020, 11, 1, 0, 0, 0, 0, time.UTC)
params["before"] = time.Date(2020, 11, 30, 0, 0, 0, 0, time.UTC)
deposits, errorChannel := deposit.Query(params, nil)
loop:
for {
select {
case err := <-errorChannel:
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
case deposit, ok := <-deposits:
if !ok {
break loop
}
fmt.Printf("%+v", deposit)
}
}
}
(def deposits (starkbank.deposit/query {
:after "2020-11-01"
:before "2020-11-30"
}))
(doseq [deposit deposits]
(println deposit))
curl --location --request GET '{{baseUrl}}/v2/deposit?after=2020-11-01&before=2020-11-30'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
Deposit(
account_number=1010101010101010,
account_type= "payment",
amount=4000,
bank_code=20018183,
branch_code=0001,
created=2023-02-06 22:14:58.555321,
fee=0,
id=4638572095847362,
name=Jon Snow,
status=created,
tags=['dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2'],
tax_id=012.345.678-90,
transaction_ids=['6532871094857362'],
type=pix,
updated=2023-02-06 22:14:58.555321
)
Deposit {
id: '4638572095847362',
name: 'Jon Snow',
taxId: '012.345.678-90',
bankCode: '20018183',
branchCode: '0001',
accountNumber: '1010101010101010',
accountType: 'payment',
amount: 4000,
type: 'pix',
status: 'created',
tags: [ 'dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2' ],
fee: 0,
transactionIds: [ '6532871094857362' ],
created: '2023-02-06T22:14:58.555321+00:00',
updated: '2023-02-06T22:14:58.555321+00:00'
}
StarkBank\Deposit Object
(
[id] => 4638572095847362
[name] => Jon Snow
[taxId] => 012.345.678-90
[bankCode] => 20018183
[branchCode] => 0001
[accountNumber] => 1010101010101010
[accountType] => payment
[amount] => 4000
[type] => pix
[status] => created
[tags] => Array
(
[0] => dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2
)
[fee] => 0
[transactionIds] => Array
(
[0] => 6532871094857362
)
[created] => DateTime Object
(
[date] => 2023-02-06 22:14:58.555321
[timezone_type] => 1
[timezone] => +00:00
)
[updated] => DateTime Object
(
[date] => 2023-02-06 22:14:58.555321
[timezone_type] => 1
[timezone] => +00:00
)
)
Deposit({
"name": "Jon Snow",
"taxId": "012.345.678-90",
"bankCode": "20018183",
"branchCode": "0001",
"accountNumber": "1010101010101010",
"accountType": "payment",
"amount": 4000,
"type": "pix",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2"
],
"fee": 0,
"transactionIds": [
"6532871094857362"
],
"created": "2023-02-06T22:14:58.555321+00:00",
"updated": "2023-02-06T22:14:58.555321+00:00",
"id": "4638572095847362"
})
deposit(
id: 4638572095847362,
name: Jon Snow,
tax_id: 012.345.678-90,
bank_code: 20018183,
branch_code: 0001,
account_number: 1010101010101010,
account_type: payment,
amount: 4000,
type: pix,
status: created,
tags: ["dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2"],
fee: 0,
transaction_ids: ["6532871094857362"],
created: 2023-02-06T22:14:58+00:00,
updated: 2023-02-06T22:14:58+00:00
)
%StarkBank.Deposit{
account_number: "1010101010101010",
account_type: "payment",
amount: 4000,
bank_code: "20018183",
branch_code: "0001",
created: ~U[2023-02-06 22:14:58.555321Z]
fee: 0,
id: "4638572095847362",
name: "Jon Snow",
status: "created",
tags: ["dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2"],
tax_id: "012.345.678-90",
transaction_ids: ["6532871094857362"],
type: "pix",
updated: ~U[2023-02-06 22:14:58.555321Z]
}
Deposit(
Amount: 4000,
Name: Jon Snow,
TaxID: 012.345.678-90,
BankCode: 20018183,
BranchCode: 0001,
AccountNumber: 1010101010101010,
AccountType: payment,
Type: pix,
Fee: 0,
TransactionIds: { 6532871094857362 },
Status: created,
Tags: { dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2 },
Created: 06/02/2023 22:14:58,
Updated: 06/02/2023 22:14:58,
ID: 4638572095847362
)
{
Id:4638572095847362
Name:Jon Snow
TaxId:012.345.678-90
BankCode:20018183
BranchCode:0001
AccountNumber:1010101010101010
AccountType:payment
Amount:4000
Type:pix
Status:created
Tags:[dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2]
Fee:0
TransactionIds:[6532871094857362]
Created:2023-02-06 22:14:58.555321 +0000 +0000
Updated:2023-02-06 22:14:58.555321 +0000 +0000
}
{
:amount 4000,
:fee 0,
:tags [dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2],
:branch-code 0001,
:updated 2023-02-06T22:14:58.555321+00:00,
:name Jon Snow,
:tax-id 012.345.678-90,
:type pix,
:created 2023-02-06T22:14:58.555321+00:00,
:status created,
:id 4638572095847362,
:transaction-ids [6532871094857362],
:account-number 1010101010101010,
:account-type payment,
:bank-code 20018183
}
{
"cursor": null,
"deposits": [
{
"status": "created",
"updated": "2023-02-06T22:14:58.555321+00:00",
"accountNumber": "1010101010101010",
"accountType": "payment",
"taxId": "012.345.678-90",
"transactionIds": [
"6532871094857362"
],
"bankCode": "20018183",
"id": "4638572095847362",
"fee": 0,
"name": "Jon Snow",
"created": "2023-02-06T22:14:58.555321+00:00",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2"
],
"branchCode": "0001",
"amount": 4000,
"type": "pix"
}
]
}
You can retrieve a single Deposit by its ID to check its amount, status, payer information, and tags.
import starkbank
deposit = starkbank.deposit.get("5155165527080960")
print(deposit)
const starkbank = require('starkbank');
(async() => {
let deposit = await starkbank.deposit.get('5155165527080960')
console.log(deposit);
})();
use StarkBank\Deposit;
$deposit = Deposit::get('5155165527080960');
print_r($deposit);
import com.starkbank.*;
Deposit deposit = Deposit.get("5155165527080960");
System.out.println(deposit);
require('starkbank')
deposit = StarkBank::Deposit.get('5155165527080960')
puts deposit
deposit = StarkBank.Deposit.get!("5155165527080960")
|> IO.inspect
using System;
StarkBank.Deposit deposit = StarkBank.Deposit.Get("5155165527080960");
Console.WriteLine(deposit);
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/deposit"
)
func main() {
deposit, err := deposit.Get("5155165527080960", nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
fmt.Printf("%+v", deposit)
}
(def deposit (starkbank.deposit/get "5155165527080960")) (println deposit)
curl --location --request GET '{{baseUrl}}/v2/deposit/5155165527080960'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
Deposit(
account_number=1010101010101010,
account_type= "payment",
amount=100000,
bank_code=20018183,
branch_code=0001,
created=2020-11-11 14:42:45.824846,
fee=50,
id=5155165527080960,
name=Iron Bank S.A,
status=created,
tags=['deposit'],
tax_id=10.203.000/0001-80,
transaction_ids=['6663513506316288'],
type=pix,
updated=2020-11-11 14:42:47.333539
)
Deposit {
id: '5155165527080960',
name: 'Iron Bank S.A',
taxId: '10.203.000/0001-80',
bankCode: '20018183',
branchCode: '0001',
accountNumber: '1010101010101010',
accountType: 'payment',
amount: 100000,
type: 'pix',
status: 'created',
tags: [ 'deposit' ],
fee: 50,
transactionIds: [ '6663513506316288' ],
created: '2020-11-11T14:42:43.144663+00:00',
updated: '2020-11-11T14:42:53.282375+00:00'
}
StarkBank\Deposit Object
(
[id] => 5155165527080960
[name] => Iron Bank S.A
[taxId] => 10.203.000/0001-80
[bankCode] => 20018183
[branchCode] => 0001
[accountNumber] => 1010101010101010
[accountType] => payment
[amount] => 100000
[type] => pix
[status] => created
[tags] => Array
(
[0] => deposit
)
[fee] => 50
[transactionIds] => Array
(
[0] => 6663513506316288
)
[created] => DateTime Object
(
[date] => 2020-11-11 14:42:43.144663
[timezone_type] => 1
[timezone] => +00:00
)
[updated] => DateTime Object
(
[date] => 2020-11-11 14:42:53.282375
[timezone_type] => 1
[timezone] => +00:00
)
)
Deposit({
"name": "Iron Bank S.A",
"taxId": "10.203.000/0001-80",
"bankCode": "20018183",
"branchCode": "0001",
"accountNumber": "1010101010101010",
"accountType": "payment",
"amount": 100000,
"type": "pix",
"status": "created",
"tags": [
"deposit"
],
"fee": 50,
"transactionIds": [
"6663513506316288"
],
"created": "2020-11-11T14:42:43.144663+00:00",
"updated": "2020-11-11T14:42:53.282375+00:00",
"id": "5155165527080960"
})
deposit(
id: 5155165527080960,
name: Iron Bank S.A,
tax_id: 10.203.000/0001-80,
bank_code: 20018183,
branch_code: 0001,
account_number: 1010101010101010,
account_type: payment,
amount: 100000,
type: pix,
status: created,
tags: ["deposit"],
fee: 50,
transaction_ids: ["5862355036536832"],
created: 2020-11-11T14:42:43+00:00,
updated: 2020-11-11T14:42:53+00:00
)
%StarkBank.Deposit{
account_number: "5078376503050240",
account_type: "payment",
amount: 100000,
bank_code: "20018183",
branch_code: "0001",
created: ~U[2020-11-11 14:42:53.282375Z]
fee: 50,
id: "5155165527080960",
name: "Stark Bank S.A.",
status: "created",
tags: ["deposit"],
tax_id: "10.203.000/0001-80",
transaction_ids: ["6663513506316288"],
type: "pix",
updated: ~U[2020-11-11 14:42:53.282375Z]
}
Deposit(
Amount: 100000,
Name: Iron Bank S.A,
TaxID: 10.203.000/0001-80,
BankCode: 20018183,
BranchCode: 0001,
AccountNumber: 1010101010101010,
AccountType: payment,
Type: pix,
Fee: 50,
TransactionIds: { 6663513506316288 },
Status: created,
Tags: { deposit },
Created: 11/11/2020 11:42:43,
Updated: 11/11/2020 11:42:53,
ID: 5155165527080960
)
{
Id:5155165527080960
Name:Iron Bank S.A
TaxId:10.203.000/0001-80
BankCode:20018183
BranchCode:0001
AccountNumber:1010101010101010
AccountType:payment
Amount:100000
Type:pix
Status:created
Tags:[deposit]
Fee:50
TransactionIds:[6663513506316288]
Created:2020-11-11 14:42:18.281081 +0000 +0000
Updated:2020-11-11 14:42:20.060486 +0000 +0000
}
{
:amount 100000,
:fee 50,
:tags [deposit],
:branch-code 0001,
:updated 2020-11-11T11:42:58.939596+00:00,
:name Stark Bank S.A.,
:tax-id 10.203.000/0001-80,
:type pix,
:created 2020-11-11T11:42:57.490286+00:00,
:status created,
:id 5155165527080960,
:transaction-ids [6663513506316288],
:account-number 1010101010101010,
:account-type payment,
:bank-code 20018183
}
{
"deposits":
{
"status": "created",
"updated": "2020-11-11T14:42:53.282375+00:00",
"accountNumber": "1010101010101010",
"accountType": "payment",
"taxId": "10.203.000/0001-80",
"transactionIds": [
"6663513506316288"
],
"bankCode": "20018183",
"id": "5155165527080960",
"fee": 50,
"name": "Iron Bank S.A",
"created": "2020-11-11T14:42:43.144663+00:00",
"tags": [
"deposit"
],
"branchCode": "0001",
"amount": 100000,
"type": "pix"
}
}
To partially reverse a Deposit, you need to PATCH the deposit amount to a lower value. The difference between the original amount and the new amount will be reversed to the payer.
For example, if a Deposit was credited with an amount of 10000 (R$ 100.00) and you patch the amount to 3000 (R$ 30.00), it means you reversed 7000 (R$ 70.00) back to the payer.
While the reversal is being processed, the deposit status remains created.
import starkbank
deposit = starkbank.deposit.update(
"5155165527080960",
amount=3000,
)
print(deposit)
const starkbank = require('starkbank');
(async() => {
let deposit = await starkbank.deposit.update(
'5155165527080960',
{
amount: 3000
}
);
console.log(deposit);
})();
Not yet available. Please contact us if you need this SDK.
import com.starkbank.*; import java.util.HashMap; HashMappatchData = new HashMap<>(); patchData.put("amount", 3000); Deposit deposit = Deposit.update("5155165527080960", patchData); System.out.println(deposit);
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request PATCH '{{baseUrl}}/v2/deposit/5155165527080960'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
--header 'Content-Type: application/json'
--data-raw '{
"amount": 3000,
}'
Deposit (
id="6165578200907776",
name="Brice Ltda.",
tax_id="72.831.025/0001-48",
bank_code="07252614",
branch_code="2645",
account_number="4729524077596703",
account_type="savings",
amount=3000,
type="pix",
status="created",
tags=[
"e07252614202310251510pkudndwgiev",
"72055490-9aa6-4df9-ab5c-2009a9621f33",
"ditto"
],
fee=0,
transaction_ids=[ "72909267320047755761378230622962" ],
created="2023-10-25T15:10:51.111167+00:00",
updated="2024-01-10T14:08:24.577238+00:00"
)
Deposit {
id: '6165578200907776',
name: 'Brice Ltda.',
taxId: '72.831.025/0001-48',
bankCode: '07252614',
branchCode: '2645',
accountNumber: '4729524077596703',
accountType: 'savings',
amount: 3000,
type: 'pix',
status: 'created',
tags: [
'e07252614202310251510pkudndwgiev',
'72055490-9aa6-4df9-ab5c-2009a9621f33',
'ditto'
],
fee: 0,
transactionIds: [ '72909267320047755761378230622962' ],
created: '2023-10-25T15:10:51.111167+00:00',
updated: '2024-01-10T14:08:24.577238+00:00'
}
Not yet available. Please contact us if you need this SDK.
Deposit({
"id": "6676193709391872",
"name": "Stark Bank S.A. - Instituicao de Pagamento",
"taxId": "20.018.183/0001-80",
"bankCode": "20018183",
"branchCode": "0001",
"accountNumber": "6285683442319360",
"accountType": "payment",
"amount": "3000",
"type": "pix",
"status": "created",
"tags": [ "e20018183202401091210feho2snf786" ],
"fee": "0",
"transactionIds": [ "14776349998573571486997563581928" ],
"created": "2024-01-09T12:10:26.394336+00:00",
"updated": "2024-01-09T17:37:28.082085+00:00"
})
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{
Deposit {
"id": "6165578200907776",
"name": "Brice Ltda.",
"taxId": "72.831.025/0001-48",
"bankCode": "07252614",
"branchCode": "2645",
"accountNumber": "4729524077596703",
"accountType": "savings",
"amount": 3000,
"type": "pix",
"status": "created",
"tags": [
"e07252614202310251510pkudndwgiev",
"72055490-9aa6-4df9-ab5c-2009a9621f33",
"ditto"
],
"fee": 0,
"transactionIds": [ "72909267320047755761378230622962" ],
"created": "2023-10-25T15:10:51.111167+00:00",
"updated": "2024-01-10T14:08:24.577238+00:00"
}
}
To fully reverse a Deposit, you need to PATCH the deposit amount to 0. This will reverse the entire amount back to the payer.
For example, if a Deposit was credited with an amount of 10000 (R$ 100.00) and you patch the amount to 0, the full 10000 (R$ 100.00) will be reversed to the payer.
After the full reversal is completed, the deposit status changes to voided.
import starkbank
deposit = starkbank.deposit.update(
"5155165527080960",
amount=0,
)
print(deposit)
const starkbank = require('starkbank');
(async() => {
let deposit = await starkbank.deposit.update(
'5155165527080960',
{
amount: 0
}
);
console.log(deposit);
})();
Not yet available. Please contact us if you need this SDK.
import com.starkbank.*; import java.util.HashMap; HashMappatchData = new HashMap<>(); patchData.put("amount", 0); Deposit deposit = Deposit.update("5155165527080960", patchData); System.out.println(deposit);
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request PATCH '{{baseUrl}}/v2/deposit/5155165527080960'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
--header 'Content-Type: application/json'
--data-raw '{
"amount": 0,
}'
Deposit (
id="6165578200907776",
name="Brice Ltda.",
tax_id="72.831.025/0001-48",
bank_code="07252614",
branch_code="2645",
account_number="4729524077596703",
account_type="savings",
amount=0,
type="pix",
status="created",
tags=[
"e07252614202310251510pkudndwgiev",
"72055490-9aa6-4df9-ab5c-2009a9621f33",
"ditto"
],
fee=0,
transaction_ids=[ "72909267320047755761378230622962" ],
created="2023-10-25T15:10:51.111167+00:00",
updated="2024-01-10T14:08:24.577238+00:00"
)
Deposit {
id: '6165578200907776',
name: 'Brice Ltda.',
taxId: '72.831.025/0001-48',
bankCode: '07252614',
branchCode: '2645',
accountNumber: '4729524077596703',
accountType: 'savings',
amount: 0,
type: 'pix',
status: 'created',
tags: [
'e07252614202310251510pkudndwgiev',
'72055490-9aa6-4df9-ab5c-2009a9621f33',
'ditto'
],
fee: 0,
transactionIds: [ '72909267320047755761378230622962' ],
created: '2023-10-25T15:10:51.111167+00:00',
updated: '2024-01-10T14:08:24.577238+00:00'
}
Not yet available. Please contact us if you need this SDK.
Deposit({
"id": "6676193709391872",
"name": "Stark Bank S.A. - Instituicao de Pagamento",
"taxId": "20.018.183/0001-80",
"bankCode": "20018183",
"branchCode": "0001",
"accountNumber": "6285683442319360",
"accountType": "payment",
"amount": "0",
"type": "pix",
"status": "created",
"tags": [ "e20018183202401091210feho2snf786" ],
"fee": "0",
"transactionIds": [ "14776349998573571486997563581928" ],
"created": "2024-01-09T12:10:26.394336+00:00",
"updated": "2024-01-09T17:37:28.082085+00:00"
})
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{
Deposit {
"id": "6165578200907776",
"name": "Brice Ltda.",
"taxId": "72.831.025/0001-48",
"bankCode": "07252614",
"branchCode": "2645",
"accountNumber": "4729524077596703",
"accountType": "savings",
"amount": 0,
"type": "pix",
"status": "created",
"tags": [
"e07252614202310251510pkudndwgiev",
"72055490-9aa6-4df9-ab5c-2009a9621f33",
"ditto"
],
"fee": 0,
"transactionIds": [ "72909267320047755761378230622962" ],
"created": "2023-10-25T15:10:51.111167+00:00",
"updated": "2024-01-10T14:08:24.577238+00:00"
}
}
After setting up a webhook subscription for deposit, Stark Bank will send a POST request to your registered URL every time a Deposit is created or updated.
Use the tags field in the webhook payload to match the deposit to the original Dynamic BR Code. The tag below links the deposit back to the QR Code that generated it.
"dynamic-brcode/{uuid}"
{
"event": {
"created": "2023-02-06T22:15:00.118056+00:00",
"id": "5765432109876543",
"log": {
"deposit": {
"accountNumber": "76543-8",
"accountType": "checking",
"amount": 4000,
"bankCode": "20018183",
"branchCode": "0001",
"created": "2023-02-06T22:14:58.555321+00:00",
"fee": 0,
"id": "4638572095847362",
"name": "Jon Snow",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2",
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["6532871094857362"],
"type": "pix",
"updated": "2023-02-06T22:14:58.555321+00:00"
},
"created": "2023-02-06T22:14:58.555335+00:00",
"errors": [],
"id": "5432198765432198",
"type": "created"
},
"subscription": "deposit",
"workspaceId": "6314371953197056"
}
}{
"event": {
"created": "2023-02-06T22:15:00.118056+00:00",
"id": "5765432109876543",
"log": {
"deposit": {
"accountNumber": "76543-8",
"accountType": "checking",
"amount": 4000,
"bankCode": "20018183",
"branchCode": "0001",
"created": "2023-02-06T22:14:58.555321+00:00",
"fee": 0,
"id": "4638572095847362",
"name": "Jon Snow",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2",
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["6532871094857362"],
"type": "pix",
"updated": "2023-02-06T22:14:58.555321+00:00"
},
"created": "2023-02-06T22:14:58.555335+00:00",
"errors": [],
"id": "5432198765432198",
"type": "created"
},
"subscription": "deposit",
"workspaceId": "6314371953197056"
}
}{
"event": {
"created": "2023-02-06T22:15:00.118056+00:00",
"id": "5765432109876543",
"log": {
"deposit": {
"accountNumber": "76543-8",
"accountType": "checking",
"amount": 4000,
"bankCode": "20018183",
"branchCode": "0001",
"created": "2023-02-06T22:14:58.555321+00:00",
"fee": 0,
"id": "4638572095847362",
"name": "Jon Snow",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2",
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["6532871094857362"],
"type": "pix",
"updated": "2023-02-06T22:14:58.555321+00:00"
},
"created": "2023-02-06T22:14:58.555335+00:00",
"errors": [],
"id": "5432198765432198",
"type": "created"
},
"subscription": "deposit",
"workspaceId": "6314371953197056"
}
}{
"event": {
"created": "2023-02-06T22:15:00.118056+00:00",
"id": "5765432109876543",
"log": {
"deposit": {
"accountNumber": "76543-8",
"accountType": "checking",
"amount": 4000,
"bankCode": "20018183",
"branchCode": "0001",
"created": "2023-02-06T22:14:58.555321+00:00",
"fee": 0,
"id": "4638572095847362",
"name": "Jon Snow",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2",
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["6532871094857362"],
"type": "pix",
"updated": "2023-02-06T22:14:58.555321+00:00"
},
"created": "2023-02-06T22:14:58.555335+00:00",
"errors": [],
"id": "5432198765432198",
"type": "created"
},
"subscription": "deposit",
"workspaceId": "6314371953197056"
}
}{
"event": {
"created": "2023-02-06T22:15:00.118056+00:00",
"id": "5765432109876543",
"log": {
"deposit": {
"accountNumber": "76543-8",
"accountType": "checking",
"amount": 4000,
"bankCode": "20018183",
"branchCode": "0001",
"created": "2023-02-06T22:14:58.555321+00:00",
"fee": 0,
"id": "4638572095847362",
"name": "Jon Snow",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2",
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["6532871094857362"],
"type": "pix",
"updated": "2023-02-06T22:14:58.555321+00:00"
},
"created": "2023-02-06T22:14:58.555335+00:00",
"errors": [],
"id": "5432198765432198",
"type": "created"
},
"subscription": "deposit",
"workspaceId": "6314371953197056"
}
}{
"event": {
"created": "2023-02-06T22:15:00.118056+00:00",
"id": "5765432109876543",
"log": {
"deposit": {
"accountNumber": "76543-8",
"accountType": "checking",
"amount": 4000,
"bankCode": "20018183",
"branchCode": "0001",
"created": "2023-02-06T22:14:58.555321+00:00",
"fee": 0,
"id": "4638572095847362",
"name": "Jon Snow",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2",
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["6532871094857362"],
"type": "pix",
"updated": "2023-02-06T22:14:58.555321+00:00"
},
"created": "2023-02-06T22:14:58.555335+00:00",
"errors": [],
"id": "5432198765432198",
"type": "created"
},
"subscription": "deposit",
"workspaceId": "6314371953197056"
}
}{
"event": {
"created": "2023-02-06T22:15:00.118056+00:00",
"id": "5765432109876543",
"log": {
"deposit": {
"accountNumber": "76543-8",
"accountType": "checking",
"amount": 4000,
"bankCode": "20018183",
"branchCode": "0001",
"created": "2023-02-06T22:14:58.555321+00:00",
"fee": 0,
"id": "4638572095847362",
"name": "Jon Snow",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2",
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["6532871094857362"],
"type": "pix",
"updated": "2023-02-06T22:14:58.555321+00:00"
},
"created": "2023-02-06T22:14:58.555335+00:00",
"errors": [],
"id": "5432198765432198",
"type": "created"
},
"subscription": "deposit",
"workspaceId": "6314371953197056"
}
}{
"event": {
"created": "2023-02-06T22:15:00.118056+00:00",
"id": "5765432109876543",
"log": {
"deposit": {
"accountNumber": "76543-8",
"accountType": "checking",
"amount": 4000,
"bankCode": "20018183",
"branchCode": "0001",
"created": "2023-02-06T22:14:58.555321+00:00",
"fee": 0,
"id": "4638572095847362",
"name": "Jon Snow",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2",
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["6532871094857362"],
"type": "pix",
"updated": "2023-02-06T22:14:58.555321+00:00"
},
"created": "2023-02-06T22:14:58.555335+00:00",
"errors": [],
"id": "5432198765432198",
"type": "created"
},
"subscription": "deposit",
"workspaceId": "6314371953197056"
}
}{
"event": {
"created": "2023-02-06T22:15:00.118056+00:00",
"id": "5765432109876543",
"log": {
"deposit": {
"accountNumber": "76543-8",
"accountType": "checking",
"amount": 4000,
"bankCode": "20018183",
"branchCode": "0001",
"created": "2023-02-06T22:14:58.555321+00:00",
"fee": 0,
"id": "4638572095847362",
"name": "Jon Snow",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2",
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["6532871094857362"],
"type": "pix",
"updated": "2023-02-06T22:14:58.555321+00:00"
},
"created": "2023-02-06T22:14:58.555335+00:00",
"errors": [],
"id": "5432198765432198",
"type": "created"
},
"subscription": "deposit",
"workspaceId": "6314371953197056"
}
}{
"event": {
"created": "2023-02-06T22:15:00.118056+00:00",
"id": "5765432109876543",
"log": {
"deposit": {
"accountNumber": "76543-8",
"accountType": "checking",
"amount": 4000,
"bankCode": "20018183",
"branchCode": "0001",
"created": "2023-02-06T22:14:58.555321+00:00",
"fee": 0,
"id": "4638572095847362",
"name": "Jon Snow",
"status": "created",
"tags": [
"dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2",
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["6532871094857362"],
"type": "pix",
"updated": "2023-02-06T22:14:58.555321+00:00"
},
"created": "2023-02-06T22:14:58.555335+00:00",
"errors": [],
"id": "5432198765432198",
"type": "created"
},
"subscription": "deposit",
"workspaceId": "6314371953197056"
}
}