Overview

Setup

Tax Payment

Tax Payment Overview

The Tax Payment Object

Creating Tax Payments

Creating Tax Payments with scheduled, tags parameters

Listing Tax Payments

Getting a Tax Payment

Canceling Tax Payment

Receiving Tax Payment Webhook

Darf Payment

Darf Payment Overview

The Darf Payment Object

Creating Darf Payments

Creating Darf Payments with scheduled, tags parameters

Listing Darf Payments

Getting a Darf Payment

Canceling Darf Payment

Receiving Darf Payment Webhook

Tax Payment

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.

RESOURCE SUMMARY
Pay taxes with bar codes using your Stark Bank balance
Pay federal taxes without bar codes (DARFs) using your Stark Bank balance

Setup

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 Overview

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.

The Tax Payment Status

Each Tax Payment has a status that can change over time according to its life cycle:

tax-payment-status

StatusDescription
CreatedThe Tax Payment was successfully created in Stark Bank.
ProcessingThe Tax Payment is being processed by Stark Bank.
SuccessThe Tax Payment was successfully completed.
FailedThe Tax Payment was unsuccessful.
CanceledThe Tax Payment was canceled before processing.

The Tax Payment Logs

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:

tax-payment-log

Log typeStatusDescription
CreatedCreatedThe Tax Payment was successfully created in Stark Bank.
ProcessingProcessingThe Tax Payment is being processed.
SuccessSuccessThe Tax Payment was successfully completed.
FailedFailedThe Tax Payment was unsuccessful.
CancelingProcessingThe Tax Payment cancellation is being processed.
CanceledCanceledThe Tax Payment was canceled before processing.

The Tax Payment Object

Attributes

id STRING

Unique id for the tax payment.

amount INTEGER

Amount automatically calculated from the barCode. Example: 500365 (R$5,003.65).

barCode STRING

Tax barCode. Example: "81660000005003657010074119002551100010601813".

created STRING

Creation datetime. Example: "2020-04-18T16:22:24.664148+00:00".

description STRING

Text to be displayed in your statement. Example: "fix the road".

fee INTEGER

Fee charged in cents.

line STRING

Tax payment line (digits only). Example: "81660000005 0036570100 74119002551 10001060181".

scheduled STRING

Scheduled date or datetime for the payment. Example: "2020-04-20" or "2020-04-20T15:23:26+00:00".

status STRING

Current payment status. Options: "created", "processing", "success", "failed", "canceled".

tags LIST OF STRINGS

Tags associated with the tax payment.

transactionIds LIST OF STRINGS

Ledger transaction IDs linked to the tax payment.

type STRING

Tax type. Example: "iss", "das".

updated STRING

Last update datetime. Example: "2020-04-18T16:22:24.664148+00:00".

Creating Tax Payments

To create a Tax Payment, fill in the mandatory parameters: barCode (or line) and description.

The amount is automatically calculated from the barCode.

Python

import starkbank

payments = starkbank.taxpayment.create([
    starkbank.TaxPayment(
        bar_code="81660000005003657010074119002551100010601813",
        description="fix the road"
    )
])

for payment in payments:
    print(payment)
    

Javascript

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);
    }
})();
    

PHP

$payments = StarkBank\TaxPayment::create([
    new StarkBank\TaxPayment([
        "barCode" => "81660000005003657010074119002551100010601813",
        "description" => "fix the road"
    ])
]);

foreach($payments as $payment){
    print_r($payment);
}
    

Java

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);
}
    

Ruby

require('starkbank')

payments = StarkBank::TaxPayment.create(
    [
        StarkBank::TaxPayment.new(
            bar_code: '81660000005003657010074119002551100010601813',
            description: 'fix the road'
        )
    ]
)

payments.each do |payment|
    puts payment
end
    

Elixir

payments = StarkBank.TaxPayment.create!([
    %StarkBank.TaxPayment{
        bar_code: "81660000005003657010074119002551100010601813",
        description: "fix the road"
    }
])

for payment <- payments do
    payment |> IO.inspect
end
    

C#

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);
}
    

Go

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)
    }
}
    

Clojure

(def payments
  (starkbank.tax-payment/create
    [
      {
        :bar-code "81660000005003657010074119002551100010601813"
        :description "fix the road"
      }
    ]))
(dorun (map println payments))
    

Curl

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"
        }
    ]
}'
    
RESPONSE

Python

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
)
    

Javascript

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'
}
    

PHP

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
        )

)
    

Java

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"
})
    

Ruby

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
)
    

Elixir

%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]
}
    

C#

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
)
    

Go

{
    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
}
    

Clojure

{: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"}
    

Curl

{
    "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"
        }
    ]
}
    

Creating Tax Payments with scheduled, tags parameters

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"]

Python

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)
    

Javascript

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);
    }
})();
    

PHP

$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);
}
    

Java

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);
}
    

Ruby

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
    

Elixir

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
    

C#

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);
}
    

Go

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)
    }
}
    

Clojure

(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

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"]
        }
    ]
}'
    
RESPONSE

Python

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
)
    

Javascript

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'
}
    

PHP

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
        )

)
    

Java

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"
})
    

Ruby

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
)
    

Elixir

%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]
}
    

C#

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
)
    

Go

{
    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
}
    

Clojure

{: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"}
    

Curl

{
    "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"
        }
    ]
}
    

Listing Tax Payments

Get a list of Tax Payments using filters such as after, before, status and tags to narrow the results.

Python

import starkbank

payments = starkbank.taxpayment.query(
    after="2020-04-01",
    before="2020-04-30",
)

for payment in payments:
    print(payment)
    

Javascript

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);
    }
})();
    

PHP

$payments = StarkBank\TaxPayment::query([
    "after" => "2020-04-01",
    "before" => "2020-04-30"
]);

foreach($payments as $payment){
    print_r($payment);
}
    

Java

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);
}
    

Ruby

require('starkbank')

payments = StarkBank::TaxPayment.query(
    after: '2020-04-01',
    before: '2020-04-30'
)

payments.each do |payment|
    puts payment
end
    

Elixir

payments = StarkBank.TaxPayment.query!(
    after: "2020-04-01",
    before: "2020-04-30"
)

for payment <- payments do
    payment |> IO.inspect
end
    

C#

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);
}
    

Go

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)
        }
    }
}
    

Clojure

(def payments
    (starkbank.tax-payment/query
    {
        :after "2020-04-01"
        :before "2020-04-30"
    }))

(dorun (map println payments))
    

Curl

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}}'
    
RESPONSE

Python

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
)
    

Javascript

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'
}
    

PHP

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
        )

)
    

Java

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"
})
    

Ruby

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
)
    

Elixir

%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]
}
    

C#

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
)
    

Go

{
    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
}
    

Clojure

{: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"}
    

Curl

{
    "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"
        }
    ]
}
    

Getting a Tax Payment

Get a single Tax Payment by its id.

You can use it to check the current status of a Tax Payment.

Python

import starkbank

payment = starkbank.taxpayment.get("5950134772826112")

print(payment)
    

Javascript

const starkbank = require('starkbank');

(async() => {
    let payment = await starkbank.taxPayment.get('5950134772826112');
    console.log(payment);
})();
    

PHP

$payment = StarkBank\TaxPayment::get("5950134772826112");

print_r($payment);
    

Java

import com.starkbank.*;

TaxPayment payment = TaxPayment.get("5950134772826112");

System.out.println(payment);
    

Ruby

require('starkbank')

payment = StarkBank::TaxPayment.get('5950134772826112')

puts payment
    

Elixir

payment = StarkBank.TaxPayment.get!("5950134772826112")

payment |> IO.inspect
    

C#

using System;

StarkBank.TaxPayment payment = StarkBank.TaxPayment.Get("5950134772826112");

Console.WriteLine(payment);
    

Go

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)
}
    

Clojure

(def payment (starkbank.tax-payment/get "5950134772826112"))

(println payment)
    

Curl

curl --location --request GET '{{baseUrl}}/v2/tax-payment/5950134772826112' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
    
RESPONSE

Python

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
)
    

Javascript

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'
}
    

PHP

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
        )

)
    

Java

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"
})
    

Ruby

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
)
    

Elixir

%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]
}
    

C#

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
)
    

Go

{
    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
}
    

Clojure

{: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"}
    

Curl

{
    "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"
    }
}
    

Canceling Tax Payment

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.

Python

import starkbank

payment = starkbank.taxpayment.delete("6693962735681536")

print(payment)
    

Javascript

const starkbank = require('starkbank');

(async() => {
    let payment = await starkbank.taxPayment.delete('6693962735681536');
    console.log(payment);
})();
    

PHP

$payment = StarkBank\TaxPayment::delete("6693962735681536");

print_r($payment);
    

Java

import com.starkbank.*;

TaxPayment payment = TaxPayment.delete("6693962735681536");

System.out.println(payment);
    

Ruby

require('starkbank')

payment = StarkBank::TaxPayment.delete('6693962735681536')

puts payment
    

Elixir

payment = StarkBank.TaxPayment.delete!("6693962735681536")

payment |> IO.inspect
    

C#

using System;

StarkBank.TaxPayment payment = StarkBank.TaxPayment.Delete("6693962735681536");

Console.WriteLine(payment);
    

Go

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)
}
    

Clojure

(def payment (starkbank.tax-payment/delete "6693962735681536"))

(println payment)
    

Curl

curl --location --request DELETE '{{baseUrl}}/v2/tax-payment/6693962735681536' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
    
RESPONSE

Python

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
)
    

Javascript

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'
}
    

PHP

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
        )

)
    

Java

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"
})
    

Ruby

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
)
    

Elixir

%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]
}
    

C#

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
)
    

Go

{
    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
}
    

Clojure

{: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"}
    

Curl

{
    "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"
    }
}
    

Receiving Tax Payment Webhook

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.

RESPONSE

Python

{
  "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"
      }
    }
  }
}
        

Javascript

{
  "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"
      }
    }
  }
}
        

PHP

{
  "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"
      }
    }
  }
}
        

Java

{
  "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"
      }
    }
  }
}
        

Ruby

{
  "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"
      }
    }
  }
}
        

Elixir

{
  "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"
      }
    }
  }
}
        

C#

{
  "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"
      }
    }
  }
}
        

Go

{
  "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"
      }
    }
  }
}
        

Clojure

{
  "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"
      }
    }
  }
}
        

Curl

{
  "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 Overview

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.

The Darf Payment Status

Each Darf Payment has a status that can change over time according to its life cycle:

darf-payment-status

StatusDescription
CreatedThe Darf Payment was successfully created in Stark Bank.
ProcessingThe Darf Payment is being processed by Stark Bank.
SuccessThe Darf Payment was successfully completed.
FailedThe Darf Payment was unsuccessful.
CanceledThe Darf Payment was canceled before processing.

The Darf Payment Logs

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:

darf-payment-log

Log typeStatusDescription
CreatedCreatedThe Darf Payment was successfully created in Stark Bank.
ProcessingProcessingThe Darf Payment is being processed.
SuccessSuccessThe Darf Payment was successfully completed.
FailedFailedThe Darf Payment was unsuccessful.
CancelingProcessingThe Darf Payment cancellation is being processed.
CanceledCanceledThe Darf Payment was canceled before processing.

The Darf Payment Object

Attributes

id STRING

Unique id for the DARF payment.

amount INTEGER

Total payment amount in cents (nominalAmount + fineAmount + interestAmount).

competence STRING

Competence month of the service. Example: "2020-03-10".

created STRING

Creation datetime. Example: "2020-04-23T23:00:00.000000+00:00".

description STRING

Text displayed in the bank statement.

due STRING

Due date for payment. Example: "2020-03-10".

fee INTEGER

Fee charged in cents.

fineAmount INTEGER

Fixed fine amount in cents.

interestAmount INTEGER

Interest amount in cents.

nominalAmount INTEGER

Amount due in cents without fee or interest.

referenceNumber STRING

Number assigned to the region of the tax.

revenueCode STRING

4-digit tax code assigned by Federal Revenue. Example: "5948".

scheduled STRING

Scheduled payment date. Example: "2020-04-23".

status STRING

Current payment status. Options: "created", "processing", "success", "failed", "canceled".

tags LIST OF STRINGS

Tags associated with the DARF payment.

taxId STRING

Payer CPF or CNPJ.

transactionIds LIST OF STRINGS

Ledger transaction IDs linked to the payment.

updated STRING

Last update datetime. Example: "2020-04-23T23:00:00.000000+00:00".

Creating Darf Payments

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.

Python

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)
    

Javascript

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);
    }
})();
    

PHP

$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);
}
    

Java

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);
}
    

Ruby

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
    

Elixir

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
    

C#

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);
}
    

Go

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)
    }
}
    

Clojure

(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

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"
        }
    ]
}'
    
RESPONSE

Python

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
)
    

Javascript

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'
}
    

PHP

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
        )

)
    

Java

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"
})
    

Ruby

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
)
    

Elixir

%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]
}
    

C#

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
)
    

Go

{
    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
}
    

Clojure

{: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"}
    

Curl

{
    "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"
        }
    ]
}
    

Creating Darf Payments with scheduled, tags parameters

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"

Python

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)
    

Javascript

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);
    }
})();
    

PHP

$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);
}
    

Java

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);
}
    

Ruby

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
    

Elixir

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
    

C#

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);
}
    

Go

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)
    }
}
    

Clojure

(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

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"]
        }
    ]
}'
    
RESPONSE

Python

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
)
    

Javascript

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'
}
    

PHP

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
        )

)
    

Java

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"
})
    

Ruby

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
)
    

Elixir

%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]
}
    

C#

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
)
    

Go

{
    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
}
    

Clojure

{: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"}
    

Curl

{
    "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"
        }
    ]
}
    

Listing Darf Payments

Get a list of Darf Payments using filters such as after, before, status and tags to narrow the results.

Python

import starkbank

payments = starkbank.darfpayment.query(
    after="2023-09-01",
    before="2023-09-30",
)

for payment in payments:
    print(payment)
    

Javascript

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);
    }
})();
    

PHP

$payments = StarkBank\DarfPayment::query([
    "after" => "2023-09-01",
    "before" => "2023-09-30"
]);

foreach($payments as $payment){
    print_r($payment);
}
    

Java

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);
}
    

Ruby

require('starkbank')

payments = StarkBank::DarfPayment.query(
    after: '2023-09-01',
    before: '2023-09-30'
)

payments.each do |payment|
    puts payment
end
    

Elixir

payments = StarkBank.DarfPayment.query!(
    after: "2023-09-01",
    before: "2023-09-30"
)

for payment <- payments do
    payment |> IO.inspect
end
    

C#

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);
}
    

Go

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)
        }
    }
}
    

Clojure

(def payments
    (starkbank.darf-payment/query
    {
        :after "2023-09-01"
        :before "2023-09-30"
    }))

(dorun (map println payments))
    

Curl

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}}'
    
RESPONSE

Python

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
)
    

Javascript

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'
}
    

PHP

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
        )

)
    

Java

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"
})
    

Ruby

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
)
    

Elixir

%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]
}
    

C#

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
)
    

Go

{
    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
}
    

Clojure

{: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"}
    

Curl

{
    "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"
        }
    ]
}
    

Getting a Darf Payment

Get a single Darf Payment by its id.

You can use it to check the current status of a Darf Payment.

Python

import starkbank

payment = starkbank.darfpayment.get("5950134772826112")

print(payment)
    

Javascript

const starkbank = require('starkbank');

(async() => {
    let payment = await starkbank.darfPayment.get('5950134772826112');
    console.log(payment);
})();
    

PHP

$payment = StarkBank\DarfPayment::get("5950134772826112");

print_r($payment);
    

Java

import com.starkbank.*;

DarfPayment payment = DarfPayment.get("5950134772826112");

System.out.println(payment);
    

Ruby

require('starkbank')

payment = StarkBank::DarfPayment.get('5950134772826112')

puts payment
    

Elixir

payment = StarkBank.DarfPayment.get!("5950134772826112")

payment |> IO.inspect
    

C#

using System;

StarkBank.DarfPayment payment = StarkBank.DarfPayment.Get("5950134772826112");

Console.WriteLine(payment);
    

Go

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)
}
    

Clojure

(def payment (starkbank.darf-payment/get "5950134772826112"))

(println payment)
    

Curl

curl --location --request GET '{{baseUrl}}/v2/darf-payment/5950134772826112' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
    
RESPONSE

Python

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
)
    

Javascript

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'
}
    

PHP

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
        )

)
    

Java

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"
})
    

Ruby

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
)
    

Elixir

%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]
}
    

C#

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
)
    

Go

{
    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
}
    

Clojure

{: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"}
    

Curl

{
    "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"
    }
}
    

Canceling Darf Payment

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.

Python

import starkbank

payment = starkbank.darfpayment.delete("6693962735681536")

print(payment)
    

Javascript

const starkbank = require('starkbank');

(async() => {
    let payment = await starkbank.darfPayment.delete('6693962735681536');
    console.log(payment);
})();
    

PHP

$payment = StarkBank\DarfPayment::delete("6693962735681536");

print_r($payment);
    

Java

import com.starkbank.*;

DarfPayment payment = DarfPayment.delete("6693962735681536");

System.out.println(payment);
    

Ruby

require('starkbank')

payment = StarkBank::DarfPayment.delete('6693962735681536')

puts payment
    

Elixir

payment = StarkBank.DarfPayment.delete!("6693962735681536")

payment |> IO.inspect
    

C#

using System;

StarkBank.DarfPayment payment = StarkBank.DarfPayment.Delete("6693962735681536");

Console.WriteLine(payment);
    

Go

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)
}
    

Clojure

(def payment (starkbank.darf-payment/delete "6693962735681536"))

(println payment)
    

Curl

curl --location --request DELETE '{{baseUrl}}/v2/darf-payment/6693962735681536' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
    
RESPONSE

Python

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
)
    

Javascript

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'
}
    

PHP

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
        )

)
    

Java

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"
})
    

Ruby

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
)
    

Elixir

%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]
}
    

C#

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
)
    

Go

{
    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
}
    

Clojure

{: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"}
    

Curl

{
    "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"
    }
}
    

Receiving Darf Payment Webhook

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.

RESPONSE

Python

{
  "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"
      }
    }
  }
}
        

Javascript

{
  "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"
      }
    }
  }
}
        

PHP

{
  "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"
      }
    }
  }
}
        

Java

{
  "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"
      }
    }
  }
}
        

Ruby

{
  "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"
      }
    }
  }
}
        

Elixir

{
  "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"
      }
    }
  }
}
        

C#

{
  "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"
      }
    }
  }
}
        

Go

{
  "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"
      }
    }
  }
}
        

Clojure

{
  "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"
      }
    }
  }
}
        

Curl

{
  "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"
      }
    }
  }
}