Tax Payments allow you to pay taxes such as ISS, DAS, and other tax-related boletos using your Stark Bank balance. For federal taxes without bar codes (DARFs), use the Darf Payment resource.
In the document below, we will detail the processes related to creating and managing Tax Payments and Darf Payments, providing a clear and comprehensive understanding of the operation and how to manage the lifecycle of these resources.
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 subscriptions to receive events in your desired URL:
tax-payment
darf-payment
2.1. Via Internet Banking:
Integrations > Webhook > New Webhook
2.2. Via API:
Use the POST /webhook route to create the webhook
Tax Payment is a resource that can be used to pay taxes such as ISS, DAS, and other tax-related boletos using your Stark Bank balance.
To create a Tax Payment, you need to provide the mandatory parameters: barCode (or line) and description.
Optional parameters include scheduled and tags.
Each Tax Payment has a status that can change over time according to its life cycle:
| Status | Description |
|---|---|
| Created | The Tax Payment was successfully created in Stark Bank. |
| Processing | The Tax Payment is being processed by Stark Bank. |
| Success | The Tax Payment was successfully completed. |
| Failed | The Tax Payment was unsuccessful. |
| Canceled | The Tax Payment was canceled before processing. |
Every time either you or Stark Bank makes a change to a Tax Payment, we create a Log. Logs are pretty useful for understanding the life cycle of each Tax Payment and the changes that happened to it. Here you can see the flow of possible logs:
| Log type | Status | Description |
|---|---|---|
| Created | Created | The Tax Payment was successfully created in Stark Bank. |
| Processing | Processing | The Tax Payment is being processed. |
| Success | Success | The Tax Payment was successfully completed. |
| Failed | Failed | The Tax Payment was unsuccessful. |
| Canceling | Processing | The Tax Payment cancellation is being processed. |
| Canceled | Canceled | The Tax Payment was canceled before processing. |
id
Unique id for the tax payment.
amount
Amount automatically calculated from the barCode. Example: 500365 (R$5,003.65).
barCode
Tax barCode. Example: "81660000005003657010074119002551100010601813".
created
Creation datetime. Example: "2020-04-18T16:22:24.664148+00:00".
description
Text to be displayed in your statement. Example: "fix the road".
fee
Fee charged in cents.
line
Tax payment line (digits only). Example: "81660000005 0036570100 74119002551 10001060181".
scheduled
Scheduled date or datetime for the payment. Example: "2020-04-20" or "2020-04-20T15:23:26+00:00".
status
Current payment status. Options: "created", "processing", "success", "failed", "canceled".
tags
Tags associated with the tax payment.
transactionIds
Ledger transaction IDs linked to the tax payment.
type
Tax type. Example: "iss", "das".
updated
Last update datetime. Example: "2020-04-18T16:22:24.664148+00:00".
To create a Tax Payment, fill in the mandatory parameters: barCode (or line) and description.
The amount is automatically calculated from the barCode.
import starkbank
payments = starkbank.taxpayment.create([
starkbank.TaxPayment(
bar_code="81660000005003657010074119002551100010601813",
description="fix the road"
)
])
for payment in payments:
print(payment)
const starkbank = require('starkbank');
(async() => {
let payments = await starkbank.taxPayment.create([
{
barCode: '81660000005003657010074119002551100010601813',
description: 'fix the road'
}
])
for (let payment of payments) {
console.log(payment);
}
})();
$payments = StarkBank\TaxPayment::create([
new StarkBank\TaxPayment([
"barCode" => "81660000005003657010074119002551100010601813",
"description" => "fix the road"
])
]);
foreach($payments as $payment){
print_r($payment);
}
import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
List<TaxPayment> payments = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("barCode", "81660000005003657010074119002551100010601813");
data.put("description", "fix the road");
payments.add(new TaxPayment(data));
payments = TaxPayment.create(payments);
for (TaxPayment payment : payments){
System.out.println(payment);
}
require('starkbank')
payments = StarkBank::TaxPayment.create(
[
StarkBank::TaxPayment.new(
bar_code: '81660000005003657010074119002551100010601813',
description: 'fix the road'
)
]
)
payments.each do |payment|
puts payment
end
payments = StarkBank.TaxPayment.create!([
%StarkBank.TaxPayment{
bar_code: "81660000005003657010074119002551100010601813",
description: "fix the road"
}
])
for payment <- payments do
payment |> IO.inspect
end
using System;
using System.Collections.Generic;
List<StarkBank.TaxPayment> payments = StarkBank.TaxPayment.Create(
new List<StarkBank.TaxPayment> {
new StarkBank.TaxPayment(
barCode: "81660000005003657010074119002551100010601813",
description: "fix the road"
)
}
);
foreach(StarkBank.TaxPayment payment in payments)
{
Console.WriteLine(payment);
}
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/taxpayment"
)
func main() {
payments, err := taxpayment.Create(
[]taxpayment.TaxPayment{
{
BarCode: "81660000005003657010074119002551100010601813",
Description: "fix the road",
},
}, nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
for _, payment := range payments {
fmt.Printf("%+v", payment)
}
}
(def payments
(starkbank.tax-payment/create
[
{
:bar-code "81660000005003657010074119002551100010601813"
:description "fix the road"
}
]))
(dorun (map println payments))
curl --location --request POST '{{baseUrl}}/v2/tax-payment'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
--header 'Content-Type: application/json'
--data-raw '{
"payments": [
{
"barCode": "81660000005003657010074119002551100010601813",
"description": "fix the road"
}
]
}'
TaxPayment(
amount=500365,
bar_code=81660000005003657010074119002551100010601813,
created=2020-04-18 16:22:24.664148,
description=fix the road,
fee=0,
id=5412038532661248,
line=81660000005 0036570100 74119002551 10001060181,
scheduled=2020-04-18 16:22:24.664148,
status=created,
tags=[],
transaction_ids=[],
type=iss,
updated=2020-04-18 16:22:24.664148
)
TaxPayment {
id: '5412038532661248',
amount: 500365,
barCode: '81660000005003657010074119002551100010601813',
created: '2020-04-18T16:22:24.664148+00:00',
description: 'fix the road',
fee: 0,
line: '81660000005 0036570100 74119002551 10001060181',
scheduled: '2020-04-18T16:22:24.664148+00:00',
status: 'created',
tags: [ ],
transactionIds: [],
type: 'iss',
updated: '2020-04-18T16:22:24.664148+00:00'
}
StarkBank\TaxPayment Object
(
[id] => 5412038532661248
[amount] => 500365
[barCode] => 81660000005003657010074119002551100010601813
[created] => DateTime Object
(
[date] => 2020-04-18 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[description] => fix the road
[fee] => 0
[line] => 81660000005 0036570100 74119002551 10001060181
[scheduled] => DateTime Object
(
[date] => 2020-04-18 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[status] => created
[tags] => Array
(
)
[transactionIds] => Array
(
)
[type] => iss
[updated] => DateTime Object
(
[date] => 2020-04-18 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
)
TaxPayment({
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2020-04-18T16:22:24.664148+00:00",
"description": "fix the road",
"fee": 0,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2020-04-18T16:22:24.664148+00:00",
"status": "created",
"tags": [],
"transactionIds": [],
"type": "iss",
"updated": "2020-04-18T16:22:24.664148+00:00",
"id": "5412038532661248"
})
taxpayment(
id: 5412038532661248,
amount: 500365,
bar_code: 81660000005003657010074119002551100010601813,
created: 2020-04-18T16:22:24+00:00,
description: fix the road,
fee: 0,
line: 81660000005 0036570100 74119002551 10001060181,
scheduled: 2020-04-18T16:22:24+00:00,
status: created,
tags: [],
transaction_ids: [],
type: iss,
updated: 2020-04-18T16:22:24+00:00
)
%StarkBank.TaxPayment{
amount: 500365,
bar_code: "81660000005003657010074119002551100010601813",
created: ~U[2020-04-18 16:22:24.664148Z],
description: "fix the road",
fee: 0,
id: "5412038532661248",
line: "81660000005 0036570100 74119002551 10001060181",
scheduled: ~U[2020-04-18 16:22:24.664148Z],
status: "created",
tags: [],
transaction_ids: [],
type: "iss",
updated: ~U[2020-04-18 16:22:24.664148Z]
}
TaxPayment(
Amount: 500365,
BarCode: 81660000005003657010074119002551100010601813,
Created: 18/04/2020 16:22:24,
Description: fix the road,
Fee: 0,
Line: 81660000005 0036570100 74119002551 10001060181,
Scheduled: 18/04/2020 16:22:24,
Status: created,
Tags: {},
TransactionIds: { },
Type: iss,
Updated: 18/04/2020 16:22:24,
ID: 5412038532661248
)
{
Id:5412038532661248
Amount:500365
BarCode:81660000005003657010074119002551100010601813
Created:2020-04-18 16:22:24.664148 +0000 +0000
Description:fix the road
Fee:0
Line:81660000005 0036570100 74119002551 10001060181
Scheduled:2020-04-18 16:22:24.664148 +0000 +0000
Status:created
Tags:[]
TransactionIds:[]
Type:iss
Updated:2020-04-18 16:22:24.664148 +0000 +0000
}
{:amount 500365,
:bar-code "81660000005003657010074119002551100010601813",
:created "2020-04-18T16:22:24.664148+00:00",
:description "fix the road",
:fee 0,
:id "5412038532661248",
:line "81660000005 0036570100 74119002551 10001060181",
:scheduled "2020-04-18T16:22:24.664148+00:00",
:status "created",
:tags [],
:transaction-ids [],
:type "iss",
:updated "2020-04-18T16:22:24.664148+00:00"}
{
"message": "Tax Payment(s) successfully created",
"payments": [
{
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2020-04-18T16:22:24.664148+00:00",
"description": "fix the road",
"fee": 0,
"id": "5412038532661248",
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2020-04-18T16:22:24.664148+00:00",
"status": "created",
"tags": [],
"transactionIds": [],
"type": "iss",
"updated": "2020-04-18T16:22:24.664148+00:00"
}
]
}
Scheduled: Schedule the tax payment for a specific date.
Today is the default.
Example: "2020-04-20T15:23:26+00:00" or "2020-04-20"
Tags: Array of strings to tag the entity for future queries. All tags will be converted to lowercase. Example: ["taxes", "iss"]
import starkbank
payments = starkbank.taxpayment.create([
starkbank.TaxPayment(
bar_code="81660000005003657010074119002551100010601813",
description="fix the road",
scheduled="2020-04-20",
tags=["taxes", "iss"]
)
])
for payment in payments:
print(payment)
const starkbank = require('starkbank');
(async() => {
let payments = await starkbank.taxPayment.create([
{
barCode: '81660000005003657010074119002551100010601813',
description: 'fix the road',
scheduled: '2020-04-20',
tags: ['taxes', 'iss']
}
])
for (let payment of payments) {
console.log(payment);
}
})();
$payments = StarkBank\TaxPayment::create([
new StarkBank\TaxPayment([
"barCode" => "81660000005003657010074119002551100010601813",
"description" => "fix the road",
"scheduled" => "2020-04-20",
"tags" => ["taxes", "iss"]
])
]);
foreach($payments as $payment){
print_r($payment);
}
import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
List<TaxPayment> payments = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("barCode", "81660000005003657010074119002551100010601813");
data.put("description", "fix the road");
data.put("scheduled", "2020-04-20");
data.put("tags", new String[]{"taxes", "iss"});
payments.add(new TaxPayment(data));
payments = TaxPayment.create(payments);
for (TaxPayment payment : payments){
System.out.println(payment);
}
require('starkbank')
payments = StarkBank::TaxPayment.create(
[
StarkBank::TaxPayment.new(
bar_code: '81660000005003657010074119002551100010601813',
description: 'fix the road',
scheduled: '2020-04-20',
tags: ['taxes', 'iss']
)
]
)
payments.each do |payment|
puts payment
end
payments = StarkBank.TaxPayment.create!([
%StarkBank.TaxPayment{
bar_code: "81660000005003657010074119002551100010601813",
description: "fix the road",
scheduled: "2020-04-20",
tags: ["taxes", "iss"]
}
])
for payment <- payments do
payment |> IO.inspect
end
using System;
using System.Collections.Generic;
List<StarkBank.TaxPayment> payments = StarkBank.TaxPayment.Create(
new List<StarkBank.TaxPayment> {
new StarkBank.TaxPayment(
barCode: "81660000005003657010074119002551100010601813",
description: "fix the road",
scheduled: new DateTime(2020, 4, 20),
tags: new List<string> { "taxes", "iss" }
)
}
);
foreach(StarkBank.TaxPayment payment in payments)
{
Console.WriteLine(payment);
}
package main
import (
"fmt"
"time"
"github.com/starkbank/sdk-go/starkbank/taxpayment"
)
func main() {
scheduled := time.Date(2020, 04, 20, 0, 0, 0, 0, time.UTC)
payments, err := taxpayment.Create(
[]taxpayment.TaxPayment{
{
BarCode: "81660000005003657010074119002551100010601813",
Description: "fix the road",
Scheduled: &scheduled,
Tags: []string{"taxes", "iss"},
},
}, nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
for _, payment := range payments {
fmt.Printf("%+v", payment)
}
}
(def payments
(starkbank.tax-payment/create
[
{
:bar-code "81660000005003657010074119002551100010601813"
:description "fix the road"
:scheduled "2020-04-20"
:tags ["taxes" "iss"]
}
]))
(dorun (map println payments))
curl --location --request POST '{{baseUrl}}/v2/tax-payment'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
--header 'Content-Type: application/json'
--data-raw '{
"payments": [
{
"barCode": "81660000005003657010074119002551100010601813",
"description": "fix the road",
"scheduled": "2020-04-20",
"tags": ["taxes", "iss"]
}
]
}'
TaxPayment(
amount=500365,
bar_code=81660000005003657010074119002551100010601813,
created=2020-04-18 16:22:24.664148,
description=fix the road,
fee=0,
id=5738709764800512,
line=81660000005 0036570100 74119002551 10001060181,
scheduled=2020-04-20 00:00:00,
status=created,
tags=['taxes', 'iss'],
transaction_ids=[],
type=iss,
updated=2020-04-18 16:22:24.664148
)
TaxPayment {
id: '5738709764800512',
amount: 500365,
barCode: '81660000005003657010074119002551100010601813',
created: '2020-04-18T16:22:24.664148+00:00',
description: 'fix the road',
fee: 0,
line: '81660000005 0036570100 74119002551 10001060181',
scheduled: '2020-04-20T00:00:00+00:00',
status: 'created',
tags: [ 'taxes', 'iss' ],
transactionIds: [],
type: 'iss',
updated: '2020-04-18T16:22:24.664148+00:00'
}
StarkBank\TaxPayment Object
(
[id] => 5738709764800512
[amount] => 500365
[barCode] => 81660000005003657010074119002551100010601813
[created] => DateTime Object
(
[date] => 2020-04-18 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[description] => fix the road
[fee] => 0
[line] => 81660000005 0036570100 74119002551 10001060181
[scheduled] => DateTime Object
(
[date] => 2020-04-20 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[status] => created
[tags] => Array
(
[0] => taxes
[1] => iss
)
[transactionIds] => Array
(
)
[type] => iss
[updated] => DateTime Object
(
[date] => 2020-04-18 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
)
TaxPayment({
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2020-04-18T16:22:24.664148+00:00",
"description": "fix the road",
"fee": 0,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2020-04-20T00:00:00+00:00",
"status": "created",
"tags": ["taxes", "iss"],
"transactionIds": [],
"type": "iss",
"updated": "2020-04-18T16:22:24.664148+00:00",
"id": "5738709764800512"
})
taxpayment(
id: 5738709764800512,
amount: 500365,
bar_code: 81660000005003657010074119002551100010601813,
created: 2020-04-18T16:22:24+00:00,
description: fix the road,
fee: 0,
line: 81660000005 0036570100 74119002551 10001060181,
scheduled: 2020-04-20T00:00:00+00:00,
status: created,
tags: ['taxes', 'iss'],
transaction_ids: [],
type: iss,
updated: 2020-04-18T16:22:24+00:00
)
%StarkBank.TaxPayment{
amount: 500365,
bar_code: "81660000005003657010074119002551100010601813",
created: ~U[2020-04-18 16:22:24.664148Z],
description: "fix the road",
fee: 0,
id: "5738709764800512",
line: "81660000005 0036570100 74119002551 10001060181",
scheduled: ~U[2020-04-20 00:00:00Z],
status: "created",
tags: ["taxes", "iss"],
transaction_ids: [],
type: "iss",
updated: ~U[2020-04-18 16:22:24.664148Z]
}
TaxPayment(
Amount: 500365,
BarCode: 81660000005003657010074119002551100010601813,
Created: 18/04/2020 16:22:24,
Description: fix the road,
Fee: 0,
Line: 81660000005 0036570100 74119002551 10001060181,
Scheduled: 20/04/2020 00:00:00,
Status: created,
Tags: { taxes, iss },
TransactionIds: { },
Type: iss,
Updated: 18/04/2020 16:22:24,
ID: 5738709764800512
)
{
Id:5738709764800512
Amount:500365
BarCode:81660000005003657010074119002551100010601813
Created:2020-04-18 16:22:24.664148 +0000 +0000
Description:fix the road
Fee:0
Line:81660000005 0036570100 74119002551 10001060181
Scheduled:2020-04-20 00:00:00 +0000 +0000
Status:created
Tags:[taxes iss]
TransactionIds:[]
Type:iss
Updated:2020-04-18 16:22:24.664148 +0000 +0000
}
{:amount 500365,
:bar-code "81660000005003657010074119002551100010601813",
:created "2020-04-18T16:22:24.664148+00:00",
:description "fix the road",
:fee 0,
:id "5738709764800512",
:line "81660000005 0036570100 74119002551 10001060181",
:scheduled "2020-04-20T00:00:00+00:00",
:status "created",
:tags ["taxes" "iss"],
:transaction-ids [],
:type "iss",
:updated "2020-04-18T16:22:24.664148+00:00"}
{
"message": "Tax Payment(s) successfully created",
"payments": [
{
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2020-04-18T16:22:24.664148+00:00",
"description": "fix the road",
"fee": 0,
"id": "5738709764800512",
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2020-04-20T00:00:00+00:00",
"status": "created",
"tags": ["taxes", "iss"],
"transactionIds": [],
"type": "iss",
"updated": "2020-04-18T16:22:24.664148+00:00"
}
]
}
Get a list of Tax Payments using filters such as after, before, status and tags to narrow the results.
import starkbank
payments = starkbank.taxpayment.query(
after="2020-04-01",
before="2020-04-30",
)
for payment in payments:
print(payment)
const starkbank = require('starkbank');
(async() => {
let payments = await starkbank.taxPayment.query({
after: '2020-04-01',
before: '2020-04-30',
});
for await (let payment of payments) {
console.log(payment);
}
})();
$payments = StarkBank\TaxPayment::query([
"after" => "2020-04-01",
"before" => "2020-04-30"
]);
foreach($payments as $payment){
print_r($payment);
}
import com.starkbank.*;
import com.starkbank.utils.Generator;
import java.util.HashMap;
HashMap<String, Object> params = new HashMap<>();
params.put("after", "2020-04-01");
params.put("before", "2020-04-30");
Generator<TaxPayment> payments = TaxPayment.query(params);
for (TaxPayment payment : payments){
System.out.println(payment);
}
require('starkbank')
payments = StarkBank::TaxPayment.query(
after: '2020-04-01',
before: '2020-04-30'
)
payments.each do |payment|
puts payment
end
payments = StarkBank.TaxPayment.query!(
after: "2020-04-01",
before: "2020-04-30"
)
for payment <- payments do
payment |> IO.inspect
end
using System;
using System.Collections.Generic;
IEnumerable<StarkBank.TaxPayment> payments = StarkBank.TaxPayment.Query(
after: new DateTime(2020, 4, 1),
before: new DateTime(2020, 4, 30)
);
foreach(StarkBank.TaxPayment payment in payments)
{
Console.WriteLine(payment);
}
package main
import (
"fmt"
"time"
"github.com/starkbank/sdk-go/starkbank/taxpayment"
)
func main() {
var params = map[string]interface{}{}
params["after"] = time.Date(2020, 4, 1, 0, 0, 0, 0, time.UTC)
params["before"] = time.Date(2020, 4, 30, 0, 0, 0, 0, time.UTC)
payments, errorChannel := taxpayment.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 payment, ok := <-payments:
if !ok {
break loop
}
fmt.Printf("%+v", payment)
}
}
}
(def payments
(starkbank.tax-payment/query
{
:after "2020-04-01"
:before "2020-04-30"
}))
(dorun (map println payments))
curl --location --request GET '{{baseUrl}}/v2/tax-payment?after=2020-04-01&before=2020-04-30'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
TaxPayment(
amount=500365,
bar_code=81660000005003657010074119002551100010601813,
created=2020-04-18 16:22:24.664148,
description=fix the road,
fee=200,
id=5950134772826112,
line=81660000005 0036570100 74119002551 10001060181,
scheduled=2020-04-20 00:00:00,
status=processing,
tags=['taxes', 'iss'],
transaction_ids=['5991715760504832'],
type=iss,
updated=2020-04-20 10:22:24.664148
)
TaxPayment {
id: '5950134772826112',
amount: 500365,
barCode: '81660000005003657010074119002551100010601813',
created: '2020-04-18T16:22:24.664148+00:00',
description: 'fix the road',
fee: 200,
line: '81660000005 0036570100 74119002551 10001060181',
scheduled: '2020-04-20T00:00:00+00:00',
status: 'processing',
tags: [ 'taxes', 'iss' ],
transactionIds: [ '5991715760504832' ],
type: 'iss',
updated: '2020-04-20T10:22:24.664148+00:00'
}
StarkBank\TaxPayment Object
(
[id] => 5950134772826112
[amount] => 500365
[barCode] => 81660000005003657010074119002551100010601813
[created] => DateTime Object
(
[date] => 2020-04-18 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[description] => fix the road
[fee] => 200
[line] => 81660000005 0036570100 74119002551 10001060181
[scheduled] => DateTime Object
(
[date] => 2020-04-20 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[status] => processing
[tags] => Array
(
[0] => taxes
[1] => iss
)
[transactionIds] => Array
(
[0] => 5991715760504832
)
[type] => iss
[updated] => DateTime Object
(
[date] => 2020-04-20 10:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
)
TaxPayment({
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2020-04-18T16:22:24.664148+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2020-04-20T00:00:00+00:00",
"status": "processing",
"tags": ["taxes", "iss"],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2020-04-20T10:22:24.664148+00:00",
"id": "5950134772826112"
})
taxpayment(
id: 5950134772826112,
amount: 500365,
bar_code: 81660000005003657010074119002551100010601813,
created: 2020-04-18T16:22:24+00:00,
description: fix the road,
fee: 200,
line: 81660000005 0036570100 74119002551 10001060181,
scheduled: 2020-04-20T00:00:00+00:00,
status: processing,
tags: ['taxes', 'iss'],
transaction_ids: ['5991715760504832'],
type: iss,
updated: 2020-04-20T10:22:24+00:00
)
%StarkBank.TaxPayment{
amount: 500365,
bar_code: "81660000005003657010074119002551100010601813",
created: ~U[2020-04-18 16:22:24.664148Z],
description: "fix the road",
fee: 200,
id: "5950134772826112",
line: "81660000005 0036570100 74119002551 10001060181",
scheduled: ~U[2020-04-20 00:00:00Z],
status: "processing",
tags: ["taxes", "iss"],
transaction_ids: ["5991715760504832"],
type: "iss",
updated: ~U[2020-04-20 10:22:24.664148Z]
}
TaxPayment(
Amount: 500365,
BarCode: 81660000005003657010074119002551100010601813,
Created: 18/04/2020 16:22:24,
Description: fix the road,
Fee: 200,
Line: 81660000005 0036570100 74119002551 10001060181,
Scheduled: 20/04/2020 00:00:00,
Status: processing,
Tags: { taxes, iss },
TransactionIds: { 5991715760504832 },
Type: iss,
Updated: 20/04/2020 10:22:24,
ID: 5950134772826112
)
{
Id:5950134772826112
Amount:500365
BarCode:81660000005003657010074119002551100010601813
Created:2020-04-18 16:22:24.664148 +0000 +0000
Description:fix the road
Fee:200
Line:81660000005 0036570100 74119002551 10001060181
Scheduled:2020-04-20 00:00:00 +0000 +0000
Status:processing
Tags:[taxes iss]
TransactionIds:[5991715760504832]
Type:iss
Updated:2020-04-20 10:22:24.664148 +0000 +0000
}
{:amount 500365,
:bar-code "81660000005003657010074119002551100010601813",
:created "2020-04-18T16:22:24.664148+00:00",
:description "fix the road",
:fee 200,
:id "5950134772826112",
:line "81660000005 0036570100 74119002551 10001060181",
:scheduled "2020-04-20T00:00:00+00:00",
:status "processing",
:tags ["taxes" "iss"],
:transaction-ids ["5991715760504832"],
:type "iss",
:updated "2020-04-20T10:22:24.664148+00:00"}
{
"cursor": null,
"payments": [
{
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2020-04-18T16:22:24.664148+00:00",
"description": "fix the road",
"fee": 200,
"id": "5950134772826112",
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2020-04-20T00:00:00+00:00",
"status": "processing",
"tags": ["taxes", "iss"],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2020-04-20T10:22:24.664148+00:00"
}
]
}
Get a single Tax Payment by its id.
You can use it to check the current status of a Tax Payment.
import starkbank
payment = starkbank.taxpayment.get("5950134772826112")
print(payment)
const starkbank = require('starkbank');
(async() => {
let payment = await starkbank.taxPayment.get('5950134772826112');
console.log(payment);
})();
$payment = StarkBank\TaxPayment::get("5950134772826112");
print_r($payment);
import com.starkbank.*;
TaxPayment payment = TaxPayment.get("5950134772826112");
System.out.println(payment);
require('starkbank')
payment = StarkBank::TaxPayment.get('5950134772826112')
puts payment
payment = StarkBank.TaxPayment.get!("5950134772826112")
payment |> IO.inspect
using System;
StarkBank.TaxPayment payment = StarkBank.TaxPayment.Get("5950134772826112");
Console.WriteLine(payment);
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/taxpayment"
)
func main() {
payment, err := taxpayment.Get("5950134772826112", nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
fmt.Println(payment)
}
(def payment (starkbank.tax-payment/get "5950134772826112"))
(println payment)
curl --location --request GET '{{baseUrl}}/v2/tax-payment/5950134772826112'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
TaxPayment(
amount=500365,
bar_code=81660000005003657010074119002551100010601813,
created=2020-04-18 16:22:24.664148,
description=fix the road,
fee=200,
id=5950134772826112,
line=81660000005 0036570100 74119002551 10001060181,
scheduled=2020-04-20 00:00:00,
status=processing,
tags=['taxes', 'iss'],
transaction_ids=['5991715760504832'],
type=iss,
updated=2020-04-20 10:22:24.664148
)
TaxPayment {
id: '5950134772826112',
amount: 500365,
barCode: '81660000005003657010074119002551100010601813',
created: '2020-04-18T16:22:24.664148+00:00',
description: 'fix the road',
fee: 200,
line: '81660000005 0036570100 74119002551 10001060181',
scheduled: '2020-04-20T00:00:00+00:00',
status: 'processing',
tags: [ 'taxes', 'iss' ],
transactionIds: [ '5991715760504832' ],
type: 'iss',
updated: '2020-04-20T10:22:24.664148+00:00'
}
StarkBank\TaxPayment Object
(
[id] => 5950134772826112
[amount] => 500365
[barCode] => 81660000005003657010074119002551100010601813
[created] => DateTime Object
(
[date] => 2020-04-18 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[description] => fix the road
[fee] => 200
[line] => 81660000005 0036570100 74119002551 10001060181
[scheduled] => DateTime Object
(
[date] => 2020-04-20 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[status] => processing
[tags] => Array
(
[0] => taxes
[1] => iss
)
[transactionIds] => Array
(
[0] => 5991715760504832
)
[type] => iss
[updated] => DateTime Object
(
[date] => 2020-04-20 10:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
)
TaxPayment({
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2020-04-18T16:22:24.664148+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2020-04-20T00:00:00+00:00",
"status": "processing",
"tags": ["taxes", "iss"],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2020-04-20T10:22:24.664148+00:00",
"id": "5950134772826112"
})
taxpayment(
id: 5950134772826112,
amount: 500365,
bar_code: 81660000005003657010074119002551100010601813,
created: 2020-04-18T16:22:24+00:00,
description: fix the road,
fee: 200,
line: 81660000005 0036570100 74119002551 10001060181,
scheduled: 2020-04-20T00:00:00+00:00,
status: processing,
tags: ['taxes', 'iss'],
transaction_ids: ['5991715760504832'],
type: iss,
updated: 2020-04-20T10:22:24+00:00
)
%StarkBank.TaxPayment{
amount: 500365,
bar_code: "81660000005003657010074119002551100010601813",
created: ~U[2020-04-18 16:22:24.664148Z],
description: "fix the road",
fee: 200,
id: "5950134772826112",
line: "81660000005 0036570100 74119002551 10001060181",
scheduled: ~U[2020-04-20 00:00:00Z],
status: "processing",
tags: ["taxes", "iss"],
transaction_ids: ["5991715760504832"],
type: "iss",
updated: ~U[2020-04-20 10:22:24.664148Z]
}
TaxPayment(
Amount: 500365,
BarCode: 81660000005003657010074119002551100010601813,
Created: 18/04/2020 16:22:24,
Description: fix the road,
Fee: 200,
Line: 81660000005 0036570100 74119002551 10001060181,
Scheduled: 20/04/2020 00:00:00,
Status: processing,
Tags: { taxes, iss },
TransactionIds: { 5991715760504832 },
Type: iss,
Updated: 20/04/2020 10:22:24,
ID: 5950134772826112
)
{
Id:5950134772826112
Amount:500365
BarCode:81660000005003657010074119002551100010601813
Created:2020-04-18 16:22:24.664148 +0000 +0000
Description:fix the road
Fee:200
Line:81660000005 0036570100 74119002551 10001060181
Scheduled:2020-04-20 00:00:00 +0000 +0000
Status:processing
Tags:[taxes iss]
TransactionIds:[5991715760504832]
Type:iss
Updated:2020-04-20 10:22:24.664148 +0000 +0000
}
{:amount 500365,
:bar-code "81660000005003657010074119002551100010601813",
:created "2020-04-18T16:22:24.664148+00:00",
:description "fix the road",
:fee 200,
:id "5950134772826112",
:line "81660000005 0036570100 74119002551 10001060181",
:scheduled "2020-04-20T00:00:00+00:00",
:status "processing",
:tags ["taxes" "iss"],
:transaction-ids ["5991715760504832"],
:type "iss",
:updated "2020-04-20T10:22:24.664148+00:00"}
{
"payment": {
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2020-04-18T16:22:24.664148+00:00",
"description": "fix the road",
"fee": 200,
"id": "5950134772826112",
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2020-04-20T00:00:00+00:00",
"status": "processing",
"tags": ["taxes", "iss"],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2020-04-20T10:22:24.664148+00:00"
}
}
This method will allow the cancellation of a Tax Payment.
It's important to note that it's only possible to cancel Tax Payments before the start of processing.
import starkbank
payment = starkbank.taxpayment.delete("6693962735681536")
print(payment)
const starkbank = require('starkbank');
(async() => {
let payment = await starkbank.taxPayment.delete('6693962735681536');
console.log(payment);
})();
$payment = StarkBank\TaxPayment::delete("6693962735681536");
print_r($payment);
import com.starkbank.*;
TaxPayment payment = TaxPayment.delete("6693962735681536");
System.out.println(payment);
require('starkbank')
payment = StarkBank::TaxPayment.delete('6693962735681536')
puts payment
payment = StarkBank.TaxPayment.delete!("6693962735681536")
payment |> IO.inspect
using System;
StarkBank.TaxPayment payment = StarkBank.TaxPayment.Delete("6693962735681536");
Console.WriteLine(payment);
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/taxpayment"
)
func main() {
payment, err := taxpayment.Delete("6693962735681536", nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
fmt.Println(payment)
}
(def payment (starkbank.tax-payment/delete "6693962735681536"))
(println payment)
curl --location --request DELETE '{{baseUrl}}/v2/tax-payment/6693962735681536'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
TaxPayment(
amount=500365,
bar_code=81660000005003657010074119002551100010601813,
created=2020-04-18 16:22:24.664148,
description=fix the road,
fee=0,
id=6693962735681536,
line=81660000005 0036570100 74119002551 10001060181,
scheduled=2020-04-20 00:00:00,
status=canceled,
tags=['taxes', 'iss'],
transaction_ids=[],
type=iss,
updated=2020-04-18 18:12:10.225810
)
TaxPayment {
id: '6693962735681536',
amount: 500365,
barCode: '81660000005003657010074119002551100010601813',
created: '2020-04-18T16:22:24.664148+00:00',
description: 'fix the road',
fee: 0,
line: '81660000005 0036570100 74119002551 10001060181',
scheduled: '2020-04-20T00:00:00+00:00',
status: 'canceled',
tags: [ 'taxes', 'iss' ],
transactionIds: [],
type: 'iss',
updated: '2020-04-18T18:12:10.225810+00:00'
}
StarkBank\TaxPayment Object
(
[id] => 6693962735681536
[amount] => 500365
[barCode] => 81660000005003657010074119002551100010601813
[created] => DateTime Object
(
[date] => 2020-04-18 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[description] => fix the road
[fee] => 0
[line] => 81660000005 0036570100 74119002551 10001060181
[scheduled] => DateTime Object
(
[date] => 2020-04-20 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[status] => canceled
[tags] => Array
(
[0] => taxes
[1] => iss
)
[transactionIds] => Array
(
)
[type] => iss
[updated] => DateTime Object
(
[date] => 2020-04-18 18:12:10.225810
[timezone_type] => 1
[timezone] => +00:00
)
)
TaxPayment({
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2020-04-18T16:22:24.664148+00:00",
"description": "fix the road",
"fee": 0,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2020-04-20T00:00:00+00:00",
"status": "canceled",
"tags": ["taxes", "iss"],
"transactionIds": [],
"type": "iss",
"updated": "2020-04-18T18:12:10.225810+00:00",
"id": "6693962735681536"
})
taxpayment(
id: 6693962735681536,
amount: 500365,
bar_code: 81660000005003657010074119002551100010601813,
created: 2020-04-18T16:22:24+00:00,
description: fix the road,
fee: 0,
line: 81660000005 0036570100 74119002551 10001060181,
scheduled: 2020-04-20T00:00:00+00:00,
status: canceled,
tags: ['taxes', 'iss'],
transaction_ids: [],
type: iss,
updated: 2020-04-18T18:12:10+00:00
)
%StarkBank.TaxPayment{
amount: 500365,
bar_code: "81660000005003657010074119002551100010601813",
created: ~U[2020-04-18 16:22:24.664148Z],
description: "fix the road",
fee: 0,
id: "6693962735681536",
line: "81660000005 0036570100 74119002551 10001060181",
scheduled: ~U[2020-04-20 00:00:00Z],
status: "canceled",
tags: ["taxes", "iss"],
transaction_ids: [],
type: "iss",
updated: ~U[2020-04-18 18:12:10.225810Z]
}
TaxPayment(
Amount: 500365,
BarCode: 81660000005003657010074119002551100010601813,
Created: 18/04/2020 16:22:24,
Description: fix the road,
Fee: 0,
Line: 81660000005 0036570100 74119002551 10001060181,
Scheduled: 20/04/2020 00:00:00,
Status: canceled,
Tags: { taxes, iss },
TransactionIds: { },
Type: iss,
Updated: 18/04/2020 18:12:10,
ID: 6693962735681536
)
{
Id:6693962735681536
Amount:500365
BarCode:81660000005003657010074119002551100010601813
Created:2020-04-18 16:22:24.664148 +0000 +0000
Description:fix the road
Fee:0
Line:81660000005 0036570100 74119002551 10001060181
Scheduled:2020-04-20 00:00:00 +0000 +0000
Status:canceled
Tags:[taxes iss]
TransactionIds:[]
Type:iss
Updated:2020-04-18 18:12:10.225810 +0000 +0000
}
{:amount 500365,
:bar-code "81660000005003657010074119002551100010601813",
:created "2020-04-18T16:22:24.664148+00:00",
:description "fix the road",
:fee 0,
:id "6693962735681536",
:line "81660000005 0036570100 74119002551 10001060181",
:scheduled "2020-04-20T00:00:00+00:00",
:status "canceled",
:tags ["taxes" "iss"],
:transaction-ids [],
:type "iss",
:updated "2020-04-18T18:12:10.225810+00:00"}
{
"payment": {
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2020-04-18T16:22:24.664148+00:00",
"description": "fix the road",
"fee": 0,
"id": "6693962735681536",
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2020-04-20T00:00:00+00:00",
"status": "canceled",
"tags": ["taxes", "iss"],
"transactionIds": [],
"type": "iss",
"updated": "2020-04-18T18:12:10.225810+00:00"
}
}
After creation, you can use asynchronous Webhooks to monitor status changes of the entity. The Tax Payment will follow the following life cycle:
Every time we change a Tax Payment, we create a Log. Logs are pretty useful for understanding the life cycle of each Tax Payment. Whenever a new Log is created, we will fire a Webhook to your registered URL.
NOTE: Check the Webhook Get Started for more details on how to receive and process Webhook events.
NOTE: A tax-payment subscription is required to receive this event.
{
"event": {
"id": "5258020443389952",
"subscription": "tax-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"taxPayment": {
"id": "6679150966341632",
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "tax-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"taxPayment": {
"id": "6679150966341632",
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "tax-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"taxPayment": {
"id": "6679150966341632",
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "tax-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"taxPayment": {
"id": "6679150966341632",
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "tax-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"taxPayment": {
"id": "6679150966341632",
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "tax-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"taxPayment": {
"id": "6679150966341632",
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "tax-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"taxPayment": {
"id": "6679150966341632",
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "tax-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"taxPayment": {
"id": "6679150966341632",
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "tax-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"taxPayment": {
"id": "6679150966341632",
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "tax-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"taxPayment": {
"id": "6679150966341632",
"amount": 500365,
"barCode": "81660000005003657010074119002551100010601813",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "fix the road",
"fee": 200,
"line": "81660000005 0036570100 74119002551 10001060181",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"transactionIds": ["5991715760504832"],
"type": "iss",
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
Darf Payment is a resource that can be used to pay federal taxes without bar codes (DARFs) using your Stark Bank balance.
To create a Darf Payment, you need to provide the mandatory parameters: revenueCode, taxId, competence, nominalAmount, fineAmount, interestAmount, due, and description.
Optional parameters include scheduled, referenceNumber, and tags.
Each Darf Payment has a status that can change over time according to its life cycle:
| Status | Description |
|---|---|
| Created | The Darf Payment was successfully created in Stark Bank. |
| Processing | The Darf Payment is being processed by Stark Bank. |
| Success | The Darf Payment was successfully completed. |
| Failed | The Darf Payment was unsuccessful. |
| Canceled | The Darf Payment was canceled before processing. |
Every time either you or Stark Bank makes a change to a Darf Payment, we create a Log. Logs are pretty useful for understanding the life cycle of each Darf Payment and the changes that happened to it. Here you can see the flow of possible logs:
| Log type | Status | Description |
|---|---|---|
| Created | Created | The Darf Payment was successfully created in Stark Bank. |
| Processing | Processing | The Darf Payment is being processed. |
| Success | Success | The Darf Payment was successfully completed. |
| Failed | Failed | The Darf Payment was unsuccessful. |
| Canceling | Processing | The Darf Payment cancellation is being processed. |
| Canceled | Canceled | The Darf Payment was canceled before processing. |
id
Unique id for the DARF payment.
amount
Total payment amount in cents (nominalAmount + fineAmount + interestAmount).
competence
Competence month of the service. Example: "2020-03-10".
created
Creation datetime. Example: "2020-04-23T23:00:00.000000+00:00".
description
Text displayed in the bank statement.
due
Due date for payment. Example: "2020-03-10".
fee
Fee charged in cents.
fineAmount
Fixed fine amount in cents.
interestAmount
Interest amount in cents.
nominalAmount
Amount due in cents without fee or interest.
referenceNumber
Number assigned to the region of the tax.
revenueCode
4-digit tax code assigned by Federal Revenue. Example: "5948".
scheduled
Scheduled payment date. Example: "2020-04-23".
status
Current payment status. Options: "created", "processing", "success", "failed", "canceled".
tags
Tags associated with the DARF payment.
taxId
Payer CPF or CNPJ.
transactionIds
Ledger transaction IDs linked to the payment.
updated
Last update datetime. Example: "2020-04-23T23:00:00.000000+00:00".
To create a Darf Payment, fill in the mandatory parameters: revenueCode, taxId, competence, nominalAmount, fineAmount, interestAmount, due, and description.
The total amount is automatically calculated as nominalAmount + fineAmount + interestAmount.
import starkbank
payments = starkbank.darfpayment.create([
starkbank.DarfPayment(
revenue_code="1240",
tax_id="012.345.678-90",
competence="2023-09-01",
nominal_amount=1234,
fine_amount=12,
interest_amount=34,
due="2023-10-01",
description="DARF Payment for revenue code 1240"
)
])
for payment in payments:
print(payment)
const starkbank = require('starkbank');
(async() => {
let payments = await starkbank.darfPayment.create([
{
revenueCode: '1240',
taxId: '012.345.678-90',
competence: '2023-09-01',
nominalAmount: 1234,
fineAmount: 12,
interestAmount: 34,
due: '2023-10-01',
description: 'DARF Payment for revenue code 1240'
}
])
for (let payment of payments) {
console.log(payment);
}
})();
$payments = StarkBank\DarfPayment::create([
new StarkBank\DarfPayment([
"revenueCode" => "1240",
"taxId" => "012.345.678-90",
"competence" => "2023-09-01",
"nominalAmount" => 1234,
"fineAmount" => 12,
"interestAmount" => 34,
"due" => "2023-10-01",
"description" => "DARF Payment for revenue code 1240"
])
]);
foreach($payments as $payment){
print_r($payment);
}
import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
List<DarfPayment> payments = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("revenueCode", "1240");
data.put("taxId", "012.345.678-90");
data.put("competence", "2023-09-01");
data.put("nominalAmount", 1234);
data.put("fineAmount", 12);
data.put("interestAmount", 34);
data.put("due", "2023-10-01");
data.put("description", "DARF Payment for revenue code 1240");
payments.add(new DarfPayment(data));
payments = DarfPayment.create(payments);
for (DarfPayment payment : payments){
System.out.println(payment);
}
require('starkbank')
payments = StarkBank::DarfPayment.create(
[
StarkBank::DarfPayment.new(
revenue_code: '1240',
tax_id: '012.345.678-90',
competence: '2023-09-01',
nominal_amount: 1234,
fine_amount: 12,
interest_amount: 34,
due: '2023-10-01',
description: 'DARF Payment for revenue code 1240'
)
]
)
payments.each do |payment|
puts payment
end
payments = StarkBank.DarfPayment.create!([
%StarkBank.DarfPayment{
revenue_code: "1240",
tax_id: "012.345.678-90",
competence: "2023-09-01",
nominal_amount: 1234,
fine_amount: 12,
interest_amount: 34,
due: "2023-10-01",
description: "DARF Payment for revenue code 1240"
}
])
for payment <- payments do
payment |> IO.inspect
end
using System;
using System.Collections.Generic;
List<StarkBank.DarfPayment> payments = StarkBank.DarfPayment.Create(
new List<StarkBank.DarfPayment> {
new StarkBank.DarfPayment(
revenueCode: "1240",
taxID: "012.345.678-90",
competence: new DateTime(2023, 9, 1),
nominalAmount: 1234,
fineAmount: 12,
interestAmount: 34,
due: new DateTime(2023, 10, 1),
description: "DARF Payment for revenue code 1240"
)
}
);
foreach(StarkBank.DarfPayment payment in payments)
{
Console.WriteLine(payment);
}
package main
import (
"fmt"
"time"
"github.com/starkbank/sdk-go/starkbank/darfpayment"
)
func main() {
due := time.Date(2023, 10, 1, 0, 0, 0, 0, time.UTC)
payments, err := darfpayment.Create(
[]darfpayment.DarfPayment{
{
RevenueCode: "1240",
TaxId: "012.345.678-90",
Competence: "2023-09-01",
NominalAmount: 1234,
FineAmount: 12,
InterestAmount: 34,
Due: &due,
Description: "DARF Payment for revenue code 1240",
},
}, nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
for _, payment := range payments {
fmt.Printf("%+v", payment)
}
}
(def payments
(starkbank.darf-payment/create
[
{
:revenue-code "1240"
:tax-id "012.345.678-90"
:competence "2023-09-01"
:nominal-amount 1234
:fine-amount 12
:interest-amount 34
:due "2023-10-01"
:description "DARF Payment for revenue code 1240"
}
]))
(dorun (map println payments))
curl --location --request POST '{{baseUrl}}/v2/darf-payment'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
--header 'Content-Type: application/json'
--data-raw '{
"payments": [
{
"revenueCode": "1240",
"taxId": "012.345.678-90",
"competence": "2023-09-01",
"nominalAmount": 1234,
"fineAmount": 12,
"interestAmount": 34,
"due": "2023-10-01",
"description": "DARF Payment for revenue code 1240"
}
]
}'
DarfPayment(
amount=1280,
competence=2023-09-01 02:59:59.999999,
created=2023-09-15 16:22:24.664148,
description=DARF Payment for revenue code 1240,
due=2023-10-01 02:59:59.999999,
fee=0,
fine_amount=12,
id=5412038532661248,
interest_amount=34,
nominal_amount=1234,
reference_number=,
revenue_code=1240,
scheduled=2023-09-15 16:22:24.664148,
status=created,
tags=[],
tax_id=012.345.678-90,
transaction_ids=[],
updated=2023-09-15 16:22:24.664148
)
DarfPayment {
id: '5412038532661248',
revenueCode: '1240',
taxId: '012.345.678-90',
competence: '2023-09-01T02:59:59.999999+00:00',
fineAmount: 12,
interestAmount: 34,
due: '2023-10-01T02:59:59.999999+00:00',
description: 'DARF Payment for revenue code 1240',
tags: [],
scheduled: '2023-09-15T16:22:24.664148+00:00',
status: 'created',
amount: 1280,
nominalAmount: 1234,
transactionIds: [],
fee: 0,
updated: '2023-09-15T16:22:24.664148+00:00',
created: '2023-09-15T16:22:24.664148+00:00'
}
StarkBank\DarfPayment Object
(
[id] => 5412038532661248
[revenueCode] => 1240
[taxId] => 012.345.678-90
[competence] => DateTime Object
(
[date] => 2023-09-01 02:59:59.999999
[timezone_type] => 1
[timezone] => +00:00
)
[referenceNumber] =>
[fineAmount] => 12
[interestAmount] => 34
[due] => DateTime Object
(
[date] => 2023-10-01 02:59:59.999999
[timezone_type] => 1
[timezone] => +00:00
)
[description] => DARF Payment for revenue code 1240
[tags] => Array
(
)
[transactionIds] => Array
(
)
[scheduled] => DateTime Object
(
[date] => 2023-09-15 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[status] => created
[amount] => 1280
[nominalAmount] => 1234
[fee] => 0
[updated] => DateTime Object
(
[date] => 2023-09-15 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-09-15 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
)
DarfPayment({
"description": "DARF Payment for revenue code 1240",
"revenueCode": "1240",
"taxId": "012.345.678-90",
"competence": "2023-09-01T02:59:59.999999+00:00",
"nominalAmount": 1234,
"fineAmount": 12,
"interestAmount": 34,
"due": "2023-10-01T02:59:59.999999+00:00",
"referenceNumber": "",
"scheduled": "2023-09-15T16:22:24.664148+00:00",
"tags": [],
"status": "created",
"amount": "1280",
"fee": "0",
"transactionIds": [],
"updated": "2023-09-15T16:22:24.664148+00:00",
"created": "2023-09-15T16:22:24.664148+00:00",
"id": "5412038532661248"
})
darfpayment(
id: 5412038532661248,
revenue_code: 1240,
tax_id: 012.345.678-90,
competence: 2023-09-01T02:59:59+00:00,
fine_amount: 12,
interest_amount: 34,
due: 2023-10-01T02:59:59+00:00,
description: DARF Payment for revenue code 1240,
tags: [],
transaction_ids: [],
scheduled: 2023-09-15T16:22:24+00:00,
status: created,
amount: 1280,
nominal_amount: 1234,
fee: 0,
updated: 2023-09-15T16:22:24+00:00,
created: 2023-09-15T16:22:24+00:00
)
%StarkBank.DarfPayment{
revenue_code: "1240",
tax_id: "012.345.678-90",
competence: ~U[2023-09-01 02:59:59.999999Z],
reference_number: "",
fine_amount: 12,
interest_amount: 34,
due: ~U[2023-10-01 02:59:59.999999Z],
description: "DARF Payment for revenue code 1240",
tags: [],
transaction_ids: [],
scheduled: ~U[2023-09-15 16:22:24.664148Z],
status: "created",
amount: 1280,
nominal_amount: 1234,
id: "5412038532661248",
fee: 0,
updated: ~U[2023-09-15 16:22:24.664148Z],
created: ~U[2023-09-15 16:22:24.664148Z]
}
DarfPayment(
RevenueCode: 1240,
TaxID: 012.345.678-90,
Description: DARF Payment for revenue code 1240,
Competence: 01/09/2023 02:59:59,
FineAmount: 12,
InterestAmount: 34,
Due: 01/10/2023 02:59:59,
NominalAmount: 1234,
Tags: { },
TransactionIds: { },
Amount: 1280,
Fee: 0,
Created: 15/09/2023 16:22:24,
Updated: 15/09/2023 16:22:24,
Scheduled: 15/09/2023 16:22:24,
Status: created,
ID: 5412038532661248
)
{
Id:5412038532661248
RevenueCode:1240
TaxId:012.345.678-90
Competence:2023-09-01 02:59:59.999999 +0000 +0000
FineAmount:12
InterestAmount:34
Due:2023-10-01 02:59:59.999999 +0000 +0000
Description:DARF Payment for revenue code 1240
Tags:[]
TransactionIds:[]
Scheduled:2023-09-15 16:22:24.664148 +0000 +0000
Status:created
Amount:1280
NominalAmount:1234
Fee:0
Updated:2023-09-15 16:22:24.664148 +0000 +0000
Created:2023-09-15 16:22:24.664148 +0000 +0000
}
{:id "5412038532661248",
:revenue-code "1240",
:tax-id "012.345.678-90",
:competence "2023-09-01T02:59:59.999999+00:00",
:fine-amount 12,
:interest-amount 34,
:due "2023-10-01T02:59:59.999999+00:00",
:description "DARF Payment for revenue code 1240",
:tags [],
:scheduled "2023-09-15T16:22:24.664148+00:00",
:status "created",
:amount 1280,
:nominal-amount 1234,
:fee 0,
:transaction-ids [],
:updated "2023-09-15T16:22:24.664148+00:00",
:created "2023-09-15T16:22:24.664148+00:00"}
{
"message": "Darf Payment(s) successfully created",
"payments": [
{
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2023-09-15T16:22:24.664148+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 0,
"fineAmount": 12,
"id": "5412038532661248",
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2023-09-15T16:22:24.664148+00:00",
"status": "created",
"tags": [],
"taxId": "012.345.678-90",
"transactionIds": [],
"updated": "2023-09-15T16:22:24.664148+00:00"
}
]
}
Scheduled: Schedule the DARF payment for a specific date.
Today is the default.
Example: "2020-04-20"
Tags: Array of strings to tag the entity for future queries. All tags will be converted to lowercase. Example: ["darf", "federal-tax"]
Reference Number: Number assigned to the region of the tax. Example: "08.1.17.00-4"
import starkbank
payments = starkbank.darfpayment.create([
starkbank.DarfPayment(
revenue_code="1240",
tax_id="012.345.678-90",
competence="2023-09-01",
nominal_amount=1234,
fine_amount=12,
interest_amount=34,
due="2023-10-01",
description="DARF Payment for revenue code 1240",
scheduled="2023-10-15",
tags=["darf", "revenue-1240"]
)
])
for payment in payments:
print(payment)
const starkbank = require('starkbank');
(async() => {
let payments = await starkbank.darfPayment.create([
{
revenueCode: '1240',
taxId: '012.345.678-90',
competence: '2023-09-01',
nominalAmount: 1234,
fineAmount: 12,
interestAmount: 34,
due: '2023-10-01',
description: 'DARF Payment for revenue code 1240',
scheduled: '2023-10-15',
tags: ['darf', 'revenue-1240']
}
])
for (let payment of payments) {
console.log(payment);
}
})();
$payments = StarkBank\DarfPayment::create([
new StarkBank\DarfPayment([
"revenueCode" => "1240",
"taxId" => "012.345.678-90",
"competence" => "2023-09-01",
"nominalAmount" => 1234,
"fineAmount" => 12,
"interestAmount" => 34,
"due" => "2023-10-01",
"description" => "DARF Payment for revenue code 1240",
"scheduled" => "2023-10-15",
"tags" => ["darf", "revenue-1240"]
])
]);
foreach($payments as $payment){
print_r($payment);
}
import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
List<DarfPayment> payments = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("revenueCode", "1240");
data.put("taxId", "012.345.678-90");
data.put("competence", "2023-09-01");
data.put("nominalAmount", 1234);
data.put("fineAmount", 12);
data.put("interestAmount", 34);
data.put("due", "2023-10-01");
data.put("description", "DARF Payment for revenue code 1240");
data.put("scheduled", "2023-10-15");
data.put("tags", new String[]{"darf", "revenue-1240"});
payments.add(new DarfPayment(data));
payments = DarfPayment.create(payments);
for (DarfPayment payment : payments){
System.out.println(payment);
}
require('starkbank')
payments = StarkBank::DarfPayment.create(
[
StarkBank::DarfPayment.new(
revenue_code: '1240',
tax_id: '012.345.678-90',
competence: '2023-09-01',
nominal_amount: 1234,
fine_amount: 12,
interest_amount: 34,
due: '2023-10-01',
description: 'DARF Payment for revenue code 1240',
scheduled: '2023-10-15',
tags: ['darf', 'revenue-1240']
)
]
)
payments.each do |payment|
puts payment
end
payments = StarkBank.DarfPayment.create!([
%StarkBank.DarfPayment{
revenue_code: "1240",
tax_id: "012.345.678-90",
competence: "2023-09-01",
nominal_amount: 1234,
fine_amount: 12,
interest_amount: 34,
due: "2023-10-01",
description: "DARF Payment for revenue code 1240",
scheduled: "2023-10-15",
tags: ["darf", "revenue-1240"]
}
])
for payment <- payments do
payment |> IO.inspect
end
using System;
using System.Collections.Generic;
List<StarkBank.DarfPayment> payments = StarkBank.DarfPayment.Create(
new List<StarkBank.DarfPayment> {
new StarkBank.DarfPayment(
revenueCode: "1240",
taxID: "012.345.678-90",
competence: new DateTime(2023, 9, 1),
nominalAmount: 1234,
fineAmount: 12,
interestAmount: 34,
due: new DateTime(2023, 10, 1),
description: "DARF Payment for revenue code 1240",
scheduled: new DateTime(2023, 10, 15),
tags: new List<string> { "darf", "revenue-1240" }
)
}
);
foreach(StarkBank.DarfPayment payment in payments)
{
Console.WriteLine(payment);
}
package main
import (
"fmt"
"time"
"github.com/starkbank/sdk-go/starkbank/darfpayment"
)
func main() {
due := time.Date(2023, 10, 1, 0, 0, 0, 0, time.UTC)
scheduled := time.Date(2023, 10, 15, 0, 0, 0, 0, time.UTC)
payments, err := darfpayment.Create(
[]darfpayment.DarfPayment{
{
RevenueCode: "1240",
TaxId: "012.345.678-90",
Competence: "2023-09-01",
NominalAmount: 1234,
FineAmount: 12,
InterestAmount: 34,
Due: &due,
Description: "DARF Payment for revenue code 1240",
Scheduled: &scheduled,
Tags: []string{"darf", "revenue-1240"},
},
}, nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
for _, payment := range payments {
fmt.Printf("%+v", payment)
}
}
(def payments
(starkbank.darf-payment/create
[
{
:revenue-code "1240"
:tax-id "012.345.678-90"
:competence "2023-09-01"
:nominal-amount 1234
:fine-amount 12
:interest-amount 34
:due "2023-10-01"
:description "DARF Payment for revenue code 1240"
:scheduled "2023-10-15"
:tags ["darf" "revenue-1240"]
}
]))
(dorun (map println payments))
curl --location --request POST '{{baseUrl}}/v2/darf-payment'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
--header 'Content-Type: application/json'
--data-raw '{
"payments": [
{
"revenueCode": "1240",
"taxId": "012.345.678-90",
"competence": "2023-09-01",
"nominalAmount": 1234,
"fineAmount": 12,
"interestAmount": 34,
"due": "2023-10-01",
"description": "DARF Payment for revenue code 1240",
"scheduled": "2023-10-15",
"tags": ["darf", "revenue-1240"]
}
]
}'
DarfPayment(
amount=1280,
competence=2023-09-01 02:59:59.999999,
created=2023-09-15 16:22:24.664148,
description=DARF Payment for revenue code 1240,
due=2023-10-01 02:59:59.999999,
fee=0,
fine_amount=12,
id=5738709764800512,
interest_amount=34,
nominal_amount=1234,
reference_number=,
revenue_code=1240,
scheduled=2023-10-15 00:00:00,
status=created,
tags=['darf', 'revenue-1240'],
tax_id=012.345.678-90,
transaction_ids=[],
updated=2023-09-15 16:22:24.664148
)
DarfPayment {
id: '5738709764800512',
revenueCode: '1240',
taxId: '012.345.678-90',
competence: '2023-09-01T02:59:59.999999+00:00',
fineAmount: 12,
interestAmount: 34,
due: '2023-10-01T02:59:59.999999+00:00',
description: 'DARF Payment for revenue code 1240',
tags: [ 'darf', 'revenue-1240' ],
scheduled: '2023-10-15T00:00:00+00:00',
status: 'created',
amount: 1280,
nominalAmount: 1234,
transactionIds: [],
fee: 0,
updated: '2023-09-15T16:22:24.664148+00:00',
created: '2023-09-15T16:22:24.664148+00:00'
}
StarkBank\DarfPayment Object
(
[id] => 5738709764800512
[revenueCode] => 1240
[taxId] => 012.345.678-90
[competence] => DateTime Object
(
[date] => 2023-09-01 02:59:59.999999
[timezone_type] => 1
[timezone] => +00:00
)
[referenceNumber] =>
[fineAmount] => 12
[interestAmount] => 34
[due] => DateTime Object
(
[date] => 2023-10-01 02:59:59.999999
[timezone_type] => 1
[timezone] => +00:00
)
[description] => DARF Payment for revenue code 1240
[tags] => Array
(
[0] => darf
[1] => revenue-1240
)
[transactionIds] => Array
(
)
[scheduled] => DateTime Object
(
[date] => 2023-10-15 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[status] => created
[amount] => 1280
[nominalAmount] => 1234
[fee] => 0
[updated] => DateTime Object
(
[date] => 2023-09-15 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-09-15 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
)
DarfPayment({
"description": "DARF Payment for revenue code 1240",
"revenueCode": "1240",
"taxId": "012.345.678-90",
"competence": "2023-09-01T02:59:59.999999+00:00",
"nominalAmount": 1234,
"fineAmount": 12,
"interestAmount": 34,
"due": "2023-10-01T02:59:59.999999+00:00",
"referenceNumber": "",
"scheduled": "2023-10-15T00:00:00+00:00",
"tags": ["darf", "revenue-1240"],
"status": "created",
"amount": "1280",
"fee": "0",
"transactionIds": [],
"updated": "2023-09-15T16:22:24.664148+00:00",
"created": "2023-09-15T16:22:24.664148+00:00",
"id": "5738709764800512"
})
darfpayment(
id: 5738709764800512,
revenue_code: 1240,
tax_id: 012.345.678-90,
competence: 2023-09-01T02:59:59+00:00,
fine_amount: 12,
interest_amount: 34,
due: 2023-10-01T02:59:59+00:00,
description: DARF Payment for revenue code 1240,
tags: ['darf', 'revenue-1240'],
transaction_ids: [],
scheduled: 2023-10-15T00:00:00+00:00,
status: created,
amount: 1280,
nominal_amount: 1234,
fee: 0,
updated: 2023-09-15T16:22:24+00:00,
created: 2023-09-15T16:22:24+00:00
)
%StarkBank.DarfPayment{
revenue_code: "1240",
tax_id: "012.345.678-90",
competence: ~U[2023-09-01 02:59:59.999999Z],
reference_number: "",
fine_amount: 12,
interest_amount: 34,
due: ~U[2023-10-01 02:59:59.999999Z],
description: "DARF Payment for revenue code 1240",
tags: ["darf", "revenue-1240"],
transaction_ids: [],
scheduled: ~U[2023-10-15 00:00:00Z],
status: "created",
amount: 1280,
nominal_amount: 1234,
id: "5738709764800512",
fee: 0,
updated: ~U[2023-09-15 16:22:24.664148Z],
created: ~U[2023-09-15 16:22:24.664148Z]
}
DarfPayment(
RevenueCode: 1240,
TaxID: 012.345.678-90,
Description: DARF Payment for revenue code 1240,
Competence: 01/09/2023 02:59:59,
FineAmount: 12,
InterestAmount: 34,
Due: 01/10/2023 02:59:59,
NominalAmount: 1234,
Tags: { darf, revenue-1240 },
TransactionIds: { },
Amount: 1280,
Fee: 0,
Created: 15/09/2023 16:22:24,
Updated: 15/09/2023 16:22:24,
Scheduled: 15/10/2023 00:00:00,
Status: created,
ID: 5738709764800512
)
{
Id:5738709764800512
RevenueCode:1240
TaxId:012.345.678-90
Competence:2023-09-01 02:59:59.999999 +0000 +0000
FineAmount:12
InterestAmount:34
Due:2023-10-01 02:59:59.999999 +0000 +0000
Description:DARF Payment for revenue code 1240
Tags:[darf revenue-1240]
TransactionIds:[]
Scheduled:2023-10-15 00:00:00 +0000 +0000
Status:created
Amount:1280
NominalAmount:1234
Fee:0
Updated:2023-09-15 16:22:24.664148 +0000 +0000
Created:2023-09-15 16:22:24.664148 +0000 +0000
}
{:id "5738709764800512",
:revenue-code "1240",
:tax-id "012.345.678-90",
:competence "2023-09-01T02:59:59.999999+00:00",
:fine-amount 12,
:interest-amount 34,
:due "2023-10-01T02:59:59.999999+00:00",
:description "DARF Payment for revenue code 1240",
:tags ["darf" "revenue-1240"],
:scheduled "2023-10-15T00:00:00+00:00",
:status "created",
:amount 1280,
:nominal-amount 1234,
:fee 0,
:transaction-ids [],
:updated "2023-09-15T16:22:24.664148+00:00",
:created "2023-09-15T16:22:24.664148+00:00"}
{
"message": "Darf Payment(s) successfully created",
"payments": [
{
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2023-09-15T16:22:24.664148+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 0,
"fineAmount": 12,
"id": "5738709764800512",
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2023-10-15T00:00:00+00:00",
"status": "created",
"tags": ["darf", "revenue-1240"],
"taxId": "012.345.678-90",
"transactionIds": [],
"updated": "2023-09-15T16:22:24.664148+00:00"
}
]
}
Get a list of Darf Payments using filters such as after, before, status and tags to narrow the results.
import starkbank
payments = starkbank.darfpayment.query(
after="2023-09-01",
before="2023-09-30",
)
for payment in payments:
print(payment)
const starkbank = require('starkbank');
(async() => {
let payments = await starkbank.darfPayment.query({
after: '2023-09-01',
before: '2023-09-30',
});
for await (let payment of payments) {
console.log(payment);
}
})();
$payments = StarkBank\DarfPayment::query([
"after" => "2023-09-01",
"before" => "2023-09-30"
]);
foreach($payments as $payment){
print_r($payment);
}
import com.starkbank.*;
import com.starkbank.utils.Generator;
import java.util.HashMap;
HashMap<String, Object> params = new HashMap<>();
params.put("after", "2023-09-01");
params.put("before", "2023-09-30");
Generator<DarfPayment> payments = DarfPayment.query(params);
for (DarfPayment payment : payments){
System.out.println(payment);
}
require('starkbank')
payments = StarkBank::DarfPayment.query(
after: '2023-09-01',
before: '2023-09-30'
)
payments.each do |payment|
puts payment
end
payments = StarkBank.DarfPayment.query!(
after: "2023-09-01",
before: "2023-09-30"
)
for payment <- payments do
payment |> IO.inspect
end
using System;
using System.Collections.Generic;
IEnumerable<StarkBank.DarfPayment> payments = StarkBank.DarfPayment.Query(
after: new DateTime(2023, 9, 1),
before: new DateTime(2023, 9, 30)
);
foreach(StarkBank.DarfPayment payment in payments)
{
Console.WriteLine(payment);
}
package main
import (
"fmt"
"time"
"github.com/starkbank/sdk-go/starkbank/darfpayment"
)
func main() {
var params = map[string]interface{}{}
params["after"] = time.Date(2023, 9, 1, 0, 0, 0, 0, time.UTC)
params["before"] = time.Date(2023, 9, 30, 0, 0, 0, 0, time.UTC)
payments, errorChannel := darfpayment.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 payment, ok := <-payments:
if !ok {
break loop
}
fmt.Printf("%+v", payment)
}
}
}
(def payments
(starkbank.darf-payment/query
{
:after "2023-09-01"
:before "2023-09-30"
}))
(dorun (map println payments))
curl --location --request GET '{{baseUrl}}/v2/darf-payment?after=2023-09-01&before=2023-09-30'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
DarfPayment(
amount=1280,
competence=2023-09-01 02:59:59.999999,
created=2023-09-15 16:22:24.664148,
description=DARF Payment for revenue code 1240,
due=2023-10-01 02:59:59.999999,
fee=200,
fine_amount=12,
id=5950134772826112,
interest_amount=34,
nominal_amount=1234,
reference_number=,
revenue_code=1240,
scheduled=2023-10-15 00:00:00,
status=processing,
tags=['darf', 'revenue-1240'],
tax_id=012.345.678-90,
transaction_ids=['5991715760504832'],
updated=2023-10-15 10:22:24.664148
)
DarfPayment {
id: '5950134772826112',
revenueCode: '1240',
taxId: '012.345.678-90',
competence: '2023-09-01T02:59:59.999999+00:00',
fineAmount: 12,
interestAmount: 34,
due: '2023-10-01T02:59:59.999999+00:00',
description: 'DARF Payment for revenue code 1240',
tags: [ 'darf', 'revenue-1240' ],
scheduled: '2023-10-15T00:00:00+00:00',
status: 'processing',
amount: 1280,
nominalAmount: 1234,
transactionIds: [ '5991715760504832' ],
fee: 200,
updated: '2023-10-15T10:22:24.664148+00:00',
created: '2023-09-15T16:22:24.664148+00:00'
}
StarkBank\DarfPayment Object
(
[id] => 5950134772826112
[revenueCode] => 1240
[taxId] => 012.345.678-90
[competence] => DateTime Object
(
[date] => 2023-09-01 02:59:59.999999
[timezone_type] => 1
[timezone] => +00:00
)
[referenceNumber] =>
[fineAmount] => 12
[interestAmount] => 34
[due] => DateTime Object
(
[date] => 2023-10-01 02:59:59.999999
[timezone_type] => 1
[timezone] => +00:00
)
[description] => DARF Payment for revenue code 1240
[tags] => Array
(
[0] => darf
[1] => revenue-1240
)
[transactionIds] => Array
(
[0] => 5991715760504832
)
[scheduled] => DateTime Object
(
[date] => 2023-10-15 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[status] => processing
[amount] => 1280
[nominalAmount] => 1234
[fee] => 200
[updated] => DateTime Object
(
[date] => 2023-10-15 10:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-09-15 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
)
DarfPayment({
"description": "DARF Payment for revenue code 1240",
"revenueCode": "1240",
"taxId": "012.345.678-90",
"competence": "2023-09-01T02:59:59.999999+00:00",
"nominalAmount": 1234,
"fineAmount": 12,
"interestAmount": 34,
"due": "2023-10-01T02:59:59.999999+00:00",
"referenceNumber": "",
"scheduled": "2023-10-15T00:00:00+00:00",
"tags": ["darf", "revenue-1240"],
"status": "processing",
"amount": "1280",
"fee": "200",
"transactionIds": ["5991715760504832"],
"updated": "2023-10-15T10:22:24.664148+00:00",
"created": "2023-09-15T16:22:24.664148+00:00",
"id": "5950134772826112"
})
darfpayment(
id: 5950134772826112,
revenue_code: 1240,
tax_id: 012.345.678-90,
competence: 2023-09-01T02:59:59+00:00,
fine_amount: 12,
interest_amount: 34,
due: 2023-10-01T02:59:59+00:00,
description: DARF Payment for revenue code 1240,
tags: ['darf', 'revenue-1240'],
transaction_ids: ['5991715760504832'],
scheduled: 2023-10-15T00:00:00+00:00,
status: processing,
amount: 1280,
nominal_amount: 1234,
fee: 200,
updated: 2023-10-15T10:22:24+00:00,
created: 2023-09-15T16:22:24+00:00
)
%StarkBank.DarfPayment{
revenue_code: "1240",
tax_id: "012.345.678-90",
competence: ~U[2023-09-01 02:59:59.999999Z],
reference_number: "",
fine_amount: 12,
interest_amount: 34,
due: ~U[2023-10-01 02:59:59.999999Z],
description: "DARF Payment for revenue code 1240",
tags: ["darf", "revenue-1240"],
transaction_ids: ["5991715760504832"],
scheduled: ~U[2023-10-15 00:00:00Z],
status: "processing",
amount: 1280,
nominal_amount: 1234,
id: "5950134772826112",
fee: 200,
updated: ~U[2023-10-15 10:22:24.664148Z],
created: ~U[2023-09-15 16:22:24.664148Z]
}
DarfPayment(
RevenueCode: 1240,
TaxID: 012.345.678-90,
Description: DARF Payment for revenue code 1240,
Competence: 01/09/2023 02:59:59,
FineAmount: 12,
InterestAmount: 34,
Due: 01/10/2023 02:59:59,
NominalAmount: 1234,
Tags: { darf, revenue-1240 },
TransactionIds: { 5991715760504832 },
Amount: 1280,
Fee: 200,
Created: 15/09/2023 16:22:24,
Updated: 15/10/2023 10:22:24,
Scheduled: 15/10/2023 00:00:00,
Status: processing,
ID: 5950134772826112
)
{
Id:5950134772826112
RevenueCode:1240
TaxId:012.345.678-90
Competence:2023-09-01 02:59:59.999999 +0000 +0000
FineAmount:12
InterestAmount:34
Due:2023-10-01 02:59:59.999999 +0000 +0000
Description:DARF Payment for revenue code 1240
Tags:[darf revenue-1240]
TransactionIds:[5991715760504832]
Scheduled:2023-10-15 00:00:00 +0000 +0000
Status:processing
Amount:1280
NominalAmount:1234
Fee:200
Updated:2023-10-15 10:22:24.664148 +0000 +0000
Created:2023-09-15 16:22:24.664148 +0000 +0000
}
{:id "5950134772826112",
:revenue-code "1240",
:tax-id "012.345.678-90",
:competence "2023-09-01T02:59:59.999999+00:00",
:fine-amount 12,
:interest-amount 34,
:due "2023-10-01T02:59:59.999999+00:00",
:description "DARF Payment for revenue code 1240",
:tags ["darf" "revenue-1240"],
:scheduled "2023-10-15T00:00:00+00:00",
:status "processing",
:amount 1280,
:nominal-amount 1234,
:fee 200,
:transaction-ids ["5991715760504832"],
:updated "2023-10-15T10:22:24.664148+00:00",
:created "2023-09-15T16:22:24.664148+00:00"}
{
"cursor": null,
"payments": [
{
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2023-09-15T16:22:24.664148+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"id": "5950134772826112",
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2023-10-15T00:00:00+00:00",
"status": "processing",
"tags": ["darf", "revenue-1240"],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2023-10-15T10:22:24.664148+00:00"
}
]
}
Get a single Darf Payment by its id.
You can use it to check the current status of a Darf Payment.
import starkbank
payment = starkbank.darfpayment.get("5950134772826112")
print(payment)
const starkbank = require('starkbank');
(async() => {
let payment = await starkbank.darfPayment.get('5950134772826112');
console.log(payment);
})();
$payment = StarkBank\DarfPayment::get("5950134772826112");
print_r($payment);
import com.starkbank.*;
DarfPayment payment = DarfPayment.get("5950134772826112");
System.out.println(payment);
require('starkbank')
payment = StarkBank::DarfPayment.get('5950134772826112')
puts payment
payment = StarkBank.DarfPayment.get!("5950134772826112")
payment |> IO.inspect
using System;
StarkBank.DarfPayment payment = StarkBank.DarfPayment.Get("5950134772826112");
Console.WriteLine(payment);
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/darfpayment"
)
func main() {
payment, err := darfpayment.Get("5950134772826112", nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
fmt.Println(payment)
}
(def payment (starkbank.darf-payment/get "5950134772826112"))
(println payment)
curl --location --request GET '{{baseUrl}}/v2/darf-payment/5950134772826112'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
DarfPayment(
amount=1280,
competence=2023-09-01 02:59:59.999999,
created=2023-09-15 16:22:24.664148,
description=DARF Payment for revenue code 1240,
due=2023-10-01 02:59:59.999999,
fee=200,
fine_amount=12,
id=5950134772826112,
interest_amount=34,
nominal_amount=1234,
reference_number=,
revenue_code=1240,
scheduled=2023-10-15 00:00:00,
status=processing,
tags=['darf', 'revenue-1240'],
tax_id=012.345.678-90,
transaction_ids=['5991715760504832'],
updated=2023-10-15 10:22:24.664148
)
DarfPayment {
id: '5950134772826112',
revenueCode: '1240',
taxId: '012.345.678-90',
competence: '2023-09-01T02:59:59.999999+00:00',
fineAmount: 12,
interestAmount: 34,
due: '2023-10-01T02:59:59.999999+00:00',
description: 'DARF Payment for revenue code 1240',
tags: [ 'darf', 'revenue-1240' ],
scheduled: '2023-10-15T00:00:00+00:00',
status: 'processing',
amount: 1280,
nominalAmount: 1234,
transactionIds: [ '5991715760504832' ],
fee: 200,
updated: '2023-10-15T10:22:24.664148+00:00',
created: '2023-09-15T16:22:24.664148+00:00'
}
StarkBank\DarfPayment Object
(
[id] => 5950134772826112
[revenueCode] => 1240
[taxId] => 012.345.678-90
[competence] => DateTime Object
(
[date] => 2023-09-01 02:59:59.999999
[timezone_type] => 1
[timezone] => +00:00
)
[referenceNumber] =>
[fineAmount] => 12
[interestAmount] => 34
[due] => DateTime Object
(
[date] => 2023-10-01 02:59:59.999999
[timezone_type] => 1
[timezone] => +00:00
)
[description] => DARF Payment for revenue code 1240
[tags] => Array
(
[0] => darf
[1] => revenue-1240
)
[transactionIds] => Array
(
[0] => 5991715760504832
)
[scheduled] => DateTime Object
(
[date] => 2023-10-15 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[status] => processing
[amount] => 1280
[nominalAmount] => 1234
[fee] => 200
[updated] => DateTime Object
(
[date] => 2023-10-15 10:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-09-15 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
)
DarfPayment({
"description": "DARF Payment for revenue code 1240",
"revenueCode": "1240",
"taxId": "012.345.678-90",
"competence": "2023-09-01T02:59:59.999999+00:00",
"nominalAmount": 1234,
"fineAmount": 12,
"interestAmount": 34,
"due": "2023-10-01T02:59:59.999999+00:00",
"referenceNumber": "",
"scheduled": "2023-10-15T00:00:00+00:00",
"tags": ["darf", "revenue-1240"],
"status": "processing",
"amount": "1280",
"fee": "200",
"transactionIds": ["5991715760504832"],
"updated": "2023-10-15T10:22:24.664148+00:00",
"created": "2023-09-15T16:22:24.664148+00:00",
"id": "5950134772826112"
})
darfpayment(
id: 5950134772826112,
revenue_code: 1240,
tax_id: 012.345.678-90,
competence: 2023-09-01T02:59:59+00:00,
fine_amount: 12,
interest_amount: 34,
due: 2023-10-01T02:59:59+00:00,
description: DARF Payment for revenue code 1240,
tags: ['darf', 'revenue-1240'],
transaction_ids: ['5991715760504832'],
scheduled: 2023-10-15T00:00:00+00:00,
status: processing,
amount: 1280,
nominal_amount: 1234,
fee: 200,
updated: 2023-10-15T10:22:24+00:00,
created: 2023-09-15T16:22:24+00:00
)
%StarkBank.DarfPayment{
revenue_code: "1240",
tax_id: "012.345.678-90",
competence: ~U[2023-09-01 02:59:59.999999Z],
reference_number: "",
fine_amount: 12,
interest_amount: 34,
due: ~U[2023-10-01 02:59:59.999999Z],
description: "DARF Payment for revenue code 1240",
tags: ["darf", "revenue-1240"],
transaction_ids: ["5991715760504832"],
scheduled: ~U[2023-10-15 00:00:00Z],
status: "processing",
amount: 1280,
nominal_amount: 1234,
id: "5950134772826112",
fee: 200,
updated: ~U[2023-10-15 10:22:24.664148Z],
created: ~U[2023-09-15 16:22:24.664148Z]
}
DarfPayment(
RevenueCode: 1240,
TaxID: 012.345.678-90,
Description: DARF Payment for revenue code 1240,
Competence: 01/09/2023 02:59:59,
FineAmount: 12,
InterestAmount: 34,
Due: 01/10/2023 02:59:59,
NominalAmount: 1234,
Tags: { darf, revenue-1240 },
TransactionIds: { 5991715760504832 },
Amount: 1280,
Fee: 200,
Created: 15/09/2023 16:22:24,
Updated: 15/10/2023 10:22:24,
Scheduled: 15/10/2023 00:00:00,
Status: processing,
ID: 5950134772826112
)
{
Id:5950134772826112
RevenueCode:1240
TaxId:012.345.678-90
Competence:2023-09-01 02:59:59.999999 +0000 +0000
FineAmount:12
InterestAmount:34
Due:2023-10-01 02:59:59.999999 +0000 +0000
Description:DARF Payment for revenue code 1240
Tags:[darf revenue-1240]
TransactionIds:[5991715760504832]
Scheduled:2023-10-15 00:00:00 +0000 +0000
Status:processing
Amount:1280
NominalAmount:1234
Fee:200
Updated:2023-10-15 10:22:24.664148 +0000 +0000
Created:2023-09-15 16:22:24.664148 +0000 +0000
}
{:id "5950134772826112",
:revenue-code "1240",
:tax-id "012.345.678-90",
:competence "2023-09-01T02:59:59.999999+00:00",
:fine-amount 12,
:interest-amount 34,
:due "2023-10-01T02:59:59.999999+00:00",
:description "DARF Payment for revenue code 1240",
:tags ["darf" "revenue-1240"],
:scheduled "2023-10-15T00:00:00+00:00",
:status "processing",
:amount 1280,
:nominal-amount 1234,
:fee 200,
:transaction-ids ["5991715760504832"],
:updated "2023-10-15T10:22:24.664148+00:00",
:created "2023-09-15T16:22:24.664148+00:00"}
{
"payment": {
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2023-09-15T16:22:24.664148+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"id": "5950134772826112",
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2023-10-15T00:00:00+00:00",
"status": "processing",
"tags": ["darf", "revenue-1240"],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2023-10-15T10:22:24.664148+00:00"
}
}
This method will allow the cancellation of a Darf Payment.
It's important to note that it's only possible to cancel Darf Payments before the start of processing.
import starkbank
payment = starkbank.darfpayment.delete("6693962735681536")
print(payment)
const starkbank = require('starkbank');
(async() => {
let payment = await starkbank.darfPayment.delete('6693962735681536');
console.log(payment);
})();
$payment = StarkBank\DarfPayment::delete("6693962735681536");
print_r($payment);
import com.starkbank.*;
DarfPayment payment = DarfPayment.delete("6693962735681536");
System.out.println(payment);
require('starkbank')
payment = StarkBank::DarfPayment.delete('6693962735681536')
puts payment
payment = StarkBank.DarfPayment.delete!("6693962735681536")
payment |> IO.inspect
using System;
StarkBank.DarfPayment payment = StarkBank.DarfPayment.Delete("6693962735681536");
Console.WriteLine(payment);
package main
import (
"fmt"
"github.com/starkbank/sdk-go/starkbank/darfpayment"
)
func main() {
payment, err := darfpayment.Delete("6693962735681536", nil)
if err.Errors != nil {
for _, e := range err.Errors {
fmt.Printf("code: %s, message: %s", e.Code, e.Message)
}
}
fmt.Println(payment)
}
(def payment (starkbank.darf-payment/delete "6693962735681536"))
(println payment)
curl --location --request DELETE '{{baseUrl}}/v2/darf-payment/6693962735681536'
--header 'Access-Id: {{accessId}}'
--header 'Access-Time: {{accessTime}}'
--header 'Access-Signature: {{accessSignature}}'
DarfPayment(
amount=1280,
competence=2023-09-01 02:59:59.999999,
created=2023-09-15 16:22:24.664148,
description=DARF Payment for revenue code 1240,
due=2023-10-01 02:59:59.999999,
fee=0,
fine_amount=12,
id=6693962735681536,
interest_amount=34,
nominal_amount=1234,
reference_number=,
revenue_code=1240,
scheduled=2023-10-15 00:00:00,
status=canceled,
tags=['darf', 'revenue-1240'],
tax_id=012.345.678-90,
transaction_ids=[],
updated=2023-09-15 18:12:10.225810
)
DarfPayment {
id: '6693962735681536',
revenueCode: '1240',
taxId: '012.345.678-90',
competence: '2023-09-01T02:59:59.999999+00:00',
fineAmount: 12,
interestAmount: 34,
due: '2023-10-01T02:59:59.999999+00:00',
description: 'DARF Payment for revenue code 1240',
tags: [ 'darf', 'revenue-1240' ],
scheduled: '2023-10-15T00:00:00+00:00',
status: 'canceled',
amount: 1280,
nominalAmount: 1234,
transactionIds: [],
fee: 0,
updated: '2023-09-15T18:12:10.225810+00:00',
created: '2023-09-15T16:22:24.664148+00:00'
}
StarkBank\DarfPayment Object
(
[id] => 6693962735681536
[revenueCode] => 1240
[taxId] => 012.345.678-90
[competence] => DateTime Object
(
[date] => 2023-09-01 02:59:59.999999
[timezone_type] => 1
[timezone] => +00:00
)
[referenceNumber] =>
[fineAmount] => 12
[interestAmount] => 34
[due] => DateTime Object
(
[date] => 2023-10-01 02:59:59.999999
[timezone_type] => 1
[timezone] => +00:00
)
[description] => DARF Payment for revenue code 1240
[tags] => Array
(
[0] => darf
[1] => revenue-1240
)
[transactionIds] => Array
(
)
[scheduled] => DateTime Object
(
[date] => 2023-10-15 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[status] => canceled
[amount] => 1280
[nominalAmount] => 1234
[fee] => 0
[updated] => DateTime Object
(
[date] => 2023-09-15 18:12:10.225810
[timezone_type] => 1
[timezone] => +00:00
)
[created] => DateTime Object
(
[date] => 2023-09-15 16:22:24.664148
[timezone_type] => 1
[timezone] => +00:00
)
)
DarfPayment({
"description": "DARF Payment for revenue code 1240",
"revenueCode": "1240",
"taxId": "012.345.678-90",
"competence": "2023-09-01T02:59:59.999999+00:00",
"nominalAmount": 1234,
"fineAmount": 12,
"interestAmount": 34,
"due": "2023-10-01T02:59:59.999999+00:00",
"referenceNumber": "",
"scheduled": "2023-10-15T00:00:00+00:00",
"tags": ["darf", "revenue-1240"],
"status": "canceled",
"amount": "1280",
"fee": "0",
"transactionIds": [],
"updated": "2023-09-15T18:12:10.225810+00:00",
"created": "2023-09-15T16:22:24.664148+00:00",
"id": "6693962735681536"
})
darfpayment(
id: 6693962735681536,
revenue_code: 1240,
tax_id: 012.345.678-90,
competence: 2023-09-01T02:59:59+00:00,
fine_amount: 12,
interest_amount: 34,
due: 2023-10-01T02:59:59+00:00,
description: DARF Payment for revenue code 1240,
tags: ['darf', 'revenue-1240'],
transaction_ids: [],
scheduled: 2023-10-15T00:00:00+00:00,
status: canceled,
amount: 1280,
nominal_amount: 1234,
fee: 0,
updated: 2023-09-15T18:12:10+00:00,
created: 2023-09-15T16:22:24+00:00
)
%StarkBank.DarfPayment{
revenue_code: "1240",
tax_id: "012.345.678-90",
competence: ~U[2023-09-01 02:59:59.999999Z],
reference_number: "",
fine_amount: 12,
interest_amount: 34,
due: ~U[2023-10-01 02:59:59.999999Z],
description: "DARF Payment for revenue code 1240",
tags: ["darf", "revenue-1240"],
transaction_ids: [],
scheduled: ~U[2023-10-15 00:00:00Z],
status: "canceled",
amount: 1280,
nominal_amount: 1234,
id: "6693962735681536",
fee: 0,
updated: ~U[2023-09-15 18:12:10.225810Z],
created: ~U[2023-09-15 16:22:24.664148Z]
}
DarfPayment(
RevenueCode: 1240,
TaxID: 012.345.678-90,
Description: DARF Payment for revenue code 1240,
Competence: 01/09/2023 02:59:59,
FineAmount: 12,
InterestAmount: 34,
Due: 01/10/2023 02:59:59,
NominalAmount: 1234,
Tags: { darf, revenue-1240 },
TransactionIds: { },
Amount: 1280,
Fee: 0,
Created: 15/09/2023 16:22:24,
Updated: 15/09/2023 18:12:10,
Scheduled: 15/10/2023 00:00:00,
Status: canceled,
ID: 6693962735681536
)
{
Id:6693962735681536
RevenueCode:1240
TaxId:012.345.678-90
Competence:2023-09-01 02:59:59.999999 +0000 +0000
FineAmount:12
InterestAmount:34
Due:2023-10-01 02:59:59.999999 +0000 +0000
Description:DARF Payment for revenue code 1240
Tags:[darf revenue-1240]
TransactionIds:[]
Scheduled:2023-10-15 00:00:00 +0000 +0000
Status:canceled
Amount:1280
NominalAmount:1234
Fee:0
Updated:2023-09-15 18:12:10.225810 +0000 +0000
Created:2023-09-15 16:22:24.664148 +0000 +0000
}
{:id "6693962735681536",
:revenue-code "1240",
:tax-id "012.345.678-90",
:competence "2023-09-01T02:59:59.999999+00:00",
:fine-amount 12,
:interest-amount 34,
:due "2023-10-01T02:59:59.999999+00:00",
:description "DARF Payment for revenue code 1240",
:tags ["darf" "revenue-1240"],
:scheduled "2023-10-15T00:00:00+00:00",
:status "canceled",
:amount 1280,
:nominal-amount 1234,
:fee 0,
:transaction-ids [],
:updated "2023-09-15T18:12:10.225810+00:00",
:created "2023-09-15T16:22:24.664148+00:00"}
{
"payment": {
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2023-09-15T16:22:24.664148+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 0,
"fineAmount": 12,
"id": "6693962735681536",
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2023-10-15T00:00:00+00:00",
"status": "canceled",
"tags": ["darf", "revenue-1240"],
"taxId": "012.345.678-90",
"transactionIds": [],
"updated": "2023-09-15T18:12:10.225810+00:00"
}
}
After creation, you can use asynchronous Webhooks to monitor status changes of the entity. The Darf Payment will follow the following life cycle:
Every time we change a Darf Payment, we create a Log. Logs are pretty useful for understanding the life cycle of each Darf Payment. Whenever a new Log is created, we will fire a Webhook to your registered URL.
NOTE: Check the Webhook Get Started for more details on how to receive and process Webhook events.
NOTE: A darf-payment subscription is required to receive this event.
{
"event": {
"id": "5258020443389952",
"subscription": "darf-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"darfPayment": {
"id": "6679150966341632",
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "darf-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"darfPayment": {
"id": "6679150966341632",
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "darf-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"darfPayment": {
"id": "6679150966341632",
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "darf-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"darfPayment": {
"id": "6679150966341632",
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "darf-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"darfPayment": {
"id": "6679150966341632",
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "darf-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"darfPayment": {
"id": "6679150966341632",
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "darf-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"darfPayment": {
"id": "6679150966341632",
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "darf-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"darfPayment": {
"id": "6679150966341632",
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "darf-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"darfPayment": {
"id": "6679150966341632",
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}
{
"event": {
"id": "5258020443389952",
"subscription": "darf-payment",
"workspaceId": "6341320293482496",
"created": "2024-02-01T02:06:27.872660+00:00",
"log": {
"id": "4638457385189376",
"type": "success",
"created": "2024-02-01T02:06:26.317809+00:00",
"errors": [],
"darfPayment": {
"id": "6679150966341632",
"amount": 1280,
"competence": "2023-09-01T02:59:59.999999+00:00",
"created": "2024-02-01T02:06:26.294998+00:00",
"description": "DARF Payment for revenue code 1240",
"due": "2023-10-01T02:59:59.999999+00:00",
"fee": 200,
"fineAmount": 12,
"interestAmount": 34,
"nominalAmount": 1234,
"referenceNumber": "",
"revenueCode": "1240",
"scheduled": "2024-02-02T10:00:00+00:00",
"status": "success",
"tags": [
"order/123",
"customer/456"
],
"taxId": "012.345.678-90",
"transactionIds": ["5991715760504832"],
"updated": "2024-02-01T02:06:26.317865+00:00"
}
}
}
}