This is our second API version. It is another small step towards launching the product we want to create for you, but it's a giant leap for the brazilian financial market. We created the first banking API in Brazil and we are proud of it.
Our API is RESTFul. This means we use predictable, resource-oriented URLs to do banking operations. The API itself speaks exclusively in JSON, including errors, but our SDK libraries convert responses to appropriate language-specific objects.
Want to check our OpenAPI 3.0 specification? You can download our yaml file right here.
Take a look at our Postman collection:
pip install starkbank
npm install starkbank
composer require starkbank/sdk
compile "com.starkbank:sdk:{latest-version}"
gem install starkbank
{:starkbank, "~> {latest-version}"}
Install-Package starkbank
go get -u github.com/starkbank/sdk-go
[starkbank/sdk "{latest-version}"]
If you have any questions about our API or
SDKs, feel free to email us.
In order to send any request to Stark Bank, you first need to create a digital account with us. We call our accounts workspaces. Feel free to test our services in Sandbox by creating your workspace here (no need to contact us):
Sandbox and Production share the same code but are isolated from each other
as they are running in separate servers and access different databases.
Switching to Production requires you to change the base url and the credentials only.
The SDKs
select the base url according to the environment you choose.
We avoid breaking changes at all costs and we won't let your application stop working because of a change we made.
We are always adding features and making improvements to our API, but whenever we make a significant change to an endpoint, we will launch a new API version.
Also, whenever the API is upgraded, we will add a new log to our changelog
We don't use any static strings such as API KEYS and ACCESS TOKENS to connect to our API. Those methods are easy to use, but make it easier for people to steal from your bank account. To make your account as safe as possible, we use the Elliptic Curve Digital Signature Algorithm (ECDSA) Private/Public key pairs (see image to the right) with SECP256k1 curve and SHA256 digest.
To ensure the integrity and safety of our requests to your services, we recommend adding our static IP addresses to your firewall ingress rules. The following IP addresses are currently being used:
There are two types of user that you might need to create API integrations:
Step 1 - Create your private and public keys
To generate a new key pair, follow this tutorial.
Step 2 - Register your credentials
To register your credentials, first log into your Sandbox Web Banking or Production Web Banking:
2.1 - For Projects, follow these steps:
2.2 - For an Organization, follow these steps:
NOTE: You must always keep your private key safe and sound. Never share it with anyone, not even with us. Also, you also should never hard-code it. Prefer saving it as an environment variable or in an encrypted database, for example.
import starkbank # This is only an example of a private key content. You should use your own key. private_key_content = """ -----BEGIN EC PARAMETERS----- BgUrgQQACg== -----END EC PARAMETERS----- -----BEGIN EC PRIVATE KEY----- MHQCAQEEIMCwW74H6egQkTiz87WDvLNm7fK/cA+ctA2vg/bbHx3woAcGBSuBBAAK oUQDQgAE0iaeEHEgr3oTbCfh8U2L+r7zoaeOX964xaAnND5jATGpD/tHec6Oe9U1 IF16ZoTVt1FzZ8WkYQ3XomRD4HS13A== -----END EC PRIVATE KEY----- """ # for project users: user = starkbank.Project( environment="sandbox", id="5656565656565656", private_key=private_key_content ) # or, for organization users: user = starkbank.Organization( environment="sandbox", id="4545454545454545", private_key=private_key_content ) starkbank.user = user
const starkbank = require('starkbank'); // This is only an example of a private key content. You should use your own key. let privateKeyContent = ` -----BEGIN EC PARAMETERS----- BgUrgQQACg== -----END EC PARAMETERS----- -----BEGIN EC PRIVATE KEY----- MHQCAQEEIMCwW74H6egQkTiz87WDvLNm7fK/cA+ctA2vg/bbHx3woAcGBSuBBAAK oUQDQgAE0iaeEHEgr3oTbCfh8U2L+r7zoaeOX964xaAnND5jATGpD/tHec6Oe9U1 IF16ZoTVt1FzZ8WkYQ3XomRD4HS13A== -----END EC PRIVATE KEY----- ` // for project users: let user = new starkbank.Project({ environment: 'sandbox', id: '5656565656565656', privateKey: privateKeyContent }); // or, for organization users: let user = new starkbank.Organization({ environment: 'sandbox', id: '4545454545454545', privateKey: privateKeyContent }); starkbank.user = user;
use StarkBank\Project; use StarkBank\Organization; use StarkBank\Settings; // This is only an example of a private key content. You should use your own key. $privateKeyContent = " -----BEGIN EC PARAMETERS----- BgUrgQQACg== -----END EC PARAMETERS----- -----BEGIN EC PRIVATE KEY----- MHQCAQEEIMCwW74H6egQkTiz87WDvLNm7fK/cA+ctA2vg/bbHx3woAcGBSuBBAAK oUQDQgAE0iaeEHEgr3oTbCfh8U2L+r7zoaeOX964xaAnND5jATGpD/tHec6Oe9U1 IF16ZoTVt1FzZ8WkYQ3XomRD4HS13A== -----END EC PRIVATE KEY----- "; // for project users: $user = new Project([ "environment" => "sandbox", "id" => "5656565656565656", "privateKey" => $privateKeyContent ]); // or, for organization users: $user = new Organization([ "environment" => "sandbox", "id" => "4545454545454545", "privateKey" => $privateKeyContent ]); Settings::setUser($user);
import com.starkbank.*; // This is only an example of a private key content. You should use your own key. String privateKeyContent = """ -----BEGIN EC PARAMETERS----- BgUrgQQACg== -----END EC PARAMETERS----- -----BEGIN EC PRIVATE KEY----- MHQCAQEEIMCwW74H6egQkTiz87WDvLNm7fK/cA+ctA2vg/bbHx3woAcGBSuBBAAK oUQDQgAE0iaeEHEgr3oTbCfh8U2L+r7zoaeOX964xaAnND5jATGpD/tHec6Oe9U1 IF16ZoTVt1FzZ8WkYQ3XomRD4HS13A== -----END EC PRIVATE KEY----- """; // for project users: Project user = new Project( "sandbox", "5656565656565656", privateKeyContent ); // or, for organization users: Organization user = new Organization( "sandbox", "4545454545454545", privateKeyContent ); Settings.user = user;
require('starkbank') # This is only an example of a private key content. You should use your own key. private_key_content = ' -----BEGIN EC PARAMETERS----- BgUrgQQACg== -----END EC PARAMETERS----- -----BEGIN EC PRIVATE KEY----- MHQCAQEEIMCwW74H6egQkTiz87WDvLNm7fK/cA+ctA2vg/bbHx3woAcGBSuBBAAK oUQDQgAE0iaeEHEgr3oTbCfh8U2L+r7zoaeOX964xaAnND5jATGpD/tHec6Oe9U1 IF16ZoTVt1FzZ8WkYQ3XomRD4HS13A== -----END EC PRIVATE KEY----- ' # for project: user = StarkBank::Project.new( environment: 'sandbox', id: '5656565656565656', private_key: private_key_content ) # or, for organization users: user = StarkBank::Organization.new( environment: 'sandbox', id: '4545454545454545', private_key: private_key_content ) StarkBank.user = user
# file config/config.exs import Config # This is only an example of a private key content. You should use your own key. private_key_content = " -----BEGIN EC PARAMETERS----- BgUrgQQACg== -----END EC PARAMETERS----- -----BEGIN EC PRIVATE KEY----- MHQCAQEEIMCwW74H6egQkTiz87WDvLNm7fK/cA+ctA2vg/bbHx3woAcGBSuBBAAK oUQDQgAE0iaeEHEgr3oTbCfh8U2L+r7zoaeOX964xaAnND5jATGpD/tHec6Oe9U1 IF16ZoTVt1FzZ8WkYQ3XomRD4HS13A== -----END EC PRIVATE KEY----- " # for project users: config :starkbank, project: [ environment: :sandbox, id: "5656565656565656", private_key: private_key_content ] # or, for organization users: config :starkbank, organization: [ environment: :sandbox, id: "4545454545454545", private_key: private_key_content ]
// This is only an example of a private key content. You should use your own key. string privateKeyContent = "-----BEGIN EC PARAMETERS----- BgUrgQQACg== -----END EC PARAMETERS----- -----BEGIN EC PRIVATE KEY----- MHQCAQEEIMCwW74H6egQkTiz87WDvLNm7fK/cA+ctA2vg/bbHx3woAcGBSuBBAAK oUQDQgAE0iaeEHEgr3oTbCfh8U2L+r7zoaeOX964xaAnND5jATGpD/tHec6Oe9U1 IF16ZoTVt1FzZ8WkYQ3XomRD4HS13A== -----END EC PRIVATE KEY-----"; // for project users: StarkBank.Project user = new StarkBank.Project( environment: "sandbox", id: "5656565656565656", privateKey: privateKeyContent ); // or, for organization users: StarkBank.Organization user = new StarkBank.Organization( environment: "sandbox", id: "4545454545454545", privateKey: privateKeyContent ); StarkBank.Settings.User = user;
import ( "github.com/starkbank/core-go/starkcore/user/project" "github.com/starkbank/core-go/starkcore/user/organization" "github.com/starkbank/sdk-go/starkbank" ) // This is only an example of a private key content. You should use your own key. var privateKeyContent = "-----BEGIN EC PRIVATE KEY----- MHQCAQEEILChZrjrrtFnyCLhcxm/hp+9ljWSmG7Wv9HRugf+FnhkoAcGBSuBBAAK oUQDQgAEpIAM/tMqXEfLeR93rRHiFcpDB9I18MrnCJyTVk0MdD1J9wgEbRfvAZEL YcEGhTFYp2X3B7K7c4gDDCr0Pu1L3A== -----END EC PRIVATE KEY-----" // for project: var user = project.Project{ Id: "5656565656565656", PrivateKey: privateKeyContent, Environment: "sandbox", } // or, for organization users: var user = organization.Organization{ Id: "4545454545454545", PrivateKey: privateKeyContent, Environment: "sandbox", } starkbank.User = user
(ns my-lib.core (:use starkbank.core)) ; This is only an example of a private key content. You should use your own key. (def private-key-content "-----BEGIN EC PARAMETERS----- BgUrgQQACg== -----END EC PARAMETERS----- -----BEGIN EC PRIVATE KEY----- MHQCAQEEIMCwW74H6egQkTiz87WDvLNm7fK/cA+ctA2vg/bbHx3woAcGBSuBBAAK oUQDQgAE0iaeEHEgr3oTbCfh8U2L+r7zoaeOX964xaAnND5jATGpD/tHec6Oe9U1 IF16ZoTVt1FzZ8WkYQ3XomRD4HS13A== -----END EC PRIVATE KEY-----") ; for project users: (def user (starkbank.user/project "sandbox" "5656565656565656" private-key-content)) ; or, for organization users: (def user (starkbank.user/organization "sandbox" "4545454545454545" private-key-content)) (starkbank.settings/user user)
--header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Just in case your are unable to use our SDKs, in every request we pass three custom headers: Access-Id, Access-Time and Access-Signature. Here is a pseudo-code explaining how to make authenticated requests:
# Set your user Id accessId = "project/12345" accessId = "organization/12345" accessId = "organization/12345/workspace/67890" # Get current Unix Time accessTime = 1584041509 # Get you json content in string format for POST/PUT/PATCH requests # or empty string for GET/DELETE requests. bodyString = "" # Build the message in this format: message = accessId + ":" + accessTime + ":" + bodyString # Load your private key from its pem string privateKey = PrivateKey.fromPem(...) # Use ECDSA to sign the message signature = ECDSA.sign(message, privateKey) # Convert the signature to base 64 accessSignature = signature.toBase64() # You are now ready to send the request request = Request.get( url="https://sandbox.api.starkbank.com/v2/transfer", body=bodyString, headers={ "Access-Id" : accessId, "Access-Time" : accessTime, "Access-Signature": accessSignature } )
We like standards. Unfortunately, not all of our possible errors could fit in the HTTP status standard. Since we believe numbers are not descriptive enough, we prefer to use strings as error codes. In order to be compatible with request libraries, though, we use the HTTP status in the summary shown to the right.
{ "errors": [ { "code": "invalidEmail", "message": "Your email address should look like "person@domain.com"." }, { "code": "invalidName", "message": "Your name must have at least 6 characters." }, ] }
Our API returns messages in two different languages: US English (default language) and Brazilian Portuguese. To select one of them, just add the optional header key Accept-Language to your request with "en-US" or "pt-BR" as value. If you use anything else, messages will be returned in english.
We use query cursors to do pagination. They allow you to retrieve query results in manageable batches, and are recommended over using integer offsets for pagination.
Therefore, we return a cursor string in the GET results. You must send the cursor back in the following query string in order to get the results from the next page. The cursor will be null if there are no more results to be retrieved.
To the right you will find a pseudo-code showing how to handle cursors in our API.
Note: All paged lists have at most 100 objects. Above that, you should use query cursors to get more elements. Our SDKs will handle this for you, though, so you don't have to worry about cursors and batches when using them.
path = "https://sandbox.api.starkbank.com/v2/transfer" response = requests.get(path) transferList = response["transfers"] cursor = response["cursor"] print(cursor) # CkYKFAoHY3JlYXRlZBIJCMWGnoWVoukCEipqE2l-YXBpLW1zLWNoYXJnZS1zYnhyEwsSBkNoYXJnZRiAgICC28rtCAwYACAB nextResponse = request.get(path + "?cursor=" + cursor) transferList += nextResponse["transfers"] nextCursor = nextResponse["cursor"] ...
All dates returned by our API will be in UTC ISO format. That means no matter where you are, you will always receive UTC times and should handle conversions to local time on your end whenever needed.
Workspaces are bank accounts. They have independent balances, statements, operations and permissions. The only property that is shared between your workspaces is the link they have to your organization, which carries your basic information, such as tax ID, name, etc...
Here you can create a brand new Workspace.
username
name
allowedTaxIds
import starkbank workspace = starkbank.workspace.create( username="iron-bank-123", name="Iron Bank #123" ) print(workspace)
const starkbank = require('starkbank'); (async() => { let workspace = await starkbank.workspace.create({ username: 'iron-bank-123', name: 'Iron Bank #123' }); console.log(workspace); })();
$workspace = StarkBank\Workspace::create([ "username" => "iron-bank-123", "name" => "Iron Bank #123" ]); print_r($workspace);
import com.starkbank.*; import java.util.HashMap; HashMap<String, Object> data = new HashMap<>(); data.put("username", "my-workspace"); data.put("name", "Iron Bank #123"); Workspace workspace = Workspace.create(data); System.out.println(workspace);
require('starkbank') workspace = StarkBank::Workspace.create( username: 'iron-bank-123', name: 'Iron Bank #123' ) puts workspace
workspace = StarkBank.Workspace.create!( username: "iron-bank-123", name: "Iron Bank #123" ) workspace |> IO.inspect
using System; StarkBank.Workspace workspace = StarkBank.Workspace.Create( username: "iron-bank-123", name: "Iron Bank #123" );
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/workspace" ) func main() { workspace, err := workspace.Create( workspace.Workspace{ Username: "iron-bank-123", Name: "Iron Bank #123", }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", workspace) }
(def workspace (starkbank.workspace/create { :username "iron-bank-123" :name "Iron Bank #123" })) (dorun (map println workspace))
curl --location --request POST '{{baseUrl}}/v2/workspace' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "username": "iron-bank-123", "name": "Iron Bank #123" }'
Workspace( id=6225875037061120, username=iron-bank-123, name=Iron Bank #123, allowed_tax_ids=[], status=active, organization_id=5656565656565656, picture_url=https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, created=2020-04-23 23:00:00.000000 )
Workspace { id: '6225875037061120', username: 'iron-bank-123', name: 'Iron Bank #123', allowedTaxIds: [] status: 'active', organizationId: '5656565656565656', pictureUrl: 'https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348', created: '2020-04-23T23:00:00.000000+00:00' }
StarkBank\Workspace Object ( [id] => 6225875037061120 [username] => iron-bank-123 [name] => Iron Bank #123 [allowedTaxIds] => Array ( ) [status] => active [organizationId] => 5656565656565656 [pictureUrl] => https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348 [created] => DateTime Object ( [date] => 2020-04-23 23:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) )
Workspace({ "id": "6225875037061120", "username": "iron-bank-123", "name": "Iron Bank #123", "allowedTaxIds": [], "status": "active", "organizationId": "5656565656565656", "pictureUrl": "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", "created": "2020-04-23T23:00:00+00:00" })
workspace( id: 6225875037061120, username: iron-bank-123, name: Iron Bank #123, allowed_tax_ids: [], status: active, organization_id: 5656565656565656, picture_url: https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, created: 2020-04-23T23:00:00+00:00 )
%StarkBank.Workspace{ id: "6225875037061120", username: "iron-bank-123", name: "Iron Bank #123", allowed_tax_ids: [], status: "active", organization_id: "5656565656565656", picture_url: "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", created: ~U[2020-04-23 23:00:00.000000Z] }
Workspace( Username: iron-bank-123, Name: Iron Bank #123, ID: 6225875037061120, AllowedTaxIds: { }, Status: active, OrganizationId: 5656565656565656, PictureUrl: https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, Created: 04/23/2020 23:00:00 )
{ Id:6225875037061120 Username:iron-bank-123 Name:Iron Bank #123 AllowedTaxIds:[] Status:active OrganizationId:5656565656565656 PictureUrl:https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348 Created:2020-04-23 23:00:00.000000 +0000 +0000 }
{:id "6225875037061120", :username "iron-bank-123", :name "Iron Bank #123"}
{ "message": "Workspace successfully created", "workspace": { "id": "6225875037061120", "username": "iron-bank-123", "name": "Iron Bank #123", "allowedTaxIds": [] "status": "active", "organizationId": "5656565656565656", "pictureUrl": "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", "created": "2020-04-23T23:00:00.000000+00:00" } }
Get a list of Workspaces your credentials have access to in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
username
ids
fields
import starkbank workspaces = starkbank.workspace.query() for workspace in workspaces: print(workspace)
const starkbank = require('starkbank'); (async() => { let workspaces = await starkbank.workspace.query(); for await (let workspace of workspaces) { console.log(workspace); } })();
workspaces = StarkBank\Workspace::query(); foreach($workspaces as $workspace){ print_r($workspace); }
import com.starkbank.*; import com.starkbank.utils.Generator; Generator<Workspace> workspaces = Workspace.query(); for (Workspace workspace : workspaces){ System.out.println(workspace); }
require('starkbank') workspaces = StarkBank::Workspace.query() workspaces.each do |workspace| puts workspace end
workspaces = StarkBank.Workspace.query!() for workspace <- workspaces do workspace |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.Workspace> workspaces = StarkBank.Workspace.Query(); foreach(StarkBank.Workspace workspace in workspaces) { Console.WriteLine(workspace); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/workspace" ) func main() { workspaces := workspace.Query(nil, nil) for workspace := range workspaces { fmt.Printf("%+v", workspace) } }
def workspaces (starkbank.workspace/query)) (dorun (map println workspaces))
curl --location --request GET '{{baseUrl}}/v2/workspace' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Workspace( id=6225875037061120, username=iron-bank-123, name=Iron Bank #123, allowed_tax_ids=[], status=active, organization_id=5656565656565656 picture_url=https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, created=2020-04-23 23:00:00.000000, )
Workspace { id: '6225875037061120', username: 'iron-bank-123', name: 'Iron Bank #123', allowedTaxIds: [] status: 'active', organizationId: '5656565656565656' pictureUrl: 'https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348', created: '2020-04-23T23:00:00.000000+00:00' }
StarkBank\Workspace Object ( [id] => 6225875037061120 [username] => iron-bank-123 [name] => Iron Bank #123 [allowedTaxIds] => Array ( ) [status] => active, [organizationId] => 5656565656565656 [pictureUrl] => https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348 [created] => DateTime Object ( [date] => 2020-04-23 23:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) )
Workspace({ "id": "6225875037061120", "username": "iron-bank-123", "name": "Iron Bank #123", "allowedTaxIds": [], "status": "active", "organizationId": "5656565656565656", "pictureUrl": "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", "created": "2020-04-23T23:00:00+00:00" })
workspace( id: 6225875037061120, username: iron-bank-123, name: Iron Bank #123, allowed_tax_ids: [], status: active, organization_id: 5656565656565656, picture_url: https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, created: 2020-04-23T23:00:00+00:00 )
StarkBank.Workspace{ id: "6225875037061120", username: "iron-bank-123", name: "Iron Bank #123", allowed_tax_ids: [], status: "active", organization_id: "5656565656565656", picture_url: "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", created: ~U[2020-04-23 23:00:00.000000Z], }
Workspace( Username: iron-bank-123, Name: Iron Bank #123, ID: 6225875037061120, AllowedTaxIds: { }, Status: active, OrganizationId: 5656565656565656, PictureUrl: https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, Created: 04/23/2020 23:00:00, )
{ Id:6225875037061120 Username:iron-bank-123 Name:Iron Bank #123 AllowedTaxIds:[] Status:active OrganizationId:5656565656565656 PictureUrl:https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348 Created:2020-04-23 23:00:00.000000 +0000 +0000 }
{:id "6225875037061120", :username "iron-bank-123", :name "Iron Bank #123"}
{ "cursor": null, "workspaces": [ { "id": "6225875037061120", "username": "iron-bank-123", "name": "Iron Bank #123", "allowedTaxIds": [] "status": "active", "organizationId": "5656565656565656", "pictureUrl": "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", "created": "2020-04-23T23:00:00.000000+00:00" } ] }
Get a single workspace by its id.
id
fields
import starkbank workspace = starkbank.workspace.get("6225875037061120") print(workspace)
const starkbank = require('starkbank'); (async() => { let workspace = await starkbank.workspace.get('6225875037061120'); console.log(workspace); })();
$workspace = StarkBank\Workspace::get("6225875037061120"); print_r($workspace);
import com.starkbank.*; Workspace workspace = Workspace.get("6225875037061120"); System.out.println(workspace);
require('starkbank') workspace = StarkBank::Workspace.get('6225875037061120') puts workspace
workspace = StarkBank.Workspace.get!("6225875037061120") workspace |> IO.inspect
using System; StarkBank.Workspace workspace = StarkBank.Workspace.Get("6225875037061120"); Console.WriteLine(workspace);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/workspace" ) func main() { workspace, err := workspace.Get("6225875037061120", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", workspace) }
(def workspace (starkbank.workspace/get "6225875037061120")) (println workspace)
curl --location --request GET '{{baseUrl}}/v2/workspace/6225875037061120' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Workspace( id=6225875037061120, username=iron-bank-123, name=Iron Bank #123, allowed_tax_ids=[], status=active, organization_id=5656565656565656 picture_url=https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, created=2020-04-23 23:00:00.000000 )
Workspace { id: '6225875037061120', username: 'iron-bank-123', name: 'Iron Bank #123', allowedTaxIds: [] status: 'active', organizationId: '5656565656565656' pictureUrl: 'https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348', created: '2020-04-23T23:00:00.000000+00:00' }
StarkBank\Workspace Object ( [id] => 6225875037061120 [username] => iron-bank-123, [name] => Iron Bank #123, [allowedTaxIds] => Array ( ) [status] => active, [organizationId] => 5656565656565656, [pictureUrl] => https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348 [created] => DateTime Object ( [date] => 2020-04-23 23:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) )
Workspace({ "id": "6225875037061120", "username": "iron-bank-123", "name": "Iron Bank #123", "allowedTaxIds": [], "status": "active", "organizationId": "5656565656565656", "pictureUrl": "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", "created": "2020-04-23T23:00:00+00:00" })
workspace( id: 6225875037061120, username: iron-bank-123, name: Iron Bank #123, allowed_tax_ids: [], status: active organization_id: 5656565656565656, picture_url: https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, created: 2020-04-23T23:00:00+00:00 )
%StarkBank.Workspace{ id: "6225875037061120", username: "iron-bank-123", name: "Iron Bank #123", allowed_tax_ids: [], status: "active", organization_id: "5656565656565656", picture_url: "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", created: ~U[2020-04-23 23:00:00.000000Z] }
Workspace( Username: iron-bank-123, Name: Iron Bank #123, ID: 6225875037061120, AllowedTaxIds: { }, Status: active, OrganizationId: 5656565656565656, PictureUrl: https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, Created: 04/23/2020 23:00:00 )
{ Id:6225875037061120 Username:iron-bank-123 Name:Iron Bank #123 AllowedTaxIds:[] Status:active OrganizationId:5656565656565656 PictureUrl:https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348 Created:2020-04-23 23:00:00.000000 +0000 +0000 }
{:id "6225875037061120", :username "iron-bank-123", :name "Iron Bank #123"}
{ "workspace": { "id": "6225875037061120", "username": "iron-bank-123", "name": "Iron Bank #123", "allowedTaxIds": [] "status": "active", "organizationId": "5656565656565656", "pictureUrl": "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", "created": "2020-04-23T23:00:00.000000+00:00" } }
Update a workspace by passing its id and the fields you want to update.
id
pictureType
name
username
allowedTaxIds
status
picture
import starkbank picture = open("path/to/picture.png", "rb").read() workspace = starkbank.workspace.update( "6225875037061120", username="new-username", name="New Name", allowed_tax_ids=["012.345.678-90"], picture=picture, picture_type="image/png", status="blocked", ) print(workspace)
const starkbank = require('starkbank'); const fs = require('fs'); (async() => { let file = fs.readFileSync('/path/to/file.png'); let workspace = await starkbank.workspace.update('6225875037061120', { username: 'new-username', name: 'New Name', picture: file, pictureType: 'image/png', status: 'blocked', allowedTaxIds: ['012.345.678-90'] }); console.log(workspace); })();
use StarkBank\Workspace; $file = file_get_contents("/path/to/file.png"); $workspace = Workspace::update( "6225875037061120", [ "username" => "new-username", "name" => "New Name", "status" => "blocked", "picture" => file, "pictureType" => "image/png", "allowedTaxIds" => ["012.345.678-90"] ] ); print_r($workspace);
import com.starkbank.*; File file = new File("/path/to/file.png"); byte[] fileBytes = Files.readAllBytes(file.toPath()); HashMap<String, Object> patchData = new HashMap<>(); patchData.put("username", "new-username"); patchData.put("name", "New Name"); patchData.put("status", "blocked"); patchData.put("picture", file); patchData.put("pictureType", "image/png"); patchData.put("allowedTaxIds", new String[]{"012.345.678-90"}); Workspace workspace = Workspace.update("6225875037061120", patchData); System.out.println(workspace);
require('starkbank') file = open('/path/to/file.png', 'rb') image = file.read file.close workspace = StarkBank::Workspace.update( "6225875037061120", username: 'new-username', name: 'New Name', status: 'blocked' picture: image, picture_type: 'image/png', allowed_tax_ids: %w[012.345.678-90] ) puts(workspace)
{:ok, image} = File.read("/path/to/file.png") workspace = StarkBank.Workspace.update( "6225875037061120", username: "new-username", status: "blocked", name: "New Name" picture: image, picture_type: "image/png", subscriptions: ["012.345.678-90"] ) |> IO.inspect
byte[] image = File.ReadAllBytes("/path/to/file.png"); Workspace workspace = Workspace.Update( "6225875037061120", username: "new-username", name: "New Name", status: "blocked", picture: image, pictureType: "image/png", allowedTaxIds: new List<string> { "012.345.678-90" } ); Console.WriteLine(workspace);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice" ) func main() { file, _ := ioutil.ReadFile("file.png") var patchData = map[string]interface{}{} patchData["username"] = "new-username" patchData["name"] = "New Name" patchData["status"] = "blocked" patchData["picture"] = file patchData["picture_type"] = "image/png" patchData["allowedTaxIds"] = []string{"012.345.678-90"} workspace, err := Workspace.Update("6225875037061120", patchData, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", workspace) }
Not yet available. Please contact us if you need this SDK.
curl --location --request PATCH '{{baseUrl}}/v2/workspace/6225875037061120' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "username": "new-username", "name": "New Name", "status": "blocked", "allowedTaxIds": ["012.345.678-90"] }'
Workspace( id=6225875037061120, username=new-username, name=New Name, allowed_tax_ids=['012.345.678-90'], status=blocked, organization_id=5656565656565656, picture_url=https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, created=2020-04-23 23:00:00.000000 )
Workspace { id: '6225875037061120', username: 'new-username', name: 'New Name', allowedTaxIds: ['012.345.678-90'], status: 'blocked', organizationId: '5656565656565656', pictureUrl: 'https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348', created: '2020-04-23T23:00:00.000000+00:00' }
StarkBank\Workspace Object ( [id] => 6225875037061120 [username] => new-username [name] => New Name [allowedTaxIds] => Array ( [0] => 012.345.678-90 ) [status] => blocked [organizationId] => 5656565656565656 [pictureUrl] => https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348 [created] => DateTime Object ( [date] => 2020-04-23 23:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) )
Workspace({ "username": "new-username", "name": "New Name", "allowedTaxIds": ['012.345.678-90'], "status": "blocked", "organizationId": "5656565656565656", "pictureUrl": "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", "created": "2020-04-23T23:00:00+00:00" "id": "6225875037061120" })
workspace( id: 6225875037061120, username: new-username, name: New Name, allowed_tax_ids: ['012.345.678-90'], status: blocked, organization_id: 5656565656565656, picture_url: https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, created: 2020-04-23T23:00:00+00:00 )
StarkBank.Workspace{ id: "6225875037061120", username: "new-username", name: "New Name", allowed_tax_ids: ['012.345.678-90'], status: "blocked", organization_id: "5656565656565656", picture_url: "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", created: ~U[2020-04-23 23:00:00.000000Z] }
Workspace( Username: new-username, AllowedTaxIds: { 012.345.678-90 }, Name: New Name, Status: blocked, OrganizationId: 5656565656565656, PictureUrl: https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348, Created: 04/23/2020 23:00:00 ID: 6225875037061120 )
{ Id: 6225875037061120 Username: new-username Name: New Name AllowedTaxIds: ['012.345.678-90'], Status: blocked OrganizationId: 5656565656565656 PictureUrl: https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348 Created:2020-04-23 23:00:00.000000 +0000 +0000 }
Not yet available. Please contact us if you need this SDK.
{ "workspace": { "allowedTaxIds": ["012.345.678-90"], "created": "2020-04-23T23:00:00.000000+00:00" "id": "6225875037061120", "name": "New Name", "organizationId": "5656565656565656", "pictureUrl": "https://storage.googleapis.com/api-ms-workspace-sbx.appspot.com/pictures/workspace/6341320293482496.png?20230314201348", "status": "blocked", "username": "new-username" } }
The balance entity holds the total funds available in your workspace and can be calculated as the sum of its transactions (cash-in + cash-out).
Get the current balance in your workspace.
import starkbank balance = starkbank.balance.get() print(balance)
const starkbank = require('starkbank'); (async() => { let balance = await starkbank.balance.get(); console.log(balance); })();
$balance = StarkBank\Balance::get(); print_r($balance);
import com.starkbank.*; Balance balance = Balance.get(); System.out.println(balance);
require('starkbank') balance = StarkBank::Balance.get() puts balance
balance = StarkBank.Balance.get!() balance |> IO.inspect
using System; StarkBank.Balance balance = StarkBank.Balance.Get(); Console.WriteLine(balance);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/balance" ) func main() { balance := balance.Get(nil) fmt.Println(balance) }
(def balance (starkbank.balance/get)) (println balance)
curl --location --request GET '{{baseUrl}}/v2/balance' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Balance( amount=5419070393, currency=BRL, id=5083989094170624, updated=2020-04-24 17:44:48.912604 )
Balance { id: '5083989094170624', amount: 5419070393, currency: 'BRL', updated: '2020-04-24T17:44:48.912604+00:00' }
StarkBank\Balance Object ( [id] => 5083989094170624 [amount] => 5419070393 [currency] => BRL [updated] => DateTime Object ( [date] => 2020-04-24 17:44:48.912604 [timezone_type] => 1 [timezone] => +00:00 ) )
Balance({ "amount": 5419070393, "currency": "BRL", "updated": "2020-04-24T17:44:48.912604+00:00", "id": "5083989094170624" })
balance( id: 5083989094170624, amount: 5419070393, currency: BRL, updated: 2020-04-24T17:44:48+00:00 )
%StarkBank.Balance{ amount: 5419070393, currency: "BRL", id: "5083989094170624", updated: ~U[2020-04-24 17:44:48.912604Z] }
Balance( Amount: 5419070393, Currency: BRL, Updated: 04/24/2020 17:44:048, ID: 5083989094170624 )
{ Id:5083989094170624 Amount:5419070393 Currency:BRL Updated:2020-04-24 17:44:48.912604 +0000 +0000 }
{:id "5083989094170624", :amount 5419070393, :currency "BRL", :updated "2020-04-24T17:44:48.912604+00:00"}
{ "cursor": null, "balances": [ { "id": "5083989094170624", "amount": 5419070393, "currency": "BRL", "updated": "2020-04-24T17:44:48.912604+00:00", } ] }
Since Stark Bank is centralized, we have a private ledger to keep track of all transactions. It's important to understand that every financial operation in Stark Bank generates a transaction that is registered in our ledger.
Your bank statement is the list of all transactions registered in your private ledger.
cursor
limit
after
before
tags
externalIds
ids
fields
import starkbank transactions = starkbank.transaction.query( after="2020-04-01", before="2020-04-30" ) for transaction in transactions: print(transaction)
const starkbank = require('starkbank'); (async() => { let transactions = await starkbank.transaction.query({ after: '2020-04-01', before: '2020-04-30' }); for await (let transaction of transactions) { console.log(transaction); } })();
$transactions = StarkBank\Transaction::query([ "after" => "2020-04-01", "before" => "2020-04-30" ]); foreach($transactions as $transaction){ print_r($transaction); }
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<Transaction> transactions = Transaction.query(params); for (Transaction transaction : transactions){ System.out.println(transaction); }
require('starkbank') transactions = StarkBank::Transaction.query( after: '2020-04-01', before: '2020-04-30' ) transactions.each do |transaction| puts transaction end
transactions = StarkBank.Transaction.query!( after: "2020-04-01", before: "2020-04-30" ) for transaction <- transactions do transaction |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.Transaction> transactions = StarkBank.Transaction.Query( after: new DateTime(2020, 4, 1), before: new DateTime(2020, 4, 30) ); foreach(StarkBank.Transaction transaction in transactions) { Console.WriteLine(transaction); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/transaction" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-04-01" params["before"] = "2020-04-30" transactions := transaction.Query(params, nil) for transaction := range transactions { fmt.Println(transaction) } }
(def transactions (starkbank.transaction/query { :after "2020-04-01" :before "2020-04-30" })) (dorun (map println transactions))
curl --location --request GET '{{baseUrl}}/v2/transaction?after=2020-04-01&before=2020-04-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Transaction( amount=-10000, created=2020-04-24 17:44:49.066074, description=A Lannister always pays his debts, external_id=my_unique_id, fee=0, id=5185595898855424, receiver_id=5651751147405312, sender_id=5083989094170624, source=self, balance=1567891, tags=['lannister', 'debts'] )
Transaction { id: '5185595898855424', amount: -10000, description: 'A Lannister always pays his debts', externalId: 'my_unique_id', receiverId: 5651751147405312, tags: [ 'lannister', 'debts' ], fee: 0, created: '2020-04-24T17:44:49.941477+00:00', source: 'self', balance: 1567891, senderId: 5083989094170624 }
StarkBank\Transaction Object ( [id] => 5185595898855424 [amount] => -10000 [description] => A Lannister always pays his debts [externalId] => my_unique_id [receiverId] => 5651751147405312 [senderId] => 5083989094170624 [tags] => Array ( [0] => lannister [1] => debts ) [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 17:44:49.045400 [timezone_type] => 1 [timezone] => +00:00 ) [source] => self [balance] => 1567891 )
Transaction({ "amount": -10000, "description": "A Lannister always pays his debts", "externalId": "my_unique_id", "receiverId": "5651751147405312", "senderId": "5083989094170624", "tags": ["lannister", "debts"], "fee": 0, "created": "2020-04-24T17:44:49.315403+00:00", "source": "self", "balance": 1567891, "id": "5185595898855424" })
transaction( id: 5185595898855424, amount: -10000, description: A Lannister always pays his debts, external_id: my_unique_id, receiverId: 5651751147405312, senderId: 5083989094170624, tags: ["lannister", "debts"], fee: 0, source: self, balance: 1567891, created: 2020-04-24T17:44:49+00:00 )
%StarkBank.Transaction{ amount: -10000, created: "2020-04-24T17:44:49.498971+00:00", description: "A Lannister always pays his debts", external_id: "my_unique_id", fee: 0, id: "5185595898855424", receiver_id: "5651751147405312", sender_id: "5083989094170624", source: "self", balance: 1567891, tags: ["lannister", "debts"] }
Transaction( Amount: -10000, ExternalID: my_unique_id, ReceiverID: 5651751147405312, SenderID: 5083989094170624, Tags: { lannister, debts }, Fee: 0, Description: A Lannister always pays his debts, Source: self, Balance: 1567891, Created: 04/24/2020 17:44:49, ID: 5185595898855424 )
{ Id:5185595898855424 Amount:-10000 Description:A Lannister always pays his debts ExternalId:my_unique_id ReceiverId:5651751147405312 Tags:[lannister debts] SenderId:5083989094170624 Source:self Fee:0 Balance:1567891 Created:2020-04-24 17:44:49.628546 +0000 +0000 }
{:description "A Lannister always pays his debts", :amount -10000, :fee 0, :tags ["lannister" "debts"], :created "2020-04-24T17:44:49.045400+00:00", :source "self", :external-id "my_unique_id", :balance 1567891, :id "5185595898855424", :sender-id "5083989094170624", :receiver-id "5651751147405312"}
{ "cursor": null, "transactions": [ { "id": "5185595898855424", "description": "A Lannister always pays his debts", "created": "2020-04-24T17:44:49.249976+00:00", "tags": ["lannister", "debts"], "source": "self", "amount": -10000, "externalId": "my_unique_id", "receiverId": "5651751147405312", "senderId": "5083989094170624", "fee": 0, "balance": 1567891 }, } }
Get a single transaction by its id.
id
fields
import starkbank transaction = starkbank.transaction.get("5185595898855424") print(transaction)
const starkbank = require('starkbank'); (async() => { let transaction = await starkbank.transaction.get('5185595898855424'); console.log(transaction); })();
$transaction = StarkBank\Transaction::get("5185595898855424"); print_r($transaction);
import com.starkbank.*; Transaction transaction = Transaction.get("5185595898855424"); System.out.println(transaction);
transaction = StarkBank::Transaction.get('5185595898855424') puts transaction
transaction = StarkBank.Transaction.get!("5185595898855424") transaction |> IO.inspect
using System; StarkBank.Transaction transaction = StarkBank.Transaction.Get("5185595898855424"); Console.WriteLine(transaction);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/transaction" ) func main() { transaction, err := transaction.Get("5185595898855424", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Println(transaction) }
(def transaction (starkbank.transaction/get "5185595898855424")) (println transaction)
curl --location --request GET '{{baseUrl}}/v2/transaction/5185595898855424' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Transaction( amount=-10000, created=2020-04-24 17:44:49.066074, description=A Lannister always pays his debts, external_id=my_unique_id, fee=0, id=5185595898855424, receiver_id=5651751147405312, sender_id=5083989094170624, source=self, balance=1567891, tags=['lannister', 'debts'] )
Transaction { id: '5185595898855424', amount: -10000, description: 'A Lannister always pays his debts', externalId: 'my_unique_id', receiverId: 5651751147405312, tags: [ 'lannister', 'debts' ], fee: 0, created: '2020-04-24T17:44:49.941477+00:00', source: 'self', balance: 1567891, senderId: 5083989094170624 }
StarkBank\Transaction Object ( [id] => 5185595898855424 [amount] => -10000 [description] => A Lannister always pays his debts [externalId] => my_unique_id [receiverId] => 5651751147405312 [senderId] => 5083989094170624 [tags] => Array ( [0] => lannister [1] => debts ) [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 17:44:49.045400 [timezone_type] => 1 [timezone] => +00:00 ) [source] => self [balance] => 1567891 )
Transaction({ "amount": -10000, "description": "A Lannister always pays his debts", "externalId": "my_unique_id", "receiverId": "5651751147405312", "senderId": "5083989094170624", "tags": ["lannister", "debts"], "fee": 0, "created": "2020-04-24T17:44:49.315403+00:00", "source": "self", "balance": 1567891, "id": "5185595898855424" })
transaction( id: 5185595898855424, amount: -10000, description: A Lannister always pays his debts, external_id: my_unique_id, receiverId: 5651751147405312, senderId: 5083989094170624, tags: ["lannister", "debts"], fee: 0, source: self, balance: 1567891, created: 2020-04-24T17:44:49+00:00 )
%StarkBank.Transaction{ amount: -10000, created: "2020-04-24T17:44:49.498971+00:00", description: "A Lannister always pays his debts", external_id: "my_unique_id", fee: 0, id: "5185595898855424", receiver_id: "5651751147405312", sender_id: "5083989094170624", source: "self", balance: 1567891, tags: ["lannister", "debts"] }
Transaction( Amount: -10000, ExternalID: my_unique_id, ReceiverID: 5651751147405312, SenderID: 5083989094170624, Tags: { lannister, debts }, Fee: 0, Description: A Lannister always pays his debts, Source: self, Balance: 1567891, Created: 04/24/2020 17:44:49, ID: 5185595898855424 )
{ Id:5185595898855424 Amount:-10000 Description:A Lannister always pays his debts ExternalId:my_unique_id ReceiverId:5651751147405312 Tags:[lannister debts] SenderId:5083989094170624 Source:self Fee:0 Balance:1567891 Created:2020-04-24 17:44:49.628546 +0000 +0000 }
{:description "A Lannister always pays his debts", :amount -10000, :fee 0, :tags ["lannister" "debts"], :created "2020-04-24T17:44:49.045400+00:00", :source "self", :external-id "my_unique_id", :balance 1567891, :id "5185595898855424", :sender-id "5083989094170624", :receiver-id "5651751147405312"}
{ "transaction": { "id": "5185595898855424", "description": "A Lannister always pays his debts", "created": "2020-04-24T17:44:49.249976+00:00", "tags": ["lannister", "debts"], "source": "self", "amount": -10000, "externalId": "my_unique_id", "receiverId": "5651751147405312", "senderId": "5083989094170624", "fee": 0, "balance": 1567891 } }
The Invoice resource is used to request payments from customers.
Use this route to create up to 100 new invoices at a time.
amount
taxId
name
due
fine
interest
expiration
splits
[ { "receiverId": "5742447426535424", "amount": 100 }, { "receiverId": "5743243941642240", "amount": 200 } ]
discounts
[ { "percentage": 5, "due": "2020-11-25T17:59:26.000000+00:00" }, { "percentage": 10.5, "due": "2020-10-25T17:59:26.000000+00:00" } ]
descriptions
[ { "key": "Product A", "value": "R$10,00" }, { "key": "Taxes", "value": "R$100,00" } ]
tags
rules
[ { "key": "allowedTaxIds", "value": [ "012.345.678-90", "45.059.493/0001-73" ] } ]
import starkbank from datetime import datetime invoices = starkbank.invoice.create([ starkbank.Invoice( amount=400000, descriptions=[{'key': 'Arya', 'value': 'Not today'}], discounts=[{'percentage': 10, 'due': datetime(2021, 3, 12, 15, 23, 26, 689377)}], due=datetime(2021, 5, 12, 15, 23, 26, 689377), expiration=123456789, fine=2.5, interest=1.3, name="Arya Stark", tags=['War supply', 'Invoice #1234'], tax_id="012.345.678-90", rules=[ { 'key': 'allowedTaxIds', 'value': [ '012.345.678-90', '45.059.493/0001-73' ] } ], splits=[ Split(amount=3000, receiverId="5742447426535424"), Split(amount=5000, receiverId="5743243941642240") ] ) ]) for invoice in invoices: print(invoice)
const starkbank = require('starkbank'); (async() => { let invoices = await starkbank.invoice.create([{ amount: 400000, due: '2021-05-12T15:23:37.585+00:00', taxId: '012.345.678-90', name: 'Arya Stark', expiration: 123456789, fine: 2.5, interest: 1.3, discounts: [ { 'percentage': 10, 'due': '2021-03-12T15:23:26.249976+00:00' } ], tags: ['War supply', 'Invoice #1234'], descriptions: [ { 'key': 'Arya', 'value': 'Not today' } ], rules: [ { 'key': 'allowedTaxIds', 'value': [ '012.345.678-90', '45.059.493/0001-73' ] } ] }]); for (let invoice of invoices) { console.log(invoice); } })();
use StarkBank\Invoice; $invoices = [ new Invoice([ "amount" => 400000, "due" => "2021-05-12T18:00:00.000000+00:00", "taxId" => "012.345.678-90", "name" => "Arya Stark", "expiration" => 123456789, "fine" => 2.5, "interest" => 1.3, "discounts" => [ [ "percentage" => 10, "due" => "2021-03-12T18:00:00.000000+00:00" ] ], "tags" => [ 'War supply', 'Invoice #1234' ], "descriptions" => [ [ "key" => "Arya", "value" => "Not today" ] ], "rules" => [ { "key" => "allowedTaxIds", "value" => [ "012.345.678-90", "45.059.493/0001-73" ] } ] ]) ]; $invoice = Invoice::create($invoices); print_r($invoice);
import com.starkbank.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; List<HashMap<String, Object>> descriptions = new ArrayList<>(); HashMap<String, Object> data = new HashMap<>(); data.put("key", "Arya"); data.put("value", "Not today"); descriptions.add(data); List<HashMap<String, Object>> rules = new ArrayList<>(); HashMap<String, Object> data = new HashMap<>(); data.put("key", "allowedTaxIds"); data.put("value", new String[]{"012.345.678-90", "45.059.493/0001-73"}); rules.add(data); List<HashMap<String, Object>> discounts = new ArrayList<>(); HashMap<String, Object> data = new HashMap<>(); data.put("percentage", 10); data.put("due", "2021-03-12T17:59:26.000000+00:00"); discounts.add(data); List<Invoice> invoices = new ArrayList<>(); HashMap<String, Object> data = new HashMap<>(); data.put("amount", 400000); data.put("due", "2021-05-12T17:59:26.000000+00:00"); data.put("taxId", "012.345.678-90"); data.put("name", "Arya Stark"); data.put("expiration", 123456789); data.put("discounts", discounts); data.put("descriptions", descriptions); data.put("rules", rules); data.put("fine", 2.5); data.put("interest", 1.3); data.put("tags", new String[]{"War supply", "Invoice #1234"}); invoices.add(new Invoice(data)); invoices = Invoice.create(invoices); for (Invoice invoice : invoices) { System.out.println(invoice); }
require('starkbank') invoices = StarkBank::Invoice.create( [ StarkBank::Invoice.new( amount: 400000, descriptions: [ { key: 'Arya', value: 'Not today' } ], discounts: [ { percentage: 10, due: '2020-04-25' } ], rules: [ { key: 'allowedTaxIds', value: [ '012.345.678-90', '45.059.493/0001-73' ] } ], tags: ['War supply', 'Invoice #1234'], due: Time.now + 24 * 3600, name: 'Arya Stark', tax_id: '012.345.678-90', fine: 2.5, interest: 1.3, expiration: 123456789, ) ] ) invoices.each do |invoice| puts invoice end
invoice = StarkBank.Invoice.create!( [ %StarkBank.Invoice{ amount: 400000, due: String.replace(DateTime.to_iso8601(DateTime.add(DateTime.utc_now(), 30*24*60*60, :second)), "Z", "+00:00"), tax_id: "012.345.678-90", name: "Arya Stark", expiration: 123456789, fine: 2.5, interest: 1.3, discounts: [ %{ percentage: 10, due: String.replace(DateTime.to_iso8601(DateTime.add(DateTime.utc_now(), 10*24*60*60, :second)), "Z", "+00:00"), } ], rules: [ %{ key: "allowedTaxIds", value: [ "012.345.678-90", "45.059.493/0001-73" ] } ], tags: [ "War Supply", "Invoice #1234" ], descriptions: [ %{ key: "Arya", value: "Not today" } ] } ] ) |> IO.inspect()
using System; using System.Collections.Generic; List<StarkBank.Invoice> invoices = StarkBank.Invoice.Create( new List<StarkBank.Invoice> { new StarkBank.Invoice( amount: 400000, descriptions: new List<Dictionary<string, object>>() { new Dictionary<string, object> { {"key", "Arya"}, {"value", "Not today"} } }, discounts: new List<Dictionary<string, object>>() { new Dictionary<string, object> { {"percentage", 10}, {"due", new DateTime(2021, 03, 12, 20, 30, 0)} } }, rules: new List<Dictionary<string, object>>() { new Dictionary<string, object> { {"key", "allowedTaxIds"}, {"value", new List<string> { "012.345.678-90", "45.059.493/0001-73" }} } }, due: new DateTime(2021, 05, 12, 20, 30, 0), expiration: 123456789, fine: 2.5, interest: 1.3, name: "Arya Stark", tags: new List<string> { "New sword", "Invoice #1234" }, taxID: "012.345.678-90" ) } ); foreach (StarkBank.Invoice invoice in invoices) { Console.WriteLine(invoice); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice" "time" ) func main() { due := time.Date(2021, 05, 12, 0, 0, 0, 0, time.UTC) descriptions := make([]map[string]interface{}, 1) var data = map[string]interface{}{} data["key"] = "Arya" data["value"] = "Not today" descriptions[0] = data discounts := make([]map[string]interface{}, 1) var dataDiscount = map[string]interface{}{} dataDiscount["percentage"] = 5 dataDiscount["due"] = time.Date(2021, 03, 12, 0, 0, 0, 0, time.UTC) discounts[0] = dataDiscount invoices, err := invoice.Create( []invoice.Invoice{ { Amount: 400000, Name: "Arya Stark", TaxId: "012.345.678-90", Descriptions: descriptions, Discounts: discounts, Due: &due, Fine: 2.5, Interest: 1.3, Expiration: 123456789, Tags: []string{"War supply", "Invoice #1234"}, }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, invoice := range invoices { fmt.Printf("%+v", invoice) } }
(def invoices (starkbank.invoice/create [{ :amount 400000 :due "2021-05-12T19:32:35.418698+00:00" :tax-id "012.345.678-90" :name "Arya Stark", :expiration 123456789, :fine 2.5, :interest 1.3, :discounts [ { :percentage 5 :due "2021-03-12T19:32:35.418698+00:00" } ] :descriptions [ { :key "Arya" :value "Not Today" } ], :rules [ { :key "allowedTaxIds", :value [ "012.345.678-90", "45.059.493/0001-73" ] } ], :tags [ "War supply", "Invoice #1234" ] }])) (doseq [invoice invoices] (println invoice) )
curl --location --request POST '{{baseUrl}}/v2/invoice' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "invoices": [ { "amount": 400000, "due": "2021-05-12T17:59:26.000000+00:00", "expiration": 123456789, "name": "Arya Stark", "taxId": "012.345.678-90", "fine": 2.5, "interest": 1.3, "tags": [ "War supply", "Invoice #1234" ] "descriptions": [ { "key": "Arya", "value": "Not today" } ], "rules": [ { "key": "allowedTaxIds", "value": [ "012.345.678-90", "45.059.493/0001-73" ] } ], "discounts": [ { "percentage": 10, "due": "2021-03-12T17:59:26.000000+00:00" } ], "splits": [ { "receiverId": "5742447426535424", "amount": 3000 }, { "receiverId": "5743243941642240", "amount": 5000 } ] } ] }'
Invoice( amount=400000, brcode=00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, created=2020-10-26 17:10:57.261868, descriptions=[{'key': 'Arya', 'value': 'Not today'}], discount_amount=0, discounts=[{'percentage': 10.0, 'due': '2021-03-12T18:23:26+00:00'}], due=2021-05-12 15:23:26, expiration=123456789, fee=0, pdf=https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link=https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine=2.5, fine_amount=0, id=4600131349381120, interest=1.3, interest_amount=0, name=Arya Stark, nominal_amount=400000, status=created, tags=['War supply', 'Invoice #1234'], transaction_ids=[], tax_id=012.345.678-90, updated=2020-10-26 17:10:57.261877, splits=[ Split( amount=3000, created=None, external_id=None, id=None, receiver_id=5742447426535424, scheduled=None, source=None, status=None, tags=None, updated=None ), Split( amount=5000, created=None, external_id=None, id=None, receiver_id=5743243941642240, scheduled=None, source=None, status=None, tags=None, updated=None ) ] )
Invoice { id: '4600131349381120', amount: 400000, due: '2021-05-12T16:27:37.585000+00:00', taxId: '012.345.678-90', name: 'Arya Stark', expiration: 123456789, fine: 2.5, interest: 1.3, discounts: [ { percentage: 10, due: '2021-03-12T14:16:10.639000+00:00' } ], tags: [ 'war supply', 'invoice #1234' ], transactionIds: [ ], descriptions: [ { key: 'Arya', value: 'Not today' } ], fee: 0, pdf: 'https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978', link: 'https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978', nominalAmount: 400000, fineAmount: 0, interestAmount: 0, discountAmount: 0, brcode: '00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79', status: 'created', created: '2020-10-26T17:10:57.606357+00:00', updated: '2020-10-26T17:10:57.606367+00:00' }
StarkBank\Invoice Object ( [id] => 4600131349381120 [amount] => 400000 [due] => DateTime Object ( [date] => 2021-05-12 18:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [taxId] => 012.345.678-90 [name] => Arya Stark [expiration] => 123456789 [fee] => 0 [pdf] => https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 [link] => https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 [fine] => 2.5 [interest] => 1.3 [discounts] => Array ( [0] => Array ( [percentage] => 10 [due] => 2021-03-12T21:00:00+00:00 ) ) [tags] => Array ( [0] => war supply [1] => invoice #1234 ) [transactionIds] => Array ( ) [descriptions] => Array ( [0] => Array ( [key] => Arya [value] => Not today ) ) [nominalAmount] => 400000 [fineAmount] => 0 [interestAmount] => 0 [discountAmount] => 0 [brcode] => 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79 [status] => created [created] => DateTime Object ( [date] => 2020-10-26 17:10:43.241309 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-10-26 17:10:43.241320 [timezone_type] => 1 [timezone] => +00:00 ) )
Invoice({ "amount": 400000, "due": "2021-05-12T15:23:26.000000+00:00", "taxId": "012.345.678-90", "name": "Arya Stark", "expiration": 123456789, "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "descriptions": [ { "key": "Arya", "value": "Not today" } ] "discounts": [], "tags": ["war supply", "invoice #1234"], "transactionIds": [], "nominalAmount": 400000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "brcode": "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", "status": "created", "created": "2020-10-26T17:32:00.997116+00:00", "updated": "2020-10-26T17:32:00.997126+00:00", "id": "4600131349381120" })
invoice( id: 4600131349381120, amount: 400000, due: 2021-05-12T11:00:20+00:00, tax_id: 012.345.678-90, name: Arya Stark, expiration: 123456789, fee: 0, pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine: 2.5, interest: 1.3, discounts: [ ( percentage: 5, due: 2021-03-12T14:00:21+00:00 ) ], tags: ["war supply", "invoice #1234"], transaction_ids: [], descriptions: [ ( key: Arya, value: Not today ) ], nominal_amount: 23571, fine_amount: 0, interest_amount: 0, discount_amount: 0, brcode: 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/0e272677d4924d1fa3520cfda61b0f6f5204000053039865802BR5933Matheus Coelho Ferraz 418128448406009Sao Paulo62200516643401702073958463047661, status: created, updated: 2020-10-26T14:00:21+00:00, created: 2020-10-26T14:00:21+00:00 )
%StarkBank.Invoice{ amount: 400000, brcode: "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", created: ~U[2020-10-26 18:36:18.116954Z], descriptions: [ %{"key" => "Arya", "value" => "Not today"} ], discount_amount: 0, discounts: [ %{"due" => "2020-11-23T21:36:18.223000+00:00", "percentage" => 10.0} ], due: "2020-05-12T18:36:18.219000+00:00", expiration: 123456789, fee: 0, pdf: "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", link: "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", fine: 2.5, fine_amount: 0, id: "4600131349381120", interest: 1.3, interest_amount: 0, name: "Arya Stark", nominal_amount: 400000, status: "created", tags: ["war supply", "invoice #1234"], transaction_ids: [], tax_id: "012.345.678-90", updated: ~U[2020-10-26 18:36:18.116976Z] }
Invoice( Name: Arya Stark, TaxID: 012.345.678-90, Due: 12/05/2021 20:30:00, Expiration: 123456789, Fee: 0, Pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, Link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, Fine: 2,5, Interest: 1,3, Descriptions: { { { key, Arya }, { value, Not today } } }, Discounts: { { { percentage, 10 }, { due, 30/05/2021 23:30:00 } } }, Tags: { war supply, invoice #1234 }, TransactionIds: { }, Amount: 400000, NominalAmount: 400000, FineAmount: 0, InterestAmount: 0, DiscountAmount: 0, Brcode: 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, Status: created, Created: 26/10/2020 12:56:53, Updated: 26/10/2020 12:56:53, ID: 4600131349381120 )
{ Id:4600131349381120 Amount:400000 Name:Arya Stark TaxId:012.345.678-90 Due:2021-05-12 16:54:53.5521 +0000 +0000 Expiration:123456789 Fine:2.5 Interest:1.3 Discounts:[map[due:2023-02-16T16:20:16.621546+00:00 percentage:5]] Tags:[war supply invoice #1234] Descriptions:[map[key:Arya value:Not today]] Pdf:https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 Link:https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 NominalAmount:400000 FineAmount:0 InterestAmount:0 DiscountAmount:0 Brcode:00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79 Status:created Fee:0 TransactionIds:[] Created:2020-10-26 17:10:54.16799 +0000 +0000 Updated:2020-10-26 17:10:54.24204 +0000 +0000 }
{ :amount 400000, :interest-amount 0, :fee 0, :tags [war supply invoice #1234], :transaction-ids [], :updated 2020-10-26T06:09:07.540753+00:00, :name Iron Bank S.A., :expiration 123456789, :tax-id 012.345.678-90, :pdf https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, :link https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, :nominal-amount 400000, :created 2020-10-26T06:09:07.540724+00:00, :discounts [ { :percentage 5.0, :due 2021-03-12T22:32:35.418698+00:00 } ], :due 2021-05-12T19:32:35.418698+00:00, :status created, :interest 1.3, :id 4600131349381120, :fine 2.5, :fine-amount 0, :discount-amount 0, :brcode 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, :descriptions [ { :key Product X, :value big } ] }
{ "message": "Invoice(s) successfully created", "invoices": [ { "id": "4600131349381120", "status": "created", "amount": 400000, "nominalAmount": 400000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "expiration": 123456789, "discounts": [ { "percentage": 5.0 "due": 2021-03-12T01:50:50.264656+00:00 } ], "descriptions": [ { "key": "Arya" "value": "Not today" } ], "name": "Arya Stark", "taxId": "012.345.678-90", "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "tags": [ "War supply", "Invoice #1234" ], "transactionIds": [], "brcode": "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", "created": "2020-10-26T01:50:50.264656+00:00", "updated": "2020-10-26T01:50:50.264656+00:00", "due": "2020-05-12T17:59:26.000000+00:00", "splits": [ { "amount": 3000, "receiverId": "5742447426535424", ), { "amount": 5000, "receiverId": "5743243941642240", } ] } ] }
Get a list of invoices in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
transactionIds
status
tags
ids
fields
import starkbank invoices = starkbank.invoice.query( after="2020-10-1", before="2020-10-30", limit=10 ) for invoice in invoices: print(invoice)
const starkbank = require('starkbank'); (async() => { let invoices = await starkbank.invoice.query({ after: '2020-10-01', before: '2020-10-30', }); for await (let invoice of invoices) { console.log(invoice); } })();
use StarkBank\Invoice; $invoices = iterator_to_array( Invoice::query([ "before" => "2020-10-30T18:00:00.000000+00:00", "after" => "2020-10-01T18:00:00.000000+00:00" ] )); foreach ($invoices as $invoice) { print_r($invoice); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2020-10-01"); params.put("before", "2020-10-30"); Generator<Invoice> invoices = Invoice.query(params); for (Invoice invoice : invoices){ System.out.println(invoice); }
require('starkbank') invoices = StarkBank::Invoice.query( after: '2020-10-01', before: '2020-10-30' ) invoices.each do |invoice| puts invoice end
invoices = StarkBank.Invoice.query!( after: "2020-10-01", before: "2020-10-30" ) |> Enum.take(1) |> IO.inspect
IEnumerable<StarkBank.Invoice> invoices = StarkBank.Invoice.Query( after: new DateTime(2020, 10, 1), before: new DateTime(2020, 10, 30) ); foreach (StarkBank.Invoice invoice in invoices) { Console.WriteLine(invoice); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-10-01" params["before"] = "2020-10-30" invoices := invoice.Query(params, nil) for invoice := range invoices { fmt.Printf("%+v", invoice) } }
(def invoices (starkbank.invoice/query { :after "2020-10-01" :before "2020-10-30" })) (doseq [invoice invoices] (println invoice))
curl --location --request GET '{{baseUrl}}/v2/invoice?after=2020-10-01&before=2020-10-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Invoice( amount=400000, brcode=00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, created=2020-10-26 17:10:57.261868, descriptions=[{'key': 'Arya', 'value': 'Not today'}], discount_amount=0, discounts=[{'percentage': 10.0, 'due': '2021-03-12T18:23:26+00:00'}], due=2021-05-12 15:23:26, expiration=123456789, fee=0, pdf=https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link=https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine=2.5, fine_amount=0, id=4600131349381120, interest=1.3, interest_amount=0, name=Arya Stark, nominal_amount=400000, status=created, tags=['War supply', 'Invoice #1234'], transaction_ids=[], tax_id=012.345.678-90, updated=2020-10-26 17:10:57.261877 )
Invoice { id: '4600131349381120', amount: 400000, due: '2021-05-12T16:27:37.585000+00:00', taxId: '012.345.678-90', name: 'Arya Stark', expiration: 123456789, fine: 2.5, interest: 1.3, discounts: [ { percentage: 10, due: '2021-03-12T14:16:10.639000+00:00' } ], tags: [ 'war supply', 'invoice #1234' ], transactionIds: [ ], descriptions: [ { key: 'Arya', value: 'Not today' } ], fee: 0, pdf: 'https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978', link: 'https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978', nominalAmount: 400000, fineAmount: 0, interestAmount: 0, discountAmount: 0, brcode: '00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79', status: 'created', created: '2020-10-26T17:10:57.606357+00:00', updated: '2020-10-26T17:10:57.606367+00:00' }
StarkBank\Invoice Object ( [id] => 4600131349381120 [amount] => 400000 [due] => DateTime Object ( [date] => 2021-05-12 18:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [taxId] => 012.345.678-90 [name] => Arya Stark [expiration] => 123456789 [fee] => 0 [pdf] => https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 [link] => https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 [fine] => 2.5 [interest] => 1.3 [discounts] => Array ( [0] => Array ( [percentage] => 10 [due] => 2021-03-12T21:00:00+00:00 ) ) [tags] => Array ( [0] => war supply [1] => invoice #1234 ) [transactionIds] => Array ( ) [descriptions] => Array ( [0] => Array ( [key] => Arya [value] => Not today ) ) [nominalAmount] => 400000 [fineAmount] => 0 [interestAmount] => 0 [discountAmount] => 0 [brcode] => 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79 [status] => created [created] => DateTime Object ( [date] => 2020-10-26 17:10:43.241309 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-10-26 17:10:43.241320 [timezone_type] => 1 [timezone] => +00:00 ) )
Invoice({ "amount": 400000, "due": "2021-05-12T15:23:26.000000+00:00", "taxId": "012.345.678-90", "name": "Arya Stark", "expiration": 123456789, "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "descriptions": [ { "key": "Arya", "value": "Not today" } ] "discounts": [], "tags": ["war supply", "invoice #1234"], "transactionIds": [], "nominalAmount": 400000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "brcode": "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", "status": "created", "created": "2020-10-26T17:32:00.997116+00:00", "updated": "2020-10-26T17:32:00.997126+00:00", "id": "4600131349381120" })
invoice( id: 4600131349381120, amount: 400000, due: 2021-05-12T11:00:20+00:00, tax_id: 012.345.678-90, name: Arya Stark, expiration: 123456789, fee: 0, pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine: 2.5, interest: 1.3, discounts: [ ( percentage: 5, due: 2021-03-12T14:00:21+00:00 ) ], tags: ["war supply", "invoice #1234"], transaction_ids: [], descriptions: [ ( key: Arya, value: Not today ) ], nominal_amount: 23571, fine_amount: 0, interest_amount: 0, discount_amount: 0, brcode: 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/0e272677d4924d1fa3520cfda61b0f6f5204000053039865802BR5933Matheus Coelho Ferraz 418128448406009Sao Paulo62200516643401702073958463047661, status: created, updated: 2020-10-26T14:00:21+00:00, created: 2020-10-26T14:00:21+00:00 )
%StarkBank.Invoice{ amount: 400000, brcode: "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", created: ~U[2020-10-26 18:36:18.116954Z], descriptions: [ %{"key" => "Arya", "value" => "Not today"} ], discount_amount: 0, discounts: [ %{"due" => "2020-11-23T21:36:18.223000+00:00", "percentage" => 10.0} ], due: "2020-05-12T18:36:18.219000+00:00", expiration: 123456789, fee: 0, pdf: "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", link: "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", fine: 2.5, fine_amount: 0, id: "4600131349381120", interest: 1.3, interest_amount: 0, name: "Arya Stark", nominal_amount: 400000, status: "created", tags: ["war supply", "invoice #1234"], transaction_ids: [], tax_id: "012.345.678-90", updated: ~U[2020-10-26 18:36:18.116976Z] }
Invoice( Name: Arya Stark, TaxID: 012.345.678-90, Due: 12/05/2021 20:30:00, Expiration: 123456789, Fee: 0, Pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, Link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, Fine: 2,5, Interest: 1,3, Descriptions: { { { key, Arya }, { value, Not today } } }, Discounts: { { { percentage, 10 }, { due, 30/05/2021 23:30:00 } } }, Tags: { war supply, invoice #1234 }, TransactionIds: { }, Amount: 400000, NominalAmount: 400000, FineAmount: 0, InterestAmount: 0, DiscountAmount: 0, Brcode: 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, Status: created, Created: 26/10/2020 12:56:53, Updated: 26/10/2020 12:56:53, ID: 4600131349381120 )
{ Id:4600131349381120 Amount:400000 Name:Arya Stark TaxId:012.345.678-90 Due:2021-05-12 16:54:53.5521 +0000 +0000 Expiration:123456789 Fine:2.5 Interest:1.3 Discounts:[map[due:2023-02-16T16:20:16.621546+00:00 percentage:5]] Tags:[war supply invoice #1234] Descriptions:[map[key:Arya value:Not today]] Pdf:https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 Link:https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 NominalAmount:400000 FineAmount:0 InterestAmount:0 DiscountAmount:0 Brcode:00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79 Status:created Fee:0 TransactionIds:[] Created:2020-10-26 17:10:54.16799 +0000 +0000 Updated:2020-10-26 17:10:54.24204 +0000 +0000 }
{ :amount 400000, :interest-amount 0, :fee 0, :tags [war supply invoice #1234], :transaction-ids [], :updated 2020-10-26T06:09:07.540753+00:00, :name Iron Bank S.A., :expiration 123456789, :tax-id 012.345.678-90, :pdf https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, :link https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, :nominal-amount 400000, :created 2020-10-26T06:09:07.540724+00:00, :discounts [ { :percentage 5.0, :due 2021-03-12T22:32:35.418698+00:00 } ], :due 2021-05-12T19:32:35.418698+00:00, :status created, :interest 1.3, :id 4600131349381120, :fine 2.5, :fine-amount 0, :discount-amount 0, :brcode 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, :descriptions [ { :key Product X, :value big } ] }
{ "cursor": null, "invoices": [ { "id": "4600131349381120", "status": "created", "amount": 400000, "nominalAmount": 400000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "expiration": 123456789, "discounts": [ { "percentage": 5.0 "due": 2021-03-12T01:50:50.264656+00:00 } ], "descriptions": [ { "key": "Arya" "value": "Not today" } ], "name": "Arya Stark", "taxId": "012.345.678-90", "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "tags": [ "War supply", "Invoice #1234" ], "transactionIds": [], "brcode": "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", "created": "2020-10-26T01:50:50.264656+00:00", "updated": "2020-10-26T01:50:50.264656+00:00", "due": "2020-05-12T17:59:26.000000+00:00", } ] }
Get a single invoice by its id.
id
fields
import starkbank invoice = starkbank.invoice.get("4600131349381120") print(invoice)
const starkbank = require('starkbank'); (async() => { let invoice = await starkbank.invoice.get('4600131349381120'); console.log(invoice); })();
use StarkBank\Invoice; $invoice = Invoice::get("4600131349381120"); print_r($invoice);
import com.starkbank.*; Invoice invoice = Invoice.get("4600131349381120"); System.out.println(invoice);
require('starkbank') invoice = StarkBank::Invoice.get('6434017020739584') puts invoice
invoice = StarkBank.Invoice.get!("4600131349381120") |> IO.inspect
using System; StarkBank.Invoice invoice = StarkBank.Invoice.Get("4600131349381120"); Console.WriteLine(invoice);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice" ) func main() { invoice, err := invoice.Get("4600131349381120", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", invoice) }
(def invoice (starkbank.invoice/get "4600131349381120")) (println invoice)
curl --location --request GET '{{baseUrl}}/v2/invoice/4600131349381120' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Invoice( amount=400000, brcode=00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, created=2020-10-26 17:10:57.261868, descriptions=[{'key': 'Arya', 'value': 'Not today'}], discount_amount=0, discounts=[{'percentage': 10.0, 'due': '2021-03-12T18:23:26+00:00'}], due=2021-05-12 15:23:26, expiration=123456789, fee=0, pdf=https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link=https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine=2.5, fine_amount=0, id=4600131349381120, interest=1.3, interest_amount=0, name=Arya Stark, nominal_amount=400000, status=created, tags=['War supply', 'Invoice #1234'], transaction_ids=[], tax_id=012.345.678-90, updated=2020-10-26 17:10:57.261877 )
Invoice { id: '4600131349381120', amount: 400000, due: '2021-05-12T16:27:37.585000+00:00', taxId: '012.345.678-90', name: 'Arya Stark', expiration: 123456789, fine: 2.5, interest: 1.3, discounts: [ { percentage: 10, due: '2021-03-12T14:16:10.639000+00:00' } ], tags: [ 'war supply', 'invoice #1234' ], transactionIds: [ ], descriptions: [ { key: 'Arya', value: 'Not today' } ], fee: 0, pdf: 'https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978', link: 'https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978', nominalAmount: 400000, fineAmount: 0, interestAmount: 0, discountAmount: 0, brcode: '00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79', status: 'created', created: '2020-10-26T17:10:57.606357+00:00', updated: '2020-10-26T17:10:57.606367+00:00' }
StarkBank\Invoice Object ( [id] => 4600131349381120 [amount] => 400000 [due] => DateTime Object ( [date] => 2021-05-12 18:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [taxId] => 012.345.678-90 [name] => Arya Stark [expiration] => 123456789 [fee] => 0 [pdf] => https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 [link] => https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 [fine] => 2.5 [interest] => 1.3 [discounts] => Array ( [0] => Array ( [percentage] => 10 [due] => 2021-03-12T21:00:00+00:00 ) ) [tags] => Array ( [0] => war supply [1] => invoice #1234 ) [transactionIds] => Array ( ) [descriptions] => Array ( [0] => Array ( [key] => Arya [value] => Not today ) ) [nominalAmount] => 400000 [fineAmount] => 0 [interestAmount] => 0 [discountAmount] => 0 [brcode] => 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79 [status] => created [created] => DateTime Object ( [date] => 2020-10-26 17:10:43.241309 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-10-26 17:10:43.241320 [timezone_type] => 1 [timezone] => +00:00 ) )
Invoice({ "amount": 400000, "due": "2021-05-12T15:23:26.000000+00:00", "taxId": "012.345.678-90", "name": "Arya Stark", "expiration": 123456789, "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "descriptions": [ { "key": "Arya", "value": "Not today" } ] "discounts": [], "tags": ["war supply", "invoice #1234"], "transactionIds": [], "nominalAmount": 400000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "brcode": "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", "status": "created", "created": "2020-10-26T17:32:00.997116+00:00", "updated": "2020-10-26T17:32:00.997126+00:00", "id": "4600131349381120" })
invoice( id: 4600131349381120, amount: 400000, due: 2021-05-12T11:00:20+00:00, tax_id: 012.345.678-90, name: Arya Stark, expiration: 123456789, fee: 0, pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine: 2.5, interest: 1.3, discounts: [ ( percentage: 5, due: 2021-03-12T14:00:21+00:00 ) ], tags: ["war supply", "invoice #1234"], transaction_ids: [], descriptions: [ ( key: Arya, value: Not today ) ], nominal_amount: 23571, fine_amount: 0, interest_amount: 0, discount_amount: 0, brcode: 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/0e272677d4924d1fa3520cfda61b0f6f5204000053039865802BR5933Matheus Coelho Ferraz 418128448406009Sao Paulo62200516643401702073958463047661, status: created, updated: 2020-10-26T14:00:21+00:00, created: 2020-10-26T14:00:21+00:00 )
%StarkBank.Invoice{ amount: 400000, brcode: "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", created: ~U[2020-10-26 18:36:18.116954Z], descriptions: [ %{"key" => "Arya", "value" => "Not today"} ], discount_amount: 0, discounts: [ %{"due" => "2020-11-23T21:36:18.223000+00:00", "percentage" => 10.0} ], due: "2020-05-12T18:36:18.219000+00:00", expiration: 123456789, fee: 0, pdf: "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", link: "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", fine: 2.5, fine_amount: 0, id: "4600131349381120", interest: 1.3, interest_amount: 0, name: "Arya Stark", nominal_amount: 400000, status: "created", tags: ["war supply", "invoice #1234"], transaction_ids: [], tax_id: "012.345.678-90", updated: ~U[2020-10-26 18:36:18.116976Z] }
Invoice( Name: Arya Stark, TaxID: 012.345.678-90, Due: 12/05/2021 20:30:00, Expiration: 123456789, Fee: 0, Pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, Link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, Fine: 2,5, Interest: 1,3, Descriptions: { { { key, Arya }, { value, Not today } } }, Discounts: { { { percentage, 10 }, { due, 30/05/2021 23:30:00 } } }, Tags: { war supply, invoice #1234 }, TransactionIds: { }, Amount: 400000, NominalAmount: 400000, FineAmount: 0, InterestAmount: 0, DiscountAmount: 0, Brcode: 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, Status: created, Created: 26/10/2020 12:56:53, Updated: 26/10/2020 12:56:53, ID: 4600131349381120 )
{ Id:4600131349381120 Amount:400000 Name:Arya Stark TaxId:012.345.678-90 Due:2021-05-12 16:54:53.5521 +0000 +0000 Expiration:123456789 Fine:2.5 Interest:1.3 Discounts:[map[due:2023-02-16T16:20:16.621546+00:00 percentage:5]] Tags:[war supply invoice #1234] Descriptions:[map[key:Arya value:Not today]] Pdf:https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 Link:https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 NominalAmount:400000 FineAmount:0 InterestAmount:0 DiscountAmount:0 Brcode:00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79 Status:created Fee:0 TransactionIds:[] Created:2020-10-26 17:10:54.16799 +0000 +0000 Updated:2020-10-26 17:10:54.24204 +0000 +0000 }
{ :amount 400000, :interest-amount 0, :fee 0, :tags [war supply invoice #1234], :transaction-ids [], :updated 2020-10-26T06:09:07.540753+00:00, :name Iron Bank S.A., :expiration 123456789, :tax-id 012.345.678-90, :pdf https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, :link https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, :nominal-amount 400000, :created 2020-10-26T06:09:07.540724+00:00, :discounts [ { :percentage 5.0, :due 2021-03-12T22:32:35.418698+00:00 } ], :due 2021-05-12T19:32:35.418698+00:00, :status created, :interest 1.3, :id 4600131349381120, :fine 2.5, :fine-amount 0, :discount-amount 0, :brcode 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, :descriptions [ { :key Product X, :value big } ] }
{ "invoice": { "id": "4600131349381120", "status": "created", "amount": 400000, "nominalAmount": 400000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "expiration": 123456789, "discounts": [ { "percentage": 5.0 "due": 2021-03-12T01:50:50.264656+00:00 } ], "descriptions": [ { "key": "Arya" "value": "Not today" } ], "name": "Arya Stark", "taxId": "012.345.678-90", "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "tags": [ "War supply", "Invoice #1234" ], "transactionIds": [], "brcode": "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", "created": "2020-10-26T01:50:50.264656+00:00", "updated": "2020-10-26T01:50:50.264656+00:00", "due": "2020-05-12T17:59:26.000000+00:00", } }
Update a single invoice. If the invoice has not yet been paid, you can adjust parameters such as the requested amount, the due datetime and the expiration. If the invoice has already been paid, only the amount can be decreased, which will result in a payment reversal.
id
amount
due
expiration
status
import starkbank updated_invoice = starkbank.invoice.update( "4600131349381120", status="canceled", amount=12345, expiration=98765 ) print(updated_invoice)
const starkbank = require('starkbank'); (async() => { let invoice = await starkbank.invoice.update('4600131349381120', { status: 'canceled', amount: 12345, expiration: 98765 } ); console.log(invoice); })();
use StarkBank\Invoice; $updateInvoice = Invoice::update( "4600131349381120", [ "status" => "canceled" "amount" => 12345, "expiration" => 98765 ] ); print_r($updateInvoice);
Invoice({ "amount": 400000, "due": "2021-05-12T15:23:26.000000+00:00", "taxId": "012.345.678-90", "name": "Arya Stark", "expiration": 123456789, "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "descriptions": [ { "key": "Arya", "value": "Not today" } ] "discounts": [], "tags": ["war supply", "invoice #1234"], "transactionIds": [], "nominalAmount": 400000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "brcode": "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", "status": "created", "created": "2020-10-26T17:32:00.997116+00:00", "updated": "2020-10-26T17:32:00.997126+00:00", "id": "4600131349381120" })
require('starkbank') invoice = StarkBank::Invoice.update( '4600131349381120', status: 'canceled', amount: 12345, expiration: 98765, ) puts invoice
invoice = StarkBank.Invoice.update!( "4600131349381120", status: "canceled", amount: 12345, expiration: 98765 ) |> IO.inspect
StarkBank.Invoice invoice = StarkBank.Invoice.Update( "4600131349381120", status: "canceled", amount: 12345, expiration: 98765 ); Console.WriteLine(invoice);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice" ) func main() { var patchData = map[string]interface{}{} patchData["status"] = "canceled" patchData["amount"] = 12345 patchData["expiration"] = 98765 invoice, err := invoice.Update("4600131349381120", patchData, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", invoice) }
(def invoice (starkbank.invoice/update "4600131349381120" {:amount 12345 :expiration 98765 :status "canceled"})) (println invoice)
curl --location --request PATCH '{{baseUrl}}/v2/invoice/4600131349381120' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "status": "canceled", "amount": 12345, "expiration": 98765, }'
Invoice( amount=12345, brcode=00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, created=2020-10-26 17:10:57.261868, descriptions=[{'key': 'Arya', 'value': 'Not today'}], discount_amount=0, discounts=[{'percentage': 10.0, 'due': '2021-03-12T18:23:26+00:00'}], due=2021-05-12 15:23:26, expiration=98765, fee=0, pdf=https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link=https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine=2.5, fine_amount=0, id=4600131349381120, interest=1.3, interest_amount=0, name=Arya Stark, nominal_amount=400000, status=canceled, tags=['War supply', 'Invoice #1234'], transaction_ids=[], tax_id=012.345.678-90, updated=2020-10-26 17:10:57.261877 )
Invoice { id: '4600131349381120', amount: 12345, due: '2021-05-12T16:27:37.585000+00:00', taxId: '012.345.678-90', name: 'Arya Stark', expiration: 98765, fine: 2.5, interest: 1.3, discounts: [ { percentage: 10, due: '2021-03-12T14:16:10.639000+00:00' } ], tags: [ 'war supply', 'invoice #1234' ], transactionIds: [ ], descriptions: [ { key: 'Arya', value: 'Not today' } ], fee: 0, pdf: 'https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978', link: 'https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978', nominalAmount: 400000, fineAmount: 0, interestAmount: 0, discountAmount: 0, brcode: '00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79', status: 'canceled', created: '2020-10-26T17:10:57.606357+00:00', updated: '2020-10-26T17:10:57.606367+00:00' }
StarkBank\Invoice Object ( [id] => 4600131349381120 [amount] => 12345 [due] => DateTime Object ( [date] => 2021-05-12 18:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [taxId] => 012.345.678-90 [name] => Arya Stark [expiration] => 98765 [fee] => 0 [pdf] => https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 [link] => https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 [fine] => 2.5 [interest] => 1.3 [discounts] => Array ( [0] => Array ( [percentage] => 10 [due] => 2021-03-12T21:00:00+00:00 ) ) [tags] => Array ( [0] => war supply [1] => invoice #1234 ) [transactionIds] => Array ( ) [descriptions] => Array ( [0] => Array ( [key] => Arya [value] => Not today ) ) [nominalAmount] => 400000 [fineAmount] => 0 [interestAmount] => 0 [discountAmount] => 0 [brcode] => 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79 [status] => canceled [created] => DateTime Object ( [date] => 2020-10-26 17:10:43.241309 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-10-26 17:10:43.241320 [timezone_type] => 1 [timezone] => +00:00 ) )
import com.starkbank.*; HashMap<String, Object> patchData = new HashMap<>(); patchData.put("status", "canceled"); patchData.put("amount", 12345); patchData.put("expiration", 98765); Invoice invoice = Invoice.update("4600131349381120", data); System.out.println(invoice);
invoice( id: 4600131349381120, amount: 12345, due: 2021-05-12T11:00:20+00:00, tax_id: 012.345.678-90, name: Arya Stark, expiration: 98765, fee: 0, pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine: 2.5, interest: 1.3, discounts: [ ( percentage: 5, due: 2021-03-12T14:00:21+00:00 ) ], tags: ["war supply", "invoice #1234"], transaction_ids: [], descriptions: [ ( key: Arya, value: Not today ) ], nominal_amount: 23571, fine_amount: 0, interest_amount: 0, discount_amount: 0, brcode: 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/0e272677d4924d1fa3520cfda61b0f6f5204000053039865802BR5933Matheus Coelho Ferraz 418128448406009Sao Paulo62200516643401702073958463047661, status: canceled, updated: 2020-10-26T14:00:21+00:00, created: 2020-10-26T14:00:21+00:00 )
%StarkBank.Invoice{ amount: 12345, brcode: "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", created: ~U[2020-10-26 18:36:18.116954Z], descriptions: [ %{"key" => "Arya", "value" => "Not today"} ], discount_amount: 0, discounts: [ %{"due" => "2020-11-23T21:36:18.223000+00:00", "percentage" => 10.0} ], due: "2020-05-12T18:36:18.219000+00:00", expiration: 98765, fee: 0, pdf: "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", link: "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", fine: 2.5, fine_amount: 0, id: "4600131349381120", interest: 1.3, interest_amount: 0, name: "Arya Stark", nominal_amount: 400000, status: "canceled", tags: ["war supply", "invoice #1234"], transaction_ids: [], tax_id: "012.345.678-90", updated: ~U[2020-10-26 18:36:18.116976Z] }
Invoice( Name: Arya Stark, TaxID: 012.345.678-90, Due: 12/05/2021 20:30:00, Expiration: 98765, Fee: 0, Pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, Link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, Fine: 2,5, Interest: 1,3, Descriptions: { { { key, Arya }, { value, Not today } } }, Discounts: { { { percentage, 10 }, { due, 30/05/2021 23:30:00 } } }, Tags: { war supply, invoice #1234 }, TransactionIds: { }, Amount: 12345, NominalAmount: 400000, FineAmount: 0, InterestAmount: 0, DiscountAmount: 0, Brcode: 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, Status: canceled, Created: 26/10/2020 12:56:53, Updated: 26/10/2020 12:56:53, ID: 4600131349381120 )
{ Id:4600131349381120 Amount:12345 Name:Arya Stark TaxId:012.345.678-90 Due:2021-05-12 16:54:53.5521 +0000 +0000 Expiration:98765 Fine:2.5 Interest:1.3 Discounts:[map[due:2023-02-16T16:20:16.621546+00:00 percentage:5]] Tags:[war supply invoice #1234] Descriptions:[map[key:Arya value:Not today]] Pdf:https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 Link:https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 NominalAmount:400000 FineAmount:0 InterestAmount:0 DiscountAmount:0 Brcode:00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79 Status:canceled Fee:0 TransactionIds:[] Created:2020-10-26 17:10:54.16799 +0000 +0000 Updated:2020-10-26 17:10:54.24204 +0000 +0000 }
{ :amount 12345, :interest-amount 0, :fee 0, :tags [war supply invoice #1234], :transaction-ids [], :updated 2020-10-26T06:09:07.540753+00:00, :name Iron Bank S.A., :expiration 98765, :tax-id 012.345.678-90, :pdf https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, :link https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, :nominal-amount 400000, :created 2020-10-26T06:09:07.540724+00:00, :discounts [ { :percentage 5.0, :due 2021-03-12T22:32:35.418698+00:00 } ], :due 2021-05-12T19:32:35.418698+00:00, :status canceled, :interest 1.3, :id 4600131349381120, :fine 2.5, :fine-amount 0, :discount-amount 0, :brcode 00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79, :descriptions [ { :key Product X, :value big } ] }
{ "invoice": { "id": "4600131349381120", "status": "canceled", "amount": 12345, "nominalAmount": 400000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "expiration": 98765, "discounts": [ { "percentage": 5.0 "due": 2021-03-12T01:50:50.264656+00:00 } ], "descriptions": [ { "key": "Arya" "value": "Not today" } ], "name": "Arya Stark", "taxId": "012.345.678-90", "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "tags": [ "War supply", "Invoice #1234" ], "transactionIds": [], "brcode": "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", "created": "2020-10-26T01:50:50.264656+00:00", "updated": "2020-10-26T01:50:50.264656+00:00", "due": "2020-05-12T17:59:26.000000+00:00", } }
Get the invoice QR Code png file. Similarly to the Boleto PDF, we create a QR Code image file with the invoice data so that your customer can pay it through Pix.
id
size
import starkbank qrcode = starkbank.invoice.qrcode("4600131349381120", size=15) with open("qrcode.png", "wb") as file: file.write(qrcode)
const starkbank = require('starkbank'); const fs = require('fs').promises; (async() => { let qrcode = await starkbank.invoice.qrcode('4600131349381120', size=7) await fs.writeFile('invoice.png', qrcode); })();
use StarkBank\Invoice; $png = Invoice::qrcode("4600131349381120", ["size" => 7]); $fp = fopen('qrcode.png', 'w'); fwrite($fp, $png); fclose($fp);
Invoice({ "amount": 12345, "due": "2021-05-12T15:23:26.000000+00:00", "taxId": "012.345.678-90", "name": "Arya Stark", "expiration": 98765, "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "descriptions": [ { "key": "Arya", "value": "Not today" } ] "discounts": [], "tags": ["war supply", "invoice #1234"], "transactionIds": [], "nominalAmount": 400000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "brcode": "00020101021226600014br.gov.bcb.pix2538invoice-h.sandbox.starkbank.com/57301741758054405204000053039865802BR5910NightKing6010Winterfell62280524invoice/573017417580544063046B79", "status": "canceled", "created": "2020-10-26T17:32:00.997116+00:00", "updated": "2020-10-26T17:32:00.997126+00:00", "id": "4600131349381120" })
require('starkbank') qrcode = StarkBank::Invoice.qrcode('4600131349381120') File.binwrite('qrcode.png', qrcode)
qrcode = StarkBank.Invoice.qrcode!("4600131349381120") file = File.open!("qrcode.png", [:write]) IO.binwrite(file, qrcode) File.close(file)
using System; byte[] png = StarkBank.Invoice.Qrcode("4600131349381120"); System.IO.File.WriteAllBytes("qrcode.png", png);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice" "io/ioutil" ) func main() { qrcode, err := invoice.Qrcode("4600131349381120", nil, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } errFile := ioutil.WriteFile("qrcode.png", qrcode, 0666) if errFile != nil { fmt.Print(errFile) } }
(def qrcode (starkbank.invoice/qrcode "4600131349381120")) (def file-name "invoice-qrcode.png") (io/make-parents file-name) (io/copy qrcode (io/file file-name))
curl --location --request GET '{{baseUrl}}/v2/invoice/4600131349381120/qrcode' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Get the invoice PDF file. Similarly to the Boleto PDF, we create a PDF file with the invoice data and the QR Code so that your customer can pay it through Pix. The same PDF can also be accessed by the public "pdf" parameter returned in the Invoice JSON. This link is the one you should send to your customers.
id
import starkbank pdf = starkbank.invoice.pdf("4600131349381120") with open("invoice.pdf", "wb") as file: file.write(pdf)
const starkbank = require('starkbank'); const fs = require('fs').promises; (async() => { let pdf = await starkbank.invoice.pdf('4600131349381120'); await fs.writeFile('invoice.pdf', pdf); })();
$pdf = StarkBank\Invoice::pdf("4600131349381120"); $fp = fopen('invoice.pdf', 'w'); fwrite($fp, $pdf); fclose($fp);
import java.io.File; import java.io.InputStream; import java.nio.file.StandardCopyOption; import com.starkbank.*; HashMap<String, Object> options = new HashMap<>(); InputStream png = Invoice.qrcode("4600131349381120"); java.nio.file.Files.copy( png, new File("qrcode.png").toPath(), StandardCopyOption.REPLACE_EXISTING );
require('starkbank') pdf = StarkBank::Invoice.pdf('4600131349381120') File.open('invoice.pdf', 'w') { |file| file.write(pdf) }
pdf = StarkBank.Invoice.pdf!("4600131349381120") file = File.open!("invoice.pdf", [:write]) IO.binwrite(file, pdf) File.close(file)
byte[] pdf = Invoice.Pdf("4600131349381120"); System.IO.File.WriteAllBytes("invoice.pdf", pdf);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice" "io/ioutil" ) func main() { pdf, err := invoice.Pdf("4600131349381120", nil, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } errFile := ioutil.WriteFile("invoice.pdf", pdf, 0666) if errFile != nil { fmt.Print(errFile) } }
(clojure.java.io/copy (starkbank.invoice/pdf "4600131349381120") (clojure.java.io/file "invoice.pdf"))
curl --location --request GET '{{baseUrl}}/v2/invoice/4600131349381120/pdf' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Get a paged list of invoice logs. A log tracks a change in the invoice entity according to its life cycle.
cursor
limit
after
before
types
invoiceIds
fields
import starkbank logs = starkbank.invoice.log.query( after="2020-10-01", before="2020-10-30" ) for log in logs: print(log)
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.invoice.log.query({ after: '2020-10-01', before: '2020-10-30', }); for await (let log of logs) { console.log(log); } })();
use StarkBank\Invoice\Log; $invoiceLogs = iterator_to_array(Log::query([ "after" => "2020-10-01", "before" => "2020-10-30" ])); foreach($invoiceLogs as $log) { print_r($log);
import java.io.File; import java.io.InputStream; import java.nio.file.StandardCopyOption; import com.starkbank.*; InputStream pdf = Invoice.pdf("4600131349381120"); java.nio.file.Files.copy( pdf, new File("invoice.pdf").toPath(), StandardCopyOption.REPLACE_EXISTING );
require('starkbank') logs = StarkBank::Invoice::Log.query( after: '2020-10-01', before: '2020-10-30' ) logs.each do |log| puts log end
logs = StarkBank.Invoice.Log.query!( after: "2020-10-01", before: "2020-10-30" ) for log <- logs do log |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.Invoice.Log> logs = StarkBank.Invoice.Log.Query( after: new DateTime(2020, 10, 1), before: new DateTime(2020, 10, 30) ); foreach (StarkBank.Invoice.Log log in logs) { Console.WriteLine(log); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice/log" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-10-01" params["before"] = "2020-10-30" logs := log.Query(params, nil) for log := range logs { fmt.Printf("%+v", log) } }
(def logs (starkbank.invoice.log/query { :after "2020-10-1", :before "2020-10-30" })) (doseq [log logs] (println log))
curl --location --request GET '{{baseUrl}}/v2/invoice/log?after=2020-10-01&before=2020-10-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2020-10-27 00:30:12.141283, errors=[], id=6742710681600000, type=credited, invoice=Invoice( amount=120000, brcode=00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D, created=2020-10-27 00:24:56.372300, descriptions=[{'value': 'Not today', 'key': 'Arya'}], discount_amount=0, discounts=[{'percentage': 10.0, 'due': '2021-03-12T18:23:26+00:00'}], due=2021-05-12 15:23:26, expiration=123456789, fee=0, pdf=https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link=https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine=2.5, fine_amount=0, id=5616810774757376, interest=1.3, interest_amount=0, name=Arya Stark, nominal_amount=120000, status=paid, tags=['new sword', 'invoice #1234'], transaction-ids=[], tax_id=012.345.678-90, updated=2020-10-27 00:30:12.362815 ) )
Log { id: '6742710681600000', created: '2020-10-27T16:40:45.571311+00:00', type: 'credited', errors: [], invoice: { status: 'paid', updated: '2020-10-27T16:40:45.784728+00:00', taxId: '012.345.678-90', interest: 1.3, tags: [ 'new sword', 'invoice #1234' ], transactionIds: [], interestAmount: 0, created: '2020-10-27T15:24:40.674849+00:00', due: '2021-05-12T14:24:58.287000+00:00', descriptions: [ { key: 'Arya', value: 'Not today' } ], nominalAmount: 120000, discounts: [ { percentage: 10, due: '2021-03-12T14:16:10.639000+00:00' } ], amount: 120000, brcode: '00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D', expiration: 123456789, fineAmount: 0, discountAmount: 0, fee: 0, pdf: 'https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978', link: 'https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978', fine: 2.5, id: '5616810774757376', name: 'Arya Stark' } }
StarkBank\Invoice\Log Object ( [id] => 6742710681600000 [created] => DateTime Object ( [date] => 2020-10-28 18:37:30.955089 [timezone_type] => 1 [timezone] => +00:00 ) [type] => credited [errors] => Array ( ) [invoice] => StarkBankInvoice Object ( [id] => 5616810774757376 [amount] => 120000 [due] => DateTime Object ( [date] => 2021-05-12 18:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [taxId] => 012.345.678-90 [name] => Arya Stark [expiration] => 123456789 [fee] => 0 [pdf] => https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 [link] => https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 [fine] => 2.5 [interest] => 1.3 [discounts] => Array ( [0] => Array ( [percentage] => 10 [due] => 2021-03-12T21:00:00+00:00 ) ) [tags] => Array ( [0] => new sword [1] => invoice #1234 ) [transactionIds] => Array ( ) [descriptions] => Array ( [0] => Array ( [value] => Arya [key] => Not today ) ) [nominalAmount] => 120000 [fineAmount] => 0 [interestAmount] => 0 [discountAmount] => 0 [brcode] => 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D [status] => paid [created] => DateTime Object ( [date] => 2020-10-27 18:37:30.924143 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-10-27 18:50:08.046495 [timezone_type] => 1 [timezone] => +00:00 ) ) )
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2020-10-01"); params.put("before", "2020-10-30"); Generator<Invoice.Log> logs = Invoice.Log.query(params); for (Invoice.Log log : logs){ System.out.println(log); }
log( id: 6742710681600000, type: created, errors: [], created: 2020-10-27T14:00:21+00:00, invoice: invoice( id: 5616810774757376, amount: 120000, due: 2021-05-12T11:00:20+00:00, tax_id: 012.345.678-90, name: Arya Stark, expiration: 123456789, fee: 0, pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine: 2.5, interest: 1.3, discounts: [ ( percentage: 5, due: 2021-03-12T14:00:21+00:00 ) ], tags: ["new sword", "invoice #1234"], descriptions: [ ( key: Arya, value: Not today ) ], transaction_ids: [], nominal_amount: 120000, fine_amount: 0, interest_amount: 0, discount_amount: 0, brcode: 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D, status: paid, updated: 2020-10-27T14:09:20+00:00, created: 2020-10-27T14:00:21+00:00 ) )
%StarkBank.Invoice.Log{ created: ~U[2020-10-27 18:45:02.141607Z], errors: [], id: "6742710681600000", invoice: %StarkBank.Invoice{ amount: 120000, brcode: "00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D", created: ~U[2020-11-13 18:36:18.116954Z], descriptions: [%{"key" => "Arya", "value" => "Not today"}], discount_amount: 0, discounts: [ %{"due" => "2021-03-12T21:36:18.223000+00:00", "percentage" => 10.0} ], due: "2021-05-12T18:45:02.924000+00:00", expiration: 123456789, fee: 0, pdf: "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", link: "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", fine: 2.5, fine_amount: 0, id: "5616810774757376", interest: 1.3, interest_amount: 0, name: "Arya Stark", transaction_ids: [], nominal_amount: 120000, status: "paid", tags: ["new sword", "invoice #1234"], tax_id: "012.345.678-90", updated: ~U[2020-10-27 18:45:02.780963Z] }, type: "credited" }
Log( Created: 27/10/2020 13:22:11, Type: credited, Errors: { }, Invoice: Invoice( Name: Arya Stark, TaxID: 012.345.678-90, Due: 12/05/2021 13:17:15, Expiration: 123456789, Fee: 0, Pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, Link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, Fine: 2,5, Interest: 1,3, Descriptions: { { { value, Not today }, { key, Arya } } }, Discounts: { { { percentage, 10 }, { due, 30/05/2021 23:30:00 } } }, Tags: { new sword, invoice #1234 }, TransactionIds: { }, Amount: 120000, NominalAmount: 120000, FineAmount: 0, InterestAmount: 0, DiscountAmount: 0, Brcode: 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D, Status: paid, Created: 27/10/2020 12:56:53, Updated: 27/10/2020 13:22:11, ID: 5616810774757376 ), ID: 6742710681600000 )
{ Id:6742710681600000 Invoice:{ Id:5616810774757376 Amount:120000 Name:Arya Stark TaxId:012.345.678-90 Due:2021-05-12 19:20:36.638 +0000 +0000 Expiration:123456789 Fine:2.5 Interest:1.3 Discounts:[ map[ due:2021-03-12T07:42:01.528000+00:00 percentage:10 ] ] Tags:[new sword invoice #1234] Descriptions:[ map[ key:Arya value:Not today ] ] Pdf:https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 Link:https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 NominalAmount:120000 FineAmount:0 InterestAmount:0 DiscountAmount:0 Brcode:00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D Status:paid Fee:0 TransactionIds:[] Created:2020-10-27 19:21:03.033976 +0000 +0000 Updated:2020-10-27 23:37:22.858647 +0000 +0000 } Errors:[] Type:credited Created:2020-10-27 19:20:37.522415 +0000 +0000 }
{ :id 6742710681600000, :created 2020-10-27T07:00:06.804223+00:00, :errors [], :type credited, :invoice { :amount 120000, :interest-amount 0, :fee 0, :tags [war supply invoice #1234], :updated 2020-10-27T07:00:07.175487+00:00, :name Arya Stark, :expiration 123456789, :tax-id 012.345.678-90, :pdf https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, :link https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, :nominal-amount 120000, :created 2020-10-27T06:41:14.165375+00:00, :discounts [ { :percentage 10.0, :due 2021-03-12T06:41:12.584000+00:00 } ], :due 2021-05-12T03:41:14.560000+00:00, :status paid, :interest 1.3, :id 5616810774757376, :fine 2.5, :fine-amount 0, :transaction-ids[] :discount-amount 0, :brcode 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D, :descriptions [ { :key Arya, :value Not today } ] } }
{ "cursor": null, "logs": [ { "id": "6742710681600000", "created": "2020-10-27T23:00:08.338233+00:00", "errors": [], "type": "credited", "invoice": { "id": "5616810774757376", "status": "paid", "amount": 120000, "nominalAmount": 120000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "expiration": 123456789, "discounts": [ { "percentage": 10 "due": "2020-11-25T17:59:26.000000+00:00" } ], "descriptions": [ { "key": "Arya" "value": "Not today" } ], "name": "Arya Stark", "taxId": "012.345.678-90", "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "tags": [ "War supply", "Invoice #1234" ], "transactionIds": [], "brcode": "00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D", "created": "2020-10-27T01:50:50.264656+00:00", "updated": "2020-10-27T01:50:50.264656+00:00", "due": "2021-05-12T17:59:26.000000+00:00" } } ] }
Get a single invoice Log by its id.
id
fields
import starkbank log = starkbank.invoice.log.get("6742710681600000") print(log)
const starkbank = require('starkbank'); (async() => { let log = await starkbank.invoice.log.get('6742710681600000'); console.log(log); })();
use StarkBank\Invoice\Log; $invoiceLog = Log::get("6742710681600000"); print_r($invoiceLog);
Log({ "id": "6742710681600000", "created": "2020-10-27T18:20:09.558082+00:00", "type": "credited", "errors": [], "invoice": { "amount": 120000, "due": "2020-10-30T18:15:53.754000+00:00", "taxId": "012.345.678-90", "name": "Arya Stark", "expiration": 123456789, "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "descriptions": [ { "key": "Arya", "value": "Not today" } ], "discounts": [ { "percentage": 10, "due": "2021-03-12T21:15:53.754000+00:00" } ], "tags": ["new sword", "invoice #1234"], "transaction_ids": [], "nominalAmount": 120000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "brcode": "00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D", "status": "paid", "created": "2020-10-27T18:15:53.894294+00:00", "updated": "2020-10-27T18:20:11.266852+00:00", "id": "5616810774757376" } })
require('starkbank') log = StarkBank::Invoice::Log.get('6742710681600000') puts log
log = StarkBank.Invoice.Log.get!("6742710681600000") |> IO.inspect
using System; StarkBank.Invoice.Log log = StarkBank.Invoice.Log.Get("6742710681600000"); Console.WriteLine(log);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice/log" ) func main() { log, err := log.Get("6742710681600000", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
(def log (starkbank.invoice.log/get "6742710681600000")) (println log)
curl --location --request GET '{{baseUrl}}/v2/invoice/log/6742710681600000' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2020-10-27 00:30:12.141283, errors=[], id=6742710681600000, type=credited, invoice=Invoice( amount=120000, brcode=00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D, created=2020-10-27 00:24:56.372300, descriptions=[{'value': 'Not today', 'key': 'Arya'}], discount_amount=0, discounts=[{'percentage': 10.0, 'due': '2021-03-12T18:23:26+00:00'}], due=2021-05-12 15:23:26, expiration=123456789, fee=0, pdf=https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link=https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine=2.5, fine_amount=0, id=5616810774757376, interest=1.3, interest_amount=0, name=Arya Stark, nominal_amount=120000, status=paid, tags=['new sword', 'invoice #1234'], transaction-ids=[], tax_id=012.345.678-90, updated=2020-10-27 00:30:12.362815 ) )
Log { id: '6742710681600000', created: '2020-10-27T16:40:45.571311+00:00', type: 'credited', errors: [], invoice: { status: 'paid', updated: '2020-10-27T16:40:45.784728+00:00', taxId: '012.345.678-90', interest: 1.3, tags: [ 'new sword', 'invoice #1234' ], transactionIds: [], interestAmount: 0, created: '2020-10-27T15:24:40.674849+00:00', due: '2021-05-12T14:24:58.287000+00:00', descriptions: [ { key: 'Arya', value: 'Not today' } ], nominalAmount: 120000, discounts: [ { percentage: 10, due: '2021-03-12T14:16:10.639000+00:00' } ], amount: 120000, brcode: '00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D', expiration: 123456789, fineAmount: 0, discountAmount: 0, fee: 0, pdf: 'https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978', link: 'https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978', fine: 2.5, id: '5616810774757376', name: 'Arya Stark' } }
StarkBank\Invoice\Log Object ( [id] => 6742710681600000 [created] => DateTime Object ( [date] => 2020-10-28 18:37:30.955089 [timezone_type] => 1 [timezone] => +00:00 ) [type] => credited [errors] => Array ( ) [invoice] => StarkBankInvoice Object ( [id] => 5616810774757376 [amount] => 120000 [due] => DateTime Object ( [date] => 2021-05-12 18:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [taxId] => 012.345.678-90 [name] => Arya Stark [expiration] => 123456789 [fee] => 0 [pdf] => https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 [link] => https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 [fine] => 2.5 [interest] => 1.3 [discounts] => Array ( [0] => Array ( [percentage] => 10 [due] => 2021-03-12T21:00:00+00:00 ) ) [tags] => Array ( [0] => new sword [1] => invoice #1234 ) [transactionIds] => Array ( ) [descriptions] => Array ( [0] => Array ( [value] => Arya [key] => Not today ) ) [nominalAmount] => 120000 [fineAmount] => 0 [interestAmount] => 0 [discountAmount] => 0 [brcode] => 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D [status] => paid [created] => DateTime Object ( [date] => 2020-10-27 18:37:30.924143 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-10-27 18:50:08.046495 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "created": "2020-11-11T14:44:44.385820+00:00", "type": "credited", "errors": [], "deposit": { "name": "Iron Bank S.A", "taxId": "10.203.000/0001-80", "bankCode": "20018183", "branchCode": "0001", "accountNumber": "1010101010101010", "accountType": "payment", "amount": 9000, "type": "pix", "status": "created", "tags": [ "deposit" ], "fee": 50, "transactionIds": [ "5862355036536832" ], "created": "2020-11-11T14:44:43.144663+00:00", "updated": "2020-11-11T14:44:53.298960+00:00", "id": "5738709764800512" }, "id": "5066704988143616" })
log( id: 6742710681600000, type: created, errors: [], created: 2020-10-27T14:00:21+00:00, invoice: invoice( id: 5616810774757376, amount: 120000, due: 2021-05-12T11:00:20+00:00, tax_id: 012.345.678-90, name: Arya Stark, expiration: 123456789, fee: 0, pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, fine: 2.5, interest: 1.3, discounts: [ ( percentage: 5, due: 2021-03-12T14:00:21+00:00 ) ], tags: ["new sword", "invoice #1234"], descriptions: [ ( key: Arya, value: Not today ) ], transaction_ids: [], nominal_amount: 120000, fine_amount: 0, interest_amount: 0, discount_amount: 0, brcode: 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D, status: paid, updated: 2020-10-27T14:09:20+00:00, created: 2020-10-27T14:00:21+00:00 ) )
%StarkBank.Invoice.Log{ created: ~U[2020-10-27 18:45:02.141607Z], errors: [], id: "6742710681600000", invoice: %StarkBank.Invoice{ amount: 120000, brcode: "00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D", created: ~U[2020-11-13 18:36:18.116954Z], descriptions: [%{"key" => "Arya", "value" => "Not today"}], discount_amount: 0, discounts: [ %{"due" => "2021-03-12T21:36:18.223000+00:00", "percentage" => 10.0} ], due: "2021-05-12T18:45:02.924000+00:00", expiration: 123456789, fee: 0, pdf: "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", link: "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", fine: 2.5, fine_amount: 0, id: "5616810774757376", interest: 1.3, interest_amount: 0, name: "Arya Stark", transaction_ids: [], nominal_amount: 120000, status: "paid", tags: ["new sword", "invoice #1234"], tax_id: "012.345.678-90", updated: ~U[2020-10-27 18:45:02.780963Z] }, type: "credited" }
Log( Created: 27/10/2020 13:22:11, Type: credited, Errors: { }, Invoice: Invoice( Name: Arya Stark, TaxID: 012.345.678-90, Due: 12/05/2021 13:17:15, Expiration: 123456789, Fee: 0, Pdf: https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, Link: https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, Fine: 2,5, Interest: 1,3, Descriptions: { { { value, Not today }, { key, Arya } } }, Discounts: { { { percentage, 10 }, { due, 30/05/2021 23:30:00 } } }, Tags: { new sword, invoice #1234 }, TransactionIds: { }, Amount: 120000, NominalAmount: 120000, FineAmount: 0, InterestAmount: 0, DiscountAmount: 0, Brcode: 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D, Status: paid, Created: 27/10/2020 12:56:53, Updated: 27/10/2020 13:22:11, ID: 5616810774757376 ), ID: 6742710681600000 )
{ Id:6742710681600000 Invoice:{ Id:5616810774757376 Amount:120000 Name:Arya Stark TaxId:012.345.678-90 Due:2021-05-12 19:20:36.638 +0000 +0000 Expiration:123456789 Fine:2.5 Interest:1.3 Discounts:[ map[ due:2021-03-12T07:42:01.528000+00:00 percentage:10 ] ] Tags:[new sword invoice #1234] Descriptions:[ map[ key:Arya value:Not today ] ] Pdf:https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978 Link:https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978 NominalAmount:120000 FineAmount:0 InterestAmount:0 DiscountAmount:0 Brcode:00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D Status:paid Fee:0 TransactionIds:[] Created:2020-10-27 19:21:03.033976 +0000 +0000 Updated:2020-10-27 23:37:22.858647 +0000 +0000 } Errors:[] Type:credited Created:2020-10-27 19:20:37.522415 +0000 +0000 }
{ :id 6742710681600000, :created 2020-10-27T07:00:06.804223+00:00, :errors [], :type credited, :invoice { :amount 120000, :interest-amount 0, :fee 0, :tags [war supply invoice #1234], :updated 2020-10-27T07:00:07.175487+00:00, :name Arya Stark, :expiration 123456789, :tax-id 012.345.678-90, :pdf https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978, :link https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978, :nominal-amount 120000, :created 2020-10-27T06:41:14.165375+00:00, :discounts [ { :percentage 10.0, :due 2021-03-12T06:41:12.584000+00:00 } ], :due 2021-05-12T03:41:14.560000+00:00, :status paid, :interest 1.3, :id 5616810774757376, :fine 2.5, :fine-amount 0, :transaction-ids[] :discount-amount 0, :brcode 00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D, :descriptions [ { :key Arya, :value Not today } ] } }
{ "log": { "id": "6742710681600000", "created": "2020-10-27T23:00:08.338233+00:00", "errors": [], "type": "credited", "invoice": { "id": "5616810774757376", "status": "paid", "amount": 120000, "nominalAmount": 120000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "expiration": 123456789, "discounts": [ { "percentage": 10 "due": "2020-11-25T17:59:26.000000+00:00" } ], "descriptions": [ { "key": "Arya" "value": "Not today" } ], "name": "Arya Stark", "taxId": "012.345.678-90", "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "tags": [ "War supply", "Invoice #1234" ], "transactionIds": [], "brcode": "00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D", "created": "2020-10-27T01:50:50.264656+00:00", "updated": "2020-10-27T01:50:50.264656+00:00", "due": "2021-05-12T17:59:26.000000+00:00" } } }
Whenever an Invoice is successfully reversed, a reversed log will be created. To retrieve a specific reversal receipt, you can request the corresponding log PDF.
id
import starkbank pdf = starkbank.invoice.log.pdf("6742710681600000") with open("invoice-reversal.pdf", "wb") as file: file.write(pdf)
const starkbank = require('starkbank'); const fs = require('fs').promises; (async() => { let pdf = await starkbank.invoice.log.pdf('6742710681600000') await fs.writeFile('invoice-log.pdf', pdf); })();
use StarkBank\Invoice\Log; $pdf = Log::pdf("6742710681600000"); $fp = fopen('invoice-log.pdf', 'w'); fwrite($fp, $pdf); fclose($fp);
Log({ "id": "6742710681600000", "created": "2020-10-27T18:20:09.558082+00:00", "type": "credited", "errors": [], "invoice": { "amount": 120000, "due": "2020-10-30T18:15:53.754000+00:00", "taxId": "012.345.678-90", "name": "Arya Stark", "expiration": 123456789, "fee": 0, "pdf": "https://invoice-h.sandbox.starkbank.com/pdf/851ff545535c40ba88e24a05accb9978", "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978", "fine": 2.5, "interest": 1.3, "descriptions": [ { "key": "Arya", "value": "Not today" } ], "discounts": [ { "percentage": 10, "due": "2021-03-12T21:15:53.754000+00:00" } ], "tags": ["new sword", "invoice #1234"], "transaction_ids": [], "nominalAmount": 120000, "fineAmount": 0, "interestAmount": 0, "discountAmount": 0, "brcode": "00020101021226860014br.gov.bcb.pix2564invoice-h.sandbox.starkbank.com/7e0b4b71ec924f48865a4a3d979565f65204000053039865802BR5915Stark Bank S.A.6009Sao Paulo62070503***6304365D", "status": "paid", "created": "2020-10-27T18:15:53.894294+00:00", "updated": "2020-10-27T18:20:11.266852+00:00", "id": "5616810774757376" } })
require('starkbank') pdf = StarkBank::Invoice::Log.pdf('6742710681600000') File.binwrite('invoice_log.pdf', pdf)
pdf = StarkBank.Invoice.Log.pdf!("6742710681600000") file = File.open!("invoice-log.pdf", [:write]) IO.binwrite(file, pdf) File.close(file)
using System; byte[] pdf = StarkBank.Invoice.Log.Pdf("6742710681600000"); System.IO.File.WriteAllBytes("invoice-log.pdf", pdf);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice/log" ) func main() { pdf, err := log.Pdf("6742710681600000", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } errFile := ioutil.WriteFile("invoiceLog.pdf", pdf, 0666) if errFile != nil { fmt.Print(errFile) } }
(clojure.java.io/copy (starkbank.invoice.log/pdf "67504567427106816000008353811456") (clojure.java.io/file "invoice-log.pdf"))
curl --location --request GET '{{baseUrl}}/v2/invoice/log/6742710681600000/pdf' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Once an invoice has been paid, you can get the payment information using the Invoice. Payment sub-resource.
id
import starkbank payment = starkbank.invoice.payment("5049137766596608") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.invoice.payment('5049137766596608'); console.log(payment); })();
use StarkBank\Invoice; $payment = Invoice::payment("5049137766596608"); print_r($payment);
import com.starkbank.*; InputStream pdf = Invoice.Log.pdf("6742710681600000"); java.nio.file.Files.copy( pdf, new File("invoice.pdf").toPath(), StandardCopyOption.REPLACE_EXISTING );
require('starkbank') payment = StarkBank::Invoice.Payment('5049137766596608') puts payment
payment = StarkBank.Invoice.payment!("5049137766596608") |> IO.inspect
using System; StarkBank.Invoice.Payment payment = StarkBank.Invoice.Payment("5049137766596608"); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice" ) func main() { payment, err := Invoice.GetPayment("5049137766596608", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.invoice/payment "5049137766596608")) (println payment)
curl --location --request GET '{{baseUrl}}/v2/invoice/5049137766596608/payment' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Payment( account_number=3352164669759737, account_type=checking, amount=566223, bank_code=35480428, branch_code=7533, end_to_end_id=E01709266202302150600xG8OcRCaojI, method=pix, name=Cesar Eireli, tax_id=54.866.319/0001-23 )
Payment { amount: 566223, name: 'Cesar Eireli', taxId: '54.866.319/0001-23' accountNumber: '3352164669759737', accountType: 'checking', bankCode: '35480428', branchCode: '7533', endToEndId: 'E01709266202302150600xG8OcRCaojI', method: 'pix', }
StarkBank\Invoice\Payment Object ( [name] => Cesar Eireli. [taxId] => 54.866.319/0001-23 [bankCode] => 35480428 [branchCode] => 7533 [accountNumber] => 3352164669759737 [accountType] => checking [amount] => 566223 [endToEndId] => E01709266202302150600xG8OcRCaojI [method] => pix )
import com.starkbank.*; Invoice.Payment payment = Invoice.payment("5049137766596608"); System.out.println(payment);
payment( name: Cesar Eireli., tax_id: 54.866.319/0001-23, bank_code: 35480428, branch_code: 7533, account_number: 3352164669759737, account_type: checking, amount: 566223, end_to_end_id: E01709266202302150600xG8OcRCaojI, method: pix )
%StarkBank.Invoice.Payment{ name: "Cesar Eireli.", tax_id: "54.866.319/0001-23", bank_code: "35480428", branch_code: "7533", account_number: "3352164669759737", account_type: "checking", amount: 566223, end_to_end_id: "E01709266202302150600xG8OcRCaojI", method: "pix" }
InvoicePayment( Amount: 566223, Name: Cesar Eireli., TaxID: 54.866.319/0001-23, BankCode: 35480428, BranchCode: 7533, AccountNumber: 3352164669759737, AccountType: checking, EndToEndId: E01709266202302150600xG8OcRCaojI, Method: pix )
{ Amount:566223, Name:Cesar Eireli., TaxId:54.866.319/0001-23, BankCode:35480428, BranchCode:7533, AccountNumber:3352164669759737, AccountType:checking, EndToEndId:E01709266202302150600xG8OcRCaojI, Method:pix }
{ :amount: 566223, :name: Cesar Eireli., :tax-id: 54.866.319/0001-23, :bank-code: 35480428, :branch-code: 7533, :account-number: 3352164669759737, :account-type: checking, :end-to-end-id: E01709266202302150600xG8OcRCaojI, :method: pix }
{ payment: { amount: 566223, name: "Cesar Eireli", taxId: "54.866.319/0001-23" accountNumber: "3352164669759737", accountType: "checking", bankCode: "35480428", branchCode: "7533", endToEndId: "E01709266202302150600xG8OcRCaojI", method: "pix", } }
Note:This is a basic Pix QR Code solution for one time payment. For a complete Pix QR Code receivable, check the Invoice resource.
Use this route to create up to 100 new dynamic brcodes at a time.
amount
expiration
tags
import starkbank from datetime import datetime brcodes = starkbank.dynamicbrcode.create([ starkbank.DynamicBrcode( amount=4000, expiration=123456789, tags=['New sword', 'DynamicBrcode #1234'] ) ]) for brcode in brcodes: print(brcode)
const starkbank = require('starkbank'); (async() => { let brcodes = await starkbank.dynamicBrcode.create([{ amount: 4000, expiration: 123456789, tags: ['New sword', 'DynamicBrcode #1234'] }]); for (let brcode of brcodes) { console.log(brcode); } })();
use StarkBank\DynamicBrcode; $brcodes = DynamicBrcode::create([ new DynamicBrcode([ "amount" => 4000, "expiration" => 123456789, "tags" => [ 'New sword', 'DynamicBrcode #1234' ] ]) ]); foreach ($brcodes as $brcode) { print_r($brcode); }
import com.starkbank.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; List<DynamicBrcode> brcodes = new ArrayList<>(); HashMap<String, Object> data = new HashMap<>(); data.put("amount", 4000); data.put("expiration", 123456789); brcodes.add(new DynamicBrcode(data)); brcodes = DynamicBrcode.create(brcodes); for (DynamicBrcode brcode : brcodes) { System.out.println(brcode); }
require('starkbank') brcodes = StarkBank::DynamicBrcode.create( [ StarkBank::DynamicBrcode.new( amount: 4000, expiration: 123456789, ) ] ) brcodes.each do |brcode| puts brcode end
brcode = StarkBank.DynamicBrcode.create!( [ %StarkBank.DynamicBrcode{ amount: 4000, expiration: 123456789, tags: [ "New sword", "DynamicBrcode #1234" ] } ] ) |> IO.inspect()
using System; using System.Collections.Generic; List<StarkBank.DynamicBrcode> brcodes = StarkBank.DynamicBrcode.Create( new List<StarkBank.DynamicBrcode> { new StarkBank.DynamicBrcode( amount: 4000, expiration: 123456789 tags: new List { "New sword", "DynamicBrcode #1234" }, ) } ); foreach (StarkBank.DynamicBrcode brcode in brcodes) { Console.WriteLine(brcode); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/dynamicbrcode" "time" ) func main() { due := time.Now().Add(time.Hour * 24) brcodes, err := dynamicbrcode.Create( []dynamicbrcode.DynamicBrcode{ { Amount: 4000, Expiration: 123456789, Tags: []string{"New sword", "DynamicBrcode #1234"}, }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, brcode := range brcodes { fmt.Printf("%+v", brcode) } }
Not yet available. Please contact us if you need this SDK.
curl --location --request POST '{{baseUrl}}/v2/dynamic-brcode' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "brcodes": [ { "amount": 4000, "expiration": 1234567890, "tags": [ "New sword", "DynamicBrcode #1234" ] } ] }'
DynamicBrcode( amount=4000, created=2023-02-06 21:15:00.118056, expiration=1428 days, 21:33:09, id=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/80b0688d05934971a6b8ecd86cde69f25204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***630461C9, picture_url=https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png, tags=['new sword', 'dynamicbrcode #1234'], updated=2023-02-06 21:15:00.449696, uuid=80b0688d05934971a6b8ecd86cde69f2 )
DynamicBrcode { id: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47', amount: 4000, expiration: 123456789, tags: [ 'new sword', 'dynamicbrcode #1234' ], uuid: '80b0688d05934971a6b8ecd86cde69f2', pictureUrl: 'https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png', updated: '2023-02-06T21:17:30.977004+00:00', created: '2023-02-06T21:17:30.625913+00:00' }
StarkBank\DynamicBrcode Object ( [id] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47 [amount] => 4000 [expiration] => DateInterval Object ( [y] => 0 [m] => 0 [d] => 0 [h] => 0 [i] => 0 [s] => 123456789 [f] => 0 [invert] => 0 [days] => [from_string] => ) [tags] => Array ( [0] => new sword [1] => dynamicbrcode #1234 ) [uuid] => 80b0688d05934971a6b8ecd86cde69f2 [pictureUrl] => https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png [updated] => DateTime Object ( [date] => 2023-02-06 21:23:50.776494 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2023-02-06 21:23:50.435531 [timezone_type] => 1 [timezone] => +00:00 ) )
DynamicBrcode({ "amount": 4000, "expiration": 123456789, "tags": ["new sword", "dynamicbrcode #1234"], "uuid": "80b0688d05934971a6b8ecd86cde69f2", "pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png", "updated": "2023-02-06T21:30:36.688229+00:00", "created": "2023-02-06T21:30:36.372956+00:00", "id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/8411cece3387471ea7f2636b618c37fb5204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304556B" })
dynamicbrcode( id: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9, amount: 4000, expiration: 123456789, tags: ["new sword", "dynamicbrcode #1234"], uuid: 80b0688d05934971a6b8ecd86cde69f2, picture_url: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png, created: 2023-02-06T21:39:47+00:00, updated: 2023-02-06T21:39:47+00:00 )
%StarkBank.DynamicBrcode{ id: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9", uuid: "80b0688d05934971a6b8ecd86cde69f2", amount: 4000, expiration: 123456789, picture_url: "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png", created: ~U[2023-02-06 18:36:18.116976Z], updated: ~U[2023-02-06 18:36:18.116976Z] }
DynamicBrcode( ID: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9 Expiration: 123456789, Tags: { "new sword", "dynamicbrcode #1234" }, Amount: 4000, Uuid: 80b0688d05934971a6b8ecd86cde69f2, PictureUrl: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png, Created: 06/02/2023 18:45:08, Updated: 06/02/2023 18:45:08 )
{ Id:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9 Uuid:80b0688d05934971a6b8ecd86cde69f2 Amount:4000 Expiration:123456789 Tags:[new sword dynamicbrcode #1234] PictureUrl:https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png Created:2023-02-06 19:54:54.16799 +0000 +0000 Updated:2023-02-06 19:54:54.24204 +0000 +0000 }
Not yet available. Please contact us if you need this SDK.
{ "brcodes": [ { "amount": 4000, "created": "2023-02-06T21:49:19.660252+00:00", "expiration": 123456789, "id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9", "pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png", "tags": [ "new sword", "dynamicbrcode #1234" ], "updated": "2023-02-06T21:49:19.987058+00:00", "uuid": "80b0688d05934971a6b8ecd86cde69f2" } ], "message": "Brcode(s) successfully created" }
Get a list of brcodes in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
uuids
tags
import starkbank brcodes = starkbank.dynamicbrcode.query( after="2023-02-01", before="2023-02-28", ) for brcode in brcodes: print(brcode)
const starkbank = require('starkbank'); (async() => { let brcodes = await starkbank.dynamicBrcode.query({ after: '2023-02-01', before: '2023-02-28', }); for await (let brcode of brcodes) { console.log(brcode); } })();
use StarkBank\DynamicBrcode; $brcodes = iterator_to_array( DynamicBrcode::query([ "after" => "2023-02-01", "before" => "2023-02-28", ]) ); foreach ($brcodes as $brcode) { print_r($brcode); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2023-02-01"); params.put("before", "2023-02-28"); Generator<DynamicBrcode> brcodes = DynamicBrcode.query(params); for (DynamicBrcode brcode : brcodes){ System.out.println(brcode); }
require('starkbank') brcodes = StarkBank::DynamicBrcode.query( after: '2023-02-01', before: '2023-02-28' ) brcodes.each do |brcode| puts brcode end
brcodes = StarkBank.DynamicBrcode.query!( after: "2023-02-01", before: "2023-02-28" ) |> Enum.take(1) |> IO.inspect
IEnumerable<StarkBank.DynamicBrcode> brcodes = StarkBank.DynamicBrcode.Query( after: new DateTime(2023, 2, 1), before: new DateTime(2023, 2, 28) ); foreach (StarkBank.DynamicBrcode brcode in brcodes) { Console.WriteLine(brcode); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/brcode" ) func main() { var params = map[string]interface{}{} params["after"] = "2023-02-01" params["before"] = "2023-02-28" brcodes := brcode.Query(params, nil) for brcode := range brcodes { fmt.Printf("%+v", brcode) } }
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/dynamic-brcode?after=2023-02-01&before=2023-02-28' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
DynamicBrcode( amount=4000, created=2023-02-06 21:15:00.118056, expiration=1428 days, 21:33:09, id=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/80b0688d05934971a6b8ecd86cde69f25204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***630461C9, picture_url=https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png, tags=['new sword', 'dynamicbrcode #1234'], updated=2023-02-06 21:15:00.449696, uuid=80b0688d05934971a6b8ecd86cde69f2 )
DynamicBrcode { id: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47', amount: 4000, expiration: 123456789, tags: [ 'new sword', 'dynamicbrcode #1234' ], uuid: '80b0688d05934971a6b8ecd86cde69f2', pictureUrl: 'https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png', updated: '2023-02-06T21:17:30.977004+00:00', created: '2023-02-06T21:17:30.625913+00:00' }
StarkBank\DynamicBrcode Object ( [id] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47 [amount] => 4000 [expiration] => DateInterval Object ( [y] => 0 [m] => 0 [d] => 0 [h] => 0 [i] => 0 [s] => 123456789 [f] => 0 [invert] => 0 [days] => [from_string] => ) [tags] => Array ( [0] => new sword [1] => dynamicbrcode #1234 ) [uuid] => 80b0688d05934971a6b8ecd86cde69f2 [pictureUrl] => https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png [updated] => DateTime Object ( [date] => 2023-02-06 21:23:50.776494 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2023-02-06 21:23:50.435531 [timezone_type] => 1 [timezone] => +00:00 ) )
DynamicBrcode({ "amount": 4000, "expiration": 123456789, "tags": ["new sword", "dynamicbrcode #1234"], "uuid": "80b0688d05934971a6b8ecd86cde69f2", "pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png", "updated": "2023-02-06T21:30:36.688229+00:00", "created": "2023-02-06T21:30:36.372956+00:00", "id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/8411cece3387471ea7f2636b618c37fb5204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304556B" })
dynamicbrcode( id: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9, amount: 4000, expiration: 123456789, tags: ["new sword", "dynamicbrcode #1234"], uuid: 80b0688d05934971a6b8ecd86cde69f2, picture_url: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png, created: 2023-02-06T21:39:47+00:00, updated: 2023-02-06T21:39:47+00:00 )
%StarkBank.DynamicBrcode{ id: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9", uuid: "80b0688d05934971a6b8ecd86cde69f2", amount: 4000, expiration: 123456789, picture_url: "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png", created: ~U[2023-02-06 18:36:18.116976Z] updated: ~U[2023-02-06 18:36:18.116976Z] }
DynamicBrcode( ID: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9 Expiration: 123456789, Tags: { "new sword", "dynamicbrcode #1234" }, Amount: 4000, Uuid: 80b0688d05934971a6b8ecd86cde69f2, PictureUrl: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png, Created: 06/02/2023 18:45:08, Updated: 06/02/2023 18:45:08, )
{ Id:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9 Uuid:80b0688d05934971a6b8ecd86cde69f2 Amount:4000 Expiration:123456789 Tags:[new sword dynamicbrcode #1234] PictureUrl:https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png Created:2023-02-06 19:54:54.16799 +0000 +0000 Updated:2023-02-06 19:54:54.24204 +0000 +0000 }
Not yet available. Please contact us if you need this SDK.
{ "brcodes": [ { "amount": 4000, "created": "2023-02-06T21:49:19.660252+00:00", "expiration": 123456789, "id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9", "pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png", "tags": [ "new sword", "dynamicbrcode #1234" ], "updated": "2023-02-06T21:49:19.987058+00:00", "uuid": "80b0688d05934971a6b8ecd86cde69f2" } ], "cursor": "CkwKFAoHY3JlYXRlZBIJCNyR8Ibwgf0CEjBqFGl-YXBpLW1zLWRlcG9zaXQtc2J4chgLEgtEZXBvc2l0UnVsZRiAgIDYr9DSCAwYACAB" }
Get a single dynamic brcode by its uuid.
uuid
fields
import starkbank brcode = starkbank.dynamicbrcode.get("80b0688d05934971a6b8ecd86cde69f2") print(brcode)
const starkbank = require('starkbank'); (async() => { let brcode = await starkbank.dynamicBrcode.get('80b0688d05934971a6b8ecd86cde69f2'); console.log(brcode); })();
use StarkBank\DynamicBrcode; $brcode = DynamicBrcode::get("80b0688d05934971a6b8ecd86cde69f2"); print_r($brcode);
import com.starkbank.*; DynamicBrcode brcode = DynamicBrcode.get("80b0688d05934971a6b8ecd86cde69f2"); System.out.println(brcode);
require('starkbank') brcode = StarkBank::DynamicBrcode.get('80b0688d05934971a6b8ecd86cde69f2') puts brcode
brcode = StarkBank.DynamicBrcode.get!("80b0688d05934971a6b8ecd86cde69f2") |> IO.inspect
using System; StarkBank.DynamicBrcode brcode = StarkBank.DynamicBrcode.Get("80b0688d05934971a6b8ecd86cde69f2"); Console.WriteLine(brcode);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/brcode" ) func main() { brcode, err := brcode.Get("80b0688d05934971a6b8ecd86cde69f2", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", brcode) }
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
DynamicBrcode( amount=4000, created=2023-02-06 21:15:00.118056, expiration=1428 days, 21:33:09, id=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/80b0688d05934971a6b8ecd86cde69f25204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***630461C9, picture_url=https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png, tags=['new sword', 'dynamicbrcode #1234'], updated=2023-02-06 21:15:00.449696, uuid=80b0688d05934971a6b8ecd86cde69f2 )
DynamicBrcode { id: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47', amount: 4000, expiration: 123456789, tags: [ 'new sword', 'dynamicbrcode #1234' ], uuid: '80b0688d05934971a6b8ecd86cde69f2', pictureUrl: 'https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png', updated: '2023-02-06T21:17:30.977004+00:00', created: '2023-02-06T21:17:30.625913+00:00' }
StarkBank\DynamicBrcode Object ( [id] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/e285405b196e42bb8e68f654283dcaa05204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304CB47 [amount] => 4000 [expiration] => DateInterval Object ( [y] => 0 [m] => 0 [d] => 0 [h] => 0 [i] => 0 [s] => 123456789 [f] => 0 [invert] => 0 [days] => [from_string] => ) [tags] => Array ( [0] => new sword [1] => dynamicbrcode #1234 ) [uuid] => 80b0688d05934971a6b8ecd86cde69f2 [pictureUrl] => https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png [updated] => DateTime Object ( [date] => 2023-02-06 21:23:50.776494 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2023-02-06 21:23:50.435531 [timezone_type] => 1 [timezone] => +00:00 ) )
DynamicBrcode({ "amount": 4000, "expiration": 123456789, "tags": ["new sword", "dynamicbrcode #1234"], "uuid": "80b0688d05934971a6b8ecd86cde69f2", "pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png", "updated": "2023-02-06T21:30:36.688229+00:00", "created": "2023-02-06T21:30:36.372956+00:00", "id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/8411cece3387471ea7f2636b618c37fb5204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***6304556B" })
dynamicbrcode( id: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9, amount: 4000, expiration: 123456789, tags: ["new sword", "dynamicbrcode #1234"], uuid: 80b0688d05934971a6b8ecd86cde69f2, picture_url: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png, created: 2023-02-06T21:39:47+00:00, updated: 2023-02-06T21:39:47+00:00 )
%StarkBank.DynamicBrcode{ id: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9", uuid: "80b0688d05934971a6b8ecd86cde69f2", amount: 4000, expiration: 123456789, picture_url: "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png", created: ~U[2023-02-06 18:36:18.116976Z] updated: ~U[2023-02-06 18:36:18.116976Z] }
DynamicBrcode( ID: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9 Expiration: 123456789, Tags: { "new sword", "dynamicbrcode #1234" }, Amount: 4000, Uuid: 80b0688d05934971a6b8ecd86cde69f2, PictureUrl: https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png, Created: 06/02/2023 18:45:08, Updated: 06/02/2023 18:45:08, )
{ Id:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9 Uuid:80b0688d05934971a6b8ecd86cde69f2 Amount:4000 Expiration:123456789 Tags:[new sword dynamicbrcode #1234] PictureUrl:https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png Created:2023-02-06 19:54:54.16799 +0000 +0000 Updated:2023-02-06 19:54:54.24204 +0000 +0000 }
Not yet available. Please contact us if you need this SDK.
{ "brcode": { "amount": 4000, "created": "2023-02-06T21:49:19.660252+00:00", "expiration": 123456789, "id": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/0e96a462d44a4d789f6d4fcbf7aa63b45204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63048CC9", "pictureUrl": "https://sandbox.api.starkbank.com/v2/dynamic-brcode/80b0688d05934971a6b8ecd86cde69f2.png", "tags": [ "new sword", "dynamicbrcode #1234" ], "updated": "2023-02-06T21:49:19.987058+00:00", "uuid": "80b0688d05934971a6b8ecd86cde69f2" } }
Deposits represent passive cash-ins received by your account from external transfers or payments. In this section, we will teach you how to manage your Deposits.
Here you can list and filter all deposits you have made. We return it paged.
cursor
limit
after
before
ids
status
sort
tags
fields
import starkbank deposits = starkbank.deposit.query( after="2020-11-01", before="2020-11-30" ) for deposit in deposits: print(deposit)
const starkbank = require('starkbank'); (async() => { let deposits = await starkbank.deposit.query({ after: '2020-11-01', before: '2020-11-30' }); for await (let deposit of deposits) { console.log(deposit); } })();
use StarkBank\Deposit; $deposits = iterator_to_array( Deposit::query([ "after" => "2020-11-01T18:00:00.000000+00:00", "before" => "2020-11-30T18:00:00.000000+00:00" ]) ); foreach ($deposits as $deposit) { print_r($deposit); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2020-11-01"); params.put("before", "2020-11-30"); Generator<Deposit> deposits = Deposit.query(params); for (Deposit deposit : deposits){ System.out.println(deposit); }
require('starkbank') require('date') deposits = StarkBank::Deposit.query( after: '2020-11-01', before: '2020-11-30' ) deposits.each do |deposit| puts deposit end
deposits = StarkBank.Deposit.query!( after: "2020-11-01", before: "2020-11-30" ) for deposit <- deposits do deposit |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.Deposit> deposits = StarkBank.Deposit.Query( after: new DateTime(2020, 11, 1), before: new DateTime(2020, 11, 30) ); foreach (StarkBank.Deposit deposit in deposits) { Console.WriteLine(deposit); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/deposit" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-11-01" params["before"] = "2020-11-30" deposits := deposit.Query(params, nil) for deposit := range deposits { fmt.Printf("%+v", deposit) } }
(def deposits (starkbank.deposit/query { :after "2020-11-01" :before "2020-11-30" })) (doseq [deposit deposits] (println deposit))
curl --location --request GET '{{baseUrl}}/v2/deposit?after=2020-11-01&before=2020-11-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Deposit( account_number=1010101010101010, account_type= "payment", amount=100000, bank_code=20018183, branch_code=0001, created=2020-11-11 14:42:45.824846, fee=50, id=5155165527080960, name=Iron Bank S.A, status=created, tags=['deposit'], tax_id=10.203.000/0001-80, transaction_ids=['6663513506316288'], type=pix, updated=2020-11-11 14:42:47.333539 )
Deposit { id: '5155165527080960', name: 'Iron Bank S.A', taxId: '10.203.000/0001-80', bankCode: '20018183', branchCode: '0001', accountNumber: '1010101010101010', accountType: 'payment', amount: 100000, type: 'pix', status: 'created', tags: [ 'deposit' ], fee: 50, transactionIds: [ '6663513506316288' ], created: '2020-11-11T14:42:43.144663+00:00', updated: '2020-11-11T14:42:53.282375+00:00' }
StarkBank\Deposit Object ( [id] => 5155165527080960 [name] => Iron Bank S.A [taxId] => 10.203.000/0001-80 [bankCode] => 20018183 [branchCode] => 0001 [accountNumber] => 1010101010101010 [accountType] => payment [amount] => 100000 [type] => pix [status] => created [tags] => Array ( [0] => deposit ) [fee] => 50 [transactionIds] => Array ( [0] => 6663513506316288 ) [created] => DateTime Object ( [date] => 2020-11-11 14:42:43.144663 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-11-11 14:42:53.282375 [timezone_type] => 1 [timezone] => +00:00 ) )
Deposit({ "name": "Iron Bank S.A", "taxId": "10.203.000/0001-80", "bankCode": "20018183", "branchCode": "0001", "accountNumber": "1010101010101010", "accountType": "payment", "amount": 100000, "type": "pix", "status": "created", "tags": [ "deposit" ], "fee": 50, "transactionIds": [ "6663513506316288" ], "created": "2020-11-11T14:42:43.144663+00:00", "updated": "2020-11-11T14:42:53.282375+00:00", "id": "5155165527080960" })
deposit( id: 5155165527080960, name: Iron Bank S.A, tax_id: 10.203.000/0001-80, bank_code: 20018183, branch_code: 0001, account_number: 1010101010101010, account_type: payment, amount: 100000, type: pix, status: created, tags: ["deposit"], fee: 50, transaction_ids: ["5862355036536832"], created: 2020-11-11T14:42:43+00:00, updated: 2020-11-11T14:42:53+00:00 )
%StarkBank.Deposit{ account_number: "5078376503050240", account_type: "payment", amount: 100000, bank_code: "20018183", branch_code: "0001", created: ~U[2020-11-11 14:42:53.282375Z] fee: 50, id: "5155165527080960", name: "Stark Bank S.A.", status: "created", tags: ["deposit"], tax_id: "10.203.000/0001-80", transaction_ids: ["6663513506316288"], type: "pix", updated: ~U[2020-11-11 14:42:53.282375Z] }
Deposit( Amount: 100000, Name: Iron Bank S.A, TaxID: 10.203.000/0001-80, BankCode: 20018183, BranchCode: 0001, AccountNumber: 1010101010101010, AccountType: payment, Type: pix, Fee: 50, TransactionIds: { 6663513506316288 }, Status: created, Tags: { deposit }, Created: 11/11/2020 11:42:43, Updated: 11/11/2020 11:42:53, ID: 5155165527080960 )
{ Id:5155165527080960 Name:Iron Bank S.A TaxId:10.203.000/0001-80 BankCode:20018183 BranchCode:0001 AccountNumber:1010101010101010 AccountType:payment Amount:100000 Type:pix Status:created Tags:[deposit] Fee:50 TransactionIds:[6663513506316288] Created:2020-11-11 14:42:18.281081 +0000 +0000 Updated:2020-11-11 14:42:20.060486 +0000 +0000 }
{ :amount 100000, :fee 50, :tags [deposit], :branch-code 0001, :updated 2020-11-11T11:42:58.939596+00:00, :name Stark Bank S.A., :tax-id 10.203.000/0001-80, :type pix, :created 2020-11-11T11:42:57.490286+00:00, :status created, :id 5155165527080960, :transaction-ids [6663513506316288], :account-number 1010101010101010, :account-type payment, :bank-code 20018183 }
{ "cursor": null, "deposits": [ { "status": "created", "updated": "2020-11-11T14:42:53.282375+00:00", "accountNumber": "1010101010101010", "accountType": "payment", "taxId": "10.203.000/0001-80", "transactionIds": [ "6663513506316288" ], "bankCode": "20018183", "id": "5155165527080960", "fee": 50, "name": "Iron Bank S.A", "created": "2020-11-11T14:42:43.144663+00:00", "tags": [ "deposit" ], "branchCode": "0001", "amount": 100000, "type": "pix" } ] }
Get a single Deposit by its id.
id
fields
import starkbank deposit = starkbank.deposit.get("5155165527080960") print(deposit)
const starkbank = require('starkbank'); (async() => { let deposit = await starkbank.deposit.get('5155165527080960') console.log(deposit); })();
use StarkBank\Deposit; $deposit = Deposit::get('5155165527080960'); print_r($deposit);
import com.starkbank.*; Deposit deposit = Deposit.get("5155165527080960"); System.out.println(deposit);
require('starkbank') deposit = StarkBank::Deposit.get('5155165527080960') puts deposit
deposit = StarkBank.Deposit.get!("5155165527080960") |> IO.inspect
using System; StarkBank.Deposit deposit = StarkBank.Deposit.Get("5155165527080960"); Console.WriteLine(deposit);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/deposit" ) func main() { deposit, err := deposit.Get("5155165527080960", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", deposit) }
(def deposit (starkbank.deposit/get "5155165527080960")) (println deposit)
curl --location --request GET '{{baseUrl}}/v2/deposit/5155165527080960' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Deposit( account_number=1010101010101010, account_type= "payment", amount=100000, bank_code=20018183, branch_code=0001, created=2020-11-11 14:42:45.824846, fee=50, id=5155165527080960, name=Iron Bank S.A, status=created, tags=['deposit'], tax_id=10.203.000/0001-80, transaction_ids=['6663513506316288'], type=pix, updated=2020-11-11 14:42:47.333539 )
Deposit { id: '5155165527080960', name: 'Iron Bank S.A', taxId: '10.203.000/0001-80', bankCode: '20018183', branchCode: '0001', accountNumber: '1010101010101010', accountType: 'payment', amount: 100000, type: 'pix', status: 'created', tags: [ 'deposit' ], fee: 50, transactionIds: [ '6663513506316288' ], created: '2020-11-11T14:42:43.144663+00:00', updated: '2020-11-11T14:42:53.282375+00:00' }
StarkBank\Deposit Object ( [id] => 5155165527080960 [name] => Iron Bank S.A [taxId] => 10.203.000/0001-80 [bankCode] => 20018183 [branchCode] => 0001 [accountNumber] => 1010101010101010 [accountType] => payment [amount] => 100000 [type] => pix [status] => created [tags] => Array ( [0] => deposit ) [fee] => 50 [transactionIds] => Array ( [0] => 6663513506316288 ) [created] => DateTime Object ( [date] => 2020-11-11 14:42:43.144663 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-11-11 14:42:53.282375 [timezone_type] => 1 [timezone] => +00:00 ) )
Deposit({ "name": "Iron Bank S.A", "taxId": "10.203.000/0001-80", "bankCode": "20018183", "branchCode": "0001", "accountNumber": "1010101010101010", "accountType": "payment", "amount": 100000, "type": "pix", "status": "created", "tags": [ "deposit" ], "fee": 50, "transactionIds": [ "6663513506316288" ], "created": "2020-11-11T14:42:43.144663+00:00", "updated": "2020-11-11T14:42:53.282375+00:00", "id": "5155165527080960" })
deposit( id: 5155165527080960, name: Iron Bank S.A, tax_id: 10.203.000/0001-80, bank_code: 20018183, branch_code: 0001, account_number: 1010101010101010, account_type: payment, amount: 100000, type: pix, status: created, tags: ["deposit"], fee: 50, transaction_ids: ["5862355036536832"], created: 2020-11-11T14:42:43+00:00, updated: 2020-11-11T14:42:53+00:00 )
%StarkBank.Deposit{ account_number: "5078376503050240", account_type: "payment", amount: 100000, bank_code: "20018183", branch_code: "0001", created: ~U[2020-11-11 14:42:53.282375Z] fee: 50, id: "5155165527080960", name: "Stark Bank S.A.", status: "created", tags: ["deposit"], tax_id: "10.203.000/0001-80", transaction_ids: ["6663513506316288"], type: "pix", updated: ~U[2020-11-11 14:42:53.282375Z] }
Deposit( Amount: 100000, Name: Iron Bank S.A, TaxID: 10.203.000/0001-80, BankCode: 20018183, BranchCode: 0001, AccountNumber: 1010101010101010, AccountType: payment, Type: pix, Fee: 50, TransactionIds: { 6663513506316288 }, Status: created, Tags: { deposit }, Created: 11/11/2020 11:42:43, Updated: 11/11/2020 11:42:53, ID: 5155165527080960 )
{ Id:5155165527080960 Name:Iron Bank S.A TaxId:10.203.000/0001-80 BankCode:20018183 BranchCode:0001 AccountNumber:1010101010101010 AccountType:payment Amount:100000 Type:pix Status:created Tags:[deposit] Fee:50 TransactionIds:[6663513506316288] Created:2020-11-11 14:42:18.281081 +0000 +0000 Updated:2020-11-11 14:42:20.060486 +0000 +0000 }
{ :amount 100000, :fee 50, :tags [deposit], :branch-code 0001, :updated 2020-11-11T11:42:58.939596+00:00, :name Stark Bank S.A., :tax-id 10.203.000/0001-80, :type pix, :created 2020-11-11T11:42:57.490286+00:00, :status created, :id 5155165527080960, :transaction-ids [6663513506316288], :account-number 1010101010101010, :account-type payment, :bank-code 20018183 }
{ "deposits": { "status": "created", "updated": "2020-11-11T14:42:53.282375+00:00", "accountNumber": "1010101010101010", "accountType": "payment", "taxId": "10.203.000/0001-80", "transactionIds": [ "6663513506316288" ], "bankCode": "20018183", "id": "5155165527080960", "fee": 50, "name": "Iron Bank S.A", "created": "2020-11-11T14:42:43.144663+00:00", "tags": [ "deposit" ], "branchCode": "0001", "amount": 100000, "type": "pix" } }
Update the Deposit by passing its id to be partially or fully reversed.
id
amount
import starkbank deposit = starkbank.deposit.update( "5155165527080960", amount=0, ) print(deposit)
const starkbank = require('starkbank'); (async() => { let deposit = await starkbank.deposit.update( '5155165527080960', { amount: 0 } ); console.log(deposit); })();
Not yet available. Please contact us if you need this SDK.
import com.starkbank.*; import java.util.HashMap; HashMappatchData = new HashMap<>(); patchData.put("amount", 0); Deposit deposit = Deposit.update("5155165527080960", patchData); System.out.println(deposit);
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request PATCH '{{baseUrl}}/v2/deposit/5155165527080960' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "amount": 0, }'
Deposit ( id="6165578200907776", name="Brice Ltda.", tax_id="72.831.025/0001-48", bank_code="07252614", branch_code="2645", account_number="4729524077596703", account_type="savings", amount=0, type="pix", status="created", tags=[ "e07252614202310251510pkudndwgiev", "72055490-9aa6-4df9-ab5c-2009a9621f33", "ditto" ], fee=0, transaction_ids=[ "72909267320047755761378230622962" ], created="2023-10-25T15:10:51.111167+00:00", updated="2024-01-10T14:08:24.577238+00:00" )
Deposit { id: '6165578200907776', name: 'Brice Ltda.', taxId: '72.831.025/0001-48', bankCode: '07252614', branchCode: '2645', accountNumber: '4729524077596703', accountType: 'savings', amount: 0, type: 'pix', status: 'created', tags: [ 'e07252614202310251510pkudndwgiev', '72055490-9aa6-4df9-ab5c-2009a9621f33', 'ditto' ], fee: 0, transactionIds: [ '72909267320047755761378230622962' ], created: '2023-10-25T15:10:51.111167+00:00', updated: '2024-01-10T14:08:24.577238+00:00' }
Not yet available. Please contact us if you need this SDK.
Deposit({ "id": "6676193709391872", "name": "Stark Bank S.A. - Instituicao de Pagamento", "taxId": "20.018.183/0001-80", "bankCode": "20018183", "branchCode": "0001", "accountNumber": "6285683442319360", "accountType": "payment", "amount": "0", "type": "pix", "status": "created", "tags": [ "e20018183202401091210feho2snf786" ], "fee": "0", "transactionIds": [ "14776349998573571486997563581928" ], "created": "2024-01-09T12:10:26.394336+00:00", "updated": "2024-01-09T17:37:28.082085+00:00" })
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ Deposit { "id": "6165578200907776", "name": "Brice Ltda.", "taxId": "72.831.025/0001-48", "bankCode": "07252614", "branchCode": "2645", "accountNumber": "4729524077596703", "accountType": "savings", "amount": 0, "type": "pix", "status": "created", "tags": [ "e07252614202310251510pkudndwgiev", "72055490-9aa6-4df9-ab5c-2009a9621f33", "ditto" ], "fee": 0, "transactionIds": [ "72909267320047755761378230622962" ], "created": "2023-10-25T15:10:51.111167+00:00", "updated": "2024-01-10T14:08:24.577238+00:00" } }
Get a paged list of all deposit logs. A log tracks a change in the deposit entity according to its life cycle.
cursor
limit
after
before
types
depositIds
fields
import starkbank logs = starkbank.deposit.log.query( after="2020-11-01", before="2020-11-30" ) for log in logs: print(log)
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.deposit.log.query({ after: '2020-11-01', before: '2020-11-30' }); for await (let log of logs) { console.log(log); } })();
use StarkBank\Deposit\Log; $depositLogs = iterator_to_array( Log::query([ "after" => "2020-11-01T18:00:00.000000+00:00", "before" => "2020-11-30T18:00:00.000000+00:00" ]) ); foreach($depositLogs as $log) { print_r($log); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2020-11-01"); params.put("before", "2020-11-30"); Generator<Deposit.Log> logs = Deposit.Log.query(params); for (Deposit.Log log : logs){ System.out.println(log); }
require('starkbank') logs = StarkBank::Deposit::Log.query( after: '2020-11-01', before: '2020-11-30' ) logs.each do |log| puts log end
logs = StarkBank.Deposit.Log.query!( after: "2020-11-01", before: "2020-11-30" ) |> Enum.take(1) |> IO.inspect
using System; using System.Collections.Generic; IEnumerable<StarkBank.Deposit.Log> logs = StarkBank.Deposit.Log.Query( after: new DateTime(2020, 11, 1), before: new DateTime(2020, 11, 30) ); foreach(StarkBank.Deposit.Log log in logs) { Console.WriteLine(log); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/deposit/log" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-11-01" params["before"] = "2020-11-30" logs := log.Query(params, nil) for log := range logs { fmt.Printf("%+v", log) } }
(def logs (starkbank.deposit.log/query { :after "2020-11-01" :before "2020-11-30" })) (doseq [log logs] (println log))
curl --location --request GET '{{baseUrl}}/v2/deposit/log?after=2020-11-01&before=2020-11-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2020-11-11 14:44:44.385820, deposit=Deposit( account_number=1010101010101010, account_type=payment, amount=9000, bank_code=20018183, branch_code=0001, created=2020-11-11 14:44:43.144663, fee=50, id=5738709764800512, name=Iron Bank S.A, status=created, tags=['deposit'], tax_id=10.203.000/0001-80, transaction_ids=['5862355036536832'], type=pix, updated=2020-11-11 14:44:53.298960 ), errors=[], id=5066704988143616, type=credited )
Log { id: '5066704988143616', created: '2020-11-11T14:44:44.385820+00:00', type: 'credited', errors: [], deposit: { status: 'created', updated: '2020-11-11T14:44:53.298960+00:00', accountNumber: '1010101010101010', accountType: 'payment', taxId: '10.203.000/0001-80', transactionIds: [ '5862355036536832' ], bankCode: '20018183', id: '5738709764800512', fee: 50, name: 'Iron Bank S.A', created: '2020-11-11T14:44:43.144663+00:00', tags: [ 'deposit' ], branchCode: '0001', amount: 9000, type: 'pix' } }
StarkBank\Deposit\Log Object ( [id] => 5066704988143616 [created] => DateTime Object ( [date] => 2020-11-11 14:44:57.576040 [timezone_type] => 1 [timezone] => +00:00 ) [type] => created [errors] => Array ( ) [deposit] => StarkBank\Deposit Object ( [id] => 5738709764800512 [name] => Iron Bank S.A [taxId] => 10.203.000/0001-80 [bankCode] => 20018183 [branchCode] => 0001 [accountNumber] => 1010101010101010 [accountType] => payment [amount] => 9000 [type] => pix [status] => created [tags] => Array ( [0] => deposit ) [fee] => [transactionIds] => Array ( [0] => 5862355036536832 ) [created] => DateTime Object ( [date] => 2020-11-11 14:44:57.490286 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-11-11 14:44:58.966772 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "created": "2020-11-11T14:44:44.385820+00:00", "type": "credited", "errors": [], "deposit": { "name": "Iron Bank S.A", "taxId": "10.203.000/0001-80", "bankCode": "20018183", "branchCode": "0001", "accountNumber": "1010101010101010", "accountType": "payment", "amount": 9000, "type": "pix", "status": "created", "tags": [ "deposit" ], "fee": 50, "transactionIds": [ "5862355036536832" ], "created": "2020-11-11T14:44:43.144663+00:00", "updated": "2020-11-11T14:44:53.298960+00:00", "id": "5738709764800512" }, "id": "5066704988143616" })
log( id: 5066704988143616, type: credited, errors: [], deposit: deposit( id: 5738709764800512, name: Iron Bank S.A, tax_id: 10.203.000/0001-80, bank_code: 20018183, branch_code: 0001, account_number: 1010101010101010, account_type: payment, amount: 9000, type: pix, status: created, tags: ["deposit"], fee: 50, transaction_ids: ["5862355036536832"], created: 2020-11-11T14:44:43+00:00, updated: 2020-11-11T14:44:53+00:00 ), created: 2020-11-11T14:44:44+00:00 )
%StarkBank.Deposit.Log{ created: ~U[2020-11-11 14:44:44.385820Z], deposit: %StarkBank.Deposit{ account_number: "1010101010101010", account_type: "payment", amount: 9000, bank_code: "20018183", branch_code: "0001", created: ~U[2020-11-11 14:44:43.144663Z], fee: 50, id: "5738709764800512", name: "Iron Bank S.A", status: "created", tags: ["deposit"], tax_id: "10.203.000/0001-80", transaction_ids: ["5862355036536832"], type: "pix", updated: ~U[2020-11-11 14:44:53.298960Z] }, errors: [], id: "5066704988143616", type: "credited" }
Log( Created: 11/11/2020 11:44:44, Type: credited, Errors: { }, Deposit: Deposit( Amount: 9000, Name: Iron Bank S.A, TaxID: 10.203.000/0001-80, BankCode: 20018183, BranchCode: 0001, AccountNumber: 1010101010101010, AccountType: payment, Type: pix, Fee: 50, TransactionIds: { 5862355036536832 }, Status: created, Tags: { deposit }, Created: 11/11/2020 11:44:43, Updated: 11/11/2020 11:44:53, ID: 5738709764800512 ), ID: 5066704988143616 )
{ Id:5066704988143616 Deposit:{ Id:5738709764800512 Name:Iron Bank S.A TaxId:10.203.000/0001-80 BankCode:20018183 BranchCode:0001 AccountNumber:1010101010101010 AccountType:payment Amount:9000 Type:pix Status:created Tags:[deposit] Fee:50 TransactionIds:[5862355036536832] Created:2020-11-11 19:01:22.183451 +0000 +0000 Updated:2020-11-11 19:01:23.183451 +0000 +0000 } Errors:[] Type:credited Created:2020-11-11 14:44:44.520104 +0000 +0000 }
{ :id 5066704988143616, :created 2020-11-11T14:44:06.804223+00:00, :errors [], :type credited, :deposit { :amount 9000, :fee 50, :tags [deposit], :branch-code 0001, :updated 2020-11-11T11:44:58.939596+00:00, :name Iron Bank S.A, :tax-id 10.203.000/0001-80, :type pix, :created 2020-11-11T11:44:57.490286+00:00, :status created, :id 5738709764800512, :transaction-ids [5862355036536832], :account-number 1010101010101010, :account-type payment, :bank-code 20018183 } }
{ "cursor": null, "logs": [ { "deposit": { "status": "created", "updated": "2020-11-11T14:44:53.298960+00:00", "accountNumber": "1010101010101010", "accountType": "payment", "taxId": "10.203.000/0001-80", "transactionIds": [ "5862355036536832" ], "bankCode": "20018183", "id": "5738709764800512", "fee": 50, "name": "Iron Bank S.A", "created": "2020-11-11T14:44:43.144663+00:00", "tags": [ "deposit" ], "branchCode": "0001", "amount": 9000, "type": "pix" }, "errors": [], "type": "credited", "id": "5066704988143616", "created": "2020-11-11T14:44:44.385820+00:00" } ] }
Get a single deposit log by its id.
id
fields
import starkbank log = starkbank.deposit.log.get("5066704988143616") print(log)
const starkbank = require('starkbank'); (async() => { let log = await starkbank.deposit.log.get('5066704988143616'); console.log(log); })();
use StarkBank\Deposit\Log; $depositLog = Log::get("5066704988143616"); print_r($depositLog);
import com.starkbank.*; Deposit.Log log = Deposit.Log.get("5066704988143616"); System.out.println(log);
require('starkbank') log = StarkBank::Deposit::Log.get('5066704988143616') puts log
log = StarkBank.Deposit.Log.get!("5066704988143616") |> IO.inspect
using System; StarkBank.Deposit.Log log = StarkBank.Deposit.Log.Get("5066704988143616"); Console.WriteLine(log);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/deposit/log" ) func main() { log, err := log.Get("5066704988143616", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
(def log (starkbank.deposit.log/get "5066704988143616")) (println log)
curl --location --request GET '{{baseUrl}}/v2/deposit/log/5066704988143616' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2020-11-11 14:44:44.385820, deposit=Deposit( account_number=1010101010101010, account_type=payment, amount=9000, bank_code=20018183, branch_code=0001, created=2020-11-11 14:44:43.144663, fee=50, id=5738709764800512, name=Iron Bank S.A, status=created, tags=['deposit'], tax_id=10.203.000/0001-80, transaction_ids=['5862355036536832'], type=pix, updated=2020-11-11 14:44:53.298960 ), errors=[], id=5066704988143616, type=credited )
Log { id: '5066704988143616', created: '2020-11-11T14:44:44.385820+00:00', type: 'credited', errors: [], deposit: { status: 'created', updated: '2020-11-11T14:44:53.298960+00:00', accountNumber: '1010101010101010', accountType: 'payment', taxId: '10.203.000/0001-80', transactionIds: [ '5862355036536832' ], bankCode: '20018183', id: '5738709764800512', fee: 50, name: 'Iron Bank S.A', created: '2020-11-11T14:44:43.144663+00:00', tags: [ 'deposit' ], branchCode: '0001', amount: 9000, type: 'pix' } }
StarkBank\Deposit\Log Object ( [id] => 5066704988143616 [created] => DateTime Object ( [date] => 2020-11-11 14:44:57.576040 [timezone_type] => 1 [timezone] => +00:00 ) [type] => created [errors] => Array ( ) [deposit] => StarkBankDeposit Object ( [id] => 5738709764800512 [name] => Iron Bank S.A [taxId] => 10.203.000/0001-80 [bankCode] => 20018183 [branchCode] => 0001 [accountNumber] => 1010101010101010 [accountType] => payment [amount] => 9000 [type] => pix [status] => created [tags] => Array ( [0] => deposit ) [fee] => [transactionIds] => Array ( [0] => 5862355036536832 ) [created] => DateTime Object ( [date] => 2020-11-11 14:44:57.490286 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-11-11 14:44:58.966772 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "created": "2020-11-11T14:44:44.385820+00:00", "type": "credited", "errors": [], "deposit": { "name": "Iron Bank S.A", "taxId": "10.203.000/0001-80", "bankCode": "20018183", "branchCode": "0001", "accountNumber": "1010101010101010", "accountType": "payment", "amount": 9000, "type": "pix", "status": "created", "tags": [ "deposit" ], "fee": 50, "transactionIds": [ "5862355036536832" ], "created": "2020-11-11T14:44:43.144663+00:00", "updated": "2020-11-11T14:44:53.298960+00:00", "id": "5738709764800512" }, "id": "5066704988143616" })
log( id: 5066704988143616, type: credited, errors: [], deposit: deposit( id: 5738709764800512, name: Iron Bank S.A, tax_id: 10.203.000/0001-80, bank_code: 20018183, branch_code: 0001, account_number: 1010101010101010, account_type: payment, amount: 9000, type: pix, status: created, tags: ["deposit"], fee: 50, transaction_ids: ["5862355036536832"], created: 2020-11-11T14:44:43+00:00, updated: 2020-11-11T14:44:53+00:00 ), created: 2020-11-11T14:44:44+00:00 )
%StarkBank.Deposit.Log{ created: ~U[2020-11-11 14:44:44.385820Z], deposit: %StarkBank.Deposit{ account_number: "1010101010101010", account_type: "payment", amount: 9000, bank_code: "20018183", branch_code: "0001", created: ~U[2020-11-11 14:44:43.144663Z], fee: 50, id: "5738709764800512", name: "Iron Bank S.A", status: "created", tags: ["deposit"], tax_id: "10.203.000/0001-80", transaction_ids: ["5862355036536832"], type: "pix", updated: ~U[2020-11-11 14:44:53.298960Z] }, errors: [], id: "5066704988143616", type: "credited" }
Log( Created: 11/11/2020 11:44:44, Type: credited, Errors: { }, Deposit: Deposit( Amount: 9000, Name: Iron Bank S.A, TaxID: 10.203.000/0001-80, BankCode: 20018183, BranchCode: 0001, AccountNumber: 1010101010101010, AccountType: payment, Type: pix, Fee: 50, TransactionIds: { 5862355036536832 }, Status: created, Tags: { deposit }, Created: 11/11/2020 11:44:43, Updated: 11/11/2020 11:44:53, ID: 5738709764800512 ), ID: 5066704988143616 )
{ Id:5066704988143616 Deposit:{ Id:5738709764800512 Name:Iron Bank S.A TaxId:10.203.000/0001-80 BankCode:20018183 BranchCode:0001 AccountNumber:1010101010101010 AccountType:payment Amount:9000 Type:pix Status:created Tags:[deposit] Fee:50 TransactionIds:[5862355036536832] Created:2020-11-11 19:01:22.183451 +0000 +0000 Updated:2020-11-11 19:01:23.183451 +0000 +0000 } Errors:[] Type:credited Created:2020-11-11 14:44:44.520104 +0000 +0000 }
{ :id 5066704988143616, :created 2020-11-11T14:44:06.804223+00:00, :errors [], :type credited, :deposit { :amount 9000, :fee 50, :tags [deposit], :branch-code 0001, :updated 2020-11-11T11:44:58.939596+00:00, :name Iron Bank S.A, :tax-id 10.203.000/0001-80, :type pix, :created 2020-11-11T11:44:57.490286+00:00, :status created, :id 5738709764800512, :transaction-ids [5862355036536832], :account-number 1010101010101010, :account-type payment, :bank-code 20018183 } }
{ "deposit": { "status": "created", "updated": "2020-11-11T14:44:53.298960+00:00", "accountNumber": "1010101010101010", "accountType": "payment", "taxId": "10.203.000/0001-80", "transactionIds": [ "5862355036536832" ], "bankCode": "20018183", "id": "5738709764800512", "fee": 50, "name": "Iron Bank S.A", "created": "2020-11-11T14:44:43.144663+00:00", "tags": [ "deposit" ], "branchCode": "0001", "amount": 9000, "type": "pix" }, "errors": [], "type": "credited", "id": "5066704988143616", "created": "2020-11-11T14:44:44.385820+00:00" }
Whenever a Deposit is successfully reversed, a reversed log will be created. To retrieve a specific reversal receipt, you can request the corresponding log PDF.
id
import starkbank pdf = starkbank.deposit.log.pdf("6742710681600000") with open("deposit-reversal.pdf", "wb") as file: file.write(pdf)
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/deposit/log/6742710681600000/pdf' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
A boleto is a method you can use to charge your customers or load your Stark Bank account. Here we will teach you how to create and manage boletos.
This is how you create a new list of boletos. You can create up to 100 boletos per request. In case a boleto is paid after its due date and there is fine or interest, its amount will be updated with the paid amount. The same is valid if the boleto is paid with a discount.
amount
name
taxId
streetLine1
streetLine2
disctrict
city
stateCode
zipCode
due
fine
interest
overdueLimit
receiverName
receiverTaxId
tags
splits
[ { "receiverId": "5742447426535424", "amount": 100 }, { "receiverId": "5743243941642240", "amount": 200 } ]
descriptions
[ { "text": "Explaining first part of the value", "amount": 20000 }, { "text": "More text to explaining something to the customer" } ]
discounts
[ { "percentage": 5, "date": "2020-04-01" }, { "percentage": 3.5, "date": "2020-04-02" } ]
import starkbank boletos = starkbank.boleto.create([ starkbank.Boleto( amount=400000, due="2020-05-20", name="Iron Bank S.A.", tax_id="20.018.183/0001-80", fine=2.5, interest=1.3, overdue_limit=5, street_line_1="Av. Faria Lima, 1844", street_line_2="CJ 13", district="Itaim Bibi", city="São Paulo", state_code="SP", zip_code="01500-000", tags=["War supply", "Invoice #1234"], discounts=[ {"percentage": 10, "date": "2020-04-25"} ], splits=[ Split(amount=3000, receiverId="5742447426535424"), Split(amount=5000, receiverId="5743243941642240") ] ) ]) for boleto in boletos: print(boleto)
const starkbank = require('starkbank'); (async() => { let boletos = await starkbank.boleto.create([ { amount: 400000, name: 'Iron Bank S.A.', taxId: '20.018.183/0001-80', streetLine1: 'Av. Faria Lima, 1844', streetLine2: 'CJ 13', district: 'Itaim Bibi', city: 'São Paulo', stateCode: 'SP', zipCode: '01500-000', due: '2020-05-20', fine: 2.5, interest: 1.3, overdueLimit: 5, tags: ['War supply', 'Invoice #1234'], discounts: [ {'percentage': 10, 'date': '2020-04-25'} ] }, ]); for (let boleto of boletos) { console.log(boleto); } })();
$boletos = StarkBank\Boleto::create([ new StarkBank\Boleto([ "amount" => 400000, "name" => "Iron Bank S.A.", "taxId" => "20.018.183/0001-80", "streetLine1" => "Av. Faria Lima, 1844", "streetLine2" => "CJ 13", "district" => "Itaim Bibi", "city" => "São Paulo", "stateCode" => "SP", "zipCode" => "01500-000", "due" => "2020-05-20", "fine" => 2.5, "interest" => 1.3, "overdueLimit" => 5, "tags" => ["War supply", "Invoice #1234"], "discounts" => [ ["percentage" => 10, "date" => "2020-04-25"] ] ]) ]); foreach($boletos as $boleto){ print_r($boleto); }
import com.starkbank.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; List<Boleto> boletos = new ArrayList<>(); HashMap<String, Object> data = new HashMap<>(); data.put("amount", 400000); data.put("name", "Iron Bank S.A."); data.put("taxId", "20.018.183/0001-80"); data.put("streetLine1", "Av. Faria Lima, 1844"); data.put("streetLine2", "CJ 13"); data.put("district", "Itaim Bibi"); data.put("city", "São Paulo"); data.put("stateCode", "SP"); data.put("zipCode", "01500-000"); data.put("due", "2020-05-20"); data.put("fine", 2.5); data.put("interest", 1.3); data.put("overdueLimit", 5); data.put("tags", new String[]{"War supply", "Invoice #1234"}); List<HashMap<String, Object>> discounts = new ArrayList<>(); discounts.add(new HashMap<>()); discounts.get(0).put("percentage", 5); discounts.get(0).put("date", "2020-04-25"); data.put("discounts", discounts); boletos.add(new Boleto(data)); boletos = Boleto.create(boletos); for (Boleto boleto : boletos){ System.out.println(boleto); }
require('starkbank') boletos = StarkBank::Boleto.create( [ StarkBank::Boleto.new( amount: 400000, due: '2020-05-20', name: 'Iron Bank S.A.', street_line_1: 'Av. Faria Lima, 1844', street_line_2: 'CJ 13', district: 'Itaim Bibi', city: 'São Paulo', state_code: 'SP', zip_code: '01500-000', tax_id: '20.018.183/0001-80', overdue_limit: 5, fine: 2.5, interest: 1.3, tags: ['War supply', 'Invoice #1234'], discounts: [ {percentage: 10, date: '2020-04-25'} ] ) ] ) boletos.each do |boleto| puts boleto end
boletos = StarkBank.Boleto.create!([ %StarkBank.Boleto{ amount: 400000, due: "2020-05-20", name: "Iron Bank S.A.", street_line_1: "Av. Faria Lima, 1844", street_line_2: "CJ 13", district: "Itaim Bibi", city: "São Paulo", state_code: "SP", zip_code: "01500-000", tax_id: "20.018.183/0001-80", overdue_limit: 5, fine: 2.5, interest: 1.3, tags: ["War supply", "Invoice #1234"], discounts: [ %{percentage: 10, date: "2020-04-25"} ] } ]) for payment <- payments do payment |> IO.inspect end
using System; using System.Collections.Generic; List<StarkBank.Boleto> boletos = StarkBank.Boleto.Create( new List<StarkBank.Boleto> { new StarkBank.Boleto( amount: 400000, due: new DateTime(2020, 5, 20), name: "Iron Bank S.A.", streetLine1: "Av. Faria Lima, 1844", streetLine2: "CJ 13", district: "Itaim Bibi", city: "Sao Paulo", stateCode: "SP", zipCode: "01500-000", taxID: "20.018.183/0001-80", overdueLimit: 5, fine: 2.5, interest: 1.3, tags: new List<string> { "War supply", "Invoice #1234" }, discounts: new List<Dictionary<string, object>>() { new Dictionary<string, object> { {"percentage", 10}, {"date", new DateTime(2020, 4, 25)} } } ) } ); foreach(StarkBank.Boleto boleto in boletos) { Console.WriteLine(boleto); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boleto" ) func main() { due := time.Date(2020, 05, 20, 0, 0, 0, 0, time.UTC) boletos, err := boleto.Create( []boleto.Boleto{ { Amount: 400000, Due: &due, Name: "Iron Bank S.A.", TaxId: "20.018.183/0001-80", Fine: 2.5, Interest: 1.3, OverdueLimit: 5, StreetLine1: "Av. Faria Lima, 1844", StreetLine2: "CJ 13", District: "Itaim Bibi", City: "São Paulo", StateCode: "SP", ZipCode: "01500-000", Tags: []string{"War Supply", "Invoice #1234"}, Discounts: []map[string]interface{}{ { "percentage": 10, "date": "2020-04-25", }, }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, boleto := range boletos { fmt.Printf("%+v", boleto) } }
(def boletos (starkbank.boleto/create [{ :amount 400000 :due "2020-05-20" :name "Iron Bank S.A." :street-line-1 "Av. Faria Lima, 1844" :street-line-2 "CJ 13" :district "Itaim Bibi" :city "São Paulo" :state-code "SP" :zip-code "01500-000" :tax-id "20.018.183/0001-80" :overdue-limit 5 :fine 2.5 :interest 1.3 :tags ["War supply" "Invoice #1234"] :discounts [ {:percentage 10 :date "2020-04-25"} ] }])) (dorun (map println boletos))
curl --location --request POST '{{baseUrl}}/v2/boleto' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "boletos": [ { "amount": 400000, "due": "2020-05-20", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "fine": 2.5, "interest": 1.3, "overdueLimit": 5, "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "tags": ["War supply", "Invoice #1234"] "discounts": [ { "percentage": 10, "date": "2020-04-25" } ], "splits": [ { "receiverId": "5742447426535424", "amount": 3000 }, { "receiverId": "5743243941642240", "amount": 5000 } ] }, ] }'
Boleto( id=6655767935451136, amount=400000, bar_code=34191826100004000001091007175647307144464000, city=São Paulo, created=2020-04-23 23:36:08.129614, descriptions=[], discounts=[{'date': '2020-04-26T02:59:59.999999+00:00', 'percentage': 10.0}], district=Itaim Bibi, due=2020-05-21, fee=0, fine=2.5, interest=1.3, line=34191.09107 07175.647309 71444.640008 1 82610000400000, name=Iron Bank S.A., our_number=10445145, transaction_ids=[], overdue_limit=5, receiver_name=Winterfell S. A., receiver_tax_id=71.735.814/0001-12, state_code=SP, status=created, street_line_1=Av. Faria Lima, 1844, street_line_2=CJ 13, tags=['war supply', 'invoice #1234'], tax_id=20.018.183/0001-80, zip_code=01500-000, workspace_id=5083989094170624, splits=[ Split( amount=3000, created=None, external_id=None, id=None, receiver_id=5742447426535424, scheduled=None, source=None, status=None, tags=None, updated=None ), Split( amount=5000, created=None, external_id=None, id=None, receiver_id=5743243941642240, scheduled=None, source=None, status=None, tags=None, updated=None ) ] )
Boleto { id: '6655767935451136', amount: 400000, name: 'Iron Bank S.A.', taxId: '20.018.183/0001-80', streetLine1: 'Av. Faria Lima, 1844', streetLine2: 'CJ 13', district: 'Itaim Bibi', city: 'São Paulo', stateCode: 'SP', zipCode: '01500-000', due: '2020-05-21T02:59:59.999999+00:00', fine: 2.5, interest: 1.3, ourNumber: '10445145', transactionIds: [], overdueLimit: 5, receiverName: 'Winterfell S.A.', receiverTaxId: '71.735.814/0001-12', tags: [ 'war supply', 'invoice #1234' ], descriptions: [], discounts: [ { date: '2020-04-26T02:59:59.999999+00:00', percentage: 10 } ], fee: 0, line: '34191.09107 07176.307309 71444.640008 1 82610000400000', barCode: '34191826100004000001091007175647307144464000', status: 'created', created: '2020-04-23T23:36:10.789288+00:00', workspaceId: '5083989094170624' }
StarkBank\Boleto Object ( [id] => 6655767935451136 [amount] => 400000 [name] => Iron Bank S.A. [taxId] => 20.018.183/0001-80 [streetLine1] => Av. Faria Lima, 1844 [streetLine2] => CJ 13 [district] => Itaim Bibi [city] => São Paulo [stateCode] => SP [zipCode] => 01500-000 [due] => DateTime Object ( [date] => 2020-05-21 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [fine] => 2.5 [interest] => 1.3 [ourNumber] => 10445145 [transactionIds] => Array ( ) [overdueLimit] => 5 [receiverName] => Winterfell S.A. [receiverTaxId] => 71.735.814/0001-12 [tags] => Array ( [0] => war supply [1] => invoice #1234 ) [descriptions] => Array ( ) [discounts] => Array ( [0] => Array ( [date] => 2020-04-26T02:59:59.999999+00:00 [percentage] => 10 ) ) [fee] => 0 [line] => 34191.09107 07150.227309 71444.640008 7 82610000400000 [barCode] => 34197826100004000001091007150227307144464000 [status] => created [created] => DateTime Object ( [date] => 2020-04-22 20:12:56.830070 [timezone_type] => 1 [timezone] => +00:00 ) [workspaceId] => 5083989094170624 )
Boleto({ "id": "6655767935451136", "amount": "400000", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "due": "2020-04-21T02:59:59.999999+00:00", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "workspaceId": "5083989094170624", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "tags": ["war supply", "invoice #1234"], "descriptions": [], "discounts": [ {"date": "2020-04-26T02:59:59.999999+00:00", "percentage": 10.0} ], "fee": 0, "line": "34191.09107 07027.987309 71444.640008 5 82310000400000", "barCode": "34191826100004000001091007175647307144464000", "status": "created", "created": "2020-04-23T23:28:13+00:00" "workspaceId": "5083989094170624" })
boleto( id: 6655767935451136, amount: 400000, name: Iron Bank S.A., tax_id: 20.018.183/0001-80, street_line_1: Av. Faria Lima, 1844, street_line_2: CJ 13, district: Itaim Bibi, city: São Paulo, state_code: SP, zip_code: 01500-000, due: 2020-05-21T02:59:59.999999+00:00, fine: 2.5, interest: 1.3, our_number: 10445145, transaction_ids: [], overdue_limit: 5, receiver_name: Winterfell S.A., receiver_tax_id: 71.735.814/0001-12, tags: ["war supply", "invoice #1234"], descriptions: [], discounts: [{"date"=>"2020-04-26T02:59:59.999999+00:00", "percentage"=>10.0}], fee: 0, line: 34191.09107 07149.917309 71444.640008 1 82610000400000, bar_code: 34191826100004000001091007149917307144464000, status: created, created: 2020-04-23T19:59:25+00:00 workspace_id: 5083989094170624 )
%StarkBank.Boleto{ amount: 400000, bar_code: "34191826100004000001091007175647307144464000", city: "São Paulo", created: ~U[2020-04-23 17:41:58.458035Z], descriptions: [], discounts: [ %{"date" => "2020-04-26T02:59:59.999999+00:00", "percentage" => 10.0} ], district: "Itaim Bibi", due: ~U[2020-05-21 02:59:59.999999Z], fee: 0, fine: 2.5, id: "6655767935451136", interest: 1.3, line: "34191.09107 07156.837309 71444.640008 8 82610000400000", name: "Iron Bank S.A.", our_number: "10445145", transaction_ids: [], overdue_limit: 5, receiver_name: "Winterfell S.A.", receiver_tax_id: "71.735.814/0001-12", state_code: "SP", status: "created", street_line_1: "Av. Faria Lima, 1844", street_line_2: "CJ 13", tags: ["war supply", "invoice #1234"], tax_id: "20.018.183/0001-80", zip_code: "01500-000", workspace_id: "5083989094170624" }
Boleto( Amount: 400000, Name: Iron Bank S.A., TaxID: 20.018.183/0001-80, StreetLine1: Av. Faria Lima, 1844, StreetLine2: CJ 13, District: Itaim Bibi, City: Sao Paulo, StateCode: SP, ZipCode: 01500-000, Due: 05/21/2020 23:59:59, Fine: 2.5, Interest: 1.3, OverdueLimit: 5, OurNumber: 10445145, TransactionIds: { }, ReceiverName: Wintefell S.A., ReceiverTaxID: 71.735.814/0001-12, Tags: { war supply, invoice #1234 }, Descriptions: { }, Discounts: { { { date, 2020-04-26T02:59:59.999999+00:00 }, { percentage, 10 } } }, Fee: 0, Line: 34191.09107 07159.647309 71444.640008 1 82610000400000, BarCode: 34191826100004000001091007159647307144464000, Status: created, Created: 04/23/2020 15:53:22, WorkspaceId: 5083989094170624 ID: 6655767935451136 )
{ Id:6655767935451136 Amount:400000 Name:Iron Bank S.A. TaxId:20.018.183/0001-80 StreetLine1:Av. Faria Lima, 1844 StreetLine2:CJ 13 District:Itaim Bibi City:São Paulo StateCode:SP ZipCode:01500-000 Due:2020-05-21 02:59:59.999999 +0000 +0000 Fine:2.5 Interest:1.3 OverdueLimit:5 Descriptions:[] Discounts:[map[date:2020-04-26T02:59:59.999999+00:00 percentage:10]] Tags:[war supply invoice #1234] ReceiverName:Winterfell S.A. ReceiverTaxId:71.735.814/0001-12 Fee:0 Line:34191.09107 44555.427309 71444.640008 4 92570000400000 BarCode:34191826100004000001091007175647307144464000 Status:created TransactionIds:[] WorkspaceId:5083989094170624 Created:2020-04-23 03:18:33.515597 +0000 +0000 OurNumber:10445554 }
{:amount 400000, :fee 0, :tags ["war supply" "invoice #1234"], :street-line-1 "Av. Faria Lima, 1844", :name "Iron Bank S.A.", :state-code "SP", :city "São Paulo", :tax-id "20.018.183/0001-80", :our-number "10445145", :transaction-ids [], :overdue-limit 5, :receiver-name "Winterfell S.A." :receiver-tax-id "71.735.814/0001-12" :created "2020-04-23T19:14:43.125462+00:00", :discounts [{:date "2020-04-26T02:59:59.999999+00:00", :percentage 10.0}], :due "2020-05-21T02:59:59.999999+00:00", :street-line-2 "CJ 13", :line "34191.09107 07322.097309 71444.640008 1 82610000400000", :status "created", :interest 1.3, :id "6655767935451136", :fine 2.5, :zip-code "01500-000", :bar-code "34191826100004000001091007322097307144464000", :descriptions [], :district "Itaim Bibi"}
{ "message": "Boleto(s) successfully created", "boletos": [ { "id": "6655767935451136", "status": "created", "line": "34191.09107 07175.647309 71444.640008 1 82610000400000", "barCode": "34191826100004000001091007175647307144464000", "amount": 400000, "due": "2020-05-21T02:59:59.999999+00:00", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "tags": ["War supply", "Invoice #1234"], "workspaceId": "5083989094170624", "fee": 0, "descriptions": [], "discounts": [ { "percentage": 10, "date": "2020-04-25" } ], "workspaceId": "5083989094170624" }, "splits": [ { "amount": 3000, "receiverId": "5742447426535424", ), { "amount": 5000, "receiverId": "5743243941642240", } ] ] }
Get a list of non-deleted boletos in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
fields
import starkbank boletos = starkbank.boleto.query( after="2020-04-01", before="2020-04-30" ) for boleto in boletos: print(boleto)
const starkbank = require('starkbank'); (async() => { let boletos = await starkbank.boleto.query({ after: '2020-04-01', before: '2020-04-30', }); for await (let boleto of boletos) { console.log(boleto); } })();
$boletos = StarkBank\Boleto::query([ "after" => "2020-04-01", "before" => "2020-04-30" ]); foreach($boletos as $boleto){ print_r($boleto); }
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<Boleto> boletos = Boleto.query(params); for (Boleto boleto : boletos){ System.out.println(boleto); }
require('starkbank') boletos = StarkBank::Boleto.query( after: '2020-04-01', before: '2020-04-30' ) boletos.each do |boleto| puts boleto end
boletos = StarkBank.Boleto.query!( after: "2019-04-01", before: "2020-04-30" ) for payment <- payments do payment |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.Boleto> boletos = StarkBank.Boleto.Query( after: new DateTime(2020, 4, 1), before: new DateTime(2020, 4, 30) ); foreach(StarkBank.Boleto boleto in boletos) { Console.WriteLine(boleto); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boleto" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-04-01" params["before"] = "2020-04-30" boletos := boleto.Query(params, nil) for boleto := range boletos { fmt.Printf("%+v", boleto) } }
(def boletos (starkbank.boleto/query { :after "2020-4-1", :before "2020-4-30" })) (dorun (map println boletos))
curl --location --request GET '{{baseUrl}}/v2/boleto?after=2020-04-01&before=2020-04-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Boleto( id=6655767935451136, amount=400000, bar_code=34191826100004000001091007175647307144464000, city=São Paulo, created=2020-04-23 23:36:08.129614, descriptions=[], discounts=[{'date': '2020-04-26T02:59:59.999999+00:00', 'percentage': 10.0}], district=Itaim Bibi, due=2020-05-21, fee=0, fine=2.5, interest=1.3, line=34191.09107 07175.647309 71444.640008 1 82610000400000, name=Iron Bank S.A., our_number=10445145, transaction_ids=[], overdue_limit=5, receiver_name=Winterfell S. A., receiver_tax_id=71.735.814/0001-12, state_code=SP, status=created, street_line_1=Av. Faria Lima, 1844, street_line_2=CJ 13, tags=['war supply', 'invoice #1234'], tax_id=20.018.183/0001-80, zip_code=01500-000 workspace_id=5083989094170624 )
Boleto { id: '6655767935451136', amount: 400000, name: 'Iron Bank S.A.', taxId: '20.018.183/0001-80', streetLine1: 'Av. Faria Lima, 1844', streetLine2: 'CJ 13', district: 'Itaim Bibi', city: 'São Paulo', stateCode: 'SP', zipCode: '01500-000', due: '2020-05-21T02:59:59.999999+00:00', fine: 2.5, interest: 1.3, ourNumber: '10445145', transactionIds: [], overdueLimit: 5, receiverName: 'Winterfell S.A.', receiverTaxId: '71.735.814/0001-12', tags: [ 'war supply', 'invoice #1234' ], descriptions: [], discounts: [ { date: '2020-04-26T02:59:59.999999+00:00', percentage: 10 } ], fee: 0, line: '34191.09107 07176.307309 71444.640008 1 82610000400000', barCode: '34191826100004000001091007175647307144464000', status: 'created', created: '2020-04-23T23:36:10.789288+00:00', workspaceId: '5083989094170624' }
StarkBank\Boleto Object ( [id] => 6655767935451136 [amount] => 400000 [name] => Iron Bank S.A. [taxId] => 20.018.183/0001-80 [streetLine1] => Av. Faria Lima, 1844 [streetLine2] => CJ 13 [district] => Itaim Bibi [city] => São Paulo [stateCode] => SP [zipCode] => 01500-000 [due] => DateTime Object ( [date] => 2020-05-21 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [fine] => 2.5 [interest] => 1.3 [ourNumber] => 10445145 [transactionIds] => Array ( ) [overdueLimit] => 5 [receiverName] => Winterfell S.A. [receiverTaxId] => 71.735.814/0001-12 [tags] => Array ( [0] => war supply [1] => invoice #1234 ) [descriptions] => Array ( ) [discounts] => Array ( [0] => Array ( [date] => 2020-04-26T02:59:59.999999+00:00 [percentage] => 10 ) ) [fee] => 0 [line] => 34191.09107 07150.227309 71444.640008 7 82610000400000 [barCode] => 34197826100004000001091007150227307144464000 [status] => created [created] => DateTime Object ( [date] => 2020-04-22 20:12:56.830070 [timezone_type] => 1 [timezone] => +00:00 ) [workspaceId] => 5083989094170624 )
Boleto({ "id": "6655767935451136", "amount": "400000", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "due": "2020-04-21T02:59:59.999999+00:00", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "workspaceId": "5083989094170624", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "tags": ["war supply", "invoice #1234"], "descriptions": [], "discounts": [ {"date": "2020-04-26T02:59:59.999999+00:00", "percentage": 10.0} ], "fee": 0, "line": "34191.09107 07027.987309 71444.640008 5 82310000400000", "barCode": "34191826100004000001091007175647307144464000", "status": "created", "created": "2020-04-23T23:28:13+00:00" "workspaceId": "5083989094170624" })
boleto( id: 6655767935451136, amount: 400000, name: Iron Bank S.A., tax_id: 20.018.183/0001-80, street_line_1: Av. Faria Lima, 1844, street_line_2: CJ 13, district: Itaim Bibi, city: São Paulo, state_code: SP, zip_code: 01500-000, due: 2020-05-21T02:59:59.999999+00:00, fine: 2.5, interest: 1.3, our_number: 10445145, transaction_ids: [], overdue_limit: 5, receiver_name: Winterfell S.A., receiver_tax_id: 71.735.814/0001-12, tags: ["war supply", "invoice #1234"], descriptions: [], discounts: [{"date"=>"2020-04-26T02:59:59.999999+00:00", "percentage"=>10.0}], fee: 0, line: 34191.09107 07149.917309 71444.640008 1 82610000400000, bar_code: 34191826100004000001091007149917307144464000, status: created, created: 2020-04-23T19:59:25+00:00 workspace_id: 5083989094170624 )
%StarkBank.Boleto{ amount: 400000, bar_code: "34191826100004000001091007175647307144464000", city: "São Paulo", created: ~U[2020-04-23 17:41:58.458035Z], descriptions: [], discounts: [ %{"date" => "2020-04-26T02:59:59.999999+00:00", "percentage" => 10.0} ], district: "Itaim Bibi", due: ~U[2020-05-21 02:59:59.999999Z], fee: 0, fine: 2.5, id: "6655767935451136", interest: 1.3, line: "34191.09107 07156.837309 71444.640008 8 82610000400000", name: "Iron Bank S.A.", our_number: "10445145", transaction_ids: [], overdue_limit: 5, receiver_name: "Winterfell S.A.", receiver_tax_id: "71.735.814/0001-12", state_code: "SP", status: "created", street_line_1: "Av. Faria Lima, 1844", street_line_2: "CJ 13", tags: ["war supply", "invoice #1234"], tax_id: "20.018.183/0001-80", zip_code: "01500-000", workspace_id: "5083989094170624" }
Boleto( Amount: 400000, Name: Iron Bank S.A., TaxID: 20.018.183/0001-80, StreetLine1: Av. Faria Lima, 1844, StreetLine2: CJ 13, District: Itaim Bibi, City: Sao Paulo, StateCode: SP, ZipCode: 01500-000, Due: 05/21/2020 23:59:59, Fine: 2.5, Interest: 1.3, OverdueLimit: 5, OurNumber: 10445145, TransactionIds: { }, ReceiverName: Wintefell S.A., ReceiverTaxID: 71.735.814/0001-12, Tags: { war supply, invoice #1234 }, Descriptions: { }, Discounts: { { { date, 2020-04-26T02:59:59.999999+00:00 }, { percentage, 10 } } }, Fee: 0, Line: 34191.09107 07159.647309 71444.640008 1 82610000400000, BarCode: 34191826100004000001091007159647307144464000, Status: created, Created: 04/23/2020 15:53:22, WorkspaceId: 5083989094170624 ID: 6655767935451136 )
{ Id:6655767935451136 Amount:400000 Name:Iron Bank S.A. TaxId:20.018.183/0001-80 StreetLine1:Av. Faria Lima, 1844 StreetLine2:CJ 13 District:Itaim Bibi City:São Paulo StateCode:SP ZipCode:01500-000 Due:2020-05-21 02:59:59.999999 +0000 +0000 Fine:2.5 Interest:1.3 OverdueLimit:5 Descriptions:[] Discounts:[map[date:2020-04-26T02:59:59.999999+00:00 percentage:10]] Tags:[war supply invoice #1234] ReceiverName:Winterfell S.A. ReceiverTaxId:71.735.814/0001-12 Fee:0 Line:34191.09107 44555.427309 71444.640008 4 92570000400000 BarCode:34191826100004000001091007175647307144464000 Status:created TransactionIds:[] WorkspaceId:5083989094170624 Created:2020-04-23 03:18:33.515597 +0000 +0000 OurNumber:10445554 }
{:amount 400000, :fee 0, :tags ["war supply" "invoice #1234"], :street-line-1 "Av. Faria Lima, 1844", :name "Iron Bank S.A.", :state-code "SP", :city "São Paulo", :tax-id "20.018.183/0001-80", :our-number "10445145", :transaction-ids [], :overdue-limit 5, :receiver-name "Winterfell S.A." :receiver-tax-id "71.735.814/0001-12" :created "2020-04-23T19:14:43.125462+00:00", :discounts [{:date "2020-04-26T02:59:59.999999+00:00", :percentage 10.0}], :due "2020-05-21T02:59:59.999999+00:00", :street-line-2 "CJ 13", :line "34191.09107 07322.097309 71444.640008 1 82610000400000", :status "created", :interest 1.3, :id "6655767935451136", :fine 2.5, :zip-code "01500-000", :bar-code "34191826100004000001091007322097307144464000", :descriptions [], :district "Itaim Bibi"}
{ "cursor": null, "boletos": [ { "id": "6655767935451136", "status": "created", "line": "34191.09107 07175.647309 71444.640008 1 82610000400000", "barCode": "34191826100004000001091007175647307144464000", "amount": 400000, "due": "2020-05-21T02:59:59.999999+00:00", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "tags": ["War supply", "Invoice #1234"], "workspaceId": "5083989094170624", "fee": 0, "descriptions": [], "discounts": [ { "percentage": 10, "date": "2020-04-25" } ], "workspaceId": "5083989094170624" } ] }
Get a single boleto by its id.
id
fields
import starkbank boleto = starkbank.boleto.get("6655767935451136") print(boleto)
const starkbank = require('starkbank'); (async() => { let boleto = await starkbank.boleto.get('6655767935451136') console.log(boleto); })();
$boleto = StarkBank\Boleto::get("6655767935451136"); print_r($boleto);
import com.starkbank.*; Boleto boleto = Boleto.get("6655767935451136"); System.out.println(boleto);
require('starkbank') boleto = StarkBank::Boleto.get('6655767935451136') puts boleto
boleto = StarkBank.Boleto.get!("6655767935451136") boleto |> IO.inspect
using System; StarkBank.Boleto boleto = StarkBank.Boleto.Get("6655767935451136"); Console.WriteLine(boleto);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boleto" ) func main() { boleto, err := boleto.Get("6655767935451136", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", boleto) }
(def log (starkbank.boleto.log/get "6655767935451136")) (println log)
curl --location --request GET '{{baseUrl}}/v2/boleto/6655767935451136' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Boleto( id=6655767935451136, amount=400000, bar_code=34191826100004000001091007175647307144464000, city=São Paulo, created=2020-04-23 23:36:08.129614, descriptions=[], discounts=[{'date': '2020-04-26T02:59:59.999999+00:00', 'percentage': 10.0}], district=Itaim Bibi, due=2020-05-21, fee=0, fine=2.5, interest=1.3, line=34191.09107 07175.647309 71444.640008 1 82610000400000, name=Iron Bank S.A., our_number=10445145, transaction_ids=[], overdue_limit=5, receiver_name=Winterfell S. A., receiver_tax_id=71.735.814/0001-12, state_code=SP, status=created, street_line_1=Av. Faria Lima, 1844, street_line_2=CJ 13, tags=['war supply', 'invoice #1234'], tax_id=20.018.183/0001-80, zip_code=01500-000, workspace_id=5083989094170624 )
Boleto { id: '6655767935451136', amount: 400000, name: 'Iron Bank S.A.', taxId: '20.018.183/0001-80', streetLine1: 'Av. Faria Lima, 1844', streetLine2: 'CJ 13', district: 'Itaim Bibi', city: 'São Paulo', stateCode: 'SP', zipCode: '01500-000', due: '2020-05-21T02:59:59.999999+00:00', fine: 2.5, interest: 1.3, ourNumber: '10445145', transactionIds: [], overdueLimit: 5, receiverName: 'Winterfell S.A.', receiverTaxId: '71.735.814/0001-12', tags: [ 'war supply', 'invoice #1234' ], descriptions: [], discounts: [ { date: '2020-04-26T02:59:59.999999+00:00', percentage: 10 } ], fee: 0, line: '34191.09107 07176.307309 71444.640008 1 82610000400000', barCode: '34191826100004000001091007175647307144464000', status: 'created', created: '2020-04-23T23:36:10.789288+00:00', workspaceId: '5083989094170624' }
StarkBank\Boleto Object ( [id] => 6655767935451136 [amount] => 400000 [name] => Iron Bank S.A. [taxId] => 20.018.183/0001-80 [streetLine1] => Av. Faria Lima, 1844 [streetLine2] => CJ 13 [district] => Itaim Bibi [city] => São Paulo [stateCode] => SP [zipCode] => 01500-000 [due] => DateTime Object ( [date] => 2020-05-21 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [fine] => 2.5 [interest] => 1.3 [ourNumber] => 10445145 [transactionIds] => Array ( ) [overdueLimit] => 5 [receiverName] => Winterfell S.A. [receiverTaxId] => 71.735.814/0001-12 [tags] => Array ( [0] => war supply [1] => invoice #1234 ) [descriptions] => Array ( ) [discounts] => Array ( [0] => Array ( [date] => 2020-04-26T02:59:59.999999+00:00 [percentage] => 10 ) ) [fee] => 0 [line] => 34191.09107 07150.227309 71444.640008 7 82610000400000 [barCode] => 34197826100004000001091007150227307144464000 [status] => created [created] => DateTime Object ( [date] => 2020-04-22 20:12:56.830070 [timezone_type] => 1 [timezone] => +00:00 ) [workspaceId] => 5083989094170624 )
Boleto({ "id": "6655767935451136", "amount": "400000", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "due": "2020-04-21T02:59:59.999999+00:00", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "workspaceId": "5083989094170624", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "tags": ["war supply", "invoice #1234"], "descriptions": [], "discounts": [ {"date": "2020-04-26T02:59:59.999999+00:00", "percentage": 10.0} ], "fee": 0, "line": "34191.09107 07027.987309 71444.640008 5 82310000400000", "barCode": "34191826100004000001091007175647307144464000", "status": "created", "created": "2020-04-23T23:28:13+00:00" "workspaceId": "5083989094170624" })
boleto( id: 6655767935451136, amount: 400000, name: Iron Bank S.A., tax_id: 20.018.183/0001-80, street_line_1: Av. Faria Lima, 1844, street_line_2: CJ 13, district: Itaim Bibi, city: São Paulo, state_code: SP, zip_code: 01500-000, due: 2020-05-21T02:59:59.999999+00:00, fine: 2.5, interest: 1.3, our_number: 10445145, transaction_ids: [], overdue_limit: 5, receiver_name: Winterfell S.A., receiver_tax_id: 71.735.814/0001-12, tags: ["war supply", "invoice #1234"], descriptions: [], discounts: [{"date"=>"2020-04-26T02:59:59.999999+00:00", "percentage"=>10.0}], fee: 0, line: 34191.09107 07149.917309 71444.640008 1 82610000400000, bar_code: 34191826100004000001091007149917307144464000, status: created, created: 2020-04-23T19:59:25+00:00 workspace_id: 5083989094170624 )
%StarkBank.Boleto{ amount: 400000, bar_code: "34191826100004000001091007175647307144464000", city: "São Paulo", created: ~U[2020-04-23 17:41:58.458035Z], descriptions: [], discounts: [ %{"date" => "2020-04-26T02:59:59.999999+00:00", "percentage" => 10.0} ], district: "Itaim Bibi", due: ~U[2020-05-21 02:59:59.999999Z], fee: 0, fine: 2.5, id: "6655767935451136", interest: 1.3, line: "34191.09107 07156.837309 71444.640008 8 82610000400000", name: "Iron Bank S.A.", our_number: "10445145", transaction_ids: [], overdue_limit: 5, receiver_name: "Winterfell S.A.", receiver_tax_id: "71.735.814/0001-12", state_code: "SP", status: "created", street_line_1: "Av. Faria Lima, 1844", street_line_2: "CJ 13", tags: ["war supply", "invoice #1234"], tax_id: "20.018.183/0001-80", zip_code: "01500-000", workspace_id: "5083989094170624" }
Boleto( Amount: 400000, Name: Iron Bank S.A., TaxID: 20.018.183/0001-80, StreetLine1: Av. Faria Lima, 1844, StreetLine2: CJ 13, District: Itaim Bibi, City: Sao Paulo, StateCode: SP, ZipCode: 01500-000, Due: 05/21/2020 23:59:59, Fine: 2.5, Interest: 1.3, OverdueLimit: 5, OurNumber: 10445145, TransactionIds: { }, ReceiverName: Wintefell S.A., ReceiverTaxID: 71.735.814/0001-12, Tags: { war supply, invoice #1234 }, Descriptions: { }, Discounts: { { { date, 2020-04-26T02:59:59.999999+00:00 }, { percentage, 10 } } }, Fee: 0, Line: 34191.09107 07159.647309 71444.640008 1 82610000400000, BarCode: 34191826100004000001091007159647307144464000, Status: created, Created: 04/23/2020 15:53:22, WorkspaceId: 5083989094170624, ID: 6655767935451136 )
{ Id:6655767935451136 Amount:400000 Name:Iron Bank S.A. TaxId:20.018.183/0001-80 StreetLine1:Av. Faria Lima, 1844 StreetLine2:CJ 13 District:Itaim Bibi City:São Paulo StateCode:SP ZipCode:01500-000 Due:2020-05-21 02:59:59.999999 +0000 +0000 Fine:2.5 Interest:1.3 OverdueLimit:5 Descriptions:[] Discounts:[map[date:2020-04-26T02:59:59.999999+00:00 percentage:10]] Tags:[war supply invoice #1234] ReceiverName:Winterfell S.A. ReceiverTaxId:71.735.814/0001-12 Fee:0 Line:34191.09107 44555.427309 71444.640008 4 92570000400000 BarCode:34191826100004000001091007175647307144464000 Status:created TransactionIds:[] WorkspaceId:5083989094170624 Created:2020-04-23 03:18:33.515597 +0000 +0000 OurNumber:10445554 }
{:amount 400000, :fee 0, :tags ["war supply" "invoice #1234"], :street-line-1 "Av. Faria Lima, 1844", :name "Iron Bank S.A.", :state-code "SP", :city "São Paulo", :tax-id "20.018.183/0001-80", :our-number "10445145", :transaction-ids [], :overdue-limit 5, :receiver-name "Winterfell S.A." :receiver-tax-id "71.735.814/0001-12" :created "2020-04-23T19:14:43.125462+00:00", :discounts [{:date "2020-04-26T02:59:59.999999+00:00", :percentage 10.0}], :due "2020-05-21T02:59:59.999999+00:00", :street-line-2 "CJ 13", :line "34191.09107 07322.097309 71444.640008 1 82610000400000", :status "created", :interest 1.3, :id "6655767935451136", :fine 2.5, :zip-code "01500-000", :bar-code "34191826100004000001091007322097307144464000", :descriptions [], :district "Itaim Bibi"}
{ "boleto": { "id": "6655767935451136", "status": "created", "line": "34191.09107 07175.647309 71444.640008 1 82610000400000", "barCode": "34191826100004000001091007175647307144464000", "amount": 400000, "due": "2020-05-21T02:59:59.999999+00:00", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "tags": ["War supply", "Invoice #1234"], "workspaceId": "5083989094170624", "fee": 0, "descriptions": [], "discounts": [ { "percentage": 10, "date": "2020-04-25" } ], "workspaceId": "5083989094170624" } }
Delete a single boleto. We will send a request to CIP to cancel the boleto registration. After the boleto registration is canceled, it won't be possible to pay it anymore.
id
import starkbank boleto = starkbank.boleto.delete("6655767935451136") print(boleto)
const starkbank = require('starkbank'); (async() => { let boleto = await starkbank.boleto.delete('6655767935451136'); console.log(boleto); })();
$boleto = StarkBank\Boleto::delete("6655767935451136"); print_r($boleto);
import com.starkbank.*; Boleto boleto = Boleto.delete("6655767935451136"); System.out.println(boleto);
require('starkbank') boleto = StarkBank::Boleto.delete('6655767935451136') puts boleto
boleto = StarkBank.Boleto.delete!("6655767935451136") boleto |> IO.inspect
using System; StarkBank.Boleto boleto = StarkBank.Boleto.Delete("6655767935451136"); Console.WriteLine(boleto);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boleto" ) func main() { boleto, err := boleto.Delete("6655767935451136", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", boleto) }
(def boleto (starkbank.boleto/delete "6655767935451136")) (println boleto)
curl --location --request DELETE '{{baseUrl}}/v2/boleto/6655767935451136' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Boleto( id=6655767935451136, amount=400000, bar_code=34191826100004000001091007175647307144464000, city=São Paulo, created=2020-04-23 23:36:08.129614, descriptions=[], discounts=[{'date': '2020-04-26T02:59:59.999999+00:00', 'percentage': 10.0}], district=Itaim Bibi, due=2020-05-21, fee=0, fine=2.5, interest=1.3, line=34191.09107 07175.647309 71444.640008 1 82610000400000, name=Iron Bank S.A., our_number=10445145, transaction_ids=[], overdue_limit=5, receiver_name=Winterfell S. A., receiver_tax_id=71.735.814/0001-12, state_code=SP, status=created, street_line_1=Av. Faria Lima, 1844, street_line_2=CJ 13, tags=['war supply', 'invoice #1234'], tax_id=20.018.183/0001-80, zip_code=01500-000, workspace_id=5083989094170624 )
Boleto { id: '6655767935451136', amount: 400000, name: 'Iron Bank S.A.', taxId: '20.018.183/0001-80', streetLine1: 'Av. Faria Lima, 1844', streetLine2: 'CJ 13', district: 'Itaim Bibi', city: 'São Paulo', stateCode: 'SP', zipCode: '01500-000', due: '2020-05-21T02:59:59.999999+00:00', fine: 2.5, interest: 1.3, ourNumber: '10445145', transactionIds: [], overdueLimit: 5, receiverName: 'Winterfell S.A.', receiverTaxId: '71.735.814/0001-12', tags: [ 'war supply', 'invoice #1234' ], descriptions: [], discounts: [ { date: '2020-04-26T02:59:59.999999+00:00', percentage: 10 } ], fee: 0, line: '34191.09107 07176.307309 71444.640008 1 82610000400000', barCode: '34191826100004000001091007175647307144464000', status: 'created', created: '2020-04-23T23:36:10.789288+00:00', workspaceId: '5083989094170624' }
StarkBank\Boleto Object ( [id] => 6655767935451136 [amount] => 400000 [name] => Iron Bank S.A. [taxId] => 20.018.183/0001-80 [streetLine1] => Av. Faria Lima, 1844 [streetLine2] => CJ 13 [district] => Itaim Bibi [city] => São Paulo [stateCode] => SP [zipCode] => 01500-000 [due] => DateTime Object ( [date] => 2020-05-21 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [fine] => 2.5 [interest] => 1.3 [ourNumber] => 10445145 [transactionIds] => Array ( ) [overdueLimit] => 5 [receiverName] => Winterfell S.A. [receiverTaxId] => 71.735.814/0001-12 [tags] => Array ( [0] => war supply [1] => invoice #1234 ) [descriptions] => Array ( ) [discounts] => Array ( [0] => Array ( [date] => 2020-04-26T02:59:59.999999+00:00 [percentage] => 10 ) ) [fee] => 0 [line] => 34191.09107 07150.227309 71444.640008 7 82610000400000 [barCode] => 34197826100004000001091007150227307144464000 [status] => created [created] => DateTime Object ( [date] => 2020-04-22 20:12:56.830070 [timezone_type] => 1 [timezone] => +00:00 ) [workspaceId] => 5083989094170624 )
Boleto({ "id": "6655767935451136", "amount": "400000", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "due": "2020-04-21T02:59:59.999999+00:00", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "workspaceId": "5083989094170624", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "tags": ["war supply", "invoice #1234"], "descriptions": [], "discounts": [ {"date": "2020-04-26T02:59:59.999999+00:00", "percentage": 10.0} ], "fee": 0, "line": "34191.09107 07027.987309 71444.640008 5 82310000400000", "barCode": "34191826100004000001091007175647307144464000", "status": "created", "created": "2020-04-23T23:28:13+00:00" "workspaceId": "5083989094170624" })
boleto( id: 6655767935451136, amount: 400000, name: Iron Bank S.A., tax_id: 20.018.183/0001-80, street_line_1: Av. Faria Lima, 1844, street_line_2: CJ 13, district: Itaim Bibi, city: São Paulo, state_code: SP, zip_code: 01500-000, due: 2020-05-21T02:59:59.999999+00:00, fine: 2.5, interest: 1.3, our_number: 10445145, transaction_ids: [], overdue_limit: 5, receiver_name: Winterfell S.A., receiver_tax_id: 71.735.814/0001-12, tags: ["war supply", "invoice #1234"], descriptions: [], discounts: [{"date"=>"2020-04-26T02:59:59.999999+00:00", "percentage"=>10.0}], fee: 0, line: 34191.09107 07149.917309 71444.640008 1 82610000400000, bar_code: 34191826100004000001091007149917307144464000, status: created, created: 2020-04-23T19:59:25+00:00 workspace_id: 5083989094170624 )
%StarkBank.Boleto{ amount: 400000, bar_code: "34191826100004000001091007175647307144464000", city: "São Paulo", created: ~U[2020-04-23 17:41:58.458035Z], descriptions: [], discounts: [ %{"date" => "2020-04-26T02:59:59.999999+00:00", "percentage" => 10.0} ], district: "Itaim Bibi", due: ~U[2020-05-21 02:59:59.999999Z], fee: 0, fine: 2.5, id: "6655767935451136", interest: 1.3, line: "34191.09107 07156.837309 71444.640008 8 82610000400000", name: "Iron Bank S.A.", our_number: "10445145", transaction_ids: [], overdue_limit: 5, receiver_name: "Winterfell S.A.", receiver_tax_id: "71.735.814/0001-12", state_code: "SP", status: "created", street_line_1: "Av. Faria Lima, 1844", street_line_2: "CJ 13", tags: ["war supply", "invoice #1234"], tax_id: "20.018.183/0001-80", zip_code: "01500-000", workspace_id: "5083989094170624" }
Boleto( Amount: 400000, Name: Iron Bank S.A., TaxID: 20.018.183/0001-80, StreetLine1: Av. Faria Lima, 1844, StreetLine2: CJ 13, District: Itaim Bibi, City: Sao Paulo, StateCode: SP, ZipCode: 01500-000, Due: 05/21/2020 23:59:59, Fine: 2.5, Interest: 1.3, OverdueLimit: 5, OurNumber: 10445145, TransactionIds: { }, ReceiverName: Wintefell S.A., ReceiverTaxID: 71.735.814/0001-12, Tags: { war supply, invoice #1234 }, Descriptions: { }, Discounts: { { { date, 2020-04-26T02:59:59.999999+00:00 }, { percentage, 10 } } }, Fee: 0, Line: 34191.09107 07159.647309 71444.640008 1 82610000400000, BarCode: 34191826100004000001091007159647307144464000, Status: created, Created: 04/23/2020 15:53:22, WorkspaceId: 5083989094170624, ID: 6655767935451136 )
{ Id:6655767935451136 Amount:400000 Name:Iron Bank S.A. TaxId:20.018.183/0001-80 StreetLine1:Av. Faria Lima, 1844 StreetLine2:CJ 13 District:Itaim Bibi City:São Paulo StateCode:SP ZipCode:01500-000 Due:2020-05-21 02:59:59.999999 +0000 +0000 Fine:2.5 Interest:1.3 OverdueLimit:5 Descriptions:[] Discounts:[map[date:2020-04-26T02:59:59.999999+00:00 percentage:10]] Tags:[war supply invoice #1234] ReceiverName:Winterfell S.A. ReceiverTaxId:71.735.814/0001-12 Fee:0 Line:34191.09107 44555.427309 71444.640008 4 92570000400000 BarCode:34191826100004000001091007175647307144464000 Status:created TransactionIds:[] WorkspaceId:5083989094170624 Created:2020-04-23 03:18:33.515597 +0000 +0000 OurNumber:10445554 }
{:amount 400000, :fee 0, :tags ["war supply" "invoice #1234"], :street-line-1 "Av. Faria Lima, 1844", :name "Iron Bank S.A.", :state-code "SP", :city "São Paulo", :tax-id "20.018.183/0001-80", :our-number "10445145", :transaction-ids [], :overdue-limit 5, :receiver-name "Winterfell S.A." :receiver-tax-id "71.735.814/0001-12" :created "2020-04-23T19:14:43.125462+00:00", :discounts [{:date "2020-04-26T02:59:59.999999+00:00", :percentage 10.0}], :due "2020-05-21T02:59:59.999999+00:00", :street-line-2 "CJ 13", :line "34191.09107 07322.097309 71444.640008 1 82610000400000", :status "created", :interest 1.3, :id "6655767935451136", :fine 2.5, :zip-code "01500-000", :bar-code "34191826100004000001091007322097307144464000", :descriptions [], :district "Itaim Bibi"}
{ "message": "Boleto successfully deleted", "boleto": { "id": "6655767935451136", "status": "created", "line": "34191.09107 07175.647309 71444.640008 1 82610000400000", "barCode": "34191826100004000001091007175647307144464000", "amount": 400000, "due": "2020-05-21T02:59:59.999999+00:00", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "tags": ["War supply", "Invoice #1234"], "workspaceId": "5083989094170624", "fee": 0, "descriptions": [], "discounts": [ { "percentage": 10, "date": "2020-04-25" } ], "workspaceId": "5083989094170624" } }
Get a downloadable boleto PDF file. This route is public and does not require the usual authentication headers. However, if you request an invalid boleto ID too many times, your IP will be blocked for this specific route.
id
layout
hiddenFields
import starkbank pdf = starkbank.boleto.pdf("6655767935451136") with open("boleto.pdf", "wb") as file: file.write(pdf)
const starkbank = require('starkbank'); const fs = require('fs').promises; (async() => { let pdf = await starkbank.boleto.pdf('6655767935451136'); await fs.writeFile('boleto.pdf', pdf); })();
$pdf = StarkBank\Boleto::pdf("6655767935451136"); $fp = fopen('boleto.pdf', 'w'); fwrite($fp, $pdf); fclose($fp);
import java.io.File; import java.io.InputStream; import java.nio.file.StandardCopyOption; import com.starkbank.*; InputStream pdf = Boleto.pdf("6655767935451136"); java.nio.file.Files.copy( pdf, new File("boleto.pdf").toPath(), StandardCopyOption.REPLACE_EXISTING );
require('starkbank') pdf = StarkBank::Boleto.pdf('6655767935451136') File.open('boleto.pdf', 'w') { |file| file.write(pdf) }
pdf = StarkBank.Boleto.pdf!("6655767935451136") file = File.open!("boleto.pdf", [:write]) IO.binwrite(file, pdf) File.close(file)
byte[] pdf = Boleto.Pdf("6655767935451136"); System.IO.File.WriteAllBytes("boleto.pdf", pdf);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boleto" ) func main() { pdf, err := boleto.Pdf("6655767935451136", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } errFile := ioutil.WriteFile("boleto.pdf", pdf, 0666) if errFile != nil { fmt.Print(errFile) } }
(clojure.java.io/copy (starkbank.boleto/pdf "6655767935451136") (clojure.java.io/file "boleto.pdf"))
curl --location --request GET '{{baseUrl}}/v2/boleto/6655767935451136/pdf?layout=booklet' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Get a paged list of boleto logs. A log tracks a change in the boleto entity according to its life cycle.
cursor
limit
after
before
types
boletoIds
fields
import starkbank logs = starkbank.boleto.log.query( after="2020-04-01", before="2020-04-30" ) for log in logs: print(log)
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.boleto.log.query({ after: '2020-04-01', before: '2020-04-30', }); for await (let log of logs) { console.log(log); } })();
$logs = StarkBank\Boleto\Log::query([ "after" => "2020-04-01", "before" => "2020-04-30" ]); foreach($logs as $log){ print_r($log); }
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<Boleto.Log> logs = Boleto.Log.query(params); for (Boleto.Log log : logs){ System.out.println(log); }
require('starkbank') logs = StarkBank::Boleto::Log.query( after: '2020-04-01', before: '2020-04-30' ) logs.each do |log| puts log end
logs = StarkBank.Boleto.Log.query!( after: "2020-04-01", before: "2020-04-30" ) for log <- logs do log |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.Boleto.Log> logs = StarkBank.Boleto.Log.Query( after: new DateTime(2020, 4, 1), before: new DateTime(2020, 4, 30) ); foreach(StarkBank.Boleto.Log log in logs) { Console.WriteLine(log); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boleto/log" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-04-01" params["before"] = "2020-04-30" logs := log.Query(params, nil) for log := range logs { fmt.Printf("%+v", log) } }
(def logs (starkbank.boleto.log/query { :after "2020-4-1" :before "2020-4-30" })) (dorun (map println logs))
curl --location --request GET '{{baseUrl}}/v2/boleto/log?after=2020-04-01&before=2020-04-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( id=6465045294743552, created=2020-04-24 23:46:14.703951, errors=[], type=paid, boleto=Boleto( id=6655767935451136, amount=400000, bar_code=34191826100004000001091007175647307144464000, city=São Paulo, created=2020-04-23 23:36:08.129614, descriptions=[], discounts=[{'date': '2020-04-26T02:59:59.999999+00:00', 'percentage': 10.0}], district=Itaim Bibi, due=2020-05-21, fee=0, fine=2.5, interest=1.3, line=34191.09107 07175.647309 71444.640008 1 82610000400000, name=Iron Bank S.A., our_number=10445145, transaction_ids=[], overdue_limit=5, receiver_name=Winterfell S. A., receiver_tax_id=71.735.814/0001-12, state_code=SP, status=created, street_line_1=Av. Faria Lima, 1844, street_line_2=CJ 13, tags=['war supply', 'invoice #1234'], tax_id=20.018.183/0001-80, zip_code=01500-000 workspace_id=5083989094170624 ) )
Log { id: '6465045294743552', created: '2020-04-24T08:00:06.900961+00:00', type: 'paid', errors: [], boleto: { id: '6655767935451136', amount: 400000, name: 'Iron Bank S.A.', taxId: '20.018.183/0001-80', streetLine1: 'Av. Faria Lima, 1844', streetLine2: 'CJ 13', district: 'Itaim Bibi', city: 'São Paulo', stateCode: 'SP', zipCode: '01500-000', due: '2020-05-21T02:59:59.999999+00:00', fine: 2.5, interest: 1.3, ourNumber: '10445145', transactionIds: [], overdueLimit: 5, receiverName: 'Winterfell S.A.', receiverTaxId: '71.735.814/0001-12', tags: [ 'war supply', 'invoice #1234' ], descriptions: [], discounts: [ { date: '2020-04-26T02:59:59.999999+00:00', percentage: 10 } ], fee: 0, line: '34191.09107 07176.307309 71444.640008 1 82610000400000', barCode: '34191826100004000001091007175647307144464000', status: 'created', created: '2020-04-23T23:36:10.789288+00:00', workspaceId: '5083989094170624' } }
StarkBank\Boleto\Log Object ( [id] => 6465045294743552 [created] => DateTime Object ( [date] => 2020-04-24 18:10:41.196079 [timezone_type] => 1 [timezone] => +00:00 ) [type] => paid [errors] => Array ( ) [boleto] => StarkBank\Boleto Object ( [id] => 6655767935451136 [amount] => 400000 [name] => Iron Bank S.A. [taxId] => 20.018.183/0001-80 [streetLine1] => Av. Faria Lima, 1844 [streetLine2] => CJ 13 [district] => Itaim Bibi [city] => São Paulo [stateCode] => SP [zipCode] => 01500-000 [due] => DateTime Object ( [date] => 2020-05-21 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [fine] => 2.5 [interest] => 1.3 [ourNumber] => 10445145 [transactionIds] => Array ( ) [overdueLimit] => 5 [receiverName] => Winterfell S.A. [receiverTaxId] => 71.735.814/0001-12 [tags] => Array ( [0] => war supply [1] => invoice #1234 ) [descriptions] => Array ( ) [discounts] => Array ( [0] => Array ( [date] => 2020-04-26T02:59:59.999999+00:00 [percentage] => 10 ) ) [fee] => 0 [line] => 34191.09107 07150.227309 71444.640008 7 82610000400000 [barCode] => 34197826100004000001091007150227307144464000 [status] => created [created] => DateTime Object ( [date] => 2020-04-22 20:12:56.830070 [timezone_type] => 1 [timezone] => +00:00 ) [workspaceId] => 5083989094170624 ) )
Log({ "id": "6465045294743552", "created": "2020-04-24T00:10:01+00:00", "type": "paid", "errors": [], "boleto": { "id": "6655767935451136", "amount": "400000", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "due": "2020-04-21T02:59:59.999999+00:00", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "workspaceId": "5083989094170624", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "tags": ["war supply", "invoice #1234"], "descriptions": [], "discounts": [ {"date": "2020-04-26T02:59:59.999999+00:00", "percentage": 10.0} ], "fee": 0, "line": "34191.09107 07027.987309 71444.640008 5 82310000400000", "barCode": "34191826100004000001091007175647307144464000", "status": "created", "created": "2020-04-23T23:28:13+00:00" "workspaceId": "5083989094170624" } })
log( id: 6465045294743552, created: 2020-04-24T00:10:01+00:00, type: paid, errors: [], boleto: boleto( id: 6655767935451136, amount: 400000, name: Iron Bank S.A., tax_id: 20.018.183/0001-80, street_line_1: Av. Faria Lima, 1844, street_line_2: CJ 13, district: Itaim Bibi, city: São Paulo, state_code: SP, zip_code: 01500-000, due: 2020-05-21T02:59:59.999999+00:00, fine: 2.5, interest: 1.3, our_number: 10445145, transaction_ids: [], overdue_limit: 5, receiver_name: Winterfell S.A., receiver_tax_id: 71.735.814/0001-12, tags: ["war supply", "invoice #1234"], descriptions: [], discounts: [{"date"=>"2020-04-26T02:59:59.999999+00:00", "percentage"=>10.0}], fee: 0, line: 34191.09107 07149.917309 71444.640008 1 82610000400000, bar_code: 34191826100004000001091007149917307144464000, status: created, created: 2020-04-23T19:59:25+00:00 workspace_id: 5083989094170624 ) )
%StarkBank.Boleto.Log { id: "6465045294743552", created: ~U[2020-04-24 00:23:07.841300Z], errors: [], type: "paid", boleto: %StarkBank.Boleto { amount: 400000, bar_code: "34191826100004000001091007175647307144464000", city: "São Paulo", created: ~U[2020-04-23 17:41:58.458035Z], descriptions: [], discounts: [ %{"date" => "2020-04-26T02:59:59.999999+00:00", "percentage" => 10.0} ], district: "Itaim Bibi", due: ~U[2020-05-21 02:59:59.999999Z], fee: 0, fine: 2.5, id: "6655767935451136", interest: 1.3, line: "34191.09107 07156.837309 71444.640008 8 82610000400000", name: "Iron Bank S.A.", our_number: "10445145", transaction_ids: [], overdue_limit: 5, receiver_name: "Winterfell S.A.", receiver_tax_id: "71.735.814/0001-12", state_code: "SP", status: "created", street_line_1: "Av. Faria Lima, 1844", street_line_2: "CJ 13", tags: ["war supply", "invoice #1234"], tax_id: "20.018.183/0001-80", zip_code: "01500-000", workspace_id: "5083989094170624" } }
Log( ID: 6465045294743552, Created: 04/24/2020 16:00:04, Type: paid, Errors: { }, Boleto: Boleto( Amount: 400000, Name: Iron Bank S.A., TaxID: 20.018.183/0001-80, StreetLine1: Av. Faria Lima, 1844, StreetLine2: CJ 13, District: Itaim Bibi, City: Sao Paulo, StateCode: SP, ZipCode: 01500-000, Due: 05/21/2020 23:59:59, Fine: 2.5, Interest: 1.3, OverdueLimit: 5, OurNumber: 10445145, TransactionIds: { }, ReceiverName: Wintefell S.A., ReceiverTaxID: 71.735.814/0001-12, Tags: { war supply, invoice #1234 }, Descriptions: { }, Discounts: { { { date, 2020-04-26T02:59:59.999999+00:00 }, { percentage, 10 } } }, Fee: 0, Line: 34191.09107 07159.647309 71444.640008 1 82610000400000, BarCode: 34191826100004000001091007159647307144464000, Status: created, Created: 04/23/2020 15:53:22, WorkspaceId: 5083989094170624 ID: 6655767935451136 ) )
{ Id:6465045294743552 Boleto:{ Id:6655767935451136 Amount:400000 Name:Iron Bank S.A. TaxId:20.018.183/0001-80 StreetLine1:Av. Faria Lima, 1844 StreetLine2:CJ 13 District:Itaim Bibi City:São Paulo StateCode:SP ZipCode:01500-000 Due:2020-05-21 02:59:59.999999 +0000 +0000 Fine:2.5 Interest:1.3 OverdueLimit:5 Descriptions:[] Discounts:[map[date:2020-04-26T02:59:59.999999+00:00 percentage:10]] Tags:[war supply invoice #1234] ReceiverName:Winterfell S.A. ReceiverTaxId:71.735.814/0001-12 Fee:0 Line:34191.09107 44555.427309 71444.640008 4 92570000400000 BarCode:34191826100004000001091007175647307144464000 Status:created TransactionIds:[] WorkspaceId:5083989094170624 Created:2020-04-23 03:18:33.515597 +0000 +0000 OurNumber:10445554 } Errors:[] Type:paid Created:2020-04-24 01:00:06.702991 +0000 +0000 }
{:id "6465045294743552", :created "2020-04-24T19:16:03.818700+00:00", :errors [], :type "paid", :boleto {:amount 400000, :fee 0, :tags ["war supply" "invoice #1234"], :street-line-1 "Av. Faria Lima, 1844", :name "Iron Bank S.A.", :state-code "SP", :city "São Paulo", :tax-id "20.018.183/0001-80", :our-number "10445145", :transaction-ids [], :overdue-limit 5, :receiver-name "Winterfell S.A." :receiver-tax-id "71.735.814/0001-12" :created "2020-04-23T19:14:43.125462+00:00", :discounts [{:date "2020-04-26T02:59:59.999999+00:00", :percentage 10.0}], :due "2020-05-21T02:59:59.999999+00:00", :street-line-2 "CJ 13", :line "34191.09107 07322.097309 71444.640008 1 82610000400000", :status "created", :interest 1.3, :id "6655767935451136", :fine 2.5, :zip-code "01500-000", :bar-code "34191826100004000001091007322097307144464000", :descriptions [], :district "Itaim Bibi"}}
{ "cursor": null, "logs": [ { "id": "6465045294743552", "created": "2020-04-24T23:00:08.338233+00:00", "errors": [], "type": "paid", "boleto": { "id": "6655767935451136", "status": "created", "line": "34191.09107 07175.647309 71444.640008 1 82610000400000", "barCode": "34191826100004000001091007175647307144464000", "amount": 400000, "due": "2020-05-21T02:59:59.999999+00:00", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "tags": ["War supply", "Invoice #1234"], "workspaceId": "5083989094170624", "fee": 0, "descriptions": [], "discounts": [ { "percentage": 10, "date": "2020-04-25" } ], "workspaceId": "5083989094170624" } } ] }
Get a single boleto log by its id.
id
fields
import starkbank log = starkbank.boleto.log.get("6465045294743552") print(log)
const starkbank = require('starkbank'); (async() => { let log = await starkbank.boleto.log.get('6465045294743552'); console.log(log); })();
$log = StarkBank\Boleto\Log::get("6465045294743552"); print_r($log);
import com.starkbank.*; Boleto.Log log = Boleto.Log.get("6465045294743552"); System.out.println(log);
require('starkbank') log = StarkBank::Boleto::Log.get('6465045294743552') puts log
log = StarkBank.Boleto.Log.get!("6465045294743552") log |> IO.inspect
using System; StarkBank.Boleto.Log log = StarkBank.Boleto.Log.Get("6465045294743552"); Console.WriteLine(log);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boleto/log" ) func main() { log, err := log.Get("6465045294743552", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
(def log (starkbank.boleto.log/get "6465045294743552")) (println log)
curl --location --request GET '{{baseUrl}}/v2/boleto/log/6465045294743552' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( id=6465045294743552, created=2020-04-24 23:46:14.703951, errors=[], type=paid, boleto=Boleto( id=6655767935451136, amount=400000, bar_code=34191826100004000001091007175647307144464000, city=São Paulo, created=2020-04-23 23:36:08.129614, descriptions=[], discounts=[{'date': '2020-04-26T02:59:59.999999+00:00', 'percentage': 10.0}], district=Itaim Bibi, due=2020-05-21, fee=0, fine=2.5, interest=1.3, line=34191.09107 07175.647309 71444.640008 1 82610000400000, name=Iron Bank S.A., our_number=10445145, transaction_ids=[], overdue_limit=5, receiver_name=Winterfell S. A., receiver_tax_id=71.735.814/0001-12, state_code=SP, status=created, street_line_1=Av. Faria Lima, 1844, street_line_2=CJ 13, tags=['war supply', 'invoice #1234'], tax_id=20.018.183/0001-80, zip_code=01500-000, workspace_id=5083989094170624 ) )
Log { id: '6465045294743552', created: '2020-04-24T08:00:06.900961+00:00', type: 'paid', errors: [], boleto: { id: '6655767935451136', amount: 400000, name: 'Iron Bank S.A.', taxId: '20.018.183/0001-80', streetLine1: 'Av. Faria Lima, 1844', streetLine2: 'CJ 13', district: 'Itaim Bibi', city: 'São Paulo', stateCode: 'SP', zipCode: '01500-000', due: '2020-05-21T02:59:59.999999+00:00', fine: 2.5, interest: 1.3, ourNumber: '10445145', transactionIds: [], overdueLimit: 5, receiverName: 'Winterfell S.A.', receiverTaxId: '71.735.814/0001-12', tags: [ 'war supply', 'invoice #1234' ], descriptions: [], discounts: [ { date: '2020-04-26T02:59:59.999999+00:00', percentage: 10 } ], fee: 0, line: '34191.09107 07176.307309 71444.640008 1 82610000400000', barCode: '34191826100004000001091007175647307144464000', status: 'created', created: '2020-04-23T23:36:10.789288+00:00', workspaceId: '5083989094170624' } }
StarkBank\Boleto\Log Object ( [id] => 6465045294743552 [created] => DateTime Object ( [date] => 2020-04-24 18:10:41.196079 [timezone_type] => 1 [timezone] => +00:00 ) [type] => paid [errors] => Array ( ) [boleto] => StarkBank\Boleto Object ( [id] => 6655767935451136 [amount] => 400000 [name] => Iron Bank S.A. [taxId] => 20.018.183/0001-80 [streetLine1] => Av. Faria Lima, 1844 [streetLine2] => CJ 13 [district] => Itaim Bibi [city] => São Paulo [stateCode] => SP [zipCode] => 01500-000 [due] => DateTime Object ( [date] => 2020-05-21 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [fine] => 2.5 [interest] => 1.3 [ourNumber] => 10445145 [transactionIds] => Array ( ) [overdueLimit] => 5 [receiverName] => Winterfell S.A. [receiverTaxId] => 71.735.814/0001-12 [tags] => Array ( [0] => war supply [1] => invoice #1234 ) [descriptions] => Array ( ) [discounts] => Array ( [0] => Array ( [date] => 2020-04-26T02:59:59.999999+00:00 [percentage] => 10 ) ) [fee] => 0 [line] => 34191.09107 07150.227309 71444.640008 7 82610000400000 [barCode] => 34197826100004000001091007150227307144464000 [status] => created [created] => DateTime Object ( [date] => 2020-04-22 20:12:56.830070 [timezone_type] => 1 [timezone] => +00:00 ) [workspaceId] => 5083989094170624 ) )
Log({ "id": "6465045294743552", "created": "2020-04-24T00:10:01+00:00", "type": "paid", "errors": [], "boleto": { "id": "6655767935451136", "amount": "400000", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "due": "2020-04-21T02:59:59.999999+00:00", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "workspaceId": "5083989094170624", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "tags": ["war supply", "invoice #1234"], "descriptions": [], "discounts": [ {"date": "2020-04-26T02:59:59.999999+00:00", "percentage": 10.0} ], "fee": 0, "line": "34191.09107 07027.987309 71444.640008 5 82310000400000", "barCode": "34191826100004000001091007175647307144464000", "status": "created", "created": "2020-04-23T23:28:13+00:00", "workspaceId": "5083989094170624" } })
log( id: 6465045294743552, created: 2020-04-24T00:10:01+00:00, type: paid, errors: [], boleto: boleto( id: 6655767935451136, amount: 400000, name: Iron Bank S.A., tax_id: 20.018.183/0001-80, street_line_1: Av. Faria Lima, 1844, street_line_2: CJ 13, district: Itaim Bibi, city: São Paulo, state_code: SP, zip_code: 01500-000, due: 2020-05-21T02:59:59.999999+00:00, fine: 2.5, interest: 1.3, our_number: 10445145, transaction_ids: [], overdue_limit: 5, receiver_name: Winterfell S.A., receiver_tax_id: 71.735.814/0001-12, tags: ["war supply", "invoice #1234"], descriptions: [], discounts: [{"date"=>"2020-04-26T02:59:59.999999+00:00", "percentage"=>10.0}], fee: 0, line: 34191.09107 07149.917309 71444.640008 1 82610000400000, bar_code: 34191826100004000001091007149917307144464000, status: created, created: 2020-04-23T19:59:25+00:00, workspace_id: 5083989094170624 ) )
%StarkBank.Boleto.Log { id: "6465045294743552", created: ~U[2020-04-24 00:23:07.841300Z], errors: [], type: "paid", boleto: %StarkBank.Boleto { amount: 400000, bar_code: "34191826100004000001091007175647307144464000", city: "São Paulo", created: ~U[2020-04-23 17:41:58.458035Z], descriptions: [], discounts: [ %{"date" => "2020-04-26T02:59:59.999999+00:00", "percentage" => 10.0} ], district: "Itaim Bibi", due: ~U[2020-05-21 02:59:59.999999Z], fee: 0, fine: 2.5, id: "6655767935451136", interest: 1.3, line: "34191.09107 07156.837309 71444.640008 8 82610000400000", name: "Iron Bank S.A.", our_number: "10445145", transaction_ids: [], overdue_limit: 5, receiver_name: "Winterfell S.A.", receiver_tax_id: "71.735.814/0001-12", state_code: "SP", status: "created", street_line_1: "Av. Faria Lima, 1844", street_line_2: "CJ 13", tags: ["war supply", "invoice #1234"], tax_id: "20.018.183/0001-80", zip_code: "01500-000", workspace_id: "5083989094170624" } }
Log( ID: 6465045294743552, Created: 04/24/2020 16:00:04, Type: paid, Errors: { }, Boleto: Boleto( Amount: 400000, Name: Iron Bank S.A., TaxID: 20.018.183/0001-80, StreetLine1: Av. Faria Lima, 1844, StreetLine2: CJ 13, District: Itaim Bibi, City: Sao Paulo, StateCode: SP, ZipCode: 01500-000, Due: 05/21/2020 23:59:59, Fine: 2.5, Interest: 1.3, OverdueLimit: 5, OurNumber: 10445145, TransactionIds: { }, ReceiverName: Wintefell S.A., ReceiverTaxID: 71.735.814/0001-12, Tags: { war supply, invoice #1234 }, Descriptions: { }, Discounts: { { { date, 2020-04-26T02:59:59.999999+00:00 }, { percentage, 10 } } }, Fee: 0, Line: 34191.09107 07159.647309 71444.640008 1 82610000400000, BarCode: 34191826100004000001091007159647307144464000, Status: created, Created: 04/23/2020 15:53:22, WorkspaceId: 5083989094170624, ID: 6655767935451136 ) )
{ Id:6465045294743552 Boleto:{ Id:6655767935451136 Amount:400000 Name:Iron Bank S.A. TaxId:20.018.183/0001-80 StreetLine1:Av. Faria Lima, 1844 StreetLine2:CJ 13 District:Itaim Bibi City:São Paulo StateCode:SP ZipCode:01500-000 Due:2020-05-21 02:59:59.999999 +0000 +0000 Fine:2.5 Interest:1.3 OverdueLimit:5 Descriptions:[] Discounts:[map[date:2020-04-26T02:59:59.999999+00:00 percentage:10]] Tags:[war supply invoice #1234] ReceiverName:Winterfell S.A. ReceiverTaxId:71.735.814/0001-12 Fee:0 Line:34191.09107 44555.427309 71444.640008 4 92570000400000 BarCode:34191826100004000001091007175647307144464000 Status:created TransactionIds:[] WorkspaceId:5083989094170624 Created:2020-04-23 03:18:33.515597 +0000 +0000 OurNumber:10445554 } Errors:[] Type:paid Created:2020-04-24 01:00:06.702991 +0000 +0000 }
{:id "6465045294743552", :created "2020-04-24T19:16:03.818700+00:00", :errors [], :type "paid", :boleto {:amount 400000, :fee 0, :tags ["war supply" "invoice #1234"], :street-line-1 "Av. Faria Lima, 1844", :name "Iron Bank S.A.", :state-code "SP", :city "São Paulo", :tax-id "20.018.183/0001-80", :our-number "10445145", :transaction-ids [], :overdue-limit 5, :receiver-name "Winterfell S.A." :receiver-tax-id "71.735.814/0001-12" :created "2020-04-23T19:14:43.125462+00:00", :discounts [{:date "2020-04-26T02:59:59.999999+00:00", :percentage 10.0}], :due "2020-05-21T02:59:59.999999+00:00", :street-line-2 "CJ 13", :line "34191.09107 07322.097309 71444.640008 1 82610000400000", :status "created", :interest 1.3, :id "6655767935451136", :fine 2.5, :zip-code "01500-000", :bar-code "34191826100004000001091007322097307144464000", :descriptions [], :district "Itaim Bibi"}}
{ "log": { "id": "6465045294743552", "created": "2020-04-24T23:00:08.338233+00:00", "errors": [], "type": "paid", "boleto": { "id": "6655767935451136", "status": "created", "line": "34191.09107 07175.647309 71444.640008 1 82610000400000", "barCode": "34191826100004000001091007175647307144464000", "amount": 400000, "due": "2020-05-21T02:59:59.999999+00:00", "name": "Iron Bank S.A.", "taxId": "20.018.183/0001-80", "fine": 2.5, "interest": 1.3, "ourNumber": "10445145", "transactionIds": [], "overdueLimit": 5, "receiverName": "Winterfell S.A.", "receiverTaxId": "71.735.814/0001-12", "streetLine1": "Av. Faria Lima, 1844", "streetLine2": "CJ 13", "district": "Itaim Bibi", "city": "São Paulo", "stateCode": "SP", "zipCode": "01500-000", "tags": ["War supply", "Invoice #1234"], "workspaceId": "5083989094170624", "fee": 0, "descriptions": [], "discounts": [ { "percentage": 10, "date": "2020-04-25" } ], "workspaceId": "5083989094170624" } } }
Honoring the famous Sherlock Holmes, this feature allows your application to investigate updated boleto status according to CIP in less than an hour.
Use this route to verify the updated status of boletos generated at Stark Bank according to CIP.
boletoId
tags
import starkbank holmes = starkbank.boletoholmes.create([ starkbank.BoletoHolmes( boleto_id="5656565656565656", tags=["sherlock", "holmes"], ) ]) for holmes in holmes: print(holmes)
const starkbank = require('starkbank'); (async() => { let holmes = await starkbank.boletoHolmes.create([ { boletoId: '5656565656565656', tags: ['sherlock', 'holmes'], } ]) for (let holmes of holmes) { console.log(holmes); } })();
use StarkBank\BoletoHolmes; $holmes = [new BoletoHolmes([ "boletoId" => "5656565656565656", "tags" => ["sherlock", "holmes"] ])]; $boletoHolmes = BoletoHolmes::create($holmes)[0]; foreach($boletoHolmes as $sherlock){ print_r($sherlock); }
import com.starkbank.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; List<BoletoHolmes> holmes = new ArrayList<>(); HashMap<String, Object> dataHolmes = new HashMap<>(); dataHolmes.put("boletoId", "5656565656565656"); dataHolmes.put("tags", new String[]{"sherlock", "holmes"}); holmes.add(new BoletoHolmes(dataHolmes)); holmes = BoletoHolmes.create(holmes); for (BoletoHolmes sherlock : holmes){ System.out.println(sherlock); }
require('starkbank') holmes = StarkBank::BoletoHolmes.create([ StarkBank::BoletoHolmes.new( boleto_id: '5656565656565656', tags: ['sherlock', 'holmes'] ) ]) holmes.each do |sherlock| puts sherlock end
holmes = StarkBank.BoletoHolmes.create!( [ %StarkBank.BoletoHolmes{ boleto_id: "5656565656565656", tags: ["sherlock", "holmes"], } ] ) |> IO.inspect
using System; using System.Collections.Generic; List<StarkBank.BoletoHolmes> holmes = StarkBank.BoletoHolmes.Create( new List<StarkBank.BoletoHolmes>() { new BoletoHolmes( boletoID: "5656565656565656", tags: new List<string> { "sherlock", "holmes" } ) } ); foreach(StarkBank.BoletoHolmes sherlock in holmes) { Console.WriteLine(sherlock); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletoholmes" ) func main() { holmes, err := boletoholmes.Create( []boletoholmes.BoletoHolmes{ { BoletoId: "4933519247671296", Tags: []string{"sherlock", "holmes"}, }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, sherlock := range holmes { fmt.Printf("%+v", sherlock) } }
def holmes (starkbank.boleto-holmes/create [{ :boleto-id "5656565656565656" :tags ["sherlock" "holmes"] }])) (doseq [sherlock holmes] (println sherlock))
curl --location --request POST '{{baseUrl}}/v2/boleto-holmes' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "holmes": [ { "boletoId": "5656565656565656", "tags": ["sherlock", "holmes"], }, ] }'
BoletoHolmes( boleto_id=5656565656565656, created=2020-07-23 00:07:51.069587, id=3232323232323232, result=, status=solving, tags=["sherlock", "holmes"], updated=2020-07-23 00:07:51.069597 )
BoletoHolmes { boletoId: '5656565656565656', created: '2020-07-23T00:07:40.611174+00:00', id: '3232323232323232', result: '', status: 'solving', tags: ['sherlock', 'holmes'], updated: '2020-07-23T00:07:51.611174+00:00' }
StarkBank\BoletoHolmes Object ( [id] => 3232323232323232 [boletoId] => 5656565656565656 [tags] => Array ( [0] => sherlock [1] => holmes ) [status] => solving [result] => [created] => DateTime Object ( [date] => 2020-07-23 00:07:51.532473 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-07-23 00:07:51.532473 [timezone_type] => 1 [timezone] => +00:00 ) )
BoletoHolmes({ "tags": [ "sherlock", "holmes" ], "boletoId": "5656565656565656", "status": "solving", "result": "", "created": "2020-07-23T00:07:51.176283+00:00", "updated": "2020-07-23T00:07:51.176290+00:00", "id": "3232323232323232" })
boletoholmes( id: 3232323232323232, boleto_id: 5656565656565656, tags: ["sherlock", "holmes"], status: solving, result: , created: 2020-07-23T00:07:51+00:00, updated: 2020-07-23T00:07:51+00:00 )
StarkBank.BoletoHolmes{ boleto_id: "5656565656565656", created: ~U[2020-07-23 00:07:51.256963Z], id: "3232323232323232", result: "", status: "solving", tags: ["sherlock", "holmes"], updated: ~U[2020-07-23 00:07:51.256969Z] }
BoletoHolmes( BoletoID: '5656565656565656', Created: 07/23/2020 00:07:51, ID: 3232323232323232, Result: , Status: solving, Tags: { sherlock, holmes }, Updated: 07/23/2020 00:07:51, )
{ Id:3232323232323232 BoletoId:5656565656565656 Tags:[sherlock holmes] Status:solving Result: Created:2020-07-23 00:07:51.351907 +0000 +0000 Updated:2020-07-23 00:07:51.351914 +0000 +0000 }
{ :id 3232323232323232, :boleto-id 5656565656565656, :status solving, :result, :tags [sherlock holmes], :created 2020-07-23T00:07:51.467925+00:00, :updated 2020-07-23T00:07:51.467931+00:00 }
{ "message": "Boleto Holmes successfully created", "holmes": [ { "boletoId": "5656565656565656", "created": "2020-07-23T00:07:51.611174+00:00", "id": "3232323232323232", "result": "", "status": "solving", "tags": ["sherlock", "holmes"], "updated": "2020-07-23T00:07:51.611174+00:00" } ] }
Get a list of non-deleted boletos in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
tags
ids
boletoId
status
fields
import starkbank holmes = starkbank.boletoholmes.query( boleto_id="5656565656565656", after="2020-07-01", before="2020-07-30" ) for holmes in holmes: print(holmes)
const starkbank = require('starkbank'); (async() => { let holmes = await starkbank.boletoHolmes.query({ boletoId: "5656565656565656", after: '2020-07-01', before: '2020-07-30', }); for await (let holmes of holmes) { console.log(holmes); } })();
use StarkBank\BoletoHolmes; $holmes = iterator_to_array(BoletoHolmes::query([ "boletoId" => "5656565656565656", "after" => "2020-07-01", "before" => "2020-07-30" ])); foreach($holmes as $sherlock){ print_r($sherlock); }
import com.starkbank.*; import java.util.HashMap; import com.starkbank.utils.Generator; HashMap<String, Object> params = new HashMap<>(); params.put("boletoId", "5656565656565656"); params.put("after", "2020-07-01"); params.put("before", "2020-07-30"); Generator<BoletoHolmes> holmes = BoletoHolmes.query(params); for (BoletoHolmes sherlock : holmes){ System.out.println(sherlock); }
require('starkbank') holmes = StarkBank::BoletoHolmes.query( boleto_id: '5656565656565656', after: '2020-07-01', before: '2020-07-30' ).to_a holmes.each do |sherlock| puts sherlock end
holmes = StarkBank.BoletoHolmes.query!( boleto_id: "5656565656565656", after: "2020-07-01", before: "2020-07-30" ) for holme <- holmes do holme |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.BoletoHolmes> holmes = StarkBank.BoletoHolmes.Query( boletoId: "5656565656565656", after: new DateTime(2020, 7, 1), before: new DateTime(2020, 7, 30) ); foreach (StarkBank.BoletoHolmes sherlock in holmes) { Console.WriteLine(sherlock); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletoholmes" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-07-01" params["before"] = "2020-07-30" holmes := boletoholmes.Query(params, nil) for sherlock := range holmes { fmt.Printf("%+v", sherlock) } }
(def holmes (starkbank.boleto-holmes/query {:boletoId 5656565656565656, :after "2020-07-01", :before "2020-07-30"})) (doseq [sherlock holmes] (println sherlock))
curl --location --request GET '{{baseUrl}}/v2/boleto-holmes?boletoId=5656565656565656&after=2020-07-01&before=2020-07-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
BoletoHolmes( boleto_id=5656565656565656, created=2020-07-23 00:07:51.069587, id=3232323232323232, result=paid, status=solved, tags=["sherlock", "holmes"], updated=2020-07-23 00:07:51.069597 )
BoletoHolmes { boletoId: '5656565656565656', created: '2020-07-23T00:07:40.611174+00:00', id: '3232323232323232', result: '', status: 'solving', tags: ['sherlock', 'holmes'], updated: '2020-07-23T00:07:51.611174+00:00' }
StarkBank\BoletoHolmes Object ( [id] => 3232323232323232 [boletoId] => 5656565656565656 [tags] => Array ( [0] => sherlock [1] => holmes ) [status] => solving [result] => [created] => DateTime Object ( [date] => 2020-07-23 00:07:51.532473 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-07-23 00:07:51.532473 [timezone_type] => 1 [timezone] => +00:00 ) )
BoletoHolmes({ "tags": [ "sherlock", "holmes" ], "boletoId": "5656565656565656", "status": "solving", "result": "", "created": "2020-07-23T00:07:51.176283+00:00", "updated": "2020-07-23T00:07:51.176290+00:00", "id": "3232323232323232" })
boletoholmes( id: 3232323232323232, boleto_id: 5656565656565656, tags: ["sherlock", "holmes"], status: solving, result: , created: 2020-07-23T00:07:51+00:00, updated: 2020-07-23T00:07:51+00:00 )
%StarkBank.BoletoHolmes{ boleto_id: "5656565656565656", created: ~U[2020-07-23 00:07:51.256963Z], id: "3232323232323232", result: "", status: "solving", tags: ["sherlock", "holmes"], updated: ~U[2020-07-23 00:07:51.256969Z] }
BoletoHolmes( BoletoID: '5656565656565656', Created: 07/23/2020 00:07:51, ID: 3232323232323232, Result: , Status: solving, Tags: { sherlock, holmes }, Updated: 07/23/2020 00:07:51, )
{ Id:3232323232323232 BoletoId:5656565656565656 Tags:[sherlock holmes] Status:solving Result: Created:2020-07-23 00:07:51.351907 +0000 +0000 Updated:2020-07-23 00:07:51.351914 +0000 +0000 }
{ :id 3232323232323232, :boleto-id 5656565656565656, :status solving, :result, :tags [sherlock holmes], :created 2020-07-23T00:07:51.467925+00:00, :updated 2020-07-23T00:07:51.467931+00:00 }
{ "cursor": null, "holmes": [ { "boletoId": "5656565656565656", "created": "2020-07-23T00:07:51.611174+00:00", "id": "3232323232323232", "result": "", "status": "solving", "tags": ["sherlock", "holmes"], "updated": "2020-07-23T00:07:51.611174+00:00" } ] }
Get a single boleto holmes by its id.
id
fields
import starkbank holmes = starkbank.boletoholmes.get("3232323232323232") print(holmes)
const starkbank = require('starkbank'); (async() => { let holmes = await starkbank.boletoHolmes.get('3232323232323232'); console.log(holmes); })();
use StarkBank\BoletoHolmes; $sherlock = BoletoHolmes::get("3232323232323232"); print_r($sherlock);
import com.starkbank.*; BoletoHolmes sherlock = BoletoHolmes.get("3232323232323232"); System.out.println(sherlock);
require('starkbank') sherlock = StarkBank::BoletoHolmes.get('3232323232323232') puts sherlock
sherlock = StarkBank.BoletoHolmes.get!("3232323232323232") |> IO.inspect
using System; StarkBank.BoletoHolmes sherlock = StarkBank.BoletoHolmes.Get("3232323232323232"); Console.WriteLine(sherlock);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletoholmes" ) func main() { sherlock, err := boletoholmes.Get("3232323232323232", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", sherlock) }
(def holmes (starkbank.boleto-holmes/get "3232323232323232")) (println holmes)
curl --location --request GET '{{baseUrl}}/v2/boleto-holmes/3232323232323232' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
BoletoHolmes( boleto_id=5656565656565656, created=2020-07-23 00:07:51.069587, id=3232323232323232, result=, status=solving, tags=["sherlock", "holmes"], updated=2020-07-23 00:07:51.069597 )
BoletoHolmes { boletoId: '5656565656565656', created: '2020-07-23T00:07:40.611174+00:00', id: '3232323232323232', result: '', status: 'solving', tags: ['sherlock', 'holmes'], updated: '2020-07-23T00:07:51.611174+00:00' }
StarkBank\BoletoHolmes Object ( [id] => 3232323232323232 [boletoId] => 5656565656565656 [tags] => Array ( [0] => sherlock [1] => holmes ) [status] => solving [result] => [created] => DateTime Object ( [date] => 2020-07-23 00:07:51.532473 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-07-23 00:07:51.532473 [timezone_type] => 1 [timezone] => +00:00 ) )
BoletoHolmes({ "tags": [ "sherlock", "holmes" ], "boletoId": "5656565656565656", "status": "solving", "result": "", "created": "2020-07-23T00:07:51.176283+00:00", "updated": "2020-07-23T00:07:51.176290+00:00", "id": "3232323232323232" })
boletoholmes( id: 3232323232323232, boleto_id: 5656565656565656, tags: ["sherlock", "holmes"], status: solving, result: , created: 2020-07-23T00:07:51+00:00, updated: 2020-07-23T00:07:51+00:00 )
%StarkBank.BoletoHolmes{ boleto_id: "5656565656565656", created: ~U[2020-07-23 00:07:51.256963Z], id: "3232323232323232", result: "", status: "solving", tags: ["sherlock", "holmes"], updated: ~U[2020-07-23 00:07:51.256969Z] }
BoletoHolmes( BoletoID: '5656565656565656', Created: 07/23/2020 00:07:51, ID: 3232323232323232, Result: , Status: solving, Tags: { sherlock, holmes }, Updated: 07/23/2020 00:07:51, )
{ Id:3232323232323232 BoletoId:5656565656565656 Tags:[sherlock holmes] Status:solving Result: Created:2020-07-23 00:07:51.351907 +0000 +0000 Updated:2020-07-23 00:07:51.351914 +0000 +0000 }
{ :id 3232323232323232, :boleto-id 5656565656565656, :status solving, :result, :tags [sherlock holmes], :created 2020-07-23T00:07:51.467925+00:00, :updated 2020-07-23T00:07:51.467931+00:00 }
{ "holmes": [ { "boletoId": "5656565656565656", "created": "2020-07-23T00:07:51.611174+00:00", "id": "3232323232323232", "result": "", "status": "solving", "tags": ["sherlock", "holmes"], "updated": "2020-07-23T00:07:51.611174+00:00" } ] }
Get a paged list of all boleto holmes logs. A log tracks a change in the holmes entity according to its life cycle.
cursor
limit
after
before
types
holmesIds
fields
import starkbank logs = starkbank.boletoholmes.log.query( after="2020-07-01", before="2020-07-30" ) for log in logs: print(log)
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.boletoHolmes.log.query({ after: '2020-07-01', before: '2020-07-30', }); for await (let log of logs) { console.log(log); } })();
use StarkBank\BoletoHolmes\Log; $logs = iterator_to_array(Log::query([ "after" => "2020-07-01", "before" => "2020-07-30" ])); foreach($logs as $log){ print_r($log); }
import com.starkbank.*; import java.util.HashMap; import com.starkbank.utils.Generator; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2020-07-01"); params.put("before", "2020-07-30"); Generator<BoletoHolmes.Log> logs = BoletoHolmes.Log.query(params); for (BoletoHolmes.Log log : logs){ System.out.println(log); }
require('starkbank') logs = StarkBank::BoletoHolmes::Log.query( after: '2020-07-01', before: '2020-07-30' ).to_a logs.each do |log| puts log end
logs = StarkBank.BoletoHolmes.Log.query!( after: "2020-07-01", before: "2020-07-30" ) for log <- logs do log |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.BoletoHolmes.Log> logs = StarkBank.BoletoHolmes.Log.Query( after: new DateTime(2020, 7, 1), before: new DateTime(2020, 7, 30) ); foreach(StarkBank.BoletoHolmes.Log log in logs) { Console.WriteLine(log); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletoholmes/log" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-07-01" params["before"] = "2020-07-30" logs := log.Query(params, nil) for log := range logs { fmt.Printf("%+v", log) } }
(def logs (starkbank.boleto-holmes.log/query {:after "2020-07-01", :before "2020-07-30"})) (doseq [log logs] (println log))
curl --location --request GET '{{baseUrl}}/v2/boleto-holmes/log?after=2020-07-01&before=2020-07-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( id=1010101010101010, created=2020-07-24 17:58:32.075347, type=solved, holmes=BoletoHolmes( boleto_id=5656565656565656, created=2020-07-23 00:07:51.069587, id=3232323232323232, result=paid, status=solved, tags=["sherlock", "holmes"], updated=2020-07-23 00:07:51.069597 ), updated=2020-07-24 17:58:32.075347, )
Log { id: '1010101010101010', created: '2020-07-24T17:58:06.423525+00:00', type: 'solved', holmes: { boletoId: '5656565656565656', created: '2020-07-23T00:07:51.611174+00:00', id: '3232323232323232', result: 'paid', status: 'solved', tags: ['sherlock', 'holmes'], updated: '2020-07-23T00:07:51.611174+00:00' }, updated: '2020-07-24T17:58:06.423525+00:00', }
StarkBank\BoletoHolmes\Log Object ( [id] => 1010101010101010 [holmes] => StarkBank\BoletoHolmes Object ( [id] => 3232323232323232 [boletoId] => 5656565656565656 [tags] => Array ( [0] => sherlock [1] => holmes ) [status] => solved [result] => paid [created] => DateTime Object ( [date] => 2020-07-23 00:07:51.532473 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-07-23 00:07:51.532473 [timezone_type] => 1 [timezone] => +00:00 ) ) [type] => solved [created] => DateTime Object ( [date] => 2020-07-24 17:58:01.424426 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-07-24 17:58:01.424426 [timezone_type] => 1 [timezone] => +00:00 ) )
Log({ "created": "2020-07-24T17:58:01.459913+00:00", "updated": "2020-07-24T17:58:01.459913+00:00", "type": "solved", "holmes": { "tags": [ "sherlock", "holmes" ], "boletoId": "5656565656565656", "status": "solved", "result": "paid", "created": "2020-07-23T00:07:51.176283+00:00", "updated": "2020-07-23T00:07:51.127831+00:00", "id": "3232323232323232" }, "id": "1010101010101010" })
log( id: 1010101010101010, holmes: boletoholmes( id: 3232323232323232, boleto_id: 5656565656565656, tags: ["sherlock", "holmes"], status: solved, result: paid, created: 2020-07-23T00:07:51+00:00, updated: 2020-07-23T00:07:51+00:00 ), type: solved, created: 2020-04-27T17:58:01+00:00, updated: 2020-04-27T17:58:01+00:00 )
%StarkBank.BoletoHolmes.Log{ created: ~U[2020-07-24 17:58:01.030661Z], updated: ~U[2020-07-24 17:58:01.030661Z], holmes: %StarkBank.BoletoHolmes{ boleto_id: "5656565656565656", created: ~U[2020-07-23 00:07:51.256963Z], id: "3232323232323232", result: "paid", status: "solved", tags: ["sherlock", "holmes"], updated: ~U[2020-07-23 00:07:51.438203Z] }, id: "1010101010101010", type: "solved" }
Log( ID: 1010101010101010, Created: 24/07/2020 17:58:52, Updated: 24/07/2020 17:58:52, Type: solved, Holmes: BoletoHolmes( BoletoID: '5656565656565656', Created: 07/23/2020 00:07:51, ID: 3232323232323232, Result: paid, Status: solved, Tags: { sherlock, holmes }, Updated: 07/23/2020 00:07:51, ) )
{ Id:1010101010101010 Holmes:{ Id:3232323232323232 BoletoId:5656565656565656 Tags:[sherlock holmes] Status:solved Result:paid Created:2020-07-23 00:07:51.581547 +0000 +0000 Updated:2020-07-23 00:07:51.860171 +0000 +0000 } Errors:[] Type:solved Created:2020-04-27 17:58:01.602964 +0000 +0000 Updated:2020-04-27 17:58:01.602964 +0000 +0000 }
{ :id 1010101010101010, :created 2020-07-24T17:58:01.743039+00:00, :updated 2020-07-24T17:58:01.743039+00:00, :type solved, :holmes { :id 3232323232323232, :boleto-id 5656565656565656, :status solved, :result paid, :tags [sherlock holmes], :created 2020-07-23T00:07:51.467925+00:00, :updated 2020-07-23T00:07:51.294078+00:00 } }
{ "cursor": null, "logs": [ { "id": "1010101010101010", "created": "2020-07-24T17:58:08.338233+00:00", "updated": "2020-07-24T17:58:08.338233+00:00", "errors": [], "type": "solved", "holmes": { "boletoId": "5656565656565656", "created": "2020-07-23T00:07:51.611174+00:00", "id": "3232323232323232", "result": "paid", "status": "solved", "tags": ["sherlock", "holmes"], "updated": "2020-07-23T00:07:51.611174+00:00" } } ] }
Get a single boleto holmes log by its id.
id
fields
import starkbank log = starkbank.boletoholmes.log.get("1010101010101010") print(log)
const starkbank = require('starkbank'); (async() => { let log = await starkbank.boletoHolmes.log.get('1010101010101010'); console.log(log); })();
use StarkBank\BoletoHolmes\Log; $log = Log::get("1010101010101010"); print_r($log)
import com.starkbank.*; BoletoHolmes.Log log = BoletoHolmes.Log.get("1010101010101010"); System.out.println(log);
require('starkbank') log = StarkBank::BoletoHolmes::Log.get('1010101010101010') puts log
log = StarkBank.BoletoHolmes.Log.get!("1010101010101010") |> IO.inspect
using System; StarkBank.BoletoHolmes.Log log = StarkBank.BoletoHolmes.Log.Get("1010101010101010"); Console.WriteLine(log);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletoholmes/log" ) func main() { log, err := log.Get("6382022373146624", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
(def log (starkbank.boleto-holmes.log/get "5702929231118336")) (println log)
curl --location --request GET '{{baseUrl}}/v2/boleto-holmes/log/1010101010101010' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( id=1010101010101010, created=2020-07-24 17:58:32.075347, updated=2020-07-24 17:58:32.075347, type=solved, holmes=BoletoHolmes( boleto_id=5656565656565656, created=2020-07-23 00:07:51.069587, id=3232323232323232, result=paid, status=solved, tags=["sherlock", "holmes"], updated=2020-07-23 00:07:51.069597 ) )
Log { id: '1010101010101010', created: '2020-07-24T17:58:06.423525+00:00', updated: '2020-07-24T17:58:06.423525+00:00', type: 'solved', holmes: { boletoId: '5656565656565656', created: '2020-07-23T00:07:51.611174+00:00', id: '3232323232323232', result: 'paid', status: 'solved', tags: ['sherlock', 'holmes'], updated: '2020-07-23T00:07:51.611174+00:00' } }
StarkBank\BoletoHolmes\Log Object ( [id] => 1010101010101010 [holmes] => StarkBank\BoletoHolmes Object ( [id] => 3232323232323232 [boletoId] => 5656565656565656 [tags] => Array ( [0] => sherlock [1] => holmes ) [status] => solved [result] => paid [created] => DateTime Object ( [date] => 2020-07-23 00:07:51.532473 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-07-23 00:07:51.532473 [timezone_type] => 1 [timezone] => +00:00 ) ) [type] => solved [created] => DateTime Object ( [date] => 2020-07-24 17:58:01.424426 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-07-24 17:58:01.424426 [timezone_type] => 1 [timezone] => +00:00 ) )
Log({ "created": "2020-07-24T17:58:01.459913+00:00", "updated": "2020-07-24T17:58:01.459913+00:00", "type": "solved", "holmes": { "tags": [ "sherlock", "holmes" ], "boletoId": "5656565656565656", "status": "solved", "result": "paid", "created": "2020-07-23T00:07:51.176283+00:00", "updated": "2020-07-23T00:07:51.127831+00:00", "id": "3232323232323232" }, "id": "1010101010101010" })
log( id: 1010101010101010, holmes: boletoholmes( id: 3232323232323232, boleto_id: 5656565656565656, tags: ["sherlock", "holmes"], status: solved, result: paid, created: 2020-07-23T00:07:51+00:00, updated: 2020-07-23T00:07:51+00:00 ), type: solved, created: 2020-04-27T17:58:01+00:00, updated: 2020-04-27T17:58:01+00:00 )
%StarkBank.BoletoHolmes.Log{ created: ~U[2020-07-24 17:58:01.030661Z], updated: ~U[2020-07-24 17:58:01.030661Z], holmes: %StarkBank.BoletoHolmes{ boleto_id: "5656565656565656", created: ~U[2020-07-23 00:07:51.256963Z], id: "3232323232323232", result: "paid", status: "solved", tags: ["sherlock", "holmes"], updated: ~U[2020-07-23 00:07:51.438203Z] }, id: "1010101010101010", type: "solved" }
Log( ID: 1010101010101010, Created: 07/24/2020 17:58:52, Updated: 07/24/2020 17:58:52, Type: solved, Holmes: BoletoHolmes( BoletoID: '5656565656565656', Created: 07/23/2020 00:07:51, ID: 3232323232323232, Result: paid, Status: solved, Tags: { sherlock, holmes }, Updated: 07/23/2020 00:07:51, ) )
{ Id:1010101010101010 Holmes:{ Id:3232323232323232 BoletoId:5656565656565656 Tags:[sherlock holmes] Status:solved Result:paid Created:2020-07-23 00:07:51.581547 +0000 +0000 Updated:2020-07-23 00:07:51.860171 +0000 +0000 } Errors:[] Type:solved Created:2020-04-27 17:58:01.602964 +0000 +0000 Updated:2020-04-27 17:58:01.602964 +0000 +0000 }
{ :id 1010101010101010, :created 2020-07-24T17:58:01.743039+00:00, :updated 2020-07-24T17:58:01.743039+00:00, :type solved, :holmes { :id 3232323232323232, :boleto-id 5656565656565656, :status solved, :result paid, :tags [sherlock holmes], :created 2020-07-23T00:07:51.467925+00:00, :updated 2020-07-23T00:07:51.294078+00:00 } }
{ "log": { "id": "1010101010101010", "created": "2020-07-24T17:58:08.338233+00:00", "updated": "2020-07-24T17:58:08.338233+00:00", "errors": [], "type": "solved", "holmes": { "boletoId": "5656565656565656", "created": "2020-07-23T00:07:51.611174+00:00", "id": "3232323232323232", "result": "paid", "status": "solved", "tags": ["sherlock", "holmes"], "updated": "2020-07-23T00:07:51.611174+00:00" } } }
The Split resource is used to split an Invoice or Boleto between different receivers.
Get a list of Splits in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
receiverIds
fields
import starkbank splits = starkbank.split.query( after="2024-01-30", before="2024-02-01", limit=1 ) for split in splits: print(split)
Not yet available. Please contact us if you need this SDK.
use StarkBank\Split; $splits = iterator_to_array(Split::query(["limit" => 10, "before" => new DateTime("now")])); foreach($splits as $split) { print_r($split); }
import com.starkbank.*; import java.util.Map; import java.util.HashMap; Mapparams = new HashMap<>(); params.put("limit", 1); Generator splits = Split.query(params); for (Split split : splits) { System.out.println(split); }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split?after=2024-01-30&before=2024-02-01' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Split( amount=10000, created=2024-01-30 16:10:59.874663, external_id=invoice/5163468596445184/receiver/5143677177430016, id=5745664021495808, receiver_id=5143677177430016, scheduled=2024-01-30 16:10:59.840821, source=invoice/5163468596445184, status=created, tags=['invoice/5163468596445184'], updated=2024-01-30 16:21:03.973723 )
Not yet available. Please contact us if you need this SDK.
StarkBank\Split Object ( [id] => 5105697184284672 [amount] => 159 [receiverId] => 5706627130851328 [source] => invoice/4952232030109696 [externalId] => invoice/4952232030109696/receiver/5706627130851328 [tags] => Array ( [0] => invoice/4952232030109696 ) [scheduled] => [status] => success [created] => [updated] => )
Split({ "amount": 10000, "created": "2024-01-30 16:10:59.874824", "external_id": invoice/5163468596445184/receiver/5706627130851328, "id": 5182714068074496, "receiver_id": 5706627130851328, "scheduled": "2024-01-30 16:10:59.840821", "source": invoice/5163468596445184, "status": created, "tags": ['invoice/5163468596445184'], "updated": 2024-01-30 16:10:59.874829 })
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": null, "splits": [ { "amount": 10000, "created": "2023-10-23T23:40:04.809130+00:00", "externalId": "invoice/6394476721340416/receiver/5644004762845184", "id": "5714489739575296", "receiverId": "5644004762845184", "scheduled": "2023-11-01T10:00:00+00:00", "source": "invoice/6394476721340416", "status": "success", "tags": [], "updated": "2023-11-01T09:51:02.985959+00:00" } ] }
Get a single Split by its id.
id
fields
import starkbank split = starkbank.split.get("5155165527080960") print(split)
Not yet available. Please contact us if you need this SDK.
use StarkBank\Split; $split = Split::get("5155165527080960"); print_r($split);
import com.starkbank.*; Split split = Split.get("5155165527080960"); System.out.println(split);
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split/5155165527080960' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Split( amount=10000, created=2024-01-30 16:10:59.874824, external_id=invoice/5163468596445184/receiver/5706627130851328, id=5155165527080960, receiver_id=5706627130851328, scheduled=2024-01-30 16:10:59.840821, source=invoice/5163468596445184, status=created, tags=['invoice/5163468596445184'], updated=2024-01-30 16:10:59.874829 )
Not yet available. Please contact us if you need this SDK.
StarkBank\Split Object ( [id] => 5155165527080960 [amount] => 159 [receiverId] => 5706627130851328 [source] => invoice/4952232030109696 [externalId] => invoice/4952232030109696/receiver/5706627130851328 [tags] => Array ( [0] => invoice/4952232030109696 ) [scheduled] => [status] => success [created] => [updated] => )
Split({ "amount": 10000, "created": "2024-01-30 16:10:59.874824", "external_id": invoice/5163468596445184/receiver/5706627130851328, "id": 5155165527080960, "receiver_id": 5706627130851328, "scheduled": "2024-01-30 16:10:59.840821", "source": invoice/5163468596445184, "status": created, "tags": ['invoice/5163468596445184'], "updated": 2024-01-30 16:10:59.874829 })
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK. }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "split": { "amount": 10000, "created": "2024-01-30 16:10:59.874824", "external_id": invoice/5163468596445184/receiver/5706627130851328, "id": 5155165527080960, "receiver_id": 5706627130851328, "scheduled": "2024-01-30 16:10:59.840821", "source": invoice/5163468596445184, "status": created, "tags": ['invoice/5163468596445184'], "updated": 2024-01-30 16:10:59.874829 } }
Get a paged list of Split logs. A log tracks a change in the Split entity according to its life cycle.
cursor
limit
after
before
types
splitIds
fields
import starkbank logs = starkbank.split.log.query( after="2020-10-01", before="2020-10-30" ) for log in logs: print(log)
Not yet available. Please contact us if you need this SDK.
use StarkBank\Split\Log; $splitLogs = iterator_to_array(Log::query(["limit" => 10])); foreach($splitLogs as log) { print_r($log); }
import com.starkbank.*; import java.util.Map; import java.util.HashMap; Mapparams = new HashMap<>(); params.put("limit", 1); Generator logs = split.Log.query(params); for (Split.Log log : logs) { System.out.println(log); }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split-receiver/log?limit=1' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2024-01-30 16:21:03.459601, errors=None, id=5659211052613632, split=Split( amount=10000, created=2024-01-30 16:10:59.874663, external_id=invoice/5163468596445184/receiver/5143677177430016, id=5745664021495808, receiver_id=5143677177430016, scheduled=2024-01-30 16:10:59.840821, source=invoice/5163468596445184, status=created, tags=['invoice/5163468596445184'], updated=2024-01-30 16:21:04.002158 ), type=created )
Not yet available. Please contact us if you need this SDK.
StarkBank\Split\Log Object ( [id] => 5730447380185088 [created] => DateTime Object ( [date] => 2024-03-08 10:10:07.198713 [timezone_type] => 1 [timezone] => +00:00 ) [type] => success [errors] => [split] => StarkBank\Split Object ( [id] => 5128899402924032 [amount] => 37 [receiverId] => 5706627130851328 [source] => invoice/5120509326917632 [externalId] => invoice/5120509326917632/receiver/5706627130851328 [tags] => Array ( [0] => invoice/5120509326917632 ) [scheduled] => [status] => success [created] => [updated] => ) )
Log({ "created": "2024-01-30T20:32:56.214350+00:00", "id": "5079983684845568", "split": { "amount": 10000, "created": "2023-10-23T23:40:04.809130+00:00", "externalId": "invoice/6394476721340416/receiver/5644004762845184", "id": "5714489739575296", "receiverId": "5644004762845184", "scheduled": "2023-11-01T10:00:00+00:00", "source": "invoice/6394476721340416", "status": "success", "tags": [], "updated": "2023-11-01T09:51:03.015157+00:00" }, "type": "success" })
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": null, "logs": [ { "created": "2023-11-01T09:51:02.882114+00:00", "id": "5729450050191360", "split": { "amount": 10000, "created": "2023-10-23T23:40:04.809130+00:00", "externalId": "invoice/6394476721340416/receiver/5644004762845184", "id": "5714489739575296", "receiverId": "5644004762845184", "scheduled": "2023-11-01T10:00:00+00:00", "source": "invoice/6394476721340416", "status": "success", "tags": [], "updated": "2023-11-01T09:51:03.015157+00:00" }, "type": "success" } ] }
Get a single Split Log by its id.
id
fields
import starkbank log = starkbank.split.log.get("5729450050191360") print(log)
Not yet available. Please contact us if you need this SDK.
use StarkBank\Split\Log; $splitLog = Log::get("5729450050191360"); print_r($splitLog);
import com.starkbank.*; Split.Log log = Split.Log.get("5729450050191360"); System.out.println(log);
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split/log/5729450050191360' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2024-01-30 16:21:03.459601, errors=None, id=5729450050191360, split=Split( amount=10000, created=2024-01-30 16:10:59.874663, external_id=invoice/5163468596445184/receiver/5143677177430016, id=5745664021495808, receiver_id=5143677177430016, scheduled=2024-01-30 16:10:59.840821, source=invoice/5163468596445184, status=success, tags=['invoice/5163468596445184'], updated=2024-01-30 16:21:04.002158 ), type=success )
Not yet available. Please contact us if you need this SDK.
StarkBank\Split\Log Object ( [id] => 5729450050191360 [created] => DateTime Object ( [date] => 2024-03-08 10:10:07.198713 [timezone_type] => 1 [timezone] => +00:00 ) [type] => success [errors] => [split] => StarkBank\Split Object ( [id] => 5128899402924032 [amount] => 37 [receiverId] => 5706627130851328 [source] => invoice/5120509326917632 [externalId] => invoice/5120509326917632/receiver/5706627130851328 [tags] => Array ( [0] => invoice/5120509326917632 ) [scheduled] => [status] => success [created] => [updated] => ) )
Log({ "created": "2024-01-30 16:21:03.459601", "errors": None, "id": 5729450050191360, "split": Split({ "amount": 10000, "created":" 2024-01-30 16:10:59.874663", "external_id": invoice/5163468596445184/receiver/5143677177430016, "id": 5745664021495808, "receiver_id": 5143677177430016, "scheduled": "2024-01-30 16:10:59.840821", "source": invoice/5163468596445184, "status": success, "tags": ['invoice/5163468596445184'], "updated": "2024-01-30 16:21:04.002158" }), "type": success })
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": null, "logs": [ { "created": "2023-11-01T09:51:02.882114+00:00", "id": "5729450050191360", "split": { "amount": 10000, "created": "2023-10-23T23:40:04.809130+00:00", "externalId": "invoice/6394476721340416/receiver/5644004762845184", "id": "6742710681600000", "receiverId": "5644004762845184", "scheduled": "2023-11-01T10:00:00+00:00", "source": "invoice/6394476721340416", "status": "success", "tags": [], "updated": "2023-11-01T09:51:03.015157+00:00" }, "type": "success" } ] }
You can create a Receiver to an Invoice or Boleto split by using the Split Receiver resource.
Send a list of Split Receiver objects for creation in the Stark Bank API
name
taxId
bankCode
branchCode
accountNumber
accountType
tags
import starkbank receiver = starkbank.splitreceiver.create( receiver=starkbank.SplitReceiver( name="Daenerys Targaryen Stormborn", tax_id="594.739.480-42", bank_code="341", branch_code="2201", account_number="76543-8", account_type="salary" ) ) print(receiver)
Not yet available. Please contact us if you need this SDK.
use StarkBank\SplitReceiver; $receivers = [ new SplitReceiver([ "name"=> "John Snow", "taxId"=> "01234567890", "bankCode"=> "18236120", "branchCode"=> "0001", "accountNumber"=> "10000-0", "accountType"=> "checking", "tags"=> ["war supplies"], ]), new SplitReceiver([ "name"=> "Arya Stark", "taxId"=> "01234567890", "bankCode"=> "18236120", "branchCode"=> "0001", "accountNumber"=> "10000-0", "accountType"=> "checking", "tags"=> ["war supplies"], ]), ]; $receivers = SplitReceiver::create($receivers); print_r($receivers);
import com.starkbank.*; import java.util.Map; import java.util.List; import java.util.HashMap; import java.util.ArrayList; Map<String, Object> data = new HashMap<>(); data.put("name", "Daenerys Targaryen Stormborn"); data.put("taxId", "594.739.480-42"); data.put("bankCode", "341"); data.put("branchCode", "2201"); data.put("accountNumber", "76543-8"); data.put("accountType", "salary"); SplitReceiver receiver = SplitReceiver.create(new SplitReceiver(data)); System.out.println(receiver);
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request POST '{{baseUrl}}/v2/split-receiver' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "receivers": [ { "name": "Daenerys Targaryen Stormborn", "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "salary" } ] }'
SplitReceiver( account_number=76543-8, account_type=salary, bank_code=341, branch_code=2201, created=2024-01-30 20:17:12.586145, id=5710191014182912, name=Daenerys Targaryen Stormborn, status=created, tags=[], tax_id=594.739.480-42, updated=2024-01-30 20:17:12.586152 )
Not yet available. Please contact us if you need this SDK.
( [0] => StarkBank\SplitReceiver Object ( [id] => 5741077466185728 [name] => John Snow [taxId] => 012.345.678-90 [bankCode] => 18236120 [branchCode] => 0001 [accountNumber] => 10000-0 [accountType] => checking [tags] => Array ( [0] => war supplies ) [status] => created [created] => DateTime Object ( [date] => 2024-03-08 19:34:38.416934 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => ) [1] => StarkBank\SplitReceiver Object ( [id] => 5178127512764416 [name] => Arya Stark [taxId] => 012.345.678-90 [bankCode] => 18236120 [branchCode] => 0001 [accountNumber] => 10000-0 [accountType] => checking [tags] => Array ( [0] => war supplies ) [status] => created [created] => DateTime Object ( [date] => 2024-03-08 19:34:38.417140 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => ) )
SplitReceiver({ "accountNumber": 76543-8, "accountType": salary, "bankCode": 341, "branchCode": 2201, "created": 2024-01-30 20:17:12.586145, "id": 5710191014182912, "name": Daenerys Targaryen Stormborn, "status": created, "tags": [], "taxId": 594.739.480-42, "updated": 2024-01-30 20:17:12.586152 })
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "receivers": [ { "accountNumber": "76543-8", "accountType": "salary", "bankCode": "341", "branchCode": "2201", "created": "2024-01-30T20:32:56.182031+00:00", "id": "5642933638266880", "name": "Daenerys Targaryen Stormborn", "status": "created", "tags": [], "taxId": "594.739.480-42", "updated": "2024-01-30T20:32:56.182039+00:00" } ] }
Get a list of Split Receivers in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
transactionIds
status
tags
ids
taxId
receiverIds
fields
import starkbank receivers = starkbank.splitreceiver.query(limit=1) for receiver in receivers: print(receiver)
Not yet available. Please contact us if you need this SDK.
use StarkBank\SplitReceiver; $splitReceivers = iterator_to_array(SplitReceiver::query(["limit" => 10, "before" => new DateTime("now")])); foreach($splitReceivers as $splitReceiver) { print_r($splitReceiver); }
import com.starkbank.*; import java.util.Map; import java.util.HashMap; Mapparams = new HashMap<>(); params.put("limit", 1); Generator receivers = SplitReceiver.query(params); for (SplitReceiver receiver : receivers) { System.out.println(receiver); }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split-receiver?after=2024-01-01&before=2024-12-01' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
SplitReceiver( account_number=73068305-0, account_type=salary, bank_code=18236120, branch_code=250, created=2024-01-30 20:17:12.586344, id=5147241060761600, name=Lucille Jette, status=created, tags=[], tax_id=949.887.518-99, updated=2024-01-30 20:17:13.685002 )
Not yet available. Please contact us if you need this SDK.
StarkBank\SplitReceiver Object ( [id] => 5077405228072960 [name] => Arya Stark [taxId] => 012.345.678-90 [bankCode] => 18236120 [branchCode] => 0001 [accountNumber] => 10000-0 [accountType] => checking [tags] => Array ( [0] => war supplies ) [status] => created [created] => DateTime Object ( [date] => 2024-03-08 19:35:29.107252 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => )
SplitReceiver({ "accountNumber": "76543-8", "accountType": "salary", "bankCode": "341", "branchCode": "2201", "created": "2024-01-30T20:32:56.182031+00:00", "id": "5642933638266880", "name": "Daenerys Targaryen Stormborn", "status": "created", "tags": [], "taxId": "594.739.480-42", "updated": "2024-01-30T20:32:56.310309+00:00" })
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK. }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": null, "receivers": [ { "accountNumber": "76543-8", "accountType": "salary", "bankCode": "341", "branchCode": "2201", "created": "2024-01-30T20:32:56.182031+00:00", "id": "5642933638266880", "name": "Daenerys Targaryen Stormborn", "status": "created", "tags": [], "taxId": "594.739.480-42", "updated": "2024-01-30T20:32:56.310309+00:00" } ] }
Retrieve a single Split Receiver object previously created in the Stark Bank API by its id.
id
fields
import starkbank receiver = starkbank.splitreceiver.get("5155165527080960") print(receiver)
Not yet available. Please contact us if you need this SDK.
use StarkBank\SplitReceiver; $splitReceiver = SplitReceiver::get("5155165527080960"); print_r($splitReceiver);
import com.starkbank.*; SplitReceiver receiver = SplitReceiver.get("5155165527080960"); System.out.println(receiver);
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split-receiver/5155165527080960' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
SplitReceiver( account_number=73068305-0, account_type=salary, bank_code=18236120, branch_code=250, created=2024-01-30 20:17:12.586344, id=5155165527080960, name=Lucille Jette, status=created, tags=[], tax_id=949.887.518-99, updated=2024-01-30 20:17:13.685002 )
Not yet available. Please contact us if you need this SDK.
StarkBank\SplitReceiver Object ( [id] => 5155165527080960 [name] => Arya Stark [taxId] => 012.345.678-90 [bankCode] => 18236120 [branchCode] => 0001 [accountNumber] => 10000-0 [accountType] => checking [tags] => Array ( [0] => war supplies ) [status] => created [created] => DateTime Object ( [date] => 2024-03-08 19:35:29.107252 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => )
SplitReceiver({ "accountNumber": "76543-8", "accountType": "salary", "bankCode": "341", "branchCode": "2201", "created": "2024-01-30T20:32:56.182031+00:00", "id": "5155165527080960", "name": "Daenerys Targaryen Stormborn", "status": "created", "tags": [], "taxId": "594.739.480-42", "updated": "2024-01-30T20:32:56.310309+00:00" })
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK. }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "receiver": { "accountNumber": "76543-8", "accountType": "salary", "bankCode": "341", "branchCode": "2201", "created": "2024-01-30T20:32:56.182031+00:00", "id": "5155165527080960", "name": "Daenerys Targaryen Stormborn", "status": "created", "tags": [], "taxId": "594.739.480-42", "updated": "2024-01-30T20:32:56.310309+00:00" } }
Get a paged list of Split Receiver logs. A log tracks a change in the Split Receiver entity according to its life cycle.
cursor
limit
after
before
types
receiverIds
fields
import starkbank log = starkbank.splitreceiver.log.get( after="2024-10-30", before="2024-10-01" ) print(log)
Not yet available. Please contact us if you need this SDK.
use StarkBank\SplitReceiver\Log; $splitReceiverLogs = iterator_to_array(Log::query(["limit" => 10])); foreach($splitReceiverLogs as log) { print_r($log); }
import com.starkbank.*; import java.util.Map; import java.util.HashMap; Mapparams = new HashMap<>(); params.put("limit", 1); Generator logs = SplitReceiver.Log.query(params); for (Split.Log log : logs) { System.out.println(log); }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split-receiver/log?limit=1' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2024-01-30 20:17:12.611535, errors=None, id=4865766084050944, receiver=SplitReceiver( account_number=73068305-0, account_type=salary, bank_code=18236120, branch_code=250, created=2024-01-30 20:17:12.586344, id=5147241060761600, name=Lucille Jette, status=created, tags=[], tax_id=949.887.518-99, updated=2024-01-30 20:17:13.712424 ), type=created )
Not yet available. Please contact us if you need this SDK.
StarkBank\SplitReceiver\Log Object ( [id] => 4795930251362304 [created] => DateTime Object ( [date] => 2024-03-08 19:35:29.140174 [timezone_type] => 1 [timezone] => +00:00 ) [type] => created [errors] => [splitReceiver] => StarkBankSplitReceiver Object ( [id] => 5077405228072960 [name] => Maria [taxId] => 012.345.678-90 [bankCode] => 18236120 [branchCode] => 0001 [accountNumber] => 10000-0 [accountType] => checking [tags] => Array ( [0] => test sdk-php ) [status] => created [created] => DateTime Object ( [date] => 2024-03-08 19:35:29.107252 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => ) )
Log({ "created": "2024-01-30T20:32:56.214350+00:00", "id": "5079983684845568", "receiver": { "accountNumber": "76543-8", "accountType": "salary", "bankCode": "341", "branchCode": "2201", "created": "2024-01-30T20:32:56.182031+00:00", "id": "5642933638266880", "name": "Daenerys Targaryen Stormborn", "status": "created", "tags": [], "taxId": "594.739.480-42", "updated": "2024-01-30T20:32:56.335505+00:00" }, "type": "created" })
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": null, "logs": [ { "created": "2024-01-30T20:32:56.214350+00:00", "id": "5079983684845568", "receiver": { "accountNumber": "76543-8", "accountType": "salary", "bankCode": "341", "branchCode": "2201", "created": "2024-01-30T20:32:56.182031+00:00", "id": "5642933638266880", "name": "Daenerys Targaryen Stormborn", "status": "created", "tags": [], "taxId": "594.739.480-42", "updated": "2024-01-30T20:32:56.335505+00:00" }, "type": "created" } ] }
Get a single Split Receiver Log by its id.
id
fields
import starkbank log = starkbank.splitreceiver.log.get("5155165527080960") print(log)
Not yet available. Please contact us if you need this SDK.
use StarkBank\SplitReceiver\Log; $splitReceiverLogs = Log::get("5155165527080960"); print_r($splitReceiverLogs);
import com.starkbank.*; SplitReceiver.Log log = SplitReceiver.Log.get("5155165527080960"); System.out.println(log);
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split-receiver/log/5155165527080960' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2024-01-30 20:17:12.611535, errors=None, id=5155165527080960, receiver=SplitReceiver( account_number=73068305-0, account_type=salary, bank_code=18236120, branch_code=250, created=2024-01-30 20:17:12.586344, id=5147241060761600, name=Lucille Jette, status=created, tags=[], tax_id=949.887.518-99, updated=2024-01-30 20:17:13.712424 ), type=created )
Not yet available. Please contact us if you need this SDK.
StarkBank\SplitReceiver\Log Object ( [id] => 4795930251362304 [created] => DateTime Object ( [date] => 2024-03-08 19:35:29.140174 [timezone_type] => 1 [timezone] => +00:00 ) [type] => created [errors] => [splitReceiver] => StarkBank\SplitReceiver Object ( [id] => 5077405228072960 [name] => Maria [taxId] => 012.345.678-90 [bankCode] => 18236120 [branchCode] => 0001 [accountNumber] => 10000-0 [accountType] => checking [tags] => Array ( [0] => test sdk-php ) [status] => created [created] => DateTime Object ( [date] => 2024-03-08 19:35:29.107252 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => ) )
Log({ "created": "2024-01-30T20:32:56.214350+00:00", "id": "5155165527080960", "receiver": { "accountNumber": "76543-8", "accountType": "salary", "bankCode": "341", "branchCode": "2201", "created": "2024-01-30T20:32:56.182031+00:00", "id": "5642933638266880", "name": "Daenerys Targaryen Stormborn", "status": "created", "tags": [], "taxId": "594.739.480-42", "updated": "2024-01-30T20:32:56.335505+00:00" }, "type": "created" })
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "log": { "created": "2024-01-30T20:32:56.214350+00:00", "id": "5155165527080960", "receiver": { "accountNumber": "76543-8", "accountType": "salary", "bankCode": "341", "branchCode": "2201", "created": "2024-01-30T20:32:56.182031+00:00", "id": "5642933638266880", "name": "Daenerys Targaryen Stormborn", "status": "created", "tags": [], "taxId": "594.739.480-42", "updated": "2024-01-30T20:32:56.335505+00:00" }, "type": "created" } }
The Split Profile resource is used to configure the behavior of split operations.
Send a list containing a single Split Profile object. If the object has already been created, its rules will be updated.
interval
delay
tags
import starkbank payload ={ "interval": "day", "delay": 0 } splitprofile = starkbank.splitprofile.update([payload]) for profile in splitprofile: print(profile)
Not yet available. Please contact us if you need this SDK.
use StarkBank\SplitProfile; $profile = [ new SplitProfile([ "interval"=> "day", "delay"=> 0, ]), ]; $profile = SplitProfile::put($profile); print_r($profile)
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request PUT '{{baseUrl}}/v2/split-profile' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --data '{ "profiles": [ { "interval": "day", "delay": 0 } ] }'
SplitProfile( created=2023-10-24 00:23:08.831127, delay=0, id=6206954716266496, interval=day, status=created, tags=[], updated=2024-02-26 17:56:13.304200 )
Not yet available. Please contact us if you need this SDK.
StarkBank\SplitProfile Object ( [0] => StarkBank\SplitProfile Object ( [id] => 6206954716266496 [interval] => day [delay] => 0 [tags] => Array ( ) [status] => created [created] => DateTime Object ( [date] => 2023-10-24 00:23:08.831127 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2024-03-08 18:13:40.980533 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK. }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "profiles": [ { "created": "2023-10-23T23:04:57.558292+00:00", "delay": 0, "id": "5634161670881280", "interval": "day", "status": "created", "tags": [], "updated": "2024-02-26T17:59:37.507079+00:00" } ] }
Get a list of Split Profiles in chunks of up to 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
tags
ids
status
fields
import starkbank splitprofiles = starkbank.splitprofile.query(limit=2) for profile in splitprofiles: print(profile)
Not yet available. Please contact us if you need this SDK.
use StarkBank\SplitProfile; $splitProfiles = iterator_to_array(SplitProfile::query(["limit" => 10, "before" => new DateTime("now")])); foreach ($splitProfiles as $splitProfile) { print_r($splitProfile); }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split-profile?limit=2' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
SplitProfile( created=2023-10-24 00:23:08.831127, delay=0, id=6206954716266496, interval=day, status=created, tags=[], updated=2024-02-26 17:56:13.539948 )
Not yet available. Please contact us if you need this SDK.
StarkBank\SplitProfile Object ( [id] => 6206954716266496 [interval] => day [delay] => 0 [tags] => Array ( ) [status] => created [created] => DateTime Object ( [date] => 2023-10-24 00:23:08.831127 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2024-03-08 18:13:41.241784 [timezone_type] => 1 [timezone] => +00:00 ) )
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK. }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": null, "profiles": [ { "created": "2023-10-23T23:04:57.558292+00:00", "delay": 0, "id": "5634161670881280", "interval": "day", "status": "created", "tags": [], "updated": "2024-02-26T17:59:37.655935+00:00" } ] }
Retrieve a single Split Profile object by its ID, which was previously created.
id
fields
import starkbank splitprofile = starkbank.splitprofile.get(5634161670881280) print(splitprofile)
Not yet available. Please contact us if you need this SDK.
use StarkBank\SplitProfile; $splitProfile = SplitProfile::get("5634161670881280"); print_r($splitprofile);
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split-profile/5634161670881280' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
SplitProfile( created=2023-10-24 00:23:08.831127, delay=0, id=6206954716266496, interval=day, status=created, tags=[], updated=2024-02-26 17:56:13.539948 )
Not yet available. Please contact us if you need this SDK.
StarkBank\SplitProfile Object ( [0] => StarkBank\SplitProfile Object ( [id] => 6206954716266496 [interval] => day [delay] => 0 [tags] => Array ( ) [status] => created [created] => DateTime Object ( [date] => 2023-10-24 00:23:08.831127 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2024-03-08 18:13:40.980533 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK. }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "profile": { "created": "2023-10-23T23:04:57.558292+00:00", "delay": 0, "id": "5634161670881280", "interval": "day", "status": "created", "tags": [], "updated": "2024-02-26T17:59:37.655935+00:00" } }
Get a paged list of Split Profile logs. A log tracks a change in the Split Profile entity according to its life cycle.
cursor
limit
after
before
types
profileIds
fields
import starkbank logs = starkbank.splitprofile.log.query(limit=10) for log in logs: print(log)
Not yet available. Please contact us if you need this SDK.
use StarkBank\SplitProfile\Log; $splitProfileLogs = iterator_to_array(Log::query(["limit" => 10])); foreach ($splitProfileLogs as $log) { print_r($log); }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split-profile/log?limit=10' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2024-02-26 17:56:13.326078, errors=None, id=5746640992337920, profile=SplitProfile( created=2023-10-24 00:23:08.831127, delay=0, id=6206954716266496, interval=day, status=created, tags=[], updated=2024-02-26 17:56:13.581938 ), type=updated )
Not yet available. Please contact us if you need this SDK.
StarkBank\SplitProfile\Log Object ( [id] => 5662484329398272 [created] => DateTime Object ( [date] => 2024-03-08 18:13:41.007739 [timezone_type] => 1 [timezone] => +00:00 ) [type] => updated [errors] => [splitProfile] => StarkBank\SplitProfile Object ( [id] => 6206954716266496 [interval] => day [delay] => 0 [tags] => Array ( ) [status] => created [created] => DateTime Object ( [date] => 2023-10-24 00:23:08.831127 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2024-03-08 18:13:41.285270 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": null, "logs": [ { "created": "2024-02-26T17:59:37.520886+00:00", "id": "5716856266555392", "profile": { "created": "2023-10-23T23:04:57.558292+00:00", "delay": 0, "id": "5634161670881280", "interval": "day", "status": "created", "tags": [], "updated": "2024-02-26T17:59:37.688751+00:00" }, "type": "updated" }, { "created": "2024-02-23T18:16:59.012225+00:00", "id": "5189852773482496", "profile": { "created": "2023-10-23T23:04:57.558292+00:00", "delay": 0, "id": "5634161670881280", "interval": "day", "status": "created", "tags": [], "updated": "2024-02-26T17:59:37.688623+00:00" }, "type": "updated" }, { "created": "2023-10-23T23:04:57.583386+00:00", "id": "5071211717459968", "profile": { "created": "2023-10-23T23:04:57.558292+00:00", "delay": 604800, "id": "5634161670881280", "interval": "month", "status": "created", "tags": [], "updated": "2024-02-26T17:59:37.688481+00:00" }, "type": "created" } ] }
Get a single Split Profile Log by its id.
id
fields
import starkbank log = starkbank.splitprofile.log.get("5634161670881280") print(log)
Not yet available. Please contact us if you need this SDK.
use StarkBank\SplitProfile\Log; $splitProfileLog = Log::get("5634161670881280"); print_r($splitProfileLog);
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/split-profile/log/5634161670881280' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2024-02-26 17:56:13.326078, errors=None, id=5746640992337920, profile=SplitProfile( created=2023-10-24 00:23:08.831127, delay=0, id=6206954716266496, interval=day, status=created, tags=[], updated=2024-02-26 17:56:13.581938 ), type=updated )
Not yet available. Please contact us if you need this SDK.
StarkBank\SplitProfile\Log Object ( [id] => 5662484329398272 [created] => DateTime Object ( [date] => 2024-03-08 18:13:41.007739 [timezone_type] => 1 [timezone] => +00:00 ) [type] => updated [errors] => [splitProfile] => StarkBank\SplitProfile Object ( [id] => 6206954716266496 [interval] => day [delay] => 0 [tags] => Array ( ) [status] => created [created] => DateTime Object ( [date] => 2023-10-24 00:23:08.831127 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2024-03-08 18:13:41.285270 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "log": { "created": "2023-10-23T23:04:57.583386+00:00", "id": "5071211717459968", "profile": { "created": "2023-10-23T23:04:57.558292+00:00", "delay": 604800, "id": "5634161670881280", "interval": "month", "status": "created", "tags": [], "updated": "2024-02-26T17:59:37.688481+00:00" }, "type": "created" } }
The Merchant Session resource can be created by a merchant and used by the card holder in order to collect their card data without having to handle it on the merchant's side.
This route allows the merchant to create a session that can be used by the card holder's application to create a new purchase.
allowedFundingTypes
allowedInstallments
{ "allowedInstallments": [ { "totalAmount": 5000, "count": 1 }, { "totalAmount": 5500, "count": 2 } ] }
expiration
challengeMode
Options are “enabled“ and “disabled“. Default: “enabled“
allowedIps
tags
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); let merchantSession = await starkbank.merchantSession.create( { allowedFundingTypes: [ 'debit', 'credit' ], allowedInstallments: [ { totalAmount: 5000, count: 1 }, { totalAmount: 5500, count: 2 } ], expiration: 3600, challengeMode: 'disabled', tags: ['purchase_1234'] } ); console.log(merchantSession)
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request POST '{{baseUrl}}/v2/merchant-session' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "allowedFundingTypes": [ "debit", "credit" ], "allowedInstallments": [ { "totalAmount": 5000, "count": 1 }, { "totalAmount": 5500, "count": 2 } ], "expiration": 3600, "challengeMode": "disabled", "tags": ["purchase_1234"] }'
Not yet available. Please contact us if you need this SDK.
MerchantSession { allowedFundingTypes: [ 'credit', 'debit' ], allowedInstallments: [ { count: 1, totalAmount: 5000 }, { count: 2, totalAmount: 5500 } ], allowedIps: [], challengeMode: 'disabled', created: '2024-09-06T20:34:10.594675+00:00', expiration: 3600, id: '6548734053711872', status: 'created', tags: [], updated: '2024-09-06T20:34:10.611544+00:00', uuid: 'b559350884674b31926abb5a8f3d5f31' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "message": "Merchant Session successfully created", "session": { "allowedFundingTypes": [ "credit", "debit" ], "allowedInstallments": [ { "count": 1, "totalAmount": 5000 }, { "count": 2, "totalAmount": 5500 } ], "allowedIps": [], "challengeMode": "disabled", "created": "2024-09-06T20:34:10.594675+00:00", "expiration": 3600, "id": "6548734053711872", "status": "created", "tags": [], "updated": "2024-09-06T20:34:10.611544+00:00", "uuid": "b559350884674b31926abb5a8f3d5f31" } }
This route can be used to create a Merchant Purchase directly from the payer's client application.
uuid
amount
E.g: 100 (R$1.00)
cardExpiration
cardNumber
cardSecurityCode
fundingType
billingCity
Required if challengeMode is “enabled“ and optional otherwise.
billingCountryCode
Required if challengeMode is “enabled“ and optional otherwise.
billingStateCode
Required if challengeMode is “enabled“ and optional otherwise.
billingStreetLine1
Required if challengeMode is “enabled“ and optional otherwise.
billingStreetLine2
Required if challengeMode is “enabled“ and optional otherwise.
billingZipCode
Required if challengeMode is “enabled“ and optional otherwise.
holderEmail
Required if challengeMode is “enabled“ and optional otherwise.
holderPhone
Required if challengeMode is “enabled“ and optional otherwise.
metadata
If 3DS is enabled, the following fields related to the payer's device are required:
{ "userAgent": "Mozilla/5.0 (X11; Linux x86_64) Chrome/51.0.2704.103 Safari/537.36", "timezoneOffset": 3, "userIp": "184.82.170.183", "language": "pt-BR" }
installmentCount
Default: 1
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); let merchantSessionPurchase = await starkbank.merchantSession.purchase( { uuid: '0d46a95fa3be44e2b1abd50308df96a6', amount: 5000, installmentCount: 1, cardExpiration: '2035-01', cardNumber: '4235647728025682', cardSecurityCode: '123', fundingType: 'credit', holderName: 'Rhaenyra Targaryen', billingCity: 'Sao Paulo', billingCountryCode: 'BRA', billingStateCode: 'SP', billingStreetLine1: 'Av. Faria Lima, 1844', billingStreetLine2: 'CJ 13', billingZipCode: '01500-000', holderEmail: 'rhaenyra.targaryen@starkbank.com', holderPhone: '11985923451', metadata: { userAgent: 'Mozilla/5.0 (X11; Linux x86_64) Chrome/51.0.2704.103 Safari/537.36', timezoneOffset: 3, userIp: '184.82.170.183', language: 'pt-BR' }, tags: ['purchase_1234'] } ); console.log(merchantSessionPurchase)
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request POST '{{baseUrl}}/v2/merchant-session/0bb894a2697d41d99fe02cad2c00c9bc/purchase' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw ' { "amount": 180, "installmentCount": 12, "cardExpiration": "2035-01", "cardNumber": "5448280000000007", "cardSecurityCode": "123", "holderName": "Holder Name", "holderEmail": "holdeName@email.com", "holderPhone": "11111111111", "fundingType": "credit", "billingCountryCode": "BRA", "billingCity": "São Paulo", "billingStateCode": "SP", "billingStreetLine1": "Rua do Holder Name, 123", "billingStreetLine2": "", "billingZipCode": "11111-111", "metadata": { "extraData": "extraData", "language": "pt-BR", "timezoneOffset": 3, "userAgent": "Postman", "userIp": "255.255.255.25" }, "tags": [ "yourtags" ] }
Not yet available. Please contact us if you need this SDK.
MerchantPurchase { amount: 5000, billingCity: 'Sao Paulo', billingCountryCode: 'BRA', billingStateCode: 'SP', billingStreetLine1: 'Av. Faria Lima, 1844', billingStreetLine2: 'CJ 13', billingZipCode: '01500-000', cardEnding: '5682', cardId: '5647443689472000', challengeMode: 'disabled', challengeUrl: '', created: '2024-09-06T21:36:15.255100+00:00', currencyCode: 'BRL', endToEndId: '8bd3bf6c-04dd-4878-9c09-f933a9234519', fee: 0, fundingType: 'credit', holderEmail: 'rhaenyra.targaryen@starkbank.com', holderName: 'Rhaenyra Targaryen', holderPhone: '11985923451', id: '6237525488173056', installmentCount: 1, metadata: { language: 'pt-BR', timezoneOffset: 3, userAgent: 'Mozilla/5.0 (X11; Linux x86_64) Chrome/51.0.2704.103 Safari/537.36', userIp: '184.82.170.183' }, network: 'mastercard', source: 'merchant-session/6012328071921664', status: 'approved', tags: [], updated: '2024-09-06T21:36:17.785121+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "message": "Merchant Purchase successfully created", "purchase": { "amount": 5000, "billingCity": "Sao Paulo", "billingCountryCode": "BRA", "billingStateCode": "SP", "billingStreetLine1": "Av. Faria Lima, 1844", "billingStreetLine2": "CJ 13", "billingZipCode": "01500-000", "cardEnding": "5682", "cardId": "5647443689472000", "challengeMode": "disabled", "challengeUrl": "", "created": "2024-09-06T21:36:15.255100+00:00", "currencyCode": "BRL", "endToEndId": "8bd3bf6c-04dd-4878-9c09-f933a9234519", "fee": 0, "fundingType": "credit", "holderEmail": "rhaenyra.targaryen@starkbank.com", "holderName": "Rhaenyra Targaryen", "holderPhone": "11985923451", "id": "6237525488173056", "installmentCount": 1, "metadata": { "language": "pt-BR", "timezoneOffset": 3, "userAgent": "Mozilla/5.0 (X11; Linux x86_64) Chrome/51.0.2704.103 Safari/537.36", "userIp": "184.82.170.183" }, "network": "mastercard", "source": "merchant-session/6012328071921664", "status": "approved", "tags": [], "updated": "2024-09-06T21:36:17.785121+00:00" } }
Get a list of merchant sessions in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantSessions = await starkbank.merchantSession.query({ after: '2020-04-01', before: '2020-04-30', }); for await (let merchantSession of merchantSessions) { console.log(merchantSession); } })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-session' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
MerchantSession { allowedFundingTypes: [ 'credit', 'debit' ], allowedInstallments: [ { count: 1, totalAmount: 5000 }, { count: 2, totalAmount: 5500 } ], allowedIps: [], challengeMode: 'disabled', created: '2024-09-06T20:34:10.594675+00:00', expiration: 3600, id: '5950134772826112', status: 'created', tags: [], updated: '2024-09-06T20:34:10.611544+00:00', uuid: 'b559350884674b31926abb5a8f3d5f31' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": "ClcKFAoHY3JlYXRlZBIJCKDD2tebqYcDEjtqGml-YXBpLW1zLWNhcmQtbWVyY2hhbnQtc2J4ch0LEhBNZXJjaGFudFB1cmNoYXNlGICAgNil4boIDBgAIAE=", "purchases": [ { "allowedFundingTypes": [ "credit", "debit" ], "allowedInstallments": [ { "count": 1, "totalAmount": 5000 }, { "count": 2, "totalAmount": 5500 } ], "allowedIps": [], "challengeMode": "disabled", "created": "2024-09-06T20:34:10.594675+00:00", "expiration": 3600, "id": "5950134772826112", "status": "created", "tags": [], "updated": "2024-09-06T20:34:10.611544+00:00", "uuid": "b559350884674b31926abb5a8f3d5f31" } ] }
Retrieve detailed information about a specific session by its id.
id
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantSession = await starkbank.merchantSession.get('5950134772826112'); console.log(merchantSession); })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-session/5950134772826112' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
MerchantSession { allowedFundingTypes: [ 'credit', 'debit' ], allowedInstallments: [ { count: 1, totalAmount: 5000 }, { count: 2, totalAmount: 5500 } ], allowedIps: [], challengeMode: 'disabled', created: '2024-09-06T20:34:10.594675+00:00', expiration: 3600, id: '5950134772826112', status: 'created', tags: [], updated: '2024-09-06T20:34:10.611544+00:00', uuid: 'b559350884674b31926abb5a8f3d5f31' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "session": { "allowedFundingTypes": [ "credit", "debit" ], "allowedInstallments": [ { "count": 1, "totalAmount": 5000 }, { "count": 2, "totalAmount": 5500 } ], "allowedIps": [], "challengeMode": "disabled", "created": "2024-09-06T20:34:10.594675+00:00", "expiration": 3600, "id": "5950134772826112", "status": "created", "tags": [], "updated": "2024-09-06T20:34:10.611544+00:00", "uuid": "b559350884674b31926abb5a8f3d5f31" } }
Get a paged list of merchant session logs.
cursor
limit
after
before
sessionIds
types
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.merchantSession.log.query({ after: '2020-04-01', before: '2020-04-30', }); for await (let log of logs) { console.log(log); } })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-purchase/log' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Log { created: '2024-09-06T20:34:10.638530+00:00', id: '4719146705092608', session: { allowedFundingTypes: [ 'credit', 'debit' ], allowedInstallments: [ { count: 1, totalAmount: 5000 }, { count: 2, totalAmount: 5500 } ], allowedIps: [], challengeMode: 'disabled', created: '2024-09-06T20:34:10.594675+00:00', expiration: 3600, id: '6548734053711872', status: 'created', tags: [], updated: '2024-09-06T20:34:10.804971+00:00', uuid: 'b559350884674b31926abb5a8f3d5f31' }, type: 'created', updated: '2024-09-06T20:34:10.804979+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": "CloKFAoHY3JlYXRlZBIJCKOlqIO5rIgDEj5qGmR-YXBpLW1zLWNhcmQtYWNxdWlyZXItZGV2ciALEhNBY3F1aXJpbmdTZXNzaW9uTG9nGICAgIS_9eYIDBgAIAE=", "logs": [ { "created": "2024-09-06T20:34:10.638530+00:00", "id": "4719146705092608", "session": { "allowedFundingTypes": [ "credit", "debit" ], "allowedInstallments": [ { "count": 1, "totalAmount": 5000 }, { "count": 2, "totalAmount": 5500 } ], "allowedIps": [], "challengeMode": "disabled", "created": "2024-09-06T20:34:10.594675+00:00", "expiration": 3600, "id": "6548734053711872", "status": "created", "tags": [], "updated": "2024-09-06T20:34:10.804971+00:00", "uuid": "b559350884674b31926abb5a8f3d5f31" }, "type": "created", "updated": "2024-09-06T20:34:10.804979+00:00" }, ] }
Get a single merchant session log by its id.
id
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantSessionLog = await starkbank.merchantSession.log.get('5950134772826112'); console.log(merchantSessionLog); })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-session/log/5950134772826112' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Log { created: '2024-09-06T20:34:10.638530+00:00', id: '4719146705092608', session: { allowedFundingTypes: [ 'credit', 'debit' ], allowedInstallments: [ { count: 1, totalAmount: 5000 }, { count: 2, totalAmount: 5500 } ], allowedIps: [], challengeMode: 'disabled', created: '2024-09-06T20:34:10.594675+00:00', expiration: 3600, id: '6548734053711872', status: 'created', tags: [], updated: '2024-09-06T20:34:10.804971+00:00', uuid: 'b559350884674b31926abb5a8f3d5f31' }, type: 'created', updated: '2024-09-06T20:34:10.804979+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "log": { "created": "2024-09-06T20:34:10.638530+00:00", "id": "4719146705092608", "session": { "allowedFundingTypes": [ "credit", "debit" ], "allowedInstallments": [ { "count": 1, "totalAmount": 5000 }, { "count": 2, "totalAmount": 5500 } ], "allowedIps": [], "challengeMode": "disabled", "created": "2024-09-06T20:34:10.594675+00:00", "expiration": 3600, "id": "6548734053711872", "status": "created", "tags": [], "updated": "2024-09-06T20:34:10.804971+00:00", "uuid": "b559350884674b31926abb5a8f3d5f31" }, "type": "created", "updated": "2024-09-06T20:34:10.804979+00:00" } }
The Merchant Purchase resource can be used to charge customers with credit or debit cards.
This route is used to charge a card that has been previously saved.
amount
E.g: 100 (R$1.00)
fundingType
cardId
billingCity
Required if challengeMode is “enabled“ and optional otherwise.
billingCountryCode
Required if challengeMode is “enabled“ and optional otherwise.
billingStateCode
Required if challengeMode is “enabled“ and optional otherwise.
billingStreetLine1
Required if challengeMode is “enabled“ and optional otherwise.
billingStreetLine2
Required if challengeMode is “enabled“ and optional otherwise.
billingZipCode
Required if challengeMode is “enabled“ and optional otherwise.
holderEmail
Required if challengeMode is “enabled“ and optional otherwise.
holderPhone
Required if challengeMode is “enabled“ and optional otherwise.
metadata
If 3DS is enabled, the following fields related to the buyer's device are required:
{ "userAgent": "Mozilla/5.0 (X11; Linux x86_64) Chrome/51.0.2704.103 Safari/537.36", "timezoneOffset": 3, "userIp": "184.82.170.183", "language": "pt-BR" }
installmentCount
Default: 1
challengeMode
Options are “enabled“ and “disabled“. Default: “enabled“
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request POST '{{baseUrl}}/v2/merchant-purchase' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "amount": 5000, "installmentCount": 1, "cardId": "5920400605184000", "fundingType": "credit", "challengeMode": "disabled", "billingCity": "Sao Paulo", "billingCountryCode": "BRA", "billingStateCode": "SP", "billingStreetLine1": "Av. Faria Lima, 1844", "billingStreetLine2": "CJ 13", "billingZipCode": "01500-000", "holderEmail": "rhaenyra.targaryen@starkbank.com", "holderPhone": "11985923451", "metadata": { "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36", "userIp": "184.82.170.183", "language": "pt-BR" } }'
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "message": "Merchant Purchase successfully created", "purchase": { "amount": 5000, "billingCity": "Sao Paulo", "billingCountryCode": "BRA", "billingStateCode": "SP", "billingStreetLine1": "Av. Faria Lima, 1844", "billingStreetLine2": "CJ 13", "billingZipCode": "01500-000", "cardEnding": "0005", "cardId": "5920400605184000", "challengeMode": "disabled", "challengeUrl": "", "created": "2024-09-06T16:58:26.270136+00:00", "currencyCode": "BRL", "endToEndId": "87ecab02-9b84-4c59-a923-df1dcf2cb01f", "fee": 0, "fundingType": "credit", "holderEmail": "rhaenyra.targaryen@starkbank.com", "holderName": "Rhaenyra Targaryen", "holderPhone": "11985923451", "id": "5898767995764736", "installmentCount": 1, "metadata": { "language": "pt-BR", "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36", "userIp": "184.82.170.183" }, "network": "mastercard", "source": "merchant-card/5920400605184000", "status": "approved", "tags": [], "updated": "2024-09-06T16:58:27.743409+00:00" } }
Get a list of merchant purchases in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantPurchases = await starkbank.merchantPurchase.query({limit: 3}); for await (let merchantPurchase of merchantPurchases){ console.log(merchantPurchases); } })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-purchase' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Purchase { id: '5476090868924416', amount: 180, installmentCount: 12, holderName: 'Holder Name', holderEmail: 'holdeName@email.com', holderPhone: '11111111111', fundingType: 'credit', billingCountryCode: 'BRA', billingCity: 'São Paulo', billingStateCode: 'SP', billingStreetLine1: 'Rua do Holder Name, 123', billingStreetLine2: '', billingZipCode: '11111-111', cardEnding: '9733', cardId: '', challengeMode: 'disabled', challengeUrl: '', created: '2024-07-15T23:10:03.306115+00:00', currencyCode: 'BRL', endToEndId: '1af93a6e-3376-4555-a5b4-b3b81fb42474', fee: 0, network: 'mastercard', source: 'merchant-session/6238344014987264', status: 'denied', tags: [ 'yourtags' ], updated: '2024-07-15T23:10:05.635255+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": "ClcKFAoHY3JlYXRlZBIJCKDD2tebqYcDEjtqGml-YXBpLW1zLWNhcmQtbWVyY2hhbnQtc2J4ch0LEhBNZXJjaGFudFB1cmNoYXNlGICAgNil4boIDBgAIAE=", "purchases": [ { "amount": 180, "billingCity": "São Paulo", "billingCountryCode": "BRA", "billingStateCode": "SP", "billingStreetLine1": "Rua do Holder Name, 123", "billingStreetLine2": "", "billingZipCode": "11111-111", "cardEnding": "9733", "cardId": "", "challengeMode": "disabled", "challengeUrl": "", "created": "2024-07-16T15:26:41.391876+00:00", "currencyCode": "BRL", "endToEndId": "53e0246b-be7a-4de3-9e99-793f80b8cb89", "fee": 0, "fundingType": "credit", "holderEmail": "holdeName@email.com", "holderName": "Holder Name", "holderPhone": "11111111111", "id": "6066273465139200", "installmentCount": 12, "metadata": {}, "network": "mastercard", "source": "merchant-session/6097606526631936", "status": "denied", "tags": [ "yourtags" ], "updated": "2024-07-16T15:26:44.679776+00:00" } ] }
Update a single purchase. If the purchase is currently approved, the status can be updated to canceled and the amount to 0, this will cancel the authorization.
id
amount
status
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request PATCH '{{baseUrl}}/v2/merchant-purchase/4600131349381120' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "status": "reversed", "amount": 0 }'
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "message": "Merchant Purchase successfully patched", "purchase": { "amount": 5000, "billingCity": "Sao Paulo", "billingCountryCode": "BRA", "billingStateCode": "SP", "billingStreetLine1": "Av. Faria Lima, 1844", "billingStreetLine2": "CJ 13", "billingZipCode": "01500-000", "cardEnding": "0005", "cardId": "5920400605184000", "challengeMode": "disabled", "challengeUrl": "", "created": "2024-09-06T16:58:26.270136+00:00", "currencyCode": "BRL", "endToEndId": "87ecab02-9b84-4c59-a923-df1dcf2cb01f", "fee": 0, "fundingType": "credit", "holderEmail": "rhaenyra.targaryen@starkbank.com", "holderName": "Rhaenyra Targaryen", "holderPhone": "11985923451", "id": "5898767995764736", "installmentCount": 1, "metadata": { "language": "pt-BR", "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36", "userIp": "184.82.170.183" }, "network": "mastercard", "source": "merchant-card/5920400605184000", "status": "confirmed", "tags": [], "updated": "2024-09-06T16:58:27.743409+00:00" } }
Retrieve detailed information about a specific purchase by its id.
id
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantPurchase = await starkbank.merchantPurchase.get('5950134772826112'); console.log(merchantPurchase); })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-purchase/5950134772826112' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Purchase { amount: 5000, billingCity: 'Sao Paulo', billingCountryCode: 'BRA', billingStateCode: 'SP', billingStreetLine1: 'Av. Faria Lima, 1844', billingStreetLine2: 'CJ 13', billingZipCode: '01500-000', cardEnding: '0007', cardId: '6325137586520064', challengeMode: 'disabled', challengeUrl: '', created: '2024-09-04T20:22:55.917826+00:00', currencyCode: 'BRL', endToEndId: '1caa7c6d-a3b8-48ce-8989-a94ee287a79a', fee: 100, fundingType: 'credit', holderEmail: 'rhaenyra.targaryen@starkbank.com', holderName: 'Rhaenyra Targaryen', holderPhone: '11985923451', id: '5704487431831552', installmentCount: 1, metadata: {}, network: 'mastercard', source: 'merchant-session/5748908131090432', status: 'confirmed', tags: [], updated: '2024-09-04T20:23:03.226050+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "purchase": { "amount": 5000, "billingCity": "Sao Paulo", "billingCountryCode": "BRA", "billingStateCode": "SP", "billingStreetLine1": "Av. Faria Lima, 1844", "billingStreetLine2": "CJ 13", "billingZipCode": "01500-000", "cardEnding": "0007", "cardId": "6325137586520064", "challengeMode": "disabled", "challengeUrl": "", "created": "2024-09-04T20:22:55.917826+00:00", "currencyCode": "BRL", "endToEndId": "1caa7c6d-a3b8-48ce-8989-a94ee287a79a", "fee": 100, "fundingType": "credit", "holderEmail": "rhaenyra.targaryen@starkbank.com", "holderName": "Rhaenyra Targaryen", "holderPhone": "11985923451", "id": "5704487431831552", "installmentCount": 1, "metadata": {}, "network": "mastercard", "source": "merchant-session/5748908131090432", "status": "confirmed", "tags": [], "updated": "2024-09-04T20:23:03.226050+00:00" } }
Get a paged list of merchant purchase logs.
cursor
limit
after
before
purchaseIds
types
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantPurchases = await starkbank.merchantPurchase.log.query({limit: 3}); for await (let merchantPurchase of merchantPurchases){ console.log(merchantPurchases); } })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-purchase/log' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Log { id: '5638465999863808', created: '2024-07-16T19:42:25.078227+00:00', type: 'created', errors: [], purchase: { amount: 180, billingCity: 'São Paulo', billingCountryCode: 'BRA', billingStateCode: 'SP', billingStreetLine1: 'Rua do Holder Name, 123', billingStreetLine2: '', billingZipCode: '11111-111', cardEnding: '', cardId: '', challengeMode: 'disabled', challengeUrl: '', created: '2024-07-16T19:42:25.059361+00:00', currencyCode: 'BRL', endToEndId: 'ee77111c-644c-4a67-a4cf-6cbc9da15ceb', fee: 0, fundingType: 'credit', holderEmail: 'holdeName@email.com', holderName: 'Holder Name', holderPhone: '11111111111', id: '4512566093021184', installmentCount: 12, metadata: {}, network: null, source: 'merchant-session/5375106121465856', status: 'created', tags: [ 'yourtags' ], updated: '2024-07-16T19:42:26.902423+00:00' }, transactionId: null, updated: '2024-07-16T19:42:26.902432+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": "CloKFAoHY3JlYXRlZBIJCO2hw9uorIcDEj5qGml-YXBpLW1zLWNhcmQtbWVyY2hhbnQtc2J4ciALEhNNZXJjaGFudFB1cmNoYXNlTG9nGICAgJj1qIsKDBgAIAE=", "logs": [ { "created": "2024-07-16T19:42:26.639110+00:00", "errors": [], "id": "6489149636870144", "purchase": { "amount": 180, "billingCity": "São Paulo", "billingCountryCode": "BRA", "billingStateCode": "SP", "billingStreetLine1": "Rua do Holder Name, 123", "billingStreetLine2": "", "billingZipCode": "11111-111", "cardEnding": "9733", "cardId": "", "challengeMode": "disabled", "challengeUrl": "", "created": "2024-07-16T15:26:41.391876+00:00", "currencyCode": "BRL", "endToEndId": "53e0246b-be7a-4de3-9e99-793f80b8cb89", "fee": 0, "fundingType": "credit", "holderEmail": "holdeName@email.com", "holderName": "Holder Name", "holderPhone": "11111111111", "id": "6066273465139200", "installmentCount": 12, "metadata": {}, "network": "mastercard", "source": "merchant-session/6097606526631936", "status": "denied", "tags": [ "yourtags" ], "updated": "2024-07-16T15:26:44.679776+00:00" }, "transactionId": null, "type": "denied", "updated": "2024-07-16T19:42:26.902595+00:00" } ] }
Get a single merchant purchase log by its id.
id
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantPurchase = await starkbank.merchantPurchase.log.get('5950134772826112'); console.log(merchantPurchase); })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-purchase/log/5950134772826112' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Log { id: '5638465999863808', created: '2024-07-16T19:42:25.078227+00:00', type: 'created', errors: [], purchase: { amount: 180, billingCity: 'São Paulo', billingCountryCode: 'BRA', billingStateCode: 'SP', billingStreetLine1: 'Rua do Holder Name, 123', billingStreetLine2: '', billingZipCode: '11111-111', cardEnding: '', cardId: '', challengeMode: 'disabled', challengeUrl: '', created: '2024-07-16T19:42:25.059361+00:00', currencyCode: 'BRL', endToEndId: 'ee77111c-644c-4a67-a4cf-6cbc9da15ceb', fee: 0, fundingType: 'credit', holderEmail: 'holdeName@email.com', holderName: 'Holder Name', holderPhone: '11111111111', id: '4512566093021184', installmentCount: 12, metadata: {}, network: null, source: 'merchant-session/5375106121465856', status: 'created', tags: [ 'yourtags' ], updated: '2024-07-16T19:42:26.902423+00:00' }, transactionId: null, updated: '2024-07-16T19:42:26.902432+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "log": { "created": "2024-07-16T19:42:25.078227+00:00", "errors": [], "id": "5638465999863808", "purchase": { "amount": 180, "billingCity": "São Paulo", "billingCountryCode": "BRA", "billingStateCode": "SP", "billingStreetLine1": "Rua do Holder Name, 123", "billingStreetLine2": "", "billingZipCode": "11111-111", "cardEnding": "", "cardId": "", "challengeMode": "disabled", "challengeUrl": "", "created": "2024-07-16T19:42:25.059361+00:00", "currencyCode": "BRL", "endToEndId": "ee77111c-644c-4a67-a4cf-6cbc9da15ceb", "fee": 0, "fundingType": "credit", "holderEmail": "holdeName@email.com", "holderName": "Holder Name", "holderPhone": "11111111111", "id": "4512566093021184", "installmentCount": 12, "metadata": {}, "network": null, "source": "merchant-session/5375106121465856", "status": "created", "tags": [ "yourtags" ], updated: "2024-07-16T19:42:26.902423+00:00" }, "transactionId": null, "type": "created", "updated": "2024-07-16T19:42:26.902432+00:00" } }
The Merchant Card resource stores information about cards used in approved purchases.
Get a list of merchant cards in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantCards = await starkbank.merchantCard.query({limit: 3}); for await (let merchantCard of merchantCards){ console.log(merchantCards); } })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-card' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Card { id: '5950134772826112', ending: '9011', fundingType: 'credit', holderName: 'Rhaenyra Targaryen', network: 'mastercard', status: 'active', tags: [], expiration: '2035-01-31T23:59:59.999999+00:00', created: '2024-09-05T18:33:32.262976+00:00', updated: '2024-09-05T18:33:32.618219+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": "ClcKFAoHY3JlYXRlZBIJCKDD2tebqYcDEjtqGml-YXBpLW1zLWNhcmQtbWVyY2hhbnQtc2J4ch0LEhBNZXJjaGFudFB1cmNoYXNlGICAgNil4boIDBgAIAE=", "cards": [ { "id": "5950134772826112", "ending": "9011", "fundingType": "credit", "holderName": "Rhaenyra Targaryen", "network": "mastercard", "status": "active", "tags": [], "expiration": "2035-01-31T23:59:59.999999+00:00", "created": "2024-09-05T18:33:32.262976+00:00", "updated": "2024-09-05T18:33:32.618219+00:00" } ] }
Retrieve detailed information about a specific card by its id.
id
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantCard = await starkbank.merchantCard.get('5950134772826112'); console.log(merchantCard); })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-card/5950134772826112' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Card { id: '5950134772826112', ending: '9011', fundingType: 'credit', holderName: 'Rhaenyra Targaryen', network: 'mastercard', status: 'active', tags: [], expiration: '2035-01-31T23:59:59.999999+00:00', created: '2024-09-05T18:33:32.262976+00:00', updated: '2024-09-05T18:33:32.618219+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "card": { "id": "5950134772826112", "ending": "9011", "fundingType": "credit", "holderName": "Rhaenyra Targaryen", "network": "mastercard", "status": "active", "tags": [], "expiration": "2035-01-31T23:59:59.999999+00:00", "created": "2024-09-05T18:33:32.262976+00:00", "updated": "2024-09-05T18:33:32.618219+00:00" } }
Get a paged list of merchant card logs.
cursor
limit
after
before
cardIds
types
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantCards = await starkbank.merchantCard.log.query({limit: 3}); for await (let merchantCard of merchantCards){ console.log(merchantCards); } })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-card/log' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Log { card: { created: '2024-09-05T18:33:32.262976+00:00', ending: '9011', expiration: '2035-01-31T23:59:59.999999+00:00', fundingType: 'credit', holderName: 'Rhaenyra Targaryen', id: '5833998009892864', network: 'mastercard', status: 'active', tags: [], updated: '2024-09-05T18:33:32.656403+00:00' }, created: '2024-09-05T18:33:32.277195+00:00', errors: [], id: '5950134772826112', type: 'active' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": "CloKFAoHY3JlYXRlZBIJCO2hw9uorIcDEj5qGml-YXBpLW1zLWNhcmQtbWVyY2hhbnQtc2J4ciALEhNNZXJjaGFudFB1cmNoYXNlTG9nGICAgJj1qIsKDBgAIAE=", "logs": [ { "card": { "created": "2024-09-05T18:33:32.262976+00:00", "ending": "9011", "expiration": "2035-01-31T23:59:59.999999+00:00", "fundingType": "credit", "holderName": "Rhaenyra Targaryen", "id": "5833998009892864", "network": "mastercard", "status": "active", "tags": [], "updated": "2024-09-05T18:33:32.656403+00:00" }, "created": "2024-09-05T18:33:32.277195+00:00", "errors": [], "id": "5950134772826112", "type": "active" } ] }
Get a single merchant card log by its id.
id
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantCard = await starkbank.merchantCard.log.get('5950134772826112'); console.log(merchantCard); })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-card/log/5950134772826112' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Log { card: { created: '2024-09-05T18:33:32.262976+00:00', ending: '9011', expiration: '2035-01-31T23:59:59.999999+00:00', fundingType: 'credit', holderName: 'Rhaenyra Targaryen', id: '5128535692341644', network: 'mastercard', status: 'active', tags: [], updated: '2024-09-05T18:33:32.656403+00:00' }, created: '2024-09-05T18:33:32.277195+00:00', errors: [], id: '5950134772826112', type: 'active' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "log": { "card": { "created": "2024-09-05T18:33:32.262976+00:00", "ending": "9011", "expiration": "2035-01-31T23:59:59.999999+00:00", "fundingType": "credit", "holderName": "Rhaenyra Targaryen", "id": "5833998009892864", "network": "mastercard", "status": "active", "tags": [], "updated": "2024-09-05T18:33:32.656403+00:00" }, "created": "2024-09-05T18:33:32.277195+00:00", "errors": [], "id": "5950134772826112", "type": "active" } }
Merchant Installments are created for every installment in a purchase.
Get a list of merchant installments in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantInstallments = await starkbank.merchantInstallment.query({limit: 3}); for await (let merchantInstallment of merchantInstallments){ console.log(merchantInstallments); } })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-installment' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Installment: { amount: 5000, created: '2024-09-06T21:36:20.489713+00:00', due: '2024-10-07T03:00:00+00:00', fee: 60, fundingType: 'credit', id: '4584324594663424', network: 'mastercard', purchaseId: '6237525488173056', status: 'created', tags: [], transactionIds: '', updated: '2024-09-06T21:36:20.911595+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": "ClcKFAoHY3JlYXRlZBIJCKDD2tebqYcDEjtqGml-YXBpLW1zLWNhcmQtbWVyY2hhbnQtc2J4ch0LEhBNZXJjaGFudFB1cmNoYXNlGICAgNil4boIDBgAIAE=", "installments": [ { "amount": 5000, "created": "2024-09-06T21:36:20.489713+00:00", "due": "2024-10-07T03:00:00+00:00", "fee": 60, "fundingType": "credit", "id": "4584324594663424", "network": "mastercard", "purchaseId": "6237525488173056", "status": "created", "tags": [], "transactionIds": [], "updated": "2024-09-06T21:36:20.911595+00:00" } ] }
Retrieve detailed information about a specific installment by its id.
id
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantInstallment = await starkbank.merchantInstallment.get('4584324594663424'); console.log(merchantInstallment); })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-installment/4584324594663424' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Installment: { amount: 5000, created: '2024-09-06T21:36:20.489713+00:00', due: '2024-10-07T03:00:00+00:00', fee: 60, fundingType: 'credit', id: '4584324594663424', network: 'mastercard', purchaseId: '6237525488173056', status: 'created', tags: [], transactionIds: '', updated: '2024-09-06T21:36:20.911595+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "installment": { "amount": 5000, "created": "2024-09-06T21:36:20.489713+00:00", "due": "2024-10-07T03:00:00+00:00", "fee": 60, "fundingType": "credit", "id": "4584324594663424", "network": "mastercard", "purchaseId": "6237525488173056", "status": "created", "tags": [], "transactionIds": [], "updated": "2024-09-06T21:36:20.911595+00:00" } }
Get a paged list of merchant installment logs.
cursor
limit
after
before
installmentIds
types
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantInstallments = await starkbank.merchantInstallment.log.query({limit: 3}); for await (let merchantInstallment of merchantInstallments){ console.log(merchantInstallments); } })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-installment/log' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Log { created: '2024-09-09T03:00:04.754608+00:00', errors: [], id: '5177774721466368', installment: { amount: 122, created: '2024-09-06T18:37:42.445978+00:00', due: '2024-09-09T03:00:00+00:00', fee: 3, fundingType: 'credit', id: '6147068645081088', network: 'mastercard', purchaseId: '6224062846074880', status: 'paid', tags: [], transactionIds: [ '53962437879807990290615252629327' ], updated: '2024-09-09T03:00:05.126276+00:00' }, type: 'credited', updated: '2024-09-09T03:00:05.126321+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "cursor": "CloKFAoHY3JlYXRlZBIJCO2hw9uorIcDEj5qGml-YXBpLW1zLWNhcmQtbWVyY2hhbnQtc2J4ciALEhNNZXJjaGFudFB1cmNoYXNlTG9nGICAgJj1qIsKDBgAIAE=", "logs": [ { "created": "2024-09-09T03:00:04.754608+00:00", "errors": [], "id": "5177774721466368", "installment": { "amount": 122, "created": "2024-09-06T18:37:42.445978+00:00", "due": "2024-09-09T03:00:00+00:00", "fee": 3, "fundingType": "credit", "id": "6147068645081088", "network": "mastercard", "purchaseId": "6224062846074880", "status": "paid", "tags": [], "transactionIds": [ "53962437879807990290615252629327" ], "updated": "2024-09-09T03:00:05.126276+00:00" }, "type": "credited", "updated": "2024-09-09T03:00:05.126321+00:00" } ] }
Get a single merchant installment log by its id.
id
fields
Not yet available. Please contact us if you need this SDK.
const starkbank = require('starkbank'); (async() => { let merchantInstallment = await starkbank.merchantInstallment.log.get('5177774721466368'); console.log(merchantInstallment); })();
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
curl --location --request GET '{{baseUrl}}/v2/merchant-installment/log/5177774721466368' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json'
Not yet available. Please contact us if you need this SDK.
Log: { created: '2024-09-09T03:00:04.754608+00:00', errors: [], id: '5177774721466368', installment: { amount: 122, created: '2024-09-06T18:37:42.445978+00:00', due: '2024-09-09T03:00:00+00:00', fee: 3, fundingType: 'credit', id: '6147068645081088', network: 'mastercard', purchaseId: '6224062846074880', status: 'paid', tags: [], transactionIds: [ '53962437879807990290615252629327' ], updated: '2024-09-09T03:00:05.126276+00:00' }, type: 'credited', updated: '2024-09-09T03:00:05.126321+00:00' }
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
Not yet available. Please contact us if you need this SDK.
{ "log": { "created": "2024-09-09T03:00:04.754608+00:00", "errors": [], "id": "5177774721466368", "installment": { "amount": 122, "created": "2024-09-06T18:37:42.445978+00:00", "due": "2024-09-09T03:00:00+00:00", "fee": 3, "fundingType": "credit", "id": "6147068645081088", "network": "mastercard", "purchaseId": "6224062846074880", "status": "paid", "tags": [], "transactionIds": [ "53962437879807990290615252629327" ], "updated": "2024-09-09T03:00:05.126276+00:00" }, "type": "credited", "updated": "2024-09-09T03:00:05.126321+00:00" } }
Transfers are used to send money to any bank account in Brazil using the TED or Pix systems.
This route is used to send your transfers to their receivers.
amount
name
taxId
bankCode
branchCode
accountNumber
accountType
description
externalId
scheduled
displayDescription
tags
rules
[ { "key": "resendingLimit", "value": 5 } ]
import starkbank transfers = starkbank.transfer.create([ starkbank.Transfer( amount=1000000, tax_id="123.456.789-10", name="Daenerys Targaryen Stormborn", bank_code="20018183", branch_code="2201", account_number="76543-8", external_id="my-external-id", scheduled="2020-08-14", tags=["daenerys", "invoice/1234"], rules=[ starkbank.transfer.Rule( key="resendingLimit", value=5 ) ] ) ]) for transfer in transfers: print(transfer)
const starkbank = require('starkbank'); (async() => { let transfers = await starkbank.transfer.create([ { amount: 1000000, bankCode: '20018183', branchCode: '2201', accountNumber: '10000-0', taxId: '123.456.789-10', name: 'Daenerys Targaryen Stormborn', externalId: 'my-external-id', scheduled: '2020-08-14', tags: ['daenerys', 'invoice/1234'], displayDescription: 'Payment for service #1234', rules: [ { key: 'resendingLimit', value: 5 } ] } ]) for (let transfer of transfers) { console.log(transfer); } })();
$transfers = StarkBank\Transfer::create([ new StarkBank\Transfer([ "amount" => 1000000, "bankCode" => "20018183", "branchCode" => "2201", "accountNumber" => "10000-0", "taxId" => "123.456.789-10", "name" => "Daenerys Targaryen Stormborn", "externalId" => "my-external-id", "scheduled" => "2020-08-14", "tags" => ["daenerys", "invoice/1234"], "rules" => [ new StarkBank\Transfer\Rule([ "key" => "resendingLimit", "value" => 5 ]) ] ]) ]); foreach($transfers as $transfer){ print_r($transfer); }
import com.starkbank.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; List<Transfer> transfers = new ArrayList<>(); List<Transfer.Rule> rules = new ArrayList<>(); rules.add(new Transfer.Rule("resendingLimit", 5)); HashMap<String, Object> data = new HashMap<>(); data.put("amount", 1000000); data.put("bankCode", "20018183"); data.put("branchCode", "2201"); data.put("accountNumber", "10000-0"); data.put("taxId", "123.456.789-10"); data.put("name", "Daenerys Targaryen Stormborn"); data.put("externalId", "my-external-id"); data.put("scheduled", "2020-08-14"); data.put("tags", new String[]{"daenerys", "invoice/1234"}); data.put("rules", rules); transfers.add(new Transfer(data)); transfers = Transfer.create(transfers); for (Transfer transfer : transfers){ System.out.println(transfer); }
require('starkbank') transfers = StarkBank::Transfer.create( [ StarkBank::Transfer.new( amount: 1000000, bank_code: '20018183', branch_code: '2201', account_number: '10000-0', tax_id: '123.456.789-10', name: 'Daenerys Targaryen Stormborn', external_id: 'my-external-id', scheduled: "2020-08-14", tags: %w[daenerys invoice/1234], rules: [ StarkBank::Transfer::Rule.new( key: 'resendingLimit', value: 5 ) ] ) ] ) transfers.each do |transfer| puts transfer end
transfers = StarkBank.Transfer.create!([ %StarkBank.Transfer{ amount: 1000000, bank_code: "20018183", branch_code: "2201", account_number: "10000-0", tax_id: "123.456.789-10", name: "Daenerys Targaryen Stormborn", external_id: "my-external-id", scheduled: "2020-08-14", tags: ["daenerys", "invoice/1234"] rules: [ %StarkBank.Transfer.Rule{ key: "resendingLimit", value: 5 } ] } ]) for transfer <- transfers do transfer |> IO.inspect end
using System; using System.Collections.Generic; List<StarkBank.Transfer> transfers = StarkBank.Transfer.Create( new List<StarkBank.Transfer> { new StarkBank.Transfer( amount: 1000000, bankCode: "20018183", branchCode: "2201", accountNumber: "10000-0", taxID: "123.456.789-10", name: "Daenerys Targaryen Stormborn", externalID: "my-external-id", scheduled: DateTime.Today.Date.AddDays(1), tags: new List<string> { "daenerys", "invoice/1234" }, rules: new List<Transfer.Rule> { new Transfer.Rule( key: "resendingLimit", value: 5 ) } ) } ); foreach(StarkBank.Transfer transfer in transfers) { Console.WriteLine(transfer); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/transfer" ) func main() { scheduled := time.Date(2020, 08, 14, 0, 0, 0, 0, time.UTC) transfers, err := transfer.Create( []transfer.Transfer{ { Amount: 1000000, Name: "Daenerys Targaryen Stormborn", TaxId: "123.456.789-10", BankCode: "20018183", BranchCode: "2201", AccountNumber: "10000-0", ExternalId: "my-external-id", Scheduled: &scheduled, Tags: []string{"daenerys", "invoice/1234"}, Rules: []rule.Rule{{Key: "resendingLimit", Value: 5}}, }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, transfer := range transfers { fmt.Printf("%+v", transfer) } }
(def transfers (starkbank.transfer/create [ { :amount 1000000 :bank-code "20018183" :branch-code "2201" :account-number "10000-0" :tax-id "123.456.789-10" :name "Daenerys Targaryen Stormborn" :external-id: "my-external-id" :tags ["daenerys" "invoice/1234"] :scheduled (date/future-datetime) } ])) (dorun (map println transfers))
curl --location --request POST '{{baseUrl}}/v2/transfer' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "transfers": [ { "amount": 1000000, "taxId": "123.456.789-10", "name": "Daenerys Targaryen Stormborn", "bankCode": "20018183", "branchCode": "2201", "accountNumber": "10000-0", "externalId": "my-external-id", "scheduled": "2020-08-14", "tags": ["daenerys", "invoice/1234"], "displayDescription": "Payment for service #1234", "rules": [ { "key": "resendingLimit", "value": 5 } ] }, ] }'
Transfer( account_number=76543-8, account_type=checking, amount=1000000, bank_code=20018183, branch_code=2201, created=2020-02-06 16:22:24.664134, description=Daenerys Targaryen Stormborn (594.739.480-42), external_id=my-external-id, fee=0, id=5412038532661248, name=Daenerys Targaryen Stormborn, rules=[ Rule( key=resendingLimit, value=5 ) ], scheduled=2020-08-14 10:00:00, status=created, tags=['daenerys', 'invoice/1234'], tax_id=123.456.789-10, transaction_ids=[], updated=2020-02-06 16:22:24.664148 )
Transfer { id: '5412038532661248', amount: 1000000, name: 'Daenerys Targaryen Stormborn', taxId: '276.685.415-00', bankCode: '20018183', branchCode: '2201', accountNumber: '76543-8', accountType: 'checking', externalId: 'my-external-id', scheduled: '2023-08-14T10:00:00+00:00', description: 'Daenerys Targaryen Stormborn (594.739.480-42)', tags: [ 'daenerys', 'invoice/1234' ], displayDescription: 'Payment for service #1234', rules: [ { key: 'resendingLimit', value: 5 } ], fee: 0, status: 'created', created: '2020-02-06T16:22:24.664148+00:00', updated: '2020-02-06T16:22:24.664148+00:00', transactionIds: [] }
StarkBank\Transfer Object ( [id] => 5412038532661248 [amount] => 1000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 20018183 [branchCode] => 2201 [accountNumber] => 76543-8 [accountType] => checking [externalId] => my-external-id [scheduled] => DateTime Object ( [date] => 2023-08-14 10:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [description] => Daenerys Targaryen Stormborn (594.739.480-42) [tags] => Array ( [0] => daenerys [1] => invoice/1234 ) [rules] => Array ( [0] => StarkBank\Transfer\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [fee] => 0 [status] => created [transactionIds] => Array ( ) [created] => DateTime Object ( [date] => 2020-02-06 16:22:24.664148 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-02-06 16:22:24.664148 [timezone_type] => 1 [timezone] => +00:00 ) )
Transfer({ "amount": 1000000, "name": "Daenerys Targaryen Stormborn", "taxId": "594.739.480-42", "bankCode": "20018183", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "checking", "externalId": "my-external-id", "scheduled": "2023-08-14T10:00:00+00:00", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "tags": [ "daenerys", "invoice/1234" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "fee": 0, "status": "created", "transactionIds": [], "created": "2020-02-06T16:22:24.664148+00:00", "updated": "2020-02-06T16:22:24.664148+00:00", "id": "5412038532661248" })
transfer( id: 5412038532661248, amount: 1000000, name: Daenerys Targaryen Stormborn, tax_id: 594.739.480-42, bank_code: 20018183, branch_code: 2201, account_number: 76543-8, account_type: checking, external_id: my-external-id, scheduled: 2023-08-14T10:00:00+00:00, description: Daenerys Targaryen Stormborn (594.739.480-42), tags: ["daenerys", "invoice/1234"], rules: [ rule( key: resendingLimit, value: 5 ) ], fee: 0, status: created, transaction_ids: [], created: 2020-02-06T16:22:24+00:00, updated: 2020-02-06T16:22:24+00:00 )
%StarkBank.Transfer { account_number: "76543-8", account_type: "checking", amount: 1000000, bank_code: "20018183", branch_code: "2201", created: ~U[2020-02-06 16:22:24.664148Z], external_id: "my-external-id", fee: 200, id: "5412038532661248", name: "Daenerys Targaryen Stormborn", status: "created", scheduled: ~U[2020-08-14 11:00:00Z], rules: %Transfer.Rule[ %{ "key" => "resendingLimit", "value" => 5 } ], description: "Daenerys Targaryen Stormborn (594.739.480-42)", tags: ["daenerys", "invoice/1234"], tax_id: "594.739.480-42", transaction_ids: [], updated: ~U[2020-02-06 16:22:24.664148Z] }
Transfer( Amount: 1000000, Name: Daenerys Targaryen Stormborn, BranchCode: 2201, AccountNumber: 76543-8, TaxID: 594.739.480-42, AccountType: checking, ExternalID: my-external-id, Description: Daenerys Targaryen Stormborn (594.739.480-42), BankCode: 20018183, Scheduled: 07/02/2020 07:00:00, Tags: { daenerys, invoice/1234 }, Rules: { Rule( Key: resendingLimit, Value: 5 ) }, Status: created, Fee: 0, TransactionIds: { }, Created: 06/02/2020 16:22:24, Updated: 06/02/2020 16:22:24, ID: 5412038532661248 )
{ Id:5412038532661248 Amount:1000000 Name:Daenerys Targaryen Stormborn, TaxId:330.731.970-10 BankCode:20018183 BranchCode:2201 AccountNumber:76543-8 AccountType:checking ExternalId:my-external-id Scheduled:2023-02-06 10:00:00 +0000 +0000 Description:Daenerys Targaryen Stormborn (594.739.480-42) Tags:[daenerys invoice/1234] Rules:[ { Key:resendingLimit Value:5 } ] Fee:0 Status:created TransactionIds:[] Created:2020-02-06 16:22:24.664148 +0000 +0000 Updated:2020-02-06 16:22:24.664148 +0000 +0000 }
{:amount 1000000, :fee 200, :tags ["daenerys" "invoice/1234"], :branch-code "2201", :updated "2020-02-06T16:22:24.664148+00:00", :name "Daenerys Targaryen Stormborn", :description "Daenerys Targaryen Stormborn (594.739.480-42)", :tax-id "594.739.480-42", :created "2020-02-06T16:22:24.664148+00:00", :status "created", :id "5412038532661248", :transaction-ids [], :account-number "76543-8", :bank-code "20018183", :account-type: "checking", :external-id: "my-external-id"}
{ "message": "Transfer(s) successfully created", "transfers": [ { "accountNumber": "76543-8", "accountType": "checking", "amount": 1000000, "bankCode": "20018183", "branchCode": "2201", "created": "2020-02-06T16:22:24.387022+00:00", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "externalId": "my-external-id", "fee": 0, "id": "5412038532661248", "name": "Daenerys Targaryen Stormborn", "displayDescription": "Payment for service #1234", "rules": [ { "key": "resendingLimit", "value": 5 } ], "scheduled": "2023-08-14T10:00:00+00:00", "status": "created", "tags": [ "daenerys", "invoice/1234" ], "taxId": "594.739.480-42", "transactionIds": [], "updated": "2020-02-06T16:22:24.664148+00:00" }, ] }
Here you can list and filter all transfers you have made. We return it paged.
cursor
limit
after
before
transactionIds
status
taxId
ids
sort
tags
fields
import starkbank transfers = starkbank.transfer.query( after="2020-04-01", before="2020-04-30", ) for transfer in transfers: print(transfer)
const starkbank = require('starkbank'); (async() => { let transfers = await starkbank.transfer.query({ after: '2020-04-01', before: '2020-04-30', }); for await (let transfer of transfers) { console.log(transfer); } })();
$transfers = StarkBank\Transfer::query([ "after" => "2020-04-01", "before" => "2020-04-30" ]); foreach($transfers as $transfer){ print_r($transfer); }
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<Transfer> transfers = Transfer.query(params); for (Transfer transfer : transfers){ System.out.println(transfer); }
require('starkbank') transfers = StarkBank::Transfer.query( after: '2020-04-01', before: '2020-04-30' ) transfers.each do |transfer| puts transfer end
transfers = StarkBank.Transfer.query!( after: "2020-04-01", before: "2020-04-30" ) for transfer <- transfers do transfer |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.Transfer> transfers = StarkBank.Transfer.Query( after: new DateTime(2020, 4, 1), before: new DateTime(2020, 4, 30) ); foreach(StarkBank.Transfer transfer in transfers) { Console.WriteLine(transfer); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/transfer" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-04-01" params["before"] = "2020-04-30" transfers := transfer.Query(params, nil) for transfer := range transfers { fmt.Println(transfer) } }
(def transfers (starkbank.transfer/query { :after "2020-04-01" :before "2020-04-30" })) (dorun (map println transfers))
curl --location --request GET '{{baseUrl}}/v2/transfer?after=2020-04-01&before=2020-04-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Transfer( account_number=76543-8, account_type=checking, amount=1000000, bank_code=341, branch_code=2201, created=2020-04-24 17:49:10.225810, description=Daenerys Targaryen Stormborn (594.739.480-42), external_id=my-external-id, fee=200, id=5950134772826112, name=Daenerys Targaryen Stormborn, rules=[ Rule( key=resendingLimit, value=5 ) ], status=processing, scheduled=2020-08-14 11:00:00, tags=['daenerys', 'invoice/1234'], tax_id=594.739.480-42, transaction_ids=['5991715760504832'], updated=2020-04-24 17:49:10.225810 )
Transfer { id: '5950134772826112', amount: 1000000, name: 'Daenerys Targaryen Stormborn', taxId: '594.739.480-42', bankCode: '341', branchCode: '2201', accountNumber: '76543-8', accountType: 'checking', externalId: 'my-external-id', description: 'Daenerys Targaryen Stormborn (594.739.480-42)', tags: [ 'daenerys', 'invoice/1234' ], rules: [ { key: 'resendingLimit', value: 5 } ], fee: 200, status: 'processing', scheduled: '2020-08-14T11:00:00+00:00', created: '2020-04-24T17:49:10.225810+00:00', updated: '2020-04-24T17:49:10.225810+00:00', transactionIds: [ '5991715760504832' ] }
StarkBank\Transfer Object ( [id] => 5950134772826112 [amount] => 1000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 [accountType] => checking [externalId] => my-external-id [description] => Daenerys Targaryen Stormborn (594.739.480-42) [tags] => Array ( [0] => daenerys [1] => invoice/1234 ) [rules] => Array ( [0] => StarkBank\Transfer\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [fee] => 200 [status] => processing [scheduled] => DateTime Object ( [date] => 2020-08-14 11:00:00 [timezone_type] => 1 [timezone] => +00:00 ) [transactionIds] => Array ( [0] => 5991715760504832 ) [created] => DateTime Object ( [date] => 2020-04-24 17:49:10.225810 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 17:49:10.225810 [timezone_type] => 1 [timezone] => +00:00 ) )
Transfer({ "id": "5950134772826112", "amount": 1000000, "name": "Daenerys Targaryen Stormborn", "taxId": "594.739.480-42", "bankCode": "341", "branch_code": "2201", "accountNumber": "76543-8", "accountType": "checking", "externalId": "my-external-id", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "transactionIds": ["5991715760504832"], "fee": 200, "tags": [ "daenerys", "invoice/1234" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "status": "processing", "scheduled": '2020-08-14T11:00:00+00:00', "created": "2020-04-24T17:49:10+00:00", "updated": "2020-04-24T17:49:10+00:00" })
transfer( id: 5950134772826112, amount: 1000000, name: Daenerys Targaryen Stormborn, tax_id: 594.739.480-42, bank_code: 341, branch_code: 2201, account_number: 76543-8, account_type: checking, external_id: my-external-id, description: Daenerys Targaryen Stormborn (594.739.480-42), transaction_ids: ["5991715760504832"], fee: 200, tags: ["daenerys", "invoice/1234"], rules: [ rule( key: resendingLimit, value: 5 ) ], status: processing, scheduled: 2020-08-14T11:00:00+00:00, created: 2020-04-24T17:49:10+00:00, updated: 2020-04-24T17:49:10+00:00 )
%StarkBank.Transfer { account_number: "76543-8", account_type: "checking", amount: 1000000, bank_code: "341", branch_code: "2201", created: ~U[2020-04-24 17:49:10.225810Z], external_id: "my-external-id", fee: 200, id: "5950134772826112", name: "Daenerys Targaryen Stormborn", status: "processing", scheduled: ~U[2020-08-14 11:00:00Z], rules: %Transfer.Rule[ %{"key" => "resendingLimit", "value" => 5} ], description: "Daenerys Targaryen Stormborn (594.739.480-42)", tags: ["daenerys", "invoice/1234"], tax_id: "594.739.480-42", transaction_ids: ["5991715760504832"], updated: ~U[2020-04-24 17:49:10.225810Z] }
Transfer( Amount: 1000000, Name: Daenerys Targaryen Stormborn, TaxID: 594.739.480-42, BankCode: 341, BranchCode: 2201, AccountNumber: 76543-8, AccountType: checking, ExternalID: my-external-id, Description: Daenerys Targaryen Stormborn (594.739.480-42), TransactionIds: { 5991715760504832 }, Fee: 200, Tags: { daenerys, invoice/1234 }, Rules: { Rule( Key: resendingLimit, Value: 5 ) }, Status: processing, Scheduled: 08/14/2020 11:00:00, Created: 04/24/2020 17:49:10, Updated: 04/24/2020 17:49:10, ID: 5950134772826112 )
{ Id:5950134772826112 Amount:1000000 Name:Daenerys Targaryen Stormborn TaxId:594.739.480-42 BankCode:341 BranchCode:2201 AccountNumber:76543-8 AccountType:checking ExternalId:my-external-id Scheduled:2020-08-14 11:00:00 +0000 +0000 Description:Daenerys Targaryen Stormborn (594.739.480-42), Tags:[daenerys invoice/1234] Rules:[ { Key:resendingLimit Value:5 } ] Fee:200 Status:canceled TransactionIds:[5991715760504832] Created:2023-04-24 17:49:10.225810 +0000 +0000 Updated:2023-04-24 17:49:10.225810 +0000 +0000 }
{:amount 1000000, :fee 200, :tags ["daenerys" "invoice/1234"], :branch-code "2201", :updated "2020-04-24T17:49:10.225810+00:00", :name "Daenerys Targaryen Stormborn", :description "Daenerys Targaryen Stormborn (594.739.480-42)", :tax-id "594.739.480-42", :created "2020-04-24T17:49:10.225810+00:00", :status "processing", :id "5950134772826112", :transaction-ids ["5991715760504832"], :account-number "76543-8", :bank-code "341", :account-type: "checking", :external-id: "my-external-id"}
{ "cursor": null, "transfers": [ { "id": "5950134772826112", "status": "processing", "amount": 1000000, "name": "Daenerys Targaryen Stormborn", "rules": [ { "key": "resendingLimit", "value": 5 } ], "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "checking", "scheduled": "2020-08-14T11:00:00+00:00", "tags": ["daenerys", "invoice/1234"], "created": "2020-04-24T17:49:10.225810+00:00", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "externalId": "my-external-id", "updated": "2020-04-24T17:49:10.225810+00:00", "transactionIds": ["5991715760504832"], "fee": 200, }, ] }
Get a single transfer by its id.
id
fields
import starkbank transfer = starkbank.transfer.get("5950134772826112") print(transfer)
const starkbank = require('starkbank'); (async() => { let transfer = await starkbank.transfer.get('5950134772826112'); console.log(transfer); })();
$transfer = StarkBank\Transfer::get("5950134772826112"); print_r($transfer);
import com.starkbank.*; Transfer transfer = Transfer.get("5950134772826112"); System.out.println(transfer);
require('starkbank') transfer = StarkBank::Transfer.get('5950134772826112') puts transfer
transfer = StarkBank.Transfer.get!("5950134772826112") transfer |> IO.inspect
using System; StarkBank.Transfer transfer = StarkBank.Transfer.Get("5950134772826112"); Console.WriteLine(transfer);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/transfer" ) func main() { transfer, err := transfer.Get("5950134772826112", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Println(transfer) }
(def transfer (starkbank.transfer/get "5950134772826112")) (println transfer)
curl --location --request GET '{{baseUrl}}/v2/transfer/5950134772826112' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Transfer( account_number=76543-8, account_type=checking, amount=1000000, bank_code=341, branch_code=2201, created=2020-04-24 17:49:10.225810, description=Daenerys Targaryen Stormborn (594.739.480-42), external_id=my-external-id, fee=200, id=5950134772826112, name=Daenerys Targaryen Stormborn, rules=[ Rule( key=resendingLimit, value=5 ) ], status=processing, scheduled=2020-08-14 11:00:00, tags=['daenerys', 'invoice/1234'], tax_id=594.739.480-42, transaction_ids=['5991715760504832'], updated=2020-04-24 17:49:10.225810 )
Transfer { id: '5950134772826112', amount: 1000000, name: 'Daenerys Targaryen Stormborn', taxId: '594.739.480-42', bankCode: '341', branchCode: '2201', accountNumber: '76543-8', accountType: 'checking', externalId: 'my-external-id', description: 'Daenerys Targaryen Stormborn (594.739.480-42)', tags: [ 'daenerys', 'invoice/1234' ], rules: [ { key: 'resendingLimit', value: 5 } ], fee: 200, status: 'processing', scheduled: '2020-08-14T11:00:00+00:00', created: '2020-04-24T17:49:10.225810+00:00', updated: '2020-04-24T17:49:10.225810+00:00', transactionIds: [ '5991715760504832' ] }
StarkBank\Transfer Object ( [id] => 5950134772826112 [amount] => 1000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 [accountType] => checking [externalId] => my-external-id [description] => Daenerys Targaryen Stormborn (594.739.480-42) [tags] => Array ( [0] => daenerys [1] => invoice/1234 ) [rules] => Array ( [0] => StarkBank\Transfer\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [fee] => 200 [status] => processing [scheduled] => DateTime Object ( [date] => 2020-08-14 11:00:00 [timezone_type] => 1 [timezone] => +00:00 ) [transactionIds] => Array ( [0] => 5991715760504832 ) [created] => DateTime Object ( [date] => 2020-04-24 17:49:10.225810 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 17:49:10.225810 [timezone_type] => 1 [timezone] => +00:00 ) )
Transfer({ "id": "5950134772826112", "amount": 1000000, "name": "Daenerys Targaryen Stormborn", "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "checking", "externalId": "my-external-id", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "transactionIds": ["5991715760504832"], "fee": 200, "tags": [ "daenerys", "invoice/1234" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "status": "processing", "scheduled": '2020-08-14T11:00:00+00:00', "created": "2020-04-24T17:49:10+00:00", "updated": "2020-04-24T17:49:10+00:00" })
transfer( id: 5950134772826112, amount: 1000000, name: Daenerys Targaryen Stormborn, tax_id: 594.739.480-42, bank_code: 341, branch_code: 2201, account_number: 76543-8, account_type: checking, external_id: my-external-id, description: Daenerys Targaryen Stormborn (594.739.480-42), transaction_ids: ["5991715760504832"], fee: 200, tags: ["daenerys", "invoice/1234"], rules: [ rule( key: resendingLimit, value: 5 ) ], status: processing, scheduled: 2020-08-14T11:00:00+00:00, created: 2020-04-24T17:49:10+00:00, updated: 2020-04-24T17:49:10+00:00 )
%StarkBank.Transfer { account_number: "76543-8", account_type: "checking", amount: 1000000, bank_code: "341", branch_code: "2201", created: ~U[2020-04-24 17:49:10.225810Z], external_id: "my-external-id", fee: 200, id: "5950134772826112", name: "Daenerys Targaryen Stormborn", status: "processing", scheduled: ~U[2020-08-14 11:00:00Z], rules: %Transfer.Rule[ %{"key" => "resendingLimit", "value" => 5} ], description: "Daenerys Targaryen Stormborn (594.739.480-42)", tags: ["daenerys", "invoice/1234"], tax_id: "594.739.480-42", transaction_ids: ["5991715760504832"], updated: ~U[2020-04-24 17:49:10.225810Z] }
Transfer( Amount: 1000000, Name: Daenerys Targaryen Stormborn, TaxID: 594.739.480-42, BankCode: 341, BranchCode: 2201, AccountNumber: 76543-8, AccountType: checking, ExternalID: my-external-id, Description: Daenerys Targaryen Stormborn (594.739.480-42), TransactionIds: { 5991715760504832 }, Fee: 200, Tags: { daenerys, invoice/1234 }, Rules: { Rule( Key: resendingLimit, Value: 5 ) }, Status: processing, Scheduled: 08/14/2020 11:00:00, Created: 04/24/2020 17:49:10, Updated: 04/24/2020 17:49:10, ID: 5950134772826112 )
{ Id:5950134772826112 Amount:1000000 Name:Daenerys Targaryen Stormborn TaxId:594.739.480-42 BankCode:341 BranchCode:2201 AccountNumber:76543-8 AccountType:checking ExternalId:my-external-id Scheduled:2020-08-14 11:00:00 +0000 +0000 Description:Daenerys Targaryen Stormborn (594.739.480-42), Tags:[daenerys invoice/1234] Rules:[ { Key:resendingLimit Value:5 } ] Fee:200 Status:canceled TransactionIds:[5991715760504832] Created:2023-04-24 17:49:10.225810 +0000 +0000 Updated:2023-04-24 17:49:10.225810 +0000 +0000 }
{:amount 1000000, :fee 200, :tags ["daenerys" "invoice/1234"], :branch-code "2201", :updated "2020-04-24T17:49:10.225810+00:00", :name "Daenerys Targaryen Stormborn", :description "Daenerys Targaryen Stormborn (594.739.480-42)", :tax-id "594.739.480-42", :created "2020-04-24T17:49:10.225810+00:00", :status "processing", :id "5950134772826112", :transaction-ids ["5991715760504832"], :account-number "76543-8", :bank-code "341", :account-type: "checking", :external-id: "my-external-id"}
{ "transfer": { "id": "5950134772826112", "status": "processing", "amount": 1000000, "name": "Daenerys Targaryen Stormborn", "rules": [ { "key": "resendingLimit", "value": 5 } ], "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "checking", "scheduled": "2020-08-14T11:00:00+00:00", "tags": ["daenerys", "invoice/1234"], "created": "2020-04-24T17:49:10.225810+00:00", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "externalId": "my-external-id", "updated": "2020-04-24T17:49:10.225810+00:00", "transactionIds": ["5991715760504832"], "fee": 200, } }
Cancel a scheduled transfer. You can only cancel transfers before they start being processed.
id
import starkbank transfer = starkbank.transfer.delete("6693962735681536") print(transfer)
const starkbank = require('starkbank'); (async() => { let transfer = await starkbank.transfer.delete('6693962735681536'); console.log(transfer); })();
$transfer = StarkBank\Transfer::delete("6693962735681536"); print_r($transfer);
import com.starkbank.*; Transfer transfer = Transfer.delete("6693962735681536"); System.out.println(transfer);
require('starkbank') transfer = StarkBank::Transfer.delete('6693962735681536') puts transfer
transfer = StarkBank.Transfer.delete!("6693962735681536") transfer |> IO.inspect
using System; StarkBank.Transfer transfer = StarkBank.Transfer.Delete("6693962735681536"); Console.WriteLine(transfer);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/transfer" ) func main() { transfer, err := transfer.Delete("6693962735681536", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Println(transfer) }
(def transfer (starkbank.transfer/delete "6693962735681536")) (println transfer)
curl --location --request DELETE '{{baseUrl}}/v2/transfer/6693962735681536' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Transfer( account_number=76543-8, account_type=checking, amount=100000000, bank_code=341, branch_code=2201, created=2020-04-24 17:49:10.225810, description=Daenerys Targaryen Stormborn (594.739.480-42), external_id=my-external-id, fee=200, id=6693962735681536, name=Daenerys Targaryen Stormborn, rules=[ Rule( key=resendingLimit, value=5 ) ], status=canceled, scheduled=2020-08-14 11:00:00, tags=['daenerys', 'invoice/1234'], tax_id=594.739.480-42, transaction_ids=['5991715760504832'], updated=2020-04-24 17:49:10.225810 )
Transfer { id: '6693962735681536', amount: 100000000, name: 'Daenerys Targaryen Stormborn', taxId: '594.739.480-42', bankCode: '341', branchCode: '2201', accountNumber: '10000-0', accountType: 'checking', externalId: 'my-external-id', description: 'Daenerys Targaryen Stormborn (594.739.480-42)', tags: [ 'daenerys', 'invoice/1234 ], rules: [ { key: 'resendingLimit', value: 5 } ], fee: 200, status: 'canceled', scheduled: '2020-08-14T11:00:00+00:00', created: '2020-04-24T17:49:10.225810+00:00', updated: '2020-04-24T17:49:10.225810+00:00', transactionIds: [ '5991715760504832' ] }
StarkBank\Transfer Object ( [id] => 6693962735681536 [amount] => 100000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 [accountType] => checking [externalId] => my-external-id [description] => Daenerys Targaryen Stormborn (594.739.480-42) [tags] => Array ( [0] => daenerys [1] => invoice/1234 ) [rules] => Array ( [0] => StarkBank\Transfer\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [fee] => 200 [status] => canceled [scheduled] => DateTime Object ( [date] => 2020-08-14 11:00:00 [timezone_type] => 1 [timezone] => +00:00 ) [transactionIds] => Array ( [0] => 5991715760504832 ) [created] => DateTime Object ( [date] => 2020-04-09 16:26:08.988538 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-09 16:26:10.280537 [timezone_type] => 1 [timezone] => +00:00 ) )
Transfer({ "id": "6693962735681536", "amount": 100000000, "name": "Daenerys Targaryen Stormborn", "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "checking", "externalId": "my-external-id", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "tags": [ "daenerys", "invoice/1234" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "transactionIds": ["5991715760504832"], "fee": 200, "status": "canceled", "scheduled": '2020-08-14T11:00:00+00:00', "created": "2020-04-11T01:08:29+00:00", "updated": "2020-04-11T01:08:31+00:00" })
transfer( id: 6693962735681536, amount: 100000000, name: Daenerys Targaryen Stormborn, tax_id: 594.739.480-42, bank_code: 341, branch_code: 2201, account_number: 76543-8, account_type: checking, external_id: my-external-id, description: Daenerys Targaryen Stormborn (594.739.480-42), transaction_ids: ["5991715760504832"], fee: 200, tags: ["daenerys", "invoice/1234"], rules: [ rule( key: resendingLimit, value: 5 ) ], status: canceled, scheduled: 2020-08-14T11:00:00+00:00, created: 2020-04-11T01:08:29+00:00, updated: 2020-04-11T01:08:31+00:00 )
%StarkBank.Transfer { account_number: "76543-8", account_type: "checking", amount: 100000000, bank_code: "341", branch_code: "2201", created: ~U[2020-04-24 17:49:10.039009Z], external_id: "my-external-id", fee: 200, id: "6693962735681536", name: "Daenerys Targaryen Stormborn", status: "canceled", scheduled: ~U[2020-08-14 11:00:00Z], rules: %Transfer.Rule[ %{"key" => "resendingLimit", "value" => 5} ], description: "Daenerys Targaryen Stormborn (594.739.480-42)", tags: ["daenerys", "invoice/1234"], tax_id: "594.739.480-42", transaction_ids: ["5991715760504832"], updated: ~U[2020-04-24 17:49:10.611646Z] }
Transfer( Amount: 100000000, Name: Daenerys Targaryen Stormborn, TaxID: 594.739.480-42, BankCode: 341, BranchCode: 2201, AccountNumber: 76543-8, AccountType: checking, ExternalID: my-external-id, Description: Daenerys Targaryen Stormborn (594.739.480-42), TransactionIds: { 5991715760504832 }, Fee: 200, Tags: { daenerys, invoice/1234 }, Rules: { Rule( Key: resendingLimit, Value: 5 ) }, Status: canceled, Scheduled: 08/14/2020 11:00:00, Created: 04/14/2020 17:49:10, Updated: 04/14/2020 17:49:10, ID: 6693962735681536 )
{ Id:6693962735681536 Amount:100000000 Name:Daenerys Targaryen Stormborn TaxId:594.739.480-42 BankCode:001 BranchCode:1234 AccountNumber:123456-0 AccountType:checking ExternalId:my-external-id Scheduled:2020-08-14 11:00:00 +0000 +0000 Description:Daenerys Targaryen Stormborn (594.739.480-42) Tags:[daenerys invoice/1234] Rules:[ { Key:resendingLimit Value:5 } ] Fee:200 Status:canceled TransactionIds:[5991715760504832] Created:2020-04-24 17:49:10.611646Z +0000 +0000 Updated:2020-04-24 17:49:10.611646Z +0000 +0000 }
{ :amount 100000000, :fee 200, :tags [daenerys invoice/1234], :branch-code 0001, :updated 2020-04-24T17:49:10.225810+00:00, :name Daenerys Targaryen Stormborn, :description "Daenerys Targaryen Stormborn (594.739.480-42)", :tax-id 012.345.678-90, :created 2020-12-05T01:08:39.415347+00:00, :status canceled, :id 6693962735681536, :scheduled 2020-08-14T11:00:0.000000+00:00, :transaction-ids [5991715760504832], :account-number 00000-0, :bank-code 60701190, :account-type: "checking", :external-id: "my-external-id" }
{ "transfer": { "id": "6693962735681536", "status": "canceled", "amount": 100000000, "name": "Daenerys Targaryen Stormborn", "rules": [ { "key": "resendingLimit", "value": 5 } ], "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "checking", "scheduled": "2020-08-14T11:00:00+00:00", "tags": ["daenerys", "invoice/1234"], "created": "2020-03-25T19:59:02.130246+00:00", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "externalId": "my-external-id", "updated": "2020-04-24T17:49:10.225810+00:00", "transactionIds": ["5991715760504832"], "fee": 200, } }
Get a PDF from a single transfer by its id.
id
import starkbank pdf = starkbank.transfer.pdf("5646210941583360") with open("transfer.pdf", "wb") as file: file.write(pdf)
const starkbank = require('starkbank'); const fs = require('fs').promises; (async() => { let pdf = await starkbank.transfer.pdf('5646210941583360'); await fs.writeFile('transfer.pdf', pdf); })();
$pdf = StarkBank\Transfer::pdf("5646210941583360"); $fp = fopen('transfer.pdf', 'w'); fwrite($fp, $pdf); fclose($fp);
import java.io.File; import java.io.InputStream; import java.nio.file.StandardCopyOption; import com.starkbank.*; InputStream pdf = Transfer.pdf("5646210941583360"); java.nio.file.Files.copy( pdf, new File("transfer.pdf").toPath(), StandardCopyOption.REPLACE_EXISTING );
require('starkbank') pdf = StarkBank::Transfer.pdf('5646210941583360') File.open('transfer.pdf', 'w') { |file| file.write(pdf) }
pdf = StarkBank.Transfer.pdf!("5646210941583360") file = File.open!("transfer.pdf", [:write]) IO.binwrite(file, pdf) File.close(file)
byte[] pdf = Transfer.Pdf("5646210941583360"); System.IO.File.WriteAllBytes("transfer.pdf", pdf);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/transfer" "io/ioutil" ) func main() { pdf, err := transfer.Pdf("5646210941583360", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } errFile := ioutil.WriteFile("transfer.pdf", pdf, 0666) if errFile != nil { fmt.Print(errFile) } }
(clojure.java.io/copy (starkbank.transfer/pdf "5646210941583360") (clojure.java.io/file "transfer.pdf"))
curl --location --request GET '{{baseUrl}}/v2/transfer/5646210941583360/pdf' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Get a paged list of all transfer logs. A log tracks a change in the transfer entity according to its life cycle.
cursor
limit
after
before
types
transferIds
fields
import starkbank logs = starkbank.transfer.log.query( after="2020-04-01", before="2020-04-30" ) for log in logs: print(log)
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.transfer.log.query({ after: '2020-04-01', before: '2020-04-30', }); for await (let log of logs) { console.log(log); } })();
$logs = StarkBank\Transfer\Log::query([ "after" => "2020-04-01", "before" => "2020-04-30" ]); foreach($logs as $log){ print_r($log); }
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<Transfer.Log> logs = Transfer.Log.query(params); for (Transfer.Log log : logs){ System.out.println(log); }
require('starkbank') logs = StarkBank::Transfer::Log.query( after: '2020-04-01', before: '2020-04-30' ) logs.each do |log| puts log end
logs = StarkBank.Transfer.Log.query!( after: "2020-04-01", before: "2020-04-30" ) for log <- logs do log |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.Transfer.Log> logs = StarkBank.Transfer.Log.Query( after: new DateTime(2020, 4, 1), before: new DateTime(2020, 4, 30) ); foreach(StarkBank.Transfer.Log log in logs) { Console.WriteLine(log); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/transfer/log" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-04-01" params["before"] = "2020-04-30" logs := log.Query(params, nil) for log := range logs { fmt.Printf("%+v", log) } }
(def logs (starkbank.transfer.log/query { :after "2020-04-01" :before "2020-04-30" })) (dorun (map println logs))
curl --location --request GET '{{baseUrl}}/v2/transfer/log??after=2020-04-01&before=2020-04-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( id=5662318377566208, created=2020-04-24 17:49:09.348444, errors=[], type=sending, transfer=Transfer( id=5950134772826112, account_number=76543-8, account_type=checking, amount=100000000, bank_code=341, branch_code=2201, created=2020-04-24 17:49:08.748893, description=Daenerys Targaryen Stormborn (594.739.480-42), external_id=my-external-id, fee=200, name=Daenerys Targaryen Stormborn, rules=[ Rule( key=resendingLimit, value=5 ) ], status=processing, scheduled=2020-08-14 11:00:00, tags=['daenerys', 'invoice/1234'], tax_id=594.739.480-42, transaction_ids=['5991715760504832'], updated=2020-04-24 17:49:10.259578 ) )
Log { id: '5662318377566208', created: '2020-04-24T17:49:09.254098+00:00', type: 'sending', errors: [], transfer: { status: 'processing', updated: '2020-04-24T17:49:10.011542+00:00', tags: [ 'Daenerys', 'invoice/1234' ], rules: [ { key: 'resendingLimit', value: 5 } ], taxId: '594.739.480-42', transactionIds: [ '5991715760504832' ], bankCode: '341', scheduled: '2020-08-14T11:00:00+00:00', id: '5950134772826112', fee: 200, name: 'Daenerys Targaryen Stormborn', created: '2020-04-24T17:49:08.646900+00:00', accountNumber: '76543-8', accountType: 'checking', externalId: 'my-external-id', description: 'Daenerys Targaryen Stormborn (594.739.480-42)', branchCode: '2201', amount: 100000000 } }
StarkBank\Transfer\Log Object ( [id] => 5662318377566208 [created] => DateTime Object ( [date] => 2020-04-24 17:49:09.494828 [timezone_type] => 1 [timezone] => +00:00 ) [type] => sending [errors] => Array ( ) [transfer] => StarkBankTransfer Object ( [id] => 5950134772826112 [amount] => 100000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 [accountType] => checking [description] => Daenerys Targaryen Stormborn (594.739.480-42) [externalId] => my-external-id [tags] => Array ( [0] => daenerys [1] => invoice/1234 ) [rules] => Array ( [0] => StarkBankTransferRule Object ( [key] => resendingLimit [value] => 5 ) ) [fee] => 200 [status] => processing [scheduled] => DateTime Object ( [date] => 2020-08-14 11:00:00 [timezone_type] => 1 [timezone] => +00:00 ) [transactionIds] => Array ( [0] => 5991715760504832 ) [created] => DateTime Object ( [date] => 2020-04-24 17:49:08.884988 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 17:49:10.319029 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "id": "5662318377566208", "created": "2020-04-24T17:49:09+00:00", "type": "sending", "errors": [], "transfer": { "id": "5950134772826112", "amount": 100000000, "name": "Daenerys Targaryen Stormborn", "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "checking", "externalId": "my-external-id", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "tags": [ "daenerys", "invoice/1234" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "transactionIds": ["5768603836088320"], "fee": 200, "status": "processing", "scheduled": '2020-08-14T11:00:00+00:00', "created": "2020-04-24T17:49:10+00:00", "updated": "2020-04-24T17:49:10+00:00" } })
log( id: 5662318377566208, created: 2020-04-24T17:49:09+00:00, type: sending, errors: [], transfer: transfer( id: 5950134772826112, amount: 100000000, name: Daenerys Targaryen Stormborn, tax_id: 594.739.480-42, bank_code: 341, branch_code: 2201, account_number: 76543-8, account_type: checking, external_id: my-external-id, description: Daenerys Targaryen Stormborn (594.739.480-42), transaction_ids: ["5991715760504832"], fee: 200, tags: ["daenerys", "invoice/1234"], rules: [ rule( key: resendingLimit, value: 5 ) ], status: processing, scheduled: 2020-08-14T11:00:00+00:00, created: 2020-04-24T17:49:10+00:00, updated: 2020-04-24T17:49:10+00:00 ) )
%StarkBank.Transfer.Log { id: "5662318377566208", created: ~U[2020-04-24 17:49:09.931897Z], errors: [], type: "sending" transfer: %StarkBank.Transfer{ account_number: "76543-8", account_type: "checking", amount: 100000000, bank_code: "341", branch_code: "2201", created: ~U[2020-04-24 17:49:08.039009Z], external_id: "my-external-id", fee: 200, id: "5950134772826112", name: "Daenerys Targaryen Stormborn", status: "processing", scheduled: ~U[2020-08-14 11:00:00Z], rules: %Transfer.Rule[ %{"key" => "resendingLimit", "value" => 5} ], description: "Daenerys Targaryen Stormborn (594.739.480-42)"", tags: ["daenerys", "invoice/1234"], tax_id: "594.739.480-42", transaction_ids: ["5991715760504832"], updated: ~U[2020-04-24 17:49:09.658635Z] } }
Log( ID: 5662318377566208, Created: 04/24/2020 17:49:09, Type: sending, Errors: { }, Transfer: Transfer( Amount: 100000000, Name: Daenerys Targaryen Stormborn, TaxID: 594.739.480-42, BankCode: 341, BranchCode: 2201, AccountNumber: 76543-8, AccountType: checking, ExternalID: my-external-id, Description: Daenerys Targaryen Stormborn (594.739.480-42), TransactionIds: { 5991715760504832 }, Fee: 200, Tags: { daenerys, invoice/1234 }, Rules: { Rule( Key: resendingLimit, Value: 5 ) }, Status: processing, Scheduled: 08/14/2020 11:00:00, Created: 04/24/2020 17:49:09, Updated: 04/24/2020 17:49:09, ID: 5950134772826112 ) )
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/transfer/log" ) func main() { log, err := log.Get("5662318377566208", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
{:id "5662318377566208", :created "2020-04-24T17:49:09.531199+00:00", :errors [], :type "sending", :transfer {:amount 100000000, :fee 200, :tags ["daenerys" "invoice/1234"], :branch-code "2201", :updated "2020-04-24T17:49:09.931279+00:00", :name "Daenerys Targaryen Stormborn", :description "Daenerys Targaryen Stormborn (594.739.480-42)", :tax-id "594.739.480-42", :created "2020-04-24T17:49:09.745548+00:00" :status "processing", :id "5950134772826112", :transaction-ids ["5991715760504832"], :account-number "76543-8", :bank-code "341", :account-type: "checking", :external-id: "my-external-id"}}
{ "cursor": null, "logs": [ { "id": "5662318377566208", "errors": [], "type": "sending", "created": "2020-03-24T17:49:43.751122+00:00", "transfer": { "id": "5950134772826112", "status": "processing", "amount": 100000000, "name": "Daenerys Targaryen Stormborn", "rules": [ { "key": "resendingLimit", "value": 5 } ], "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "checking", "scheduled": "2020-08-14T11:00:00+00:00", "tags": ["daenerys", "invoice/1234"], "created": "2020-04-24T19:59:02.130246+00:00", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "externalId": "my-external-id", "updated": "2020-04-24T19:59:02.130255+00:00", "transactionIds": ["5991715760504832"], "fee": 200, } } ] }
Get a single transfer log by its id.
id
fields
import starkbank log = starkbank.transfer.log.get("5662318377566208") print(log)
const starkbank = require('starkbank'); (async() => { let log = await starkbank.transfer.log.get('5662318377566208'); console.log(log); })();
$log = StarkBank\Transfer\Log::get("5662318377566208"); print_r($log);
import com.starkbank.*; Transfer.Log log = Transfer.Log.get("5662318377566208"); System.out.println(log);
require('starkbank') log = StarkBank::Transfer::Log.get('5662318377566208') puts log
log = StarkBank.Transfer.Log.get!("5662318377566208") log |> IO.inspect
using System; StarkBank.Transfer.Log log = StarkBank.Transfer.Log.Get("5662318377566208"); Console.WriteLine(log);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/transfer/log" ) func main() { log, err := log.Get("5662318377566208", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
(def log (starkbank.transfer.log/get "5662318377566208")) (println log)
curl --location --request GET '{{baseUrl}}/v2/transfer/log/5662318377566208' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( id=5662318377566208, created=2020-04-24 17:49:09.348444, errors=[], type=sending, transfer=Transfer( id=5950134772826112, account_number=76543-8, account_type=checking, amount=100000000, bank_code=341, branch_code=2201, created=2020-04-24 17:49:08.748893, description=Daenerys Targaryen Stormborn (594.739.480-42), external_id=my-external-id, fee=200, name=Daenerys Targaryen Stormborn, rules=[ Rule( key=resendingLimit, value=5 ) ], status=processing, scheduled=2020-08-14 11:00:00, tags=['daenerys', 'invoice/1234'], tax_id=594.739.480-42, transaction_ids=['5991715760504832'], updated=2020-04-24 17:49:10.259578 ) )
Log { id: '5662318377566208', created: '2020-04-24T17:49:09.254098+00:00', type: 'sending', errors: [], transfer: { status: 'processing', updated: '2020-04-24T17:49:10.011542+00:00', tags: [ 'Daenerys', 'invoice/1234' ], rules: [ { key: 'resendingLimit', value: 5 } ], taxId: '594.739.480-42', transactionIds: [ '5991715760504832' ], bankCode: '341', scheduled: '2020-08-14T11:00:00+00:00', id: '5950134772826112', fee: 200, name: 'Daenerys Targaryen Stormborn', created: '2020-04-24T17:49:08.646900+00:00', accountNumber: '76543-8', accountType: 'checking', externalId: 'my-external-id', description: 'Daenerys Targaryen Stormborn (594.739.480-42)', branchCode: '2201', amount: 100000000 } }
StarkBank\Transfer\Log Object ( [id] => 5662318377566208 [created] => DateTime Object ( [date] => 2020-04-24 17:49:09.494828 [timezone_type] => 1 [timezone] => +00:00 ) [type] => sending [errors] => Array ( ) [transfer] => StarkBank\Transfer Object ( [id] => 5950134772826112 [amount] => 100000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 [accountType] => checking [description] => Daenerys Targaryen Stormborn (594.739.480-42) [externalId] => my-external-id [tags] => Array ( [0] => daenerys [1] => invoice/1234 ) [rules] => Array ( [0] => StarkBank\Transfer\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [fee] => 200 [status] => processing [scheduled] => DateTime Object ( [date] => 2020-08-14 11:00:00 [timezone_type] => 1 [timezone] => +00:00 ) [transactionIds] => Array ( [0] => 5991715760504832 ) [created] => DateTime Object ( [date] => 2020-04-24 17:49:08.884988 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 17:49:10.319029 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "id": "5662318377566208", "created": "2020-04-24T17:49:09+00:00", "type": "sending", "errors": [], "transfer": { "id": "5950134772826112", "amount": 100000000, "name": "Daenerys Targaryen Stormborn", "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "checking", "externalId": "my-external-id", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "tags": [ "daenerys", "invoice/1234" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "transactionIds": ["5768603836088320"], "fee": 200, "status": "processing", "scheduled": '2020-08-14T11:00:00+00:00', "created": "2020-04-24T17:49:10+00:00", "updated": "2020-04-24T17:49:10+00:00" } })
log( id: 5662318377566208, created: 2020-04-24T17:49:09+00:00, type: sending, errors: [], transfer: transfer( id: 5950134772826112, amount: 100000000, name: Daenerys Targaryen Stormborn, tax_id: 594.739.480-42, bank_code: 341, branch_code: 2201, account_number: 76543-8, account_type: checking, external_id: my-external-id, description: Daenerys Targaryen Stormborn (594.739.480-42), transaction_ids: ["5991715760504832"], fee: 200, tags: ["daenerys", "invoice/1234"], rules: [ rule( key: resendingLimit, value: 5 ) ], status: processing, scheduled: 2020-08-14T11:00:00+00:00, created: 2020-04-24T17:49:10+00:00, updated: 2020-04-24T17:49:10+00:00 ) )
%StarkBank.Transfer.Log { id: "5662318377566208", created: ~U[2020-04-24 17:49:09.931897Z], errors: [], type: "sending" transfer: %StarkBank.Transfer{ account_number: "76543-8", account_type: "checking", amount: 100000000, bank_code: "341", branch_code: "2201", created: ~U[2020-04-24 17:49:08.039009Z], external_id: "my-external-id", fee: 200, id: "5950134772826112", name: "Daenerys Targaryen Stormborn", status: "processing", scheduled: ~U[2020-08-14 11:00:00Z], rules: %Transfer.Rule[ %{"key" => "resendingLimit", "value" => 5} ], description: "Daenerys Targaryen Stormborn (594.739.480-42)"", tags: ["daenerys", "invoice/1234"], tax_id: "594.739.480-42", transaction_ids: ["5991715760504832"], updated: ~U[2020-04-24 17:49:09.658635Z] } }
Log( ID: 5662318377566208, Created: 04/24/2020 17:49:09, Type: sending, Errors: { }, Transfer: Transfer( Amount: 100000000, Name: Daenerys Targaryen Stormborn, TaxID: 594.739.480-42, BankCode: 341, BranchCode: 2201, AccountNumber: 76543-8, AccountType: checking, ExternalID: my-external-id, Description: Daenerys Targaryen Stormborn (594.739.480-42), TransactionIds: { 5991715760504832 }, Fee: 200, Tags: { daenerys, invoice/1234 }, Rules: { Rule( Key: resendingLimit, Value: 5 ) }, Status: processing, Scheduled: 08/14/2020 11:00:00, Created: 04/24/2020 17:49:09, Updated: 04/24/2020 17:49:09, ID: 5950134772826112 ) )
{ Id:5662318377566208 Created:2020-04-24 17:49:09.00773 +0000 +0000 Type:sending Errors:[] Transfer: { Id:5950134772826112 Amount:100000000 Name:Daenerys Targaryen Stormborn TaxId:594.739.480-42 BankCode:341 BranchCode:2201 AccountNumber:76543-8 AccountType:checking ExternalId:my-external-id Scheduled:2020-04-24 11:00:00.000000 +0000 +0000 Description:Good description Tags:[daenerys invoice/1234] Rules:[ { Key:resendingLimit Value:5 } ] Fee:200 Status:created TransactionIds:[5991715760504832] Created:2020-04-24 17:49:10.001771 +0000 +0000 Updated:2020-04-24 17:49:10.81727 +0000 +0000 } }
{:id "5662318377566208", :created "2020-04-24T17:49:09.531199+00:00", :errors [], :type "sending", :transfer {:amount 100000000, :fee 200, :tags ["daenerys" "invoice/1234"], :branch-code "2201", :updated "2020-04-24T17:49:09.931279+00:00", :name "Daenerys Targaryen Stormborn", :description "Daenerys Targaryen Stormborn (594.739.480-42)", :tax-id "594.739.480-42", :created "2020-04-24T17:49:09.745548+00:00" :status "processing", :id "5950134772826112", :transaction-ids ["5991715760504832"], :account-number "76543-8", :bank-code "341", :account-type: "checking", :external-id: "my-external-id"}}
{ "log": { "id": "5662318377566208", "errors": [], "type": "sending", "created": "2020-03-24T17:49:43.751122+00:00", "transfer": { "id": "5950134772826112", "status": "processing", "amount": 100000000, "name": "Daenerys Targaryen Stormborn", "rules": [ { "key": "resendingLimit", "value": 5 } ], "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8", "accountType": "checking", "scheduled": "2020-08-14T11:00:00+00:00", "tags": ["daenerys", "invoice/1234"], "created": "2020-04-24T19:59:02.130246+00:00", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "externalId": "my-external-id", "updated": "2020-04-24T19:59:02.130255+00:00", "transactionIds": ["5991715760504832"], "fee": 200, } } }
Here we will teach you how to create and manage brcode payments.
Use this route to pay registered brcodes generated at Stark Bank or at other financial institutions using the available balance in your Stark Bank account.
brcode
taxId
description
amount
tags
scheduled
rules
[ { "key": "resendingLimit", "value": 5 } ]
import starkbank payments = starkbank.brcodepayment.create([ starkbank.BrcodePayment( brcode="00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", tax_id="012.345.678-90", scheduled="2021-01-13", description="this will be fast", tags=["pix", "qrcode"], rules=[ starkbank.brcodepayment.Rule(key="resendingLimit", value=5) ] ) ]) for payment in payments: print(payment)
const starkbank = require('starkbank'); (async() => { let payments = await starkbank.brcodePayment.create([ { brcode: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", taxId: '012.345.678-90', description: "this will be fast", scheduled: '2021-01-13', tags: ['pix', 'qrcode'], rules: [ { key: 'resendingLimit', value: 5 } ] }, ]); for (let payment of payments) { console.log(payment); } })();
use StarkBank\BrcodePayment; $payments = StarkBank\BrcodePayment::create([ new StarkBank\BrcodePayment([ "brcode" => "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "taxId" => "012.345.678-90", "description" => "this will be fast", "scheduled" => "2021-01-13", "tags" => ["pix", "qrcode"], "rules" => [ new StarkBank\BrcodePayment\Rule(["key" => "resendingLimit", "value" => 5]) ] ]) ]); foreach($payments as $payment){ print_r($payment); }
import com.starkbank.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; List<BrcodePayment> payments = new ArrayList<>(); List<BrcodePayment.Rule> rules = new ArrayList<>(); rules.add(new BrcodePayment.Rule("resendingLimit", 5)); HashMap<String, Object> data = new HashMap<>(); data.put("brcode", "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF"); data.put("taxId", "012.345.678-90"); data.put("scheduled", "2021-01-13"); data.put("description", "this will be fast"); data.put("tags", new String[]{"pix", "qrcode"}); data.put("rules", rules); payments.add(new BrcodePayment(data)); payments = BrcodePayment.create(payments); for (BrcodePayment payment : payments){ System.out.println(payment); }
require('starkbank') payments = StarkBank::BrcodePayment.create( [ StarkBank::BrcodePayment.new( brcode: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", tax_id: '012.345.678-90', scheduled: '2021-01-13', description: 'this will be fast', tags: %w[pix qrcode], rules: [ StarkBank::BrcodePayment::Rule.new(key: 'resendingLimit', value: 5) ] ) ] ) payments.each do |payment| puts payment end
payments = StarkBank.BrcodePayment.create!( [ %StarkBank.BrcodePayment{ brcode: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", tax_id: "012.345.678-90", scheduled: "2021-01-13" description: "this will be fast", tags: ["pix", "qrcode"], rules: [ %StarkBank.BrcodePayment.Rule{ key: "resendingLimit", value: 5 } ] } ] ) |> IO.inspect
using System; using System.Collections.Generic; List<StarkBank.BrcodePayment> payments = StarkBank.BrcodePayment.Create( new List<StarkBank.BrcodePayment> { new StarkBank.BrcodePayment( brcode: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", taxID: "012.345.678-90", scheduled: new DateTime(2021, 1, 13), description: "this will be fast", tags: new List<string> { "pix", "qrcode" }, rules: new List<StarkBank.BrcodePayment.Rule> { new StarkBank.BrcodePayment.Rule(key: "resendingLimit", value: 5) } ) } ); foreach (StarkBank.BrcodePayment payment in payments) { Console.WriteLine(payment); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/brcodepayment" ) func main() { scheduled := time.Date(2021, 01, 13, 0, 0, 0, 0, time.UTC) payments, err := brcodepayment.Create( []brcodepayment.BrcodePayment{ { Brcode: "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", TaxId: "012.345.678-90", Scheduled: &scheduled, Description: "this will be fast", Tags: []string{"pix", "qrcode"}, Rules: []rule.Rule{{Key: "resendingLimit", Value: 5}}, }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, payment := range payments { fmt.Printf("%+v", payment) } }
(def payments (starkbank.brcode-payment/create [{ :brcode "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF" :tax-id "012.345.678-90" :scheduled "2021-01-13T20:32:02.218000+00:00" :description "this will be fast" :tags ["pix" "qrcode"] }])) (doseq [payment payments] (println payment))
curl --location --request POST '{{baseUrl}}/v2/brcode-payment' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "payments": [ { "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "taxId": "012.345.678-90", "scheduled": "2021-01-13", "description": "BR Code Test 1", "tags": ["pix", "qrcode"] "rules": [ { "key": "resendingLimit", "value": 5 } ] } ] }'
BrcodePayment( amount=0, brcode=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created=2021-01-03 18:36:18.574799, description=this will be fast, fee=0, id=5717797661310976, name=None, rules=[ Rule( key=resendingLimit, value=5 ) ], scheduled=2021-01-13 10:00:00, status=creating, tags=['pix', 'qrcode'], tax_id=***.345.678-**, transaction_ids=[], type=dynamic, updated=2021-01-03 18:36:18.574815 )
BrcodePayment { id: '5717797661310976', brcode: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF', taxId: '***.345.678-**', name: null, description: 'this will be fast', amount: 0, scheduled: '2021-01-13T10:00:00+00:00', tags: [ 'pix', 'qrcode' ], rules: [ { key: 'resendingLimit', value: 5 } ], status: 'creating', type: 'dynamic', fee: 0, updated: '2021-01-03T18:36:23.200972+00:00', created: '2021-01-03T18:36:23.200957+00:00', transactionIds: [] }
StarkBank\BrcodePayment Object ( [id] => 5717797661310976 [brcode] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF [taxId] => ***.345.678-** [description] => this will be fast [amount] => 0 [scheduled] => DateTime Object ( [date] => 2021-01-13 10:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [name] => [tags] => Array ( [0] => pix [1] => qrcode ) [rules] => Array ( [0] => StarkBank\BrcodePayment\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [status] => creating [type] => dynamic [transactionIds] => Array ( ) [fee] => 0 [updated] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) )
BrcodePayment({ "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "taxId": "***.345.678-**", "description": "this will be fast", "amount": 0, "scheduled": "2021-01-13T10:00:00+00:00", "tags": [ "pix", "qrcode" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "status": "creating", "name": "", "type": "dynamic", "transactionIds": [], "fee": 0, "updated": "2021-01-03T18:36:18.142541+00:00", "created": "2021-01-03T18:36:18.142526+00:00", "id": "5717797661310976" })
brcodepayment( id: 5717797661310976, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, tax_id: ***.345.678-**, description: this will be fast, amount: 0, scheduled: 2021-01-13T10:00:00+00:00, tags: ["pix", "qrcode"], rules: [ rule( key: resendingLimit, value: 5 ) ], name: , status: creating, type: dynamic, transaction_ids: [], fee: 0, updated: 2021-01-03T18:36:18+00:00, created: 2021-01-03T18:36:18+00:00 )
%StarkBank.BrcodePayment{ amount: 0, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created: ~U[2021-01-03 18:36:00.235426Z], description: "this will be fast", fee: 0, id: "5717797661310976", name: "", scheduled: ~U[2021-01-13 10:00:00.000000Z], rules: [ %StarkBank.BrcodePayment.Rules{ key: "resendingLimit", value: 5 } ] status: "creating", tags: ["pix", "qrcode"], transaction_ids: [], tax_id: "***.345.678-**", type: "dynamic", updated: ~U[2021-01-03 18:36:00.235440Z] }
BrcodePayment( Brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, Tags: { pix, qrcode }, Scheduled: 13/01/2021 10:00:00, Name: null, TaxID: ***.345.678-**, Amount: 0, Rules: Rule( Key: resendingLimit, Value: 5 ) Status: creating, Type: dynamic, Description: this will be fast, ID: 5717797661310976 Fee: 0, Created: 03/01/2021 18:36:00, Updated: 03/01/2021 18:36:00, TransactionIds: { }, )
{ Id:5717797661310976 Brcode:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF TaxId:***.345.678-** Description:this will be fast Amount:0 Scheduled:2021-01-13 10:00:00.000000 +0000 +0000 Rules:[ { Key:resendingLimit Value:5 } ] Tags:[pix qrcode] Name: Status:creating Type:dynamic TransactionIds:[] Fee:0 Updated:2021-01-03 18:36:00.796544 +0000 +0000 Created:2021-01-03 18:36:00.796529 +0000 +0000 }
{ :description this will be fast, :name , :amount 0, :fee 0, :tags [pix, qrcode], :transaction-ids [], :updated 2021-01-03T18:36:00.892863+00:00, :tax-id ***.345.678-**, :type dynamic, :created 2021-01-03T18:36:00.892848+00:00, :status creating, :id 5717797661310976, :scheduled 2021-01-12T10:00:00.000000+00:00, :brcode 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF }
{ "message": "Payment(s) successfully created", "payments": [ { "amount": 0, "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "created": "2021-01-03T18:36:00.369014+00:00", "description": "this will be fast", "fee": 0, "id": "5717797661310976", "name": null, "rules": [ { "key": "resendingLimit", "value": 5 } ], "scheduled": "2021-01-13T10:00:00.000000+00:00", "status": "creating", "tags": ["pix", "qrcode"], "taxId": "***.345.678-**", "transactionIds": [], "type": "dynamic", "updated": "2021-01-03T18:36:00.369028+00:00" } ] }
Get a list of non-deleted brcodes in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
fields
import starkbank payments = starkbank.brcodepayment.query( after="2021-01-01", before="2021-01-30" ) for payment in payments: print(payment)
const starkbank = require('starkbank'); (async() => { let payments = await starkbank.brcodePayment.query({ after: '2021-01-01', before: '2021-01-30' }); for await (let payment of payments) { console.log(payment); } })();
use StarkBank\BrcodePayment; $payments = BrcodePayment::query([ "after" => "2021-01-01", "before" => "2021-01-30" ]); foreach($payments as $payment){ print_r($payment); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2021-01-01"); params.put("before", "2021-01-30"); Generator<BrcodePayment> payments = BrcodePayment.query(params); for (BrcodePayment payment : payments){ System.out.println(payment); }
require('starkbank') payments = StarkBank::BrcodePayment.query( after: "2021-01-01", before: "2021-01-30" ) payments.each do |payment| puts payment end
payments = StarkBank.BrcodePayment.query!( after: "2021-01-01", before: "2021-01-30" ) |> Enum.take(10) |> IO.inspect
using System; using System.Collections.Generic; IEnumerable<StarkBank.BrcodePayment> payments = StarkBank.BrcodePayment.Query( after: new DateTime(2021, 1, 1), before: new DateTime(2021, 1, 30) ); foreach (StarkBank.BrcodePayment payment in payments) { Console.WriteLine(payment); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/brcodepayment" ) func main() { var params = map[string]interface{}{} params["after"] = "2021-01-01" params["before"] = "2021-01-30" payments := brcodepayment.Query(params, nil) for payment := range payments { fmt.Printf("%+v", payment) } }
(def payments (starkbank.brcode-payment/query {:after "2021-01-01", :before "2021-01-30"})) (doseq [payment payments] (println payment))
curl --location --request GET '{{baseUrl}}/v2/brcode-payment?after=2021-01-01&before=2021-01-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
BrcodePayment( amount=0, brcode=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created=2021-01-03 18:36:18.574799, description=this will be fast, fee=0, id=5717797661310976, name=None, rules=[ Rule( key=resendingLimit, value=5 ) ], scheduled=2021-01-13 10:00:00, status=creating, tags=['pix', 'qrcode'], tax_id=***.345.678-**, transaction_ids=[], type=dynamic, updated=2021-01-03 18:36:18.574815 )
BrcodePayment { id: '5717797661310976', brcode: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF', taxId: '***.345.678-**', name: null, description: 'this will be fast', amount: 0, scheduled: '2021-01-13T10:00:00+00:00', tags: [ 'pix', 'qrcode' ], rules: [ { key: 'resendingLimit', value: 5 } ], status: 'creating', type: 'dynamic', fee: 0, updated: '2021-01-03T18:36:23.200972+00:00', created: '2021-01-03T18:36:23.200957+00:00', transactionIds: [] }
StarkBank\BrcodePayment Object ( [id] => 5717797661310976 [brcode] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF [taxId] => ***.345.678-** [description] => this will be fast [amount] => 0 [scheduled] => DateTime Object ( [date] => 2021-01-13 10:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [name] => [tags] => Array ( [0] => pix [1] => qrcode ) [rules] => Array ( [0] => StarkBank\BrcodePayment\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [status] => creating [type] => dynamic [transactionIds] => Array ( ) [fee] => 0 [updated] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) )
BrcodePayment({ "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "taxId": "***.345.678-**", "description": "this will be fast", "amount": 0, "scheduled": "2021-01-13T10:00:00+00:00", "tags": [ "pix", "qrcode" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "status": "creating", "name": "", "type": "dynamic", "transactionIds": [], "fee": 0, "updated": "2021-01-03T18:36:18.142541+00:00", "created": "2021-01-03T18:36:18.142526+00:00", "id": "5717797661310976" })
brcodepayment( id: 5717797661310976, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, tax_id: ***.345.678-**, description: this will be fast, amount: 0, scheduled: 2021-01-13T10:00:00+00:00, tags: ["pix", "qrcode"], rules: [ rule( key: resendingLimit, value: 5 ) ], name: , status: creating, type: dynamic, transaction_ids: [], fee: 0, updated: 2021-01-03T18:36:18+00:00, created: 2021-01-03T18:36:18+00:00 )
%StarkBank.BrcodePayment{ amount: 0, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created: ~U[2021-01-03 18:36:00.235426Z], description: "this will be fast", fee: 0, id: "5717797661310976", name: "", scheduled: ~U[2021-01-13 10:00:00.000000Z], rules: [ %StarkBank.BrcodePayment.Rules{ key: "resendingLimit", value: 5 } ] status: "creating", tags: ["pix", "qrcode"], transaction_ids: [], tax_id: "***.345.678-**", type: "dynamic", updated: ~U[2021-01-03 18:36:00.235440Z] }
BrcodePayment( Brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, Tags: { pix, qrcode }, Scheduled: 13/01/2021 10:00:00, Name: null, TaxID: ***.345.678-**, Amount: 0, Rules: Rule( Key: resendingLimit, Value: 5 ) Status: creating, Type: dynamic, Description: this will be fast, ID: 5717797661310976, Fee: 0, Created: 03/01/2021 18:36:00, Updated: 03/01/2021 18:36:00, TransactionIds: { }, )
{ Id:5717797661310976 Brcode:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF TaxId:***.345.678-** Description:this will be fast Amount:0 Scheduled:2021-01-13 10:00:00.000000 +0000 +0000 Rules:[ { Key:resendingLimit Value:5 } ] Tags:[pix qrcode] Name: Status:creating Type:dynamic TransactionIds:[] Fee:0 Updated:2021-01-03 18:36:00.796544 +0000 +0000 Created:2021-01-03 18:36:00.796529 +0000 +0000 }
{ :description this will be fast, :name , :amount 0, :fee 0, :tags [pix, qrcode], :transaction-ids [], :updated 2021-01-03T18:36:00.892863+00:00, :tax-id ***.345.678-**, :type dynamic, :created 2021-01-03T18:36:00.892848+00:00, :status creating, :id 5717797661310976, :scheduled 2021-01-12T10:00:00.000000+00:00, :brcode 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF }
{ "cursor": null, "payments": [ { "amount": 0, "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "created": "2021-01-03T18:36:00.369014+00:00", "description": "this will be fast", "fee": 0, "id": "5717797661310976", "name": null, "rules": [ { "key": "resendingLimit", "value": 5 } ], "scheduled": "2021-01-13T10:00:00.000000+00:00", "status": "creating", "tags": ["pix", "qrcode"], "taxId": "***.345.678-**", "transactionIds": [], "type": "dynamic", "updated": "2021-01-03T18:36:00.369028+00:00" } ] }
Get a single brcode by its id.
id
fields
import starkbank payment = starkbank.brcodepayment.get("5717797661310976") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.brcodePayment.get('5717797661310976') console.log(payment); })();
use StarkBank\BrcodePayment; $payment = BrcodePayment::get("5717797661310976"); print_r($payment);
import com.starkbank.*; BrcodePayment payment = BrcodePayment.get("5717797661310976"); System.out.println(payment);
require('starkbank') payment = StarkBank::BrcodePayment.get('5717797661310976') puts payment
payment = StarkBank.BrcodePayment.get!("5717797661310976") |> IO.inspect
using System; StarkBank.BrcodePayment payment = StarkBank.BrcodePayment.Get("5717797661310976"); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/brcodepayment" ) func main() { payment, err := brcodepayment.Get("5717797661310976", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.brcode-payment/get "5717797661310976")) (println payment)
curl --location --request GET '{{baseUrl}}/v2/brcode-payment/5717797661310976' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
BrcodePayment( amount=0, brcode=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created=2021-01-03 18:36:18.574799, description=this will be fast, fee=0, id=5717797661310976, name=None, rules=[ Rule( key=resendingLimit, value=5 ) ], scheduled=2021-01-13 10:00:00, status=creating, tags=['pix', 'qrcode'], tax_id=***.345.678-**, transaction_ids=[], type=dynamic, updated=2021-01-03 18:36:18.574815 )
BrcodePayment { id: '5717797661310976', brcode: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF', taxId: '***.345.678-**', name: null, description: 'this will be fast', amount: 0, scheduled: '2021-01-13T10:00:00+00:00', tags: [ 'pix', 'qrcode' ], rules: [ { key: 'resendingLimit', value: 5 } ], status: 'creating', type: 'dynamic', fee: 0, updated: '2021-01-03T18:36:23.200972+00:00', created: '2021-01-03T18:36:23.200957+00:00', transactionIds: [] }
StarkBank\BrcodePayment Object ( [id] => 5717797661310976 [brcode] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF [taxId] => ***.345.678-** [description] => this will be fast [amount] => 0 [scheduled] => DateTime Object ( [date] => 2021-01-13 10:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [name] => [tags] => Array ( [0] => pix [1] => qrcode ) [rules] => Array ( [0] => StarkBank\BrcodePayment\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [status] => creating [type] => dynamic [transactionIds] => Array ( ) [fee] => 0 [updated] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) )
BrcodePayment({ "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "taxId": "***.345.678-**", "description": "this will be fast", "amount": 0, "scheduled": "2021-01-13T10:00:00+00:00", "tags": [ "pix", "qrcode" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "status": "creating", "name": "", "type": "dynamic", "transactionIds": [], "fee": 0, "updated": "2021-01-03T18:36:18.142541+00:00", "created": "2021-01-03T18:36:18.142526+00:00", "id": "5717797661310976" })
brcodepayment( id: 5717797661310976, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, tax_id: ***.345.678-**, description: this will be fast, amount: 0, scheduled: 2021-01-13T10:00:00+00:00, tags: ["pix", "qrcode"], rules: [ rule( key: resendingLimit, value: 5 ) ], name: , status: creating, type: dynamic, transaction_ids: [], fee: 0, updated: 2021-01-03T18:36:18+00:00, created: 2021-01-03T18:36:18+00:00 )
%StarkBank.BrcodePayment{ amount: 0, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created: ~U[2021-01-03 18:36:00.235426Z], description: "this will be fast", fee: 0, id: "5717797661310976", name: "", scheduled: ~U[2021-01-13 10:00:00.000000Z], rules: [ %StarkBank.BrcodePayment.Rules{ key: "resendingLimit", value: 5 } ] status: "creating", tags: ["pix", "qrcode"], transaction_ids: [], tax_id: "***.345.678-**", type: "dynamic", updated: ~U[2021-01-03 18:36:00.235440Z] }
BrcodePayment( Brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, Tags: { pix, qrcode }, Scheduled: 13/01/2021 10:00:00, Name: null, TaxID: ***.345.678-**, Amount: 0, Rules: Rule( Key: resendingLimit, Value: 5 ) Status: creating, Type: dynamic, Description: this will be fast, ID: 5717797661310976 Fee: 0, Created: 03/01/2021 18:36:00, Updated: 03/01/2021 18:36:00, TransactionIds: { }, )
{ Id:5717797661310976 Brcode:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF TaxId:***.345.678-** Description:this will be fast Amount:0 Scheduled:2021-01-13 10:00:00.000000 +0000 +0000 Rules:[ { Key:resendingLimit Value:5 } ] Tags:[pix qrcode] Name: Status:creating Type:dynamic TransactionIds:[] Fee:0 Updated:2021-01-03 18:36:00.796544 +0000 +0000 Created:2021-01-03 18:36:00.796529 +0000 +0000 }
{ :description this will be fast, :name , :amount 0, :fee 0, :tags [pix, qrcode], :transaction-ids [], :updated 2021-01-03T18:36:00.892863+00:00, :tax-id ***.345.678-**, :type dynamic, :created 2021-01-03T18:36:00.892848+00:00, :status creating, :id 5717797661310976, :scheduled 2021-01-12T10:00:00.000000+00:00, :brcode 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF }
{ "payment": { "amount": 0, "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "created": "2021-01-03T18:36:00.369014+00:00", "description": "this will be fast", "fee": 0, "id": "5717797661310976", "name": null, "rules": [ { "key": "resendingLimit", "value": 5 } ], "scheduled": "2021-01-13T10:00:00.000000+00:00", "status": "creating", "tags": ["pix", "qrcode"], "taxId": "***.345.678-**", "transactionIds": [], "type": "dynamic", "updated": "2021-01-03T18:36:00.369028+00:00" } }
Update a single brcode payment, if it hasn't been paid yet.
id
status
import starkbank payment = starkbank.brcodepayment.update("5717797661310976", status="canceled") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.brcodePayment.update('5717797661310976', {status: 'canceled'}); console.log(payment); })();
use StarkBank\BrcodePayment; $payment = BrcodePayment::update( "5717797661310976", [ "status" => "canceled" ] ); print_r($payment);
import com.starkbank.*; HashMap<String, Object> patchData = new HashMap<>(); patchData.put("status", "canceled"); BrcodePayment payment = BrcodePayment.update("5717797661310976", patchData); System.out.println(payment);
require('starkbank') payment = StarkBank::BrcodePayment.update('5717797661310976', status: 'canceled') puts payment
payment = StarkBank.BrcodePayment.update!( "5717797661310976", status: "canceled" ) |> IO.inspect
StarkBank.BrcodePayment payment = StarkBank.BrcodePayment.Update( "5717797661310976", status: "canceled" ); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/invoice" ) func main() { var patchData = map[string]interface{}{} patchData["status"] = "canceled" payment, err := brcodePayment.Update("5717797661310976", patchData, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.brcode-payment/update "5717797661310976" {:status "canceled"})) (println payment)
curl --location --request PATCH '{{baseUrl}}/v2/brcode-payment/5717797661310976' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "status": "canceled", }'
BrcodePayment( amount=0, brcode=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created=2021-01-03 18:36:18.574799, description=this will be fast, fee=0, id=5717797661310976, name=None, rules=[ Rule( key=resendingLimit, value=5 ) ], scheduled=2021-01-13 10:00:00, status=canceled, tags=['pix', 'qrcode'], tax_id=***.345.678-**, transaction_ids=[], type=dynamic, updated=2021-01-03 18:36:18.574815 )
BrcodePayment { id: '5717797661310976', brcode: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF', taxId: '***.345.678-**', name: null, description: 'this will be fast', amount: 0, scheduled: '2021-01-13T10:00:00+00:00', tags: [ 'pix', 'qrcode' ], rules: [ { key: 'resendingLimit', value: 5 } ], status: 'canceled', type: 'dynamic', fee: 0, updated: '2021-01-03T18:36:23.200972+00:00', created: '2021-01-03T18:36:23.200957+00:00', transactionIds: [] }
StarkBank\BrcodePayment Object ( [id] => 5717797661310976 [brcode] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF [taxId] => ***.345.678-** [description] => this will be fast [amount] => 0 [scheduled] => DateTime Object ( [date] => 2021-01-13 10:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [name] => [tags] => Array ( [0] => pix [1] => qrcode ) [rules] => Array ( [0] => StarkBank\BrcodePayment\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [status] => canceled [type] => dynamic [transactionIds] => Array ( ) [fee] => 0 [updated] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) )
BrcodePayment({ "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "taxId": "***.345.678-**", "description": "this will be fast", "amount": 0, "scheduled": "2021-01-13T10:00:00+00:00", "tags": [ "pix", "qrcode" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "status": "canceled", "name": "", "type": "dynamic", "transactionIds": [], "fee": 0, "updated": "2021-01-03T18:36:18.142541+00:00", "created": "2021-01-03T18:36:18.142526+00:00", "id": "5717797661310976" })
brcodepayment( id: 5717797661310976, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, tax_id: ***.345.678-**, description: this will be fast, amount: 0, scheduled: 2021-01-13T10:00:00+00:00, tags: ["pix", "qrcode"], rules: [ rule( key: resendingLimit, value: 5 ) ], name: , status: canceled, type: dynamic, transaction_ids: [], fee: 0, updated: 2021-01-03T18:36:18+00:00, created: 2021-01-03T18:36:18+00:00 )
%StarkBank.BrcodePayment{ amount: 0, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created: ~U[2021-01-03 18:36:00.235426Z], description: "this will be fast", fee: 0, id: "5717797661310976", name: "", scheduled: ~U[2021-01-13 10:00:00.000000Z], rules: [ %StarkBank.BrcodePayment.Rules{ key: "resendingLimit", value: 5 } ] status: "canceled", tags: ["pix", "qrcode"], transaction_ids: [], tax_id: "***.345.678-**", type: "dynamic", updated: ~U[2021-01-03 18:36:00.235440Z] }
BrcodePayment( Brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, Tags: { pix, qrcode }, Scheduled: 13/01/2021 10:00:00, Name: null, TaxID: ***.345.678-**, Amount: 0, Rules: Rule( Key: resendingLimit, Value: 5 ) Status: canceled, Type: dynamic, Description: this will be fast, ID: 5717797661310976 Fee: 0, Created: 03/01/2021 18:36:00, Updated: 03/01/2021 18:36:00, TransactionIds: { } )
{ Id:5717797661310976 Brcode:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF TaxId:***.345.678-** Description:this will be fast Amount:0 Scheduled:2021-01-13 10:00:00.000000 +0000 +0000 Rules:[ { Key:resendingLimit Value:5 } ] Tags:[pix qrcode] Name: Status:canceled Type:dynamic TransactionIds:[] Fee:0 Updated:2021-01-03 18:36:00.796544 +0000 +0000 Created:2021-01-03 18:36:00.796529 +0000 +0000 }
{ :description this will be fast, :name , :amount 0, :fee 0, :tags [pix, qrcode], :transaction-ids [], :updated 2021-01-03T18:36:00.892863+00:00, :tax-id ***.345.678-**, :type dynamic, :created 2021-01-03T18:36:00.892848+00:00, :status canceled, :id 5717797661310976, :scheduled 2021-01-12T10:00:00.000000+00:00, :brcode 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF }
{ "message": "Payment successfully patched", "invoice": { "amount": 0, "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "created": "2021-01-03T18:36:00.369014+00:00", "description": "this will be fast", "fee": 0, "id": "5717797661310976", "name": null, "rules": [ { "key": "resendingLimit", "value": 5 } ], "scheduled": "2021-01-13T10:00:00.000000+00:00", "status": "canceled", "tags": ["pix", "qrcode"], "taxId": "***.345.678-**", "transactionIds": [], "type": "dynamic", "updated": "2021-01-03T18:36:00.369028+00:00" } }
Get a brcode payment PDF receipt. You can only get a receipt for payments whose status are either success, processing or created.
id
import starkbank pdf = starkbank.brcodepayment.pdf("5717797661310976") with open("brcode-payment.pdf", "wb") as file: file.write(pdf)
const starkbank = require('starkbank'); const fs = require('fs').promises; (async() => { let pdf = await starkbank.brcodePayment.pdf('5717797661310976'); await fs.writeFile('brcode-payment.pdf', pdf); })();
$pdf = StarkBank\BrcodePayment::pdf("5717797661310976"); $fp = fopen('brcode-payment.pdf', 'w'); fwrite($fp, $pdf); fclose($fp);
import java.io.File; import java.io.InputStream; import java.nio.file.StandardCopyOption; import com.starkbank.*; InputStream pdf = BrcodePayment.pdf("5717797661310976"); java.nio.file.Files.copy( pdf, new File("brcode-payment.pdf").toPath(), StandardCopyOption.REPLACE_EXISTING );
require('starkbank') pdf = StarkBank::BrcodePayment.pdf('5717797661310976') File.open('brcode-payment.pdf', 'w') { |file| file.write(pdf) }
pdf = StarkBank.BrcodePayment.pdf!("5717797661310976") file = File.open!("brcode-payment.pdf", [:write]) IO.binwrite(file, pdf) File.close(file)
byte[] pdf = StarkBank.BrcodePayment.Pdf("5717797661310976"); System.IO.File.WriteAllBytes("brcode-payment.pdf", pdf);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/brcodepayment" ) func main() { pdf, err := brcodepayment.Pdf("5717797661310976", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } errFile := ioutil.WriteFile("brcodepayment.pdf", pdf, 0666) if errFile != nil { fmt.Print(errFile) } }
(def file-name "brcode-payment.pdf") (io/make-parents file-name) (io/copy (starkbank.brcode-payment/pdf "5717797661310976") (io/file file-name))
curl --location --request GET '{{baseUrl}}/v2/brcode-payment/5717797661310976/pdf' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Get a paged list of all brcode payment logs. A log tracks a change in the payment entity according to its life cycle.
cursor
limit
after
before
types
paymentIds
fields
import starkbank logs = starkbank.brcodepayment.log.query( after="2021-01-01", before="2021-01-30", payment_ids=["5717797661310976"] ) for log in logs: print(log)
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.brcodePayment.log.query({ after: '2021-01-01', before: '2021-01-30', paymentIds: ['5717797661310976'] }); for await (let log of logs) { console.log(log); } })();
use StarkBank\BrcodePayment; $logs = BrcodePayment\Log::query([ "after" => "2021-01-01", "before" => "2021-01-30", "paymentIds" => ["5717797661310976"] ]); foreach($logs as $log){ print_r($log); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2021-01-01"); params.put("before", "2021-01-30"); params.put("paymentIds", "5717797661310976"); Generator<BrcodePayment.Log> logs = BrcodePayment.Log.query(params); for (BrcodePayment.Log log : logs){ System.out.println(log); }
require('starkbank') logs = StarkBank::BrcodePayment::Log.query( after: "2021-01-01", before: "2021-01-30", payment_ids: %w[5717797661310976] ) logs.each do |log| puts log end
logs = StarkBank.BrcodePayment.Log.query!( after: "2021-01-01", before: "2021-01-30", payment_ids: ["5717797661310976"] ) for log <- logs do log |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.BrcodePayment.Log> logs = StarkBank.BrcodePayment.Log.Query( after: new DateTime(2021, 1, 1), before: new DateTime(2021, 1, 30), paymentIds: new List<string> { "5717797661310976" } ); foreach (StarkBank.BrcodePayment.Log log in logs) { Console.WriteLine(log); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/brcodepayment/log" ) func main() { var params = map[string]interface{}{} params["after"] = "2021-01-01" params["before"] = "2021-01-30" logs := log.Query(params, nil) for log := range logs { fmt.Printf("%+v", log) } }
(def logs (starkbank.brcode-payment.log/query {:after "2021-01-01" :before "2021-01-30"})) (doseq [log logs] (println log))
curl --location --request GET '{{baseUrl}}/v2/brcode-payment/log?paymentIds=5717797661310976&after=2021-01-01&before=2021-01-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2021-01-03 18:36:18.966033, errors=[], id=5172860540682240, payment=BrcodePayment( amount=0, brcode=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created=2021-01-03 18:36:18.574799, description=this will be fast, fee=0, id=5717797661310976, name=None, rules=[ Rule( key=resendingLimit, value=5 ) ], scheduled=2021-01-13 10:00:00, status=canceled, tags=['pix', 'qrcode'], tax_id=***.345.678-**, transaction_ids=[], type=dynamic, updated=2021-01-03 18:36:18.574815 ), type=failed )
Log { id: '5172860540682240', created: '2021-01-03T18:36:18.124698+00:00', type: 'failed', errors: [ ], payment: { id: '5717797661310976', brcode: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF', taxId: '***.345.678-**', name: null, description: 'this will be fast', amount: 0, scheduled: '2021-01-13T10:00:00+00:00', tags: [ 'pix', 'qrcode' ], rules: [ { key: 'resendingLimit', value: 5 } ], status: 'canceled', type: 'dynamic', fee: 0, updated: '2021-01-03T18:36:23.200972+00:00', created: '2021-01-03T18:36:23.200957+00:00', transactionIds: [] } }
StarkBank\BrcodePayment\Log Object ( [id] => 5172860540682240 [created] => DateTime Object ( [date] => 2021-01-03 18:36:18.167983 [timezone_type] => 1 [timezone] => +00:00 ) [type] => failed [errors] => Array ( ) [payment] => StarkBank\BrcodePayment Object ( [id] => 5717797661310976 [brcode] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF [taxId] => ***.345.678-** [description] => this will be fast [amount] => 0 [scheduled] => DateTime Object ( [date] => 2021-01-13 10:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [name] => [tags] => Array ( [0] => pix [1] => qrcode ) [rules] => Array ( [0] => StarkBank\BrcodePayment\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [status] => canceled [type] => dynamic [transactionIds] => Array ( ) [fee] => 0 [updated] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "created": "2021-01-03T18:36:18.481078+00:00", "type": "failed", "errors": [], "payment": { "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "taxId": "***.345.678-**", "description": "this will be fast", "amount": 0, "scheduled": "2021-01-13T10:00:00+00:00", "tags": [ "pix", "qrcode" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "status": "canceled", "name": "", "type": "dynamic", "transactionIds": [], "fee": 0, "updated": "2021-01-03T18:36:18.142541+00:00", "created": "2021-01-03T18:36:18.142526+00:00", "id": "5717797661310976" }, "id": "5172860540682240" })
log( id: 5172860540682240, type: failed, errors: [], payment: brcodepayment( id: 5717797661310976, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, tax_id: ***.345.678-**, description: this will be fast, amount: 0, scheduled: 2021-01-13T10:00:00+00:00, tags: ["pix", "qrcode"], rules: [ rule( key: resendingLimit, value: 5 ) ], name: , status: canceled, type: dynamic, transaction_ids: [], fee: 0, updated: 2021-01-03T18:36:18+00:00, created: 2021-01-03T18:36:18+00:00 ), created: 2021-01-03T18:36:18+00:00 )
%StarkBank.BrcodePayment.Log{ created: ~U[2021-01-03 18:36:18.742789Z], errors: [], id: "5172860540682240", payment: %StarkBank.BrcodePayment{ amount: 0, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created: ~U[2021-01-03 18:36:00.235426Z], description: "this will be fast", fee: 0, id: "5717797661310976", name: "", scheduled: ~U[2021-01-13 10:00:00.000000Z], rules: [ %StarkBank.BrcodePayment.Rules{ key: "resendingLimit", value: 5 } ] status: "canceled", tags: ["pix", "qrcode"], transaction_ids: [], tax_id: "***.345.678-**", type: "dynamic", updated: ~U[2021-01-03 18:36:00.235440Z] }, type: "failed" }
Log( Created: 03/01/2020 18:36:18, Type: failed, Errors: { }, Payment: BrcodePayment( Brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, Tags: { pix, qrcode }, Scheduled: 13/01/2021 10:00:00, Name: null, TaxID: ***.345.678-**, Amount: 0, Rules: Rule( Key: resendingLimit, Value: 5 ) Status: canceled, Type: dynamic, Description: this will be fast, ID: 5717797661310976 Fee: 0, Created: 03/01/2021 18:36:00, Updated: 03/01/2021 18:36:00, TransactionIds: { } ), ID: 5172860540682240 )
{ Id:5172860540682240 Payment:{ Id:5717797661310976 Brcode:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF TaxId:***.345.678-** Description:this will be fast Amount:0 Scheduled:2021-01-13 10:00:00.000000 +0000 +0000 Rules:[ { Key:resendingLimit Value:5 } ] Tags:[pix qrcode] Name: Status:canceled Type:dynamic TransactionIds:[] Fee:0 Updated:2021-01-03 18:36:00.796544 +0000 +0000 Created:2021-01-03 18:36:00.796529 +0000 +0000 } Errors:[] Type:failed Created:2021-01-03 18:36:18.883935 +0000 +0000 }
{ :id 5172860540682240, :created 2021-01-03T18:36:18.092065+00:00, :errors [This payment is not payable anymore], :type failed, :payment { :description this will be fast, :name , :amount 0, :fee 0, :tags [pix, qrcode], :transaction-ids [], :updated 2021-01-03T18:36:00.892863+00:00, :tax-id ***.345.678-**, :type dynamic, :created 2021-01-03T18:36:00.892848+00:00, :status canceled, :id 5717797661310976, :scheduled 2021-01-12T10:00:00.000000+00:00, :brcode 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF } }
{ "cursor": null, "logs": [ { "payment": { "amount": 0, "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "created": "2021-01-03T18:36:00.369014+00:00", "description": "this will be fast", "fee": 0, "id": "5717797661310976", "name": null, "rules": [ { "key": "resendingLimit", "value": 5 } ], "scheduled": "2021-01-13T10:00:00.000000+00:00", "status": "canceled", "tags": ["pix", "qrcode"], "taxId": "***.345.678-**", "transactionIds": [], "type": "dynamic", "updated": "2021-01-03T18:36:00.369028+00:00" }, "errors": [], "type": "failed", "id": "5172860540682240", "created": "2021-01-03T18:36:18.369868+00:00" } ] }
Get a single brcode payment log by its id.
id
fields
import starkbank log = starkbank.brcodepayment.log.get("5172860540682240") print(log)
const starkbank = require('starkbank'); (async() => { let log = await starkbank.brcodePayment.log.get('5172860540682240'); console.log(log); })();
use StarkBank\BrcodePayment; $log = BrcodePayment\Log::get("5172860540682240"); print_r($log);
import com.starkbank.*; BrcodePayment.Log log = BrcodePayment.Log.get("5172860540682240"); System.out.println(log);
require('starkbank') log = StarkBank::BrcodePayment::Log.get('5172860540682240') puts log
log = StarkBank.BrcodePayment.Log.get!("5172860540682240") log |> IO.inspect
using System; StarkBank.BrcodePayment.Log log = StarkBank.BrcodePayment.Log.Get("5172860540682240"); Console.WriteLine(log);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/brcodepayment/log" ) func main() { log, err := log.Get("5172860540682240", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
(def log (starkbank.brcode-payment.log/get "5172860540682240")) (println log)
curl --location --request GET '{{baseUrl}}/v2/brcode-payment/log/5172860540682240' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2021-01-03 18:36:18.966033, errors=[], id=5172860540682240, payment=BrcodePayment( amount=0, brcode=00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created=2021-01-03 18:36:18.574799, description=this will be fast, fee=0, id=5717797661310976, name=None, rules=[ Rule( key=resendingLimit, value=5 ) ], scheduled=2021-01-13 10:00:00, status=canceled, tags=['pix', 'qrcode'], tax_id=***.345.678-**, transaction_ids=[], type=dynamic, updated=2021-01-03 18:36:18.574815 ), type=failed )
Log { id: '5172860540682240', created: '2021-01-03T18:36:18.124698+00:00', type: 'failed', errors: [ ], payment: { id: '5717797661310976', brcode: '00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF', taxId: '***.345.678-**', name: null, description: 'this will be fast', amount: 0, scheduled: '2021-01-13T10:00:00+00:00', tags: [ 'pix', 'qrcode' ], rules: [ { key: 'resendingLimit', value: 5 } ], status: 'canceled', type: 'dynamic', fee: 0, updated: '2021-01-03T18:36:23.200972+00:00', created: '2021-01-03T18:36:23.200957+00:00', transactionIds: [] } }
StarkBank\BrcodePayment\Log Object ( [id] => 5172860540682240 [created] => DateTime Object ( [date] => 2021-01-03 18:36:18.167983 [timezone_type] => 1 [timezone] => +00:00 ) [type] => failed [errors] => Array ( ) [payment] => StarkBank\BrcodePayment Object ( [id] => 5717797661310976 [brcode] => 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF [taxId] => ***.345.678-** [description] => this will be fast [amount] => 0 [scheduled] => DateTime Object ( [date] => 2021-01-13 10:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [name] => [tags] => Array ( [0] => pix [1] => qrcode ) [rules] => Array ( [0] => StarkBank\BrcodePayment\Rule Object ( [key] => resendingLimit [value] => 5 ) ) [status] => canceled [type] => dynamic [transactionIds] => Array ( ) [fee] => 0 [updated] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-01-03 18:36:18.739116 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "created": "2021-01-03T18:36:18.481078+00:00", "type": "failed", "errors": [], "payment": { "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "taxId": "***.345.678-**", "description": "this will be fast", "amount": 0, "scheduled": "2021-01-13T10:00:00+00:00", "tags": [ "pix", "qrcode" ], "rules": [ { "key": "resendingLimit", "value": 5 } ], "status": "canceled", "name": "", "type": "dynamic", "transactionIds": [], "fee": 0, "updated": "2021-01-03T18:36:18.142541+00:00", "created": "2021-01-03T18:36:18.142526+00:00", "id": "5717797661310976" }, "id": "5172860540682240" })
log( id: 5172860540682240, type: failed, errors: [], payment: brcodepayment( id: 5717797661310976, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, tax_id: ***.345.678-**, description: this will be fast, amount: 0, scheduled: 2021-01-13T10:00:00+00:00, tags: ["pix", "qrcode"], rules: [ rule( key: resendingLimit, value: 5 ) ], name: , status: canceled, type: dynamic, transaction_ids: [], fee: 0, updated: 2021-01-03T18:36:18+00:00, created: 2021-01-03T18:36:18+00:00 ), created: 2021-01-03T18:36:18+00:00 )
%StarkBank.BrcodePayment.Log{ created: ~U[2021-01-03 18:36:18.742789Z], errors: [], id: "5172860540682240", payment: %StarkBank.BrcodePayment{ amount: 0, brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, created: ~U[2021-01-03 18:36:00.235426Z], description: "this will be fast", fee: 0, id: "5717797661310976", name: "", scheduled: ~U[2021-01-13 10:00:00.000000Z], rules: [ %StarkBank.BrcodePayment.Rules{ key: "resendingLimit", value: 5 } ] status: "canceled", tags: ["pix", "qrcode"], transaction_ids: [], tax_id: "***.345.678-**", type: "dynamic", updated: ~U[2021-01-03 18:36:00.235440Z] }, type: "failed" }
Log( Created: 03/01/2020 18:36:18, Type: failed, Errors: { }, Payment: BrcodePayment( Brcode: 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF, Tags: { pix, qrcode }, Scheduled: 13/01/2021 10:00:00, Name: null, TaxID: ***.345.678-**, Amount: 0, Rules: Rule( Key: resendingLimit, Value: 5 ) Status: canceled, Type: dynamic, Description: this will be fast, ID: 5717797661310976, Fee: 0, Created: 03/01/2021 18:36:00, Updated: 03/01/2021 18:36:00, TransactionIds: { } ), ID: 5172860540682240 )
{ Id:5172860540682240 Payment:{ Id:5717797661310976 Brcode:00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF TaxId:***.345.678-** Description:this will be fast Amount:0 Scheduled:2021-01-13 10:00:00.000000 +0000 +0000 Rules:[ { Key:resendingLimit Value:5 } ] Tags:[pix qrcode] Name: Status:canceled Type:dynamic TransactionIds:[] Fee:0 Updated:2021-01-03 18:36:00.796544 +0000 +0000 Created:2021-01-03 18:36:00.796529 +0000 +0000 } Errors:[] Type:failed Created:2021-01-03 18:36:18.883935 +0000 +0000 }
{ :id 5172860540682240, :created 2021-01-03T18:36:18.092065+00:00, :errors [This payment is not payable anymore], :type failed, :payment { :description this will be fast, :name , :amount 0, :fee 0, :tags [pix, qrcode], :transaction-ids [], :updated 2021-01-03T18:36:00.892863+00:00, :tax-id ***.345.678-**, :type dynamic, :created 2021-01-03T18:36:00.892848+00:00, :status canceled, :id 5717797661310976, :scheduled 2021-01-12T10:00:00.000000+00:00, :brcode 00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF } }
{ "cursor": null, "logs": [ { "payment": { "amount": 0, "brcode": "00020101021226890014br.gov.bcb.pix2567brcode-h.sandbox.starkinfra.com/v2/ace289aac1ce453b9ca64fb12ec525855204000053039865802BR5925Stark Bank S.A. - Institu6009Sao Paulo62070503***63044DDF", "created": "2021-01-03T18:36:00.369014+00:00", "description": "this will be fast", "fee": 0, "id": "5717797661310976", "name": null, "rules": [ { "key": "resendingLimit", "value": 5 } ], "scheduled": "2021-01-13T10:00:00.000000+00:00", "status": "canceled", "tags": ["pix", "qrcode"], "taxId": "***.345.678-**", "transactionIds": [], "type": "dynamic", "updated": "2021-01-03T18:36:00.369028+00:00" }, "errors": [], "type": "failed", "id": "5172860540682240", "created": "2021-01-03T18:36:18.369868+00:00" } ] }
Here we will teach you how to create and manage boleto payments.
Use this route to pay registered boletos generated at Stark Bank or at other financial institutions using the available balance in your Stark Bank account.
line
barCode
taxId
description
tags
scheduled
amount
import starkbank payments = starkbank.boletopayment.create([ starkbank.BoletoPayment( line="34191.09107 05447.947309 71544.640008 8 84660000011631", tax_id="38.435.677/0001-25", tags=["little girl", "no one"], description="Payment for killing white walkers", scheduled="2020-04-25" ) ]) for payment in payments: print(payment)
const starkbank = require('starkbank'); (async() => { let payments = await starkbank.boletoPayment.create([ { taxId: '38.435.677/0001-25', description: 'Payment for killing white walkers', scheduled: '2020-04-25', line: '34191.09107 05447.947309 71544.640008 8 84660000011631', tags: ['little girl', 'no one'], } ]) for (let payment of payments) { console.log(payment); } })();
$payments = StarkBank\BoletoPayment::create([ new StarkBank\BoletoPayment([ "line" => "34191.09107 05447.947309 71544.640008 8 84660000011631", "taxId" => "38.435.677/0001-25", "scheduled" => "2020-04-25", "description" => "Payment for killing white walkers", "tags" => ["little girl", "no one"], ]) ]); foreach($payments as $payment){ print_r($payment); }
import com.starkbank.*; List<BoletoPayment> payments = new ArrayList<>(); HashMap<String, Object> data = new HashMap<>(); data.put("line", "34191.09107 05447.947309 71544.640008 8 84660000011631"); data.put("taxId", "38.435.677/0001-25"); data.put("scheduled", "2020-04-25"); data.put("description", "Payment for killing white walkers"); data.put("tags", new String[]{"little girl", "no one"}); payments.add(new BoletoPayment(data)); payments = BoletoPayment.create(payments); for (BoletoPayment payment : payments){ System.out.println(payment); }
require('starkbank') payments = StarkBank::BoletoPayment.create( [ StarkBank::BoletoPayment.new( line: '34191.09107 05447.947309 71544.640008 8 84660000011631', tax_id: '38.435.677/0001-25', scheduled: '2020-04-25', description: 'Payment for killing white walkers', tags: ['little girl', 'no one'] ) ] ) payments.each do |payment| puts payment end
payments = StarkBank.BoletoPayment.create!([ %StarkBank.BoletoPayment{ line: "34191.09107 05447.947309 71444.640008 8 84660000011631", tax_id: "38.435.677/0001-25", scheduled: "2020-04-25", description: "Payment for killing white walkers", tags: ["little girl", "no one"] } ]) for payment <- payments do payment |> IO.inspect end
using System; using System.Collections.Generic; List<StarkBank.BoletoPayment> payments = StarkBank.BoletoPayment.Create( new List<StarkBank.BoletoPayment>() { new BoletoPayment( line: "34191.09107 05447.947309 71444.640008 8 84660000011631", scheduled: DateTime.Today.Date.AddDays(1), description: "Payment for killing white walkers", taxID: "38.435.677/0001-25", tags: new List<string> { "little girl", "no one" } ) } ); foreach(StarkBank.BoletoPayment payment in payments) { Console.WriteLine(payment); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletopayment" ) func main() { payments, err := boletopayment.Create( []boletopayment.boletopayment{ { TaxId: "38.435.677/0001-25", Description: "Payment for killing white walkers", Line: "34191.09107 05447.947309 71544.640008 8 84660000011631", Tags: []string{"little girl", "no one"}, Scheduled: "2020-04-25", }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, payment := range payments { fmt.Printf("%+v", payment) } }
(def payments (starkbank.boleto-payment/create [ { :line "34191.09107 05447.947309 71544.640008 8 84660000011631" :tax-id "38.435.677/0001-25" :scheduled "2020-04-25" :description "Payment for killing white walkers" :tags ["little girl" "no one"] } ])) (dorun (map println payments))
curl --location --request POST '{{baseUrl}}/v2/boleto-payment' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "payments": [ { "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", "taxId": "38.435.677/0001-25", "tags": ["little girl", "no one"], "description": "Payment for killing white walkers", "scheduled": "2020-04-25" }, ] }'
BoletoPayment( amount=11631, bar_code=34198846600000116311091005447947307154464000, created=2020-04-24 17:58:32.007153, description=Payment for killing white walkers, fee=0, id=6693962735681536, line=34191.09107 05447.947309 71544.640008 8 84660000011631, scheduled=2020-04-25 15:00:00, status=created, tags=['little girl', 'no one'], transaction_ids=[], tax_id=38.435.677/0001-25 )
BoletoPayment { id: '6693962735681536', taxId: '38.435.677/0001-25', description: 'Payment for killing white walkers', line: '34191.09107 05447.947309 71544.640008 8 84660000011631', barCode: '34198846600000116311091005447947307154464000', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'little girl', 'no one' ], transactionIds: [], status: 'created', amount: 11631, fee: 0, created: '2020-04-24T01:33:40.611174+00:00' }
StarkBank\BoletoPayment Object ( [id] => 6693962735681536 [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631 [taxId] => 38.435.677/0001-25 [barCode] => 34198846600000116311091005447947307154464000 [description] => Payment for killing white walkers [tags] => Array ( [0] => little girl [1] => no one ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [amount] => 11631 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 18:35:37.166061 [timezone_type] => 1 [timezone] => +00:00 ) )
BoletoPayment({ "id": "6693962735681536", "taxId": "38.435.677/0001-25", "description": "Payment for killing white walkers", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", "barCode": "34198846600000116311091005447947307154464000", "scheduled": "2020-04-25T15:00:00+00:00", "tags": ["little girl", "no one"], "transactionIds": [], "status": "created", "amount": 11631, "fee": 0, "created": "2020-04-24T00:57:48+00:00" })
boletopayment( id: 6693962735681536, tax_id: 38.435.677/0001-25, description: Payment for killing white walkers, line: 34191.09107 05447.947309 71544.640008 8 84660000011631, bar_code: 34198846600000116311091005447947307154464000, scheduled: 2020-04-25T15:00:00+00:00, tags: ["little girl", "no one"], transaction_ids: [], status: created, amount: 11631, fee: 0, created: 2020-04-24T00:57:48+00:00 )
%StarkBank.BoletoPayment{ amount: 11631, bar_code: "34198846600000116311091005447947307154464000", created: ~U[2020-04-24 17:29:22.713657Z], description: "Payment for killing white walkers", fee: 0, id: "6693962735681536", line: "34191.09107 05447.947309 71544.640008 8 84660000011631", scheduled: ~U[2020-04-25 15:00:00Z], status: "created", tags: ["little girl", "no one"], transaction_ids: [], tax_id: "38.435.677/0001-25" }
BoletoPayment( Amount: 11631, Description: Payment for killing white walkers, TaxID: 38.435.677/0001-25, Line: 34191.09107 05447.947309 71544.640008 8 84660000011631, BarCode: 34198846600000116311091005447947307154464000, Scheduled: 04/25/2020 15:00:00, Tags: { little girl, no one }, TransactionIds: { }, Status: created, Fee: 0, Created: 04/24/2020 13:39:28, ID: 6693962735681536 )
{ Id:6693962735681536 Line:34191.09107 05447.947309 71544.640008 8 84660000011631 BarCode:34198846600000116311091005447947307154464000 TaxId:38.435.677/0001-25 Description:Payment for killing white walkers Amount:11631 Scheduled:2020-04-25 15:00:00.00000 +0000 +0000 Tags:[little girl no one] TransactionIds:[] Status:created Fee:0, Created:2020-04-24 15:32:37.718634 +0000 +0000 }
{:description "Payment for killing white walkers", :fee 0, :tags ["little girl" "no one"], :tax-id "38.435.677/0001-25", :created "2020-04-24T19:27:53.013692+00:00", :line "34191.09107 05447.947309 71544.640008 8 84660000011631", :status "created", :id "6693962735681536", :scheduled "2020-04-25T15:00:00.000000+00:00", :bar-code "34198846600000116311091005447947307154464000"}
{ "message": "Boleto Payment(s) successfully created", "payments": [ { "id": "6693962735681536", "status": "created", "amount": 11631, "fee": 0, "description": "Payment for killing white walkers", "tags": ["little girl", "no one"], "transactionIds": [], "created": "2020-04-24T01:37:21.146576+00:00", "scheduled": "2020-04-25T15:00:00+00:00", "taxId": "38.435.677/0001-25", "barCode": "34198846600000116311091005447947307154464000", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", } ] }
Get a list of non-deleted boleto payments in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
fields
import starkbank payments = starkbank.boletopayment.query( after="2020-04-01", before="2020-04-30" ) for payment in payments: print(payment)
const starkbank = require('starkbank'); (async() => { let payments = await starkbank.boletoPayment.query({ after: '2020-04-01', before: '2020-04-30', }); for await (let payment of payments) { console.log(payment); } })();
$payments = StarkBank\BoletoPayment::query([ "after" => "2020-04-01", "before" => "2020-04-30" ]); foreach($payments as $payment){ print_r($payment); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2020-04-01"); params.put("before", "2020-04-30"); Generator<BoletoPayment> payments = BoletoPayment.query(params); for (BoletoPayment payment : payments){ System.out.println(payment); }
require('starkbank') payments = StarkBank::BoletoPayment.query( after: '2020-04-01', before: '2020-04-30' ) payments.each do |payment| puts payment end
payments = StarkBank.BoletoPayment.query!( after: "2020-04-01", before: "2020-04-30" ) for payment <- payments do payment |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.BoletoPayment> payments = StarkBank.BoletoPayment.Query( after: new DateTime(2020, 4, 1), before: new DateTime(2020, 4, 30) ); foreach (StarkBank.BoletoPayment payment in payments) { Console.WriteLine(payment); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletopayment" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-04-01" params["before"] = "2020-04-30" payments := boletopayment.Query(params, nil) for payment := range payments { fmt.Printf("%+v", payment) } }
(def payments (starkbank.boleto-payment/query { :after "2020-04-01" :before "2020-04-30" })) (dorun (map println payments))
curl --location --request GET '{{baseUrl}}/v2/boleto-payment?after=2020-01-01&before=2020-01-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
BoletoPayment( amount=11631, bar_code=34198846600000116311091005447947307154464000, created=2020-04-24 17:58:32.007153, description=Payment for killing white walkers, fee=0, id=6693962735681536, line=34191.09107 05447.947309 71544.640008 8 84660000011631, scheduled=2020-04-25 15:00:00, status=created, tags=['little girl', 'no one'], transaction_ids=[], tax_id=38.435.677/0001-25 )
BoletoPayment { id: '6693962735681536', taxId: '38.435.677/0001-25', description: 'Payment for killing white walkers', line: '34191.09107 05447.947309 71544.640008 8 84660000011631', barCode: '34198846600000116311091005447947307154464000', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'little girl', 'no one' ], transactionIds: [], status: 'created', amount: 11631, fee: 0, created: '2020-04-24T01:33:40.611174+00:00' }
StarkBank\BoletoPayment Object ( [id] => 6693962735681536 [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631 [taxId] => 38.435.677/0001-25 [barCode] => 34198846600000116311091005447947307154464000 [description] => Payment for killing white walkers [tags] => Array ( [0] => little girl [1] => no one ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [amount] => 11631 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 18:35:37.166061 [timezone_type] => 1 [timezone] => +00:00 ) )
BoletoPayment({ "id": "6693962735681536", "taxId": "38.435.677/0001-25", "description": "Payment for killing white walkers", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", "barCode": "34198846600000116311091005447947307154464000", "scheduled": "2020-04-25T15:00:00+00:00", "tags": ["little girl", "no one"], "transactionIds": [], "status": "created", "amount": 11631, "fee": 0, "created": "2020-04-24T00:57:48+00:00" })
boletopayment( id: 6693962735681536, tax_id: 38.435.677/0001-25, description: Payment for killing white walkers, line: 34191.09107 05447.947309 71544.640008 8 84660000011631, bar_code: 34198846600000116311091005447947307154464000, scheduled: 2020-04-25T15:00:00+00:00, tags: ["little girl", "no one"], transaction_ids: [], status: created, amount: 11631, fee: 0, created: 2020-04-24T00:57:48+00:00 )
%StarkBank.BoletoPayment{ amount: 11631, bar_code: "34198846600000116311091005447947307154464000", created: ~U[2020-04-24 17:29:22.713657Z], description: "Payment for killing white walkers", fee: 0, id: "6693962735681536", line: "34191.09107 05447.947309 71544.640008 8 84660000011631", scheduled: ~U[2020-04-25 15:00:00Z], status: "created", tags: ["little girl", "no one"], transaction_ids: [], tax_id: "38.435.677/0001-25" }
BoletoPayment( Amount: 11631, Description: Payment for killing white walkers, TaxID: 38.435.677/0001-25, Line: 34191.09107 05447.947309 71544.640008 8 84660000011631, BarCode: 34198846600000116311091005447947307154464000, Scheduled: 04/25/2020 15:00:00, Tags: { little girl, no one }, TransactionIds: { }, Status: created, Fee: 0, Created: 04/24/2020 13:39:28, ID: 6693962735681536 )
{ Id:6693962735681536 Line:34191.09107 05447.947309 71544.640008 8 84660000011631 BarCode:34198846600000116311091005447947307154464000 TaxId:38.435.677/0001-25 Description:Payment for killing white walkers Amount:11631 Scheduled:2020-04-25 15:00:00.00000 +0000 +0000 Tags:[little girl no one] TransactionIds:[] Status:created Fee:0, Created:2020-04-24 15:32:37.718634 +0000 +0000 }
{:description "Payment for killing white walkers", :fee 0, :tags ["little girl" "no one"], :tax-id "38.435.677/0001-25", :created "2020-04-24T19:27:53.013692+00:00", :line "34191.09107 05447.947309 71544.640008 8 84660000011631", :status "created", :id "6693962735681536", :scheduled "2020-04-25T15:00:00.000000+00:00", :bar-code "34198846600000116311091005447947307154464000"}
{ "cursor": null, "payments": [ { "id": "6693962735681536", "status": "created", "amount": 11631, "fee": 0, "description": "Payment for killing white walkers", "tags": ["little girl", "no one"], "transactionIds": [], "created": "2020-04-24T01:37:21.146576+00:00", "scheduled": "2020-04-25T15:00:00+00:00", "taxId": "38.435.677/0001-25", "barCode": "34198846600000116311091005447947307154464000", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", } ] }
Get a single boleto payment by its id.
id
fields
import starkbank payment = starkbank.boletopayment.get("6693962735681536") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.boletoPayment.get('6693962735681536'); console.log(payment); })();
$payment = StarkBank\BoletoPayment::get("6693962735681536"); print_r($payment);
import com.starkbank.*; BoletoPayment payment = BoletoPayment.get("6693962735681536"); System.out.println(payment);
require('starkbank') payment = StarkBank::BoletoPayment.get('6693962735681536') puts payment
payment = StarkBank.BoletoPayment.get!("6693962735681536") payment |> IO.inspect
using System; StarkBank.BoletoPayment payment = StarkBank.BoletoPayment.Get("6693962735681536"); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletopayment" ) func main() { payment, err := boletopayment.Get("6693962735681536", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.boleto-payment/get "6693962735681536")) (println payment)
curl --location --request GET '{{baseUrl}}/v2/boleto-payment/6693962735681536' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
BoletoPayment( amount=11631, bar_code=34198846600000116311091005447947307154464000, created=2020-04-24 17:58:32.007153, description=Payment for killing white walkers, fee=0, id=6693962735681536, line=34191.09107 05447.947309 71544.640008 8 84660000011631, scheduled=2020-04-25 15:00:00, status=created, tags=['little girl', 'no one'], transaction_ids=[], tax_id=38.435.677/0001-25 )
BoletoPayment { id: '6693962735681536', taxId: '38.435.677/0001-25', description: 'Payment for killing white walkers', line: '34191.09107 05447.947309 71544.640008 8 84660000011631', barCode: '34198846600000116311091005447947307154464000', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'little girl', 'no one' ], transactionIds: [], status: 'created', amount: 11631, fee: 0, created: '2020-04-24T01:33:40.611174+00:00' }
StarkBank\BoletoPayment Object ( [id] => 6693962735681536 [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631 [taxId] => 38.435.677/0001-25 [barCode] => 34198846600000116311091005447947307154464000 [description] => Payment for killing white walkers [tags] => Array ( [0] => little girl [1] => no one ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [amount] => 11631 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 18:35:37.166061 [timezone_type] => 1 [timezone] => +00:00 ) )
BoletoPayment({ "id": "6693962735681536", "taxId": "38.435.677/0001-25", "description": "Payment for killing white walkers", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", "barCode": "34198846600000116311091005447947307154464000", "scheduled": "2020-04-25T15:00:00+00:00", "tags": ["little girl", "no one"], "transactionIds": [], "status": "created", "amount": 11631, "fee": 0, "created": "2020-04-24T00:57:48+00:00" })
boletopayment( id: 6693962735681536, tax_id: 38.435.677/0001-25, description: Payment for killing white walkers, line: 34191.09107 05447.947309 71544.640008 8 84660000011631, bar_code: 34198846600000116311091005447947307154464000, scheduled: 2020-04-25T15:00:00+00:00, tags: ["little girl", "no one"], transaction_ids: [], status: created, amount: 11631, fee: 0, created: 2020-04-24T00:57:48+00:00 )
%StarkBank.BoletoPayment{ amount: 11631, bar_code: "34198846600000116311091005447947307154464000", created: ~U[2020-04-24 17:29:22.713657Z], description: "Payment for killing white walkers", fee: 0, id: "6693962735681536", line: "34191.09107 05447.947309 71544.640008 8 84660000011631", scheduled: ~U[2020-04-25 15:00:00Z], status: "created", tags: ["little girl", "no one"], transaction_ids: [], tax_id: "38.435.677/0001-25" }
BoletoPayment( Amount: 11631, Description: Payment for killing white walkers, TaxID: 38.435.677/0001-25, Line: 34191.09107 05447.947309 71544.640008 8 84660000011631, BarCode: 34198846600000116311091005447947307154464000, Scheduled: 04/25/2020 15:00:00, Tags: { little girl, no one }, TransactionIds: { }, Status: created, Fee: 0, Created: 04/24/2020 13:39:28, ID: 6693962735681536 )
{ Id:6693962735681536 Line:34191.09107 05447.947309 71544.640008 8 84660000011631 BarCode:34198846600000116311091005447947307154464000 TaxId:38.435.677/0001-25 Description:Payment for killing white walkers Amount:11631 Scheduled:2020-04-25 15:00:00.00000 +0000 +0000 Tags:[little girl no one] TransactionIds:[] Status:created Fee:0, Created:2020-04-24 15:32:37.718634 +0000 +0000 }
{:description "Payment for killing white walkers", :fee 0, :tags ["little girl" "no one"], :tax-id "38.435.677/0001-25", :created "2020-04-24T19:27:53.013692+00:00", :line "34191.09107 05447.947309 71544.640008 8 84660000011631", :status "created", :id "6693962735681536", :scheduled "2020-04-25T15:00:00.000000+00:00", :bar-code "34198846600000116311091005447947307154464000"}
{ "payment": { "id": "6693962735681536", "status": "created", "amount": 11631, "fee": 0, "description": "Payment for killing white walkers", "tags": ["little girl", "no one"], "transactionIds": [], "created": "2020-04-24T01:37:21.146576+00:00", "scheduled": "2020-04-25T15:00:00+00:00", "taxId": "38.435.677/0001-25", "barCode": "34198846600000116311091005447947307154464000", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", } }
Cancel a scheduled boleto payment. You can only cancel boleto payments before they start being processed.
id
import starkbank payment = starkbank.boletopayment.delete("6693962735681536") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.boletoPayment.delete('6693962735681536'); console.log(payment); })();
$payment = StarkBank\BoletoPayment::delete("6693962735681536"); print_r($payment);
import com.starkbank.*; BoletoPayment payment = BoletoPayment.delete("6693962735681536"); System.out.println(payment);
require('starkbank') payment = StarkBank::BoletoPayment.delete('6693962735681536') puts payment
payment = StarkBank.BoletoPayment.delete!("6693962735681536") payment |> IO.inspect
using System; StarkBank.BoletoPayment payment = StarkBank.BoletoPayment.Delete("6693962735681536"); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletopayment" ) func main() { payment, err := boletopayment.Delete("6693962735681536", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.boleto-payment/delete "6693962735681536")) (println payment)
curl --location --request DELETE '{{baseUrl}}/v2/boleto-payment/6693962735681536' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
BoletoPayment( amount=11631, bar_code=34198846600000116311091005447947307154464000, created=2020-04-24 17:58:32.007153, description=Payment for killing white walkers, fee=0, id=6693962735681536, line=34191.09107 05447.947309 71544.640008 8 84660000011631, scheduled=2020-04-25 15:00:00, status=canceled, tags=['little girl', 'no one'], transaction_ids=[], tax_id=38.435.677/0001-25 )
BoletoPayment { id: '6693962735681536', taxId: '38.435.677/0001-25', description: 'Payment for killing white walkers', line: '34191.09107 05447.947309 71544.640008 8 84660000011631', barCode: '34198846600000116311091005447947307154464000', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'little girl', 'no one' ], transactionIds: [], status: 'canceled', amount: 11631, fee: 0, created: '2020-04-24T01:33:40.611174+00:00' }
StarkBank\BoletoPayment Object ( [id] => 6693962735681536 [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631 [taxId] => 38.435.677/0001-25 [barCode] => 34198846600000116311091005447947307154464000 [description] => Payment for killing white walkers [tags] => Array ( [0] => little girl [1] => no one ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => canceled [amount] => 11631 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 18:35:37.166061 [timezone_type] => 1 [timezone] => +00:00 ) )
BoletoPayment({ "id": "6693962735681536", "taxId": "38.435.677/0001-25", "description": "Payment for killing white walkers", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", "barCode": "34198846600000116311091005447947307154464000", "scheduled": "2020-04-25T15:00:00+00:00", "tags": ["little girl", "no one"], "transactionIds": [], "status": "canceled", "amount": 11631, "fee": 0, "created": "2020-04-24T00:57:48+00:00" })
boletopayment( id: 6693962735681536, tax_id: 38.435.677/0001-25, description: Payment for killing white walkers, line: 34191.09107 05447.947309 71544.640008 8 84660000011631, bar_code: 34198846600000116311091005447947307154464000, scheduled: 2020-04-25T15:00:00+00:00, tags: ["little girl", "no one"], transaction_ids: [], status: canceled, amount: 11631, fee: 0, created: 2020-04-24T00:57:48+00:00 )
%StarkBank.BoletoPayment{ amount: 11631, bar_code: "34198846600000116311091005447947307154464000", created: ~U[2020-04-24 17:29:22.713657Z], description: "Payment for killing white walkers", fee: 0, id: "6693962735681536", line: "34191.09107 05447.947309 71544.640008 8 84660000011631", scheduled: ~U[2020-04-25 15:00:00Z], status: "canceled", tags: ["little girl", "no one"], transaction_ids: [], tax_id: "38.435.677/0001-25" }
BoletoPayment( Amount: 11631, Description: Payment for killing white walkers, TaxID: 38.435.677/0001-25, Line: 34191.09107 05447.947309 71544.640008 8 84660000011631, BarCode: 34198846600000116311091005447947307154464000, Scheduled: 04/25/2020 15:00:00, Tags: { little girl, no one }, TransactionIds: { }, Status: canceled, Fee: 0, Created: 04/24/2020 13:39:28, ID: 6693962735681536 )
{ Id:6693962735681536 Line:34191.09107 05447.947309 71544.640008 8 84660000011631 BarCode:34198846600000116311091005447947307154464000 TaxId:38.435.677/0001-25 Description:Payment for killing white walkers Amount:11631 Scheduled:2020-04-25 15:00:00.00000 +0000 +0000 Tags:[little girl no one] TransactionIds:[] Status:canceled Fee:0, Created:2020-04-24 15:32:37.718634 +0000 +0000 }
{:description "Payment for killing white walkers", :fee 0, :tags ["little girl" "no one"], :tax-id "38.435.677/0001-25", :created "2020-04-24T19:27:53.013692+00:00", :line "34191.09107 05447.947309 71544.640008 8 84660000011631", :status "canceled", :id "6693962735681536", :scheduled "2020-04-25T15:00:00.000000+00:00", :bar-code "34198846600000116311091005447947307154464000"}
{ "message": "Boleto Payment successfully deleted", "payment": { "id": "6693962735681536", "status": "canceled", "amount": 11631, "fee": 0, "description": "Payment for killing white walkers", "tags": ["little girl", "no one"], "transactionIds": [], "created": "2020-04-24T01:37:21.146576+00:00", "scheduled": "2020-04-25T15:00:00+00:00", "taxId": "38.435.677/0001-25", "barCode": "34198846600000116311091005447947307154464000", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", } }
Get a boleto payment PDF receipt. You can only get a receipt for payments whose status are either success, processing or created.
id
import starkbank pdf = starkbank.boletopayment.pdf("6693962735681536") with open("boleto-payment.pdf", "wb") as file: file.write(pdf)
const starkbank = require('starkbank'); const fs = require('fs').promises; (async() => { let pdf = await starkbank.boletoPayment.pdf('6693962735681536'); await fs.writeFile('boleto-payment.pdf', pdf); })();
$pdf = StarkBank\BoletoPayment::pdf("6693962735681536"); $fp = fopen('boleto-payment.pdf', 'w'); fwrite($fp, $pdf); fclose($fp);
import java.io.File; import java.io.InputStream; import java.nio.file.StandardCopyOption; import com.starkbank.*; InputStream pdf = BoletoPayment.pdf("6693962735681536"); java.nio.file.Files.copy( pdf, new File("boleto-payment.pdf").toPath(), StandardCopyOption.REPLACE_EXISTING );
require('starkbank') pdf = StarkBank::BoletoPayment.pdf('6693962735681536') File.open('boleto-payment.pdf', 'w') { |file| file.write(pdf) }
pdf = StarkBank.BoletoPayment.pdf!("6693962735681536") file = File.open!("boleto-payment.pdf", [:write]) IO.binwrite(file, pdf) File.close(file)
byte[] pdf = StarkBank.BoletoPayment.Pdf("6693962735681536"); System.IO.File.WriteAllBytes("boleto-payment.pdf", pdf);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletopayment" ) func main() { pdf, err := boletopayment.Pdf("6693962735681536", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } errFile := ioutil.WriteFile("boletopayment.pdf", pdf, 0666) if errFile != nil { fmt.Print(errFile) } }
(clojure.java.io/copy (starkbank.boleto-payment/pdf "6693962735681536") (clojure.java.io/file "boleto-payment.pdf"))
curl --location --request GET '{{baseUrl}}/v2/boleto-payment/6693962735681536/pdf' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Get a paged list of all boleto payment logs. A log tracks a change in the payment entity according to its life cycle.
cursor
limit
after
before
types
paymentIds
fields
import starkbank logs = starkbank.boletopayment.log.query( payment_ids=["6693962735681536"] ) for log in logs: print(log)
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.boletoPayment.log.query({ paymentIds: ['6693962735681536'], }); for await (let log of logs) { console.log(log); } })();
$logs = StarkBank\BoletoPayment\Log::query([ "paymentIds" => ["6693962735681536"] ]); foreach($logs as $log){ print_r($log); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("paymentIds", "6693962735681536"); Generator<BoletoPayment.Log> logs = BoletoPayment.Log.query(params); for (BoletoPayment.Log log : logs){ System.out.println(log); }
require('starkbank') logs = StarkBank::BoletoPayment::Log.query( payment_ids: ['6693962735681536'] ) logs.each do |log| puts log end
logs = StarkBank.BoletoPayment.Log.query!( payment_ids: ["6693962735681536"] ) for log <- logs do log |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.BoletoPayment.Log> logs = StarkBank.BoletoPayment.Log.Query( paymentIds: new List<string> { "6260312504270848" } ); foreach(StarkBank.BoletoPayment.Log log in logs) { Console.WriteLine(log); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletopayment/log" ) func main() { var params = map[string]interface{}{} params["paymentIds"] = []string{"6693962735681536"} logs := log.Query(params, nil) for log := range logs { fmt.Printf("%+v", log) } }
(def logs (starkbank.boleto-payment.log/query { :payment-ids ["6693962735681536"] })) (dorun (map println logs))
curl --location --request GET '{{baseUrl}}/v2/boleto-payment/log?paymentIds=6693962735681536' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( id=5260913007394816, created=2020-04-24 17:58:32.075347, errors=[], type=created, payment=BoletoPayment( amount=11631, bar_code=34198846600000116311091005447947307154464000, created=2020-04-24 17:58:32.007153, description=Payment for killing white walkers, fee=0, id=6693962735681536, line=34191.09107 05447.947309 71544.640008 8 84660000011631, scheduled=2020-04-25 15:00:00, status=created, tags=['little girl', 'no one'], transaction_ids=[], tax_id=38.435.677/0001-25 ) )
Log { id: '5260913007394816', created: '2020-04-24T01:37:06.423525+00:00', type: 'created', errors: [], payment: { id: '6693962735681536', taxId: '38.435.677/0001-25', description: 'Payment for killing white walkers', line: '34191.09107 05447.947309 71544.640008 8 84660000011631', barCode: '34198846600000116311091005447947307154464000', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'little girl', 'no one' ], transactionIds: [], status: 'created', amount: 11631, fee: 0, created: '2020-04-24T01:33:40.611174+00:00' } }
StarkBank\BoletoPayment\Log Object ( [id] => 5260913007394816 [created] => DateTime Object ( [date] => 2020-04-24 18:35:37.252968 [timezone_type] => 1 [timezone] => +00:00 ) [type] => created [errors] => Array ( ) [payment] => StarkBank\BoletoPayment Object ( [id] => 6693962735681536 [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631 [taxId] => 38.435.677/0001-25 [barCode] => 34198846600000116311091005447947307154464000 [description] => Payment for killing white walkers [tags] => Array ( [0] => little girl [1] => no one ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [amount] => 11631 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 18:35:37.166061 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "id": "5260913007394816", "created": "2020-04-24T00:57:48+00:00", "type": "created", "errors": [], "payment": { "id": "6693962735681536", "taxId": "38.435.677/0001-25", "description": "Payment for killing white walkers", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", "barCode": "34198846600000116311091005447947307154464000", "scheduled": "2020-04-25T15:00:00+00:00", "tags": ["little girl", "no one"], "transactionIds": [], "status": "created", "amount": 11631, "fee": 0, "created": "2020-04-24T00:57:48+00:00" } })
log( id: 5260913007394816, created: 2020-04-24T00:57:48+00:00, type: created, errors: [], payment: boletopayment( id: 6693962735681536, tax_id: 38.435.677/0001-25, description: Payment for killing white walkers, line: 34191.09107 05447.947309 71544.640008 8 84660000011631, bar_code: 34198846600000116311091005447947307154464000, scheduled: 2020-04-25T15:00:00+00:00, tags: ["little girl", "no one"], transaction_ids: [], status: created, amount: 11631, fee: 0, created: 2020-04-24T00:57:48+00:00 ) )
%StarkBank.BoletoPayment.Log{ id: "5260913007394816", created: ~U[2020-04-24 17:29:22.831884Z], errors: [], type: "created", payment: %starkbank.boletopayment{ amount: 11631, bar_code: "34198846600000116311091005447947307154464000", created: ~U[2020-04-24 17:29:22.713657Z], description: "Payment for killing white walkers", fee: 0, id: "6693962735681536", line: "34191.09107 05447.947309 71544.640008 8 84660000011631", scheduled: ~U[2020-04-25 15:00:00Z], status: "created", tags: ["little girl", "no one"], transaction_ids: [], tax_id: "38.435.677/0001-25" } }
Log( ID: 5260913007394816, Created: 24/04/2020 12:41:52, Type: created, Errors: { }, Payment: BoletoPayment( Amount: 11631, Description: Payment for killing white walkers, TaxID: 38.435.677/0001-25, Line: 34191.09107 05447.947309 71544.640008 8 84660000011631, BarCode: 34198846600000116311091005447947307154464000, Scheduled: 04/25/2020 15:00:00, Tags: { little girl, no one }, TransactionIds: { }, Status: created, Fee: 0, Created: 04/24/2020 13:39:28, ID: 6693962735681536 ) )
{ Id:5260913007394816 Payment:{ Id:6693962735681536 Line:34191.09107 05447.947309 71544.640008 8 84660000011631 BarCode:34198846600000116311091005447947307154464000 TaxId:38.435.677/0001-25 Description:Payment for killing white walkers Amount:11631 Scheduled:2020-04-25 15:00:00.00000 +0000 +0000 Tags:[little girl no one] TransactionIds:[] Status:created Fee:0, Created:2020-04-24 15:32:37.718634 +0000 +0000 } Errors:[] Type:crated Created:2020-04-24 15:00:33.60648 +0000 +0000 }
{:id "5260913007394816", :created "2020-04-24T19:27:53.750606+00:00", :errors [], :type "created", :payment {:description "Payment for killing white walkers", :fee 0, :tags ["little girl" "no one"], :tax-id "38.435.677/0001-25", :created "2020-04-24T19:27:53.013692+00:00", :line "34191.09107 05447.947309 71544.640008 8 84660000011631", :status "created", :id "6693962735681536", :scheduled "2020-04-25T15:00:00.000000+00:00", :bar-code "34198846600000116311091005447947307154464000"}}
{ "cursor": null, "logs": [ { "id": "5260913007394816", "created": "2020-04-24T23:00:08.338233+00:00", "errors": [], "type": "created", "payment": { "id": "6693962735681536", "status": "created", "amount": 11631, "fee": 0, "description": "Payment for killing white walkers", "tags": ["little girl", "no one"], "transactionIds": [], "created": "2020-04-24T01:37:21.146576+00:00", "scheduled": "2020-04-25T15:00:00+00:00", "taxId": "38.435.677/0001-25", "barCode": "34198846600000116311091005447947307154464000", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", } } ] }
Get a single boleto payment log by its id.
id
fields
import starkbank log = starkbank.boletopayment.log.get("5260913007394816") print(log)
const starkbank = require('starkbank'); (async() => { let log = await starkbank.boletoPayment.log.get('5260913007394816'); console.log(log); })();
$log = StarkBank\BoletoPayment\Log::get("5260913007394816"); print_r($log);
import com.starkbank.*; BoletoPayment.Log log = BoletoPayment.Log.get("5260913007394816"); System.out.println(log);
require('starkbank') log = StarkBank::BoletoPayment::Log.get('5260913007394816') puts log
log = StarkBank.BoletoPayment.Log.get!("5260913007394816") log |> IO.inspect
using System; StarkBank.BoletoPayment.Log log = StarkBank.BoletoPayment.Log.Get("5260913007394816"); Console.WriteLine(log);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletopayment/log" ) func main() { log, err := log.Get("5260913007394816", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
(def log (starkbank.boleto-payment.log/get "5260913007394816")) (println log)
curl --location --request GET '{{baseUrl}}/v2/boleto-payment/log/5260913007394816' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( id=5260913007394816, created=2020-04-24 17:58:32.075347, errors=[], type=created, payment=BoletoPayment( amount=11631, bar_code=34198846600000116311091005447947307154464000, created=2020-04-24 17:58:32.007153, description=Payment for killing white walkers, fee=0, id=6693962735681536, line=34191.09107 05447.947309 71544.640008 8 84660000011631, scheduled=2020-04-25 15:00:00, status=created, tags=['little girl', 'no one'], transaction_ids=[], tax_id=38.435.677/0001-25 ) )
Log { id: '5260913007394816', created: '2020-04-24T01:37:06.423525+00:00', type: 'created', errors: [], payment: { id: '6693962735681536', taxId: '38.435.677/0001-25', description: 'Payment for killing white walkers', line: '34191.09107 05447.947309 71544.640008 8 84660000011631', barCode: '34198846600000116311091005447947307154464000', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'little girl', 'no one' ], transactionIds: [], status: 'created', amount: 11631, fee: 0, created: '2020-04-24T01:33:40.611174+00:00' } }
StarkBank\BoletoPayment\Log Object ( [id] => 5260913007394816 [created] => DateTime Object ( [date] => 2020-04-24 18:35:37.252968 [timezone_type] => 1 [timezone] => +00:00 ) [type] => created [errors] => Array ( ) [payment] => StarkBank\BoletoPayment Object ( [id] => 6693962735681536 [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631 [taxId] => 38.435.677/0001-25 [barCode] => 34198846600000116311091005447947307154464000 [description] => Payment for killing white walkers [tags] => Array ( [0] => little girl [1] => no one ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [amount] => 11631 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 18:35:37.166061 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "id": "5260913007394816", "created": "2020-04-24T00:57:48+00:00", "type": "created", "errors": [], "payment": { "id": "6693962735681536", "taxId": "38.435.677/0001-25", "description": "Payment for killing white walkers", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", "barCode": "34198846600000116311091005447947307154464000", "scheduled": "2020-04-25T15:00:00+00:00", "tags": ["little girl", "no one"], "transactionIds": [], "status": "created", "amount": 11631, "fee": 0, "created": "2020-04-24T00:57:48+00:00" } })
log( id: 5260913007394816, created: 2020-04-24T00:57:48+00:00, type: created, errors: [], payment: boletopayment( id: 6693962735681536, tax_id: 38.435.677/0001-25, description: Payment for killing white walkers, line: 34191.09107 05447.947309 71544.640008 8 84660000011631, bar_code: 34198846600000116311091005447947307154464000, scheduled: 2020-04-25T15:00:00+00:00, tags: ["little girl", "no one"], transaction_ids: [], status: created, amount: 11631, fee: 0, created: 2020-04-24T00:57:48+00:00 ) )
%StarkBank.BoletoPayment.Log{ id: "5260913007394816", created: ~U[2020-04-24 17:29:22.831884Z], errors: [], type: "created", payment: %starkbank.boletopayment{ amount: 11631, bar_code: "34198846600000116311091005447947307154464000", created: ~U[2020-04-24 17:29:22.713657Z], description: "Payment for killing white walkers", fee: 0, id: "6693962735681536", line: "34191.09107 05447.947309 71544.640008 8 84660000011631", scheduled: ~U[2020-04-25 15:00:00Z], status: "created", tags: ["little girl", "no one"], transaction_ids: [], tax_id: "38.435.677/0001-25" } }
Log( ID: 5260913007394816, Created: 24/04/2020 12:41:52, Type: created, Errors: { }, Payment: BoletoPayment( Amount: 11631, Description: Payment for killing white walkers, TaxID: 38.435.677/0001-25, Line: 34191.09107 05447.947309 71544.640008 8 84660000011631, BarCode: 34198846600000116311091005447947307154464000, Scheduled: 04/25/2020 15:00:00, Tags: { little girl, no one }, TransactionIds: { }, Status: created, Fee: 0, Created: 04/24/2020 13:39:28, ID: 6693962735681536 ) )
{ Id:5260913007394816 Payment:{ Id:6693962735681536 Line:34191.09107 05447.947309 71544.640008 8 84660000011631 BarCode:34198846600000116311091005447947307154464000 TaxId:38.435.677/0001-25 Description:Payment for killing white walkers Amount:11631 Scheduled:2020-04-25 15:00:00.00000 +0000 +0000 Tags:[little girl no one] TransactionIds:[] Status:created Fee:0, Created:2020-04-24 15:32:37.718634 +0000 +0000 } Errors:[] Type:crated Created:2020-04-24 15:00:33.60648 +0000 +0000 }
{:id "5260913007394816", :created "2020-04-24T19:27:53.750606+00:00", :errors [], :type "created", :payment {:description "Payment for killing white walkers", :fee 0, :tags ["little girl" "no one"], :tax-id "38.435.677/0001-25", :created "2020-04-24T19:27:53.013692+00:00", :line "34191.09107 05447.947309 71544.640008 8 84660000011631", :status "created", :id "6693962735681536", :scheduled "2020-04-25T15:00:00.000000+00:00", :bar-code "34198846600000116311091005447947307154464000"}}
{ "log": { "id": "5260913007394816", "created": "2020-04-24T23:00:08.338233+00:00", "errors": [], "type": "created", "payment": { "id": "6693962735681536", "status": "created", "amount": 11631, "fee": 0, "description": "Payment for killing white walkers", "tags": ["little girl", "no one"], "transactionIds": [], "created": "2020-04-24T01:37:21.146576+00:00", "scheduled": "2020-04-25T15:00:00+00:00", "taxId": "38.435.677/0001-25", "barCode": "34198846600000116311091005447947307154464000", "line": "34191.09107 05447.947309 71544.640008 8 84660000011631", } } }
Here we will teach you how to create and manage utility payments, such as electricity and water bills.
Use this route to pay utility bills using the available balance in your Stark Bank account.
line
barCode
description
tags
scheduled
import starkbank payments = starkbank.utilitypayment.create([ starkbank.UtilityPayment( line="83640000001 1 08740138007 0 61053026111 0 08067159411 9", tags=["Energy", "Winterfell"], description="Electricity for the Long Night", scheduled="2020-04-25" ) ]) for payment in payments: print(payment)
const starkbank = require('starkbank'); (async() => { let payments = await starkbank.utilityPayment.create([ { line: '83640000001 1 07850138007 0 61053026111 0 08067159411 9', scheduled: '2020-04-25', description: 'Electricity for the Long Night', tags: ['Energy', 'Winterfell'], } ]); for await (let payment of payments) { console.log(payment); } })();
$payments = StarkBank\UtilityPayment::create([ new StarkBank\UtilityPayment([ "line" => "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "scheduled" => "2020-04-25", "description" => "Electricity for the Long Night", "tags" => ["Energy", "Winterfell"], ]) ]); foreach($payments as $payment){ print_r($payment); }
import com.starkbank.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; List<UtilityPayment> payments = new ArrayList<>(); HashMap<String, Object> data = new HashMap<>(); data.put("line", "83640000001 1 07540138007 0 61053026111 0 08067159411 9"); data.put("scheduled", "2020-04-25"); data.put("description", "Electricity for the Long Night"); data.put("tags", new String[]{"Energy", "Winterfell"}); payments.add(new UtilityPayment(data)); payments = UtilityPayment.create(payments); for (UtilityPayment payment : payments){ System.out.println(payment); }
require('starkbank') payments = StarkBank::UtilityPayment.create( [ StarkBank::UtilityPayment.new( line: '83640000001 1 07540138007 0 61053026111 0 08067159411 9', scheduled: '2020-04-25', description: 'Electricity for the Long Night', tags: %w[Energy Winterfell] ) ] ) payments.each do |payment| puts payment end
payments = StarkBank.UtilityPayment.create!([ %StarkBank.UtilityPayment{ line: "83640000001 1 07540138007 0 61053026111 0 08067159411 9", description: "Electricity for the Long Night", tags: ["Energy", "Winterfell"], scheduled: "2020-04-25" } ]) for payment <- payments do payment |> IO.inspect end
using System; using System.Collections.Generic; List<StarkBank.UtilityPayment> payments = StarkBank.UtilityPayment.Create( new List<StarkBank.UtilityPayment> { new StarkBank.UtilityPayment( line: "83640000001 1 07540138007 0 61053026111 0 08067159411 9", description: "Electricity for the Long Night", tags: new List<string> { "Energy", "Winterfell" }, scheduled: new DateTime(2020, 4, 25) ) } ); foreach(StarkBank.UtilityPayment payment in payments) { Console.WriteLine(payment); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/utilitypayment" ) func main() { scheduled := time.Date(2020, 04, 25, 0, 0, 0, 0, time.UTC) payments, err := utilitypayment.Create( []utilitypayment.Utilitypayment{ { Line: "83640000001 1 07540138007 0 61053026111 0 08067159411 9", Description: "Electricity for the Long Night", Scheduled: &scheduled, Tags: []string{"Energy", "Winterfell"}, }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, payment := range payments { fmt.Printf("%+v", payment) } }
(def payments (starkbank.utility-payment/create [ { :line "83640000001 1 07540138007 0 61053026111 0 08067159411 9" :description "Electricity for the Long Night" :tags ["Energy" "Winterfell"] :scheduled "2020-04-25" } ])) (dorun (map println payments))
curl --location --request POST '{{baseUrl}}/v2/utility-payment' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "payments": [ { "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "tags": ["Energy", "Winterfell"], "description": "Electricity for the Long Night", "scheduled": "2020-04-25" } ] }'
UtilityPayment( amount=10874, bar_code=83640000001087401380076105302611108067159411, created=2020-04-24 18:03:18.662638, description=Electricity for the Long Night, fee=0, id=5949004768608256, line=83640000001 1 08740138007 0 61053026111 0 08067159411 9, scheduled=2020-04-25 15:00:00, status=created, tags=['energy', 'winterfell'], transaction_ids=[], type=utility, updated=2020-04-24 18:03:18.662638, )
UtilityPayment { id: '5949004768608256', barCode: '83640000001078501380076105302611108067159411', line: '83640000001 1 07850138007 0 61053026111 0 08067159411 9', description: 'Electricity for the Long Night', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'energy', 'winterfell' ], transactionIds: [ ], amount: 10874, status: 'created', type: 'utility', created: '2020-04-24T01:43:13.038706+00:00', fee: 0, updated: '2020-04-24T01:43:13.038706+00:00', }
StarkBank\UtilityPayment Object ( [id] => 5949004768608256 [line] => 83640000001 1 07540138007 0 61053026111 0 08067159411 9 [barCode] => 83640000001075401380076105302611108067159411 [description] => Electricity for the Long Night [tags] => Array ( [0] => energy [1] => winterfell ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [type] => utility [amount] => 10874 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) )
UtilityPayment({ "id": "5949004768608256", "description": "Electricity for the Long Night", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "barCode": "83640000001075401380076105302611108067159411", "tags": ["energy", "winterfell"], "transactionIds": [], "scheduled": "2020-04-20T15:00:00+00:00", "amount": 10874, "fee": 0, "status": "created", "type": "utility", "created": "2020-04-13T13:05:53+00:00", "updated": "2020-04-13T13:05:53+00:00" })
utilitypayment( id: 5949004768608256, description: Electricity for the Long Night, line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, bar_code: 83640000001075401380076105302611108067159411, tags: ["energy", "winterfell"], transaction_ids: [], scheduled: 2020-04-20T15:00:00+00:00, amount: -10874, fee: 0, status: created, type: utility, created: 2020-04-24T13:05:53+00:00, updated: 2020-04-24T13:05:53+00:00 )
%StarkBank.UtilityPayment{ amount: 10874, bar_code: "83640000001075401380076105302611108067159411", created: ~U[2020-04-24 18:20:15.232053Z], description: "Electricity for the Long Night", fee: 0, id: "5949004768608256", line: "83640000001 1 07540138007 0 61053026111 0 08067159411 9", scheduled: ~U[2020-04-25 15:00:00Z], status: "created", type: "utility", tags: ["energy", "winterfell"], transaction_ids: [], updated: ~U[2020-04-24 18:20:15.232053Z], }
UtilityPayment( Amount: 10874, Description: electricity payment, Line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, BarCode: 83640000001075401380076105302611108067159411, Scheduled: 04/25/2020 12:00:00, Tags: { energy winterfell }, TransactionIds: { }, Status: created, Fee: 0, Type: utility, Created: 04/24/2020 17:46:39, ID: 5949004768608256, Updated: 04/24/2020 17:46:39, )
{ Id:5949004768608256 Line:83640000001 1 07540138007 0 61053026111 0 08067159411 9 BarCode:83640000001075401380076105302611108067159411 Description:Electricity for the Long Night Scheduled:2020-04-25 15:00:00.000000 +0000 +0000 Tags:[energy winterfell] TransactionIds:[] Status:created Type:utility Amount:10874 Fee:0 TransactionIds:[5733517593935872 6057392487792640] Created:2020-04-24 13:05:53.00000 +0000 +0000 Updated:2020-04-24 13:05:53.00000 +0000 +0000 }
{:description "Electricity for the Long Night", :amount 10874, :fee 0, :tags ["energy" "winterfell"], :created "2020-04-24T19:04:46.594557+00:00", :line "83640000001 1 07540138007 0 61053026111 0 08067159411 9", :status "created", :id "5949004768608256", :scheduled "2020-04-25T15:00:00+00:00", :bar-code "83640000001075401380076105302611108067159411", :updated "2020-04-24T19:04:46.594557+00:00"}
{ "message": "Utility Payment(s) successfully created", "payments": [ { "id": "5949004768608256", "status": "created", "fee": 0, "amount": 10874, "description": "Electricity for the Long Night", "scheduled": "2020-04-25T15:22:24.957735+00:00", "created": "2020-04-24T15:22:25.096450+00:00", "barCode": "83640000001075401380076105302611108067159411", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "tags": ["Energy", "Winterfell"], "transactionIds": [], "status": "created", "type": "utility", "updated": "2020-04-24T15:22:25.096450+00:00", } ] }
Get a list of non-deleted utility payments in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
fields
import starkbank payments = starkbank.utilitypayment.query( after="2020-04-01", before="2020-04-30" ) for payment in payments: print(payment)
const starkbank = require('starkbank'); (async() => { let payments = await starkbank.utilityPayment.query({ after: '2020-04-01', before: '2020-04-30' }); for await (let payment of payments) { console.log(payment); } })();
$payments = StarkBank\UtilityPayment::query([ "after" => "2020-04-01", "before" => "2020-04-30" ]); foreach($payments as $payment){ print_r($payment); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2020-04-01"); params.put("before", "2020-04-30"); Generator<UtilityPayment> payments = UtilityPayment.query(params); for (UtilityPayment payment : payments){ System.out.println(payment); }
require('starkbank') payments = StarkBank::UtilityPayment.query( after: '2020-04-01', before: '2020-04-30' ) payments.each do |payment| puts payment end
payments = StarkBank.UtilityPayment.query!( after: "2020-04-01", before: "2020-04-30" ) for payment <- payments do payment |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.UtilityPayment> payments = StarkBank.UtilityPayment.Query( after: new DateTime(2020, 4, 1), before: new DateTime(2020, 4, 30) ); foreach(StarkBank.UtilityPayment payment in payments) { Console.WriteLine(payment); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/utilitypayment" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-04-01" params["before"] = "2020-04-30" payments := utilitypayment.Query(params, nil) for payment := range payments { fmt.Printf("%+v", payment) } }
(def payments (starkbank.utility-payment/query { :after "2020-04-01" :before "2020-04-30" })) (dorun (map println payments))
curl --location --request GET '{{baseUrl}}/v2/utility-payment?after=2020-01-01&before=2020-01-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
UtilityPayment( amount=10874, bar_code=83640000001087401380076105302611108067159411, created=2020-04-24 18:03:18.662638, description=Electricity for the Long Night, fee=0, id=5949004768608256, line=83640000001 1 08740138007 0 61053026111 0 08067159411 9, scheduled=2020-04-25 15:00:00, status=created, tags=['energy', 'winterfell'], transaction_ids=[], type=utility, updated=2020-04-24 18:03:18.662638, )
UtilityPayment { id: '5949004768608256', barCode: '83640000001078501380076105302611108067159411', line: '83640000001 1 07850138007 0 61053026111 0 08067159411 9', description: 'Electricity for the Long Night', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'energy', 'winterfell' ], transactionIds: [ ], amount: 10874, status: 'created', type: 'utility', created: '2020-04-24T01:43:13.038706+00:00', fee: 0, updated: '2020-04-24T01:43:13.038706+00:00', }
StarkBank\UtilityPayment Object ( [id] => 5949004768608256 [line] => 83640000001 1 07540138007 0 61053026111 0 08067159411 9 [barCode] => 83640000001075401380076105302611108067159411 [description] => Electricity for the Long Night [tags] => Array ( [0] => energy [1] => winterfell ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [type] => utility [amount] => 10874 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) )
UtilityPayment({ "id": "5949004768608256", "description": "Electricity for the Long Night", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "barCode": "83640000001075401380076105302611108067159411", "tags": ["energy", "winterfell"], "transactionIds": [], "scheduled": "2020-04-20T15:00:00+00:00", "amount": 10874, "fee": 0, "amount": 10874, "type": "utility", "created": "2020-04-13T13:05:53+00:00", "updated": "2020-04-13T13:05:53+00:00" })
utilitypayment( id: 5949004768608256, description: Electricity for the Long Night, line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, bar_code: 83640000001075401380076105302611108067159411, tags: ["energy", "winterfell"], transaction_ids: [], scheduled: 2020-04-20T15:00:00+00:00, amount: 10874, fee: 0, status: created, type: utility, created: 2020-04-24T13:05:53+00:00, updated: 2020-04-24T13:05:53+00:00 )
%StarkBank.UtilityPayment{ amount: 10874, bar_code: "83640000001075401380076105302611108067159411", created: ~U[2020-04-24 18:20:15.232053Z], description: "Electricity for the Long Night", fee: 0, id: "5949004768608256", line: "83640000001 1 07540138007 0 61053026111 0 08067159411 9", scheduled: ~U[2020-04-25 15:00:00Z], status: "created", type: "utility", tags: ["energy", "winterfell"], transaction_ids: [], updated: ~U[2020-04-24 18:20:15.232053Z], }
UtilityPayment( Amount: 10874, Description: electricity payment, Line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, BarCode: 83640000001075401380076105302611108067159411, Scheduled: 04/25/2020 12:00:00, Tags: { energy winterfell }, TransactionIds: { }, Status: created, Fee: 0, Type: utility, Created: 04/24/2020 17:46:39, ID: 5949004768608256, Updated: 04/24/2020 17:46:39, )
{ Id:5949004768608256 Line:83640000001 1 07540138007 0 61053026111 0 08067159411 9 BarCode:83640000001075401380076105302611108067159411 Description:Electricity for the Long Night Scheduled:2020-04-25 15:00:00.000000 +0000 +0000 Tags:[energy winterfell] TransactionIds:[] Status:created Type:utility Amount:10874 Fee:0 TransactionIds:[5733517593935872 6057392487792640] Created:2020-04-24 13:05:53.00000 +0000 +0000 Updated:2020-04-24 13:05:53.00000 +0000 +0000 }
{:description "Electricity for the Long Night", :amount 10874, :fee 0, :tags ["energy" "winterfell"], :created "2020-04-24T19:04:46.594557+00:00", :line "83640000001 1 07540138007 0 61053026111 0 08067159411 9", :status "created", :id "5949004768608256", :scheduled "2020-04-25T15:00:00+00:00", :bar-code "83640000001075401380076105302611108067159411", :updated "2020-04-24T19:04:46.594557+00:00"}
{ "cursor": null, "payments": [ { "id": "5949004768608256", "status": "created", "fee": 0, "amount": 10874, "description": "Electricity for the Long Night", "scheduled": "2020-04-25T15:22:24.957735+00:00", "created": "2020-04-24T15:22:25.096450+00:00", "barCode": "83640000001075401380076105302611108067159411", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "tags": ["Energy", "Winterfell"], "transactionIds": [], "status": "created", "type": "utility", "updated": "2020-04-24T15:22:25.096450+00:00", } ] }
Get a single utility payment by its id.
id
fields
import starkbank payment = starkbank.utilitypayment.get("5949004768608256") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.utilityPayment.get('5949004768608256'); console.log(payment); })();
$payment = StarkBank\UtilityPayment::get("5949004768608256"); print_r($payment);
import com.starkbank.*; UtilityPayment payment = UtilityPayment.get("5949004768608256"); System.out.println(payment);
require('starkbank') payment = StarkBank::UtilityPayment.get('5949004768608256') puts payment
payment = StarkBank.UtilityPayment.get!("5949004768608256") payment |> IO.inspect
using System; StarkBank.UtilityPayment payment = StarkBank.UtilityPayment.Get("5949004768608256"); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/utilitypayment" ) func main() { payment, err := utilitypayment.Get("5949004768608256", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.utility-payment/get "5949004768608256")) (println payment)
curl --location --request GET '{{baseUrl}}/v2/utility-payment/5949004768608256' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
UtilityPayment( amount=10874, bar_code=83640000001087401380076105302611108067159411, created=2020-04-24 18:03:18.662638, description=Electricity for the Long Night, fee=0, id=5949004768608256, line=83640000001 1 08740138007 0 61053026111 0 08067159411 9, scheduled=2020-04-25 15:00:00, status=created, tags=['energy', 'winterfell'], transaction_ids=[], type=utility, updated=2020-04-24 18:03:18.662638, )
UtilityPayment { id: '5949004768608256', barCode: '83640000001078501380076105302611108067159411', line: '83640000001 1 07850138007 0 61053026111 0 08067159411 9', description: 'Electricity for the Long Night', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'energy', 'winterfell' ], transactionIds: [ ], amount: 10874, status: 'created', type: 'utility', created: '2020-04-24T01:43:13.038706+00:00', fee: 0, updated: '2020-04-24T01:43:13.038706+00:00', }
StarkBank\UtilityPayment Object ( [id] => 5949004768608256 [line] => 83640000001 1 07540138007 0 61053026111 0 08067159411 9 [barCode] => 83640000001075401380076105302611108067159411 [description] => Electricity for the Long Night [tags] => Array ( [0] => energy [1] => winterfell ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => canceled [type] => utility [amount] => 10874 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) )
UtilityPayment({ "id": "5949004768608256", "description": "Electricity for the Long Night", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "barCode": "83640000001075401380076105302611108067159411", "tags": ["energy", "winterfell"], "transactionIds": [], "scheduled": "2020-04-20T15:00:00+00:00", "amount": 10874, "fee": 0, "amount": 10874, "type": "utility", "created": "2020-04-13T13:05:53+00:00", "updated": "2020-04-13T13:05:53+00:00" })
utilitypayment( id: 5949004768608256, description: Electricity for the Long Night, line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, bar_code: 83640000001075401380076105302611108067159411, tags: ["energy", "winterfell"], transaction_ids: [], scheduled: 2020-04-20T15:00:00+00:00, amount: 10874, fee: 0, status: created, type: utility, created: 2020-04-24T13:05:53+00:00, updated: 2020-04-24T13:05:53+00:00 )
%StarkBank.UtilityPayment{ amount: 10874, bar_code: "83640000001075401380076105302611108067159411", created: ~U[2020-04-24 18:20:15.232053Z], description: "Electricity for the Long Night", fee: 0, id: "5949004768608256", line: "83640000001 1 07540138007 0 61053026111 0 08067159411 9", scheduled: ~U[2020-04-25 15:00:00Z], status: "created", type: "utility", tags: ["energy", "winterfell"], transaction_ids: [], updated: ~U[2020-04-24 18:20:15.232053Z], }
UtilityPayment( Amount: 10874, Description: electricity payment, Line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, BarCode: 83640000001075401380076105302611108067159411, Scheduled: 04/25/2020 12:00:00, Tags: { energy winterfell }, TransactionIds: { }, Status: created, Fee: 0, Type: utility, Created: 04/24/2020 17:46:39, ID: 5949004768608256, Updated: 04/24/2020 17:46:39, )
{ Id:5949004768608256 Line:83640000001 1 07540138007 0 61053026111 0 08067159411 9 BarCode:83640000001075401380076105302611108067159411 Description:Electricity for the Long Night Scheduled:2020-04-25 15:00:00.000000 +0000 +0000 Tags:[energy winterfell] TransactionIds:[] Status:created Type:utility Amount:10874 Fee:0 TransactionIds:[5733517593935872 6057392487792640] Created:2020-04-24 13:05:53.00000 +0000 +0000 Updated:2020-04-24 13:05:53.00000 +0000 +0000 }
{:description "Electricity for the Long Night", :amount 10874, :fee 0, :tags ["energy" "winterfell"], :created "2020-04-24T19:04:46.594557+00:00", :line "83640000001 1 07540138007 0 61053026111 0 08067159411 9", :status "created", :id "5949004768608256", :scheduled "2020-04-25T15:00:00+00:00", :bar-code "83640000001075401380076105302611108067159411"}
{ "payment": { "id": "5949004768608256", "status": "created", "fee": 0, "amount": 10874, "description": "Electricity for the Long Night", "scheduled": "2020-04-25T15:22:24.957735+00:00", "created": "2020-04-24T15:22:25.096450+00:00", "barCode": "83640000001075401380076105302611108067159411", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "tags": ["Energy", "Winterfell"], "transactionIds": [], "status": "created", "type": "utility", "updated": "2020-04-24T15:22:25.096450+00:00", } }
Cancel a scheduled utility payment. You can only cancel utility payments before they start being processed.
id
import starkbank payment = starkbank.utilitypayment.delete("5949004768608256") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.utilityPayment.delete('5949004768608256'); console.log(payment); })();
$payment = StarkBank\UtilityPayment::delete("5949004768608256"); print_r($payment);
import com.starkbank.*; UtilityPayment payment = UtilityPayment.delete("5949004768608256"); System.out.println(payment);
require('starkbank') payment = StarkBank::UtilityPayment.delete('5949004768608256') puts payment
payment = StarkBank.UtilityPayment.delete!("5949004768608256") payment |> IO.inspect
using System; StarkBank.UtilityPayment payment = StarkBank.UtilityPayment.Delete("5949004768608256"); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/utilitypayment" ) func main() { payment, err := utilitypayment.Delete("5949004768608256", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.utility-payment/delete "5949004768608256")) (println payment)
curl --location --request DELETE '{{baseUrl}}/v2/utility-payment/5949004768608256' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
UtilityPayment( amount=10874, bar_code=83640000001087401380076105302611108067159411, created=2020-04-24 18:03:18.662638, description=Electricity for the Long Night, fee=0, id=5949004768608256, line=83640000001 1 08740138007 0 61053026111 0 08067159411 9, scheduled=2020-04-25 15:00:00, status=canceled, tags=['energy', 'winterfell'], transaction_ids=[], type=utility, updated=2020-04-24 18:03:18.662638, )
UtilityPayment { id: '5949004768608256', barCode: '83640000001078501380076105302611108067159411', line: '83640000001 1 07850138007 0 61053026111 0 08067159411 9', description: 'Electricity for the Long Night', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'energy', 'winterfell' ], transactionIds: [ ], amount: 10874, status: 'canceled', type: 'utility', created: '2020-04-24T01:43:13.038706+00:00', fee: 0, updated: '2020-04-24T01:43:13.038706+00:00', }
StarkBank\UtilityPayment Object ( [id] => 5949004768608256 [line] => 83640000001 1 07540138007 0 61053026111 0 08067159411 9 [barCode] => 83640000001075401380076105302611108067159411 [description] => Electricity for the Long Night [tags] => Array ( [0] => energy [1] => winterfell ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => canceled [type] => utility [amount] => 10874 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) )
UtilityPayment({ "id": "5949004768608256", "description": "Electricity for the Long Night", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "barCode": "83640000001075401380076105302611108067159411", "tags": ["energy", "winterfell"], "transactionIds": [], "scheduled": "2020-04-20T15:00:00+00:00", "amount": 10874, "fee": 0, "status": "canceled", "type": "utility", "created": "2020-04-13T13:05:53+00:00", "updated": "2020-04-13T13:05:53+00:00" })
utilitypayment( id: 5949004768608256, description: Electricity for the Long Night, line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, bar_code: 83640000001075401380076105302611108067159411, tags: ["energy", "winterfell"], transaction_ids: [], scheduled: 2020-04-20T15:00:00+00:00, amount: 10874, fee: 0, status: canceled, type: utility, created: 2020-04-24T13:05:53+00:00, updated: 2020-04-24T13:05:53+00:00 )
%StarkBank.UtilityPayment{ amount: 10874, bar_code: "83640000001075401380076105302611108067159411", created: ~U[2020-04-24 18:20:15.232053Z], description: "Electricity for the Long Night", fee: 0, id: "5949004768608256", line: "83640000001 1 07540138007 0 61053026111 0 08067159411 9", scheduled: ~U[2020-04-25 15:00:00Z], status: "canceled", type: "utility", tags: ["energy", "winterfell"], transaction_ids: [], updated: ~U[2020-04-24 18:20:15.232053Z], }
UtilityPayment( Amount: 10874, Description: electricity payment, Line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, BarCode: 83640000001075401380076105302611108067159411, Scheduled: 04/25/2020 12:00:00, Tags: { energy winterfell }, TransactionIds: { }, Status: canceled, Fee: 0, Type: utility, Created: 04/24/2020 17:46:39, ID: 5949004768608256, Updated: 04/24/2020 17:46:39, )
{ Id:5949004768608256 Line:83640000001 1 07540138007 0 61053026111 0 08067159411 9 BarCode:83640000001075401380076105302611108067159411 Description:Electricity for the Long Night Scheduled:2020-04-25 15:00:00.000000 +0000 +0000 Tags:[energy winterfell] TransactionIds:[] Status:canceled Type:utility Amount:10874 Fee:0 TransactionIds:[5733517593935872 6057392487792640] Created:2020-04-24 13:05:53.00000 +0000 +0000 Updated:2020-04-24 13:05:53.00000 +0000 +0000 }
{:description "Electricity for the Long Night", :amount 10874, :fee 0, :tags ["energy" "winterfell"], :created "2020-04-24T19:04:46.594557+00:00", :line "83640000001 1 07540138007 0 61053026111 0 08067159411 9", :status "canceled", :id "5949004768608256", :scheduled "2020-04-25T15:00:00+00:00", :bar-code "83640000001075401380076105302611108067159411", :updated "2020-04-24T19:04:46.594557+00:00"}
{ "message": "Utility Payment successfully deleted", "payment": { "id": "5949004768608256", "status": "canceled", "fee": 0, "amount": 10874, "description": "Electricity for the Long Night", "scheduled": "2020-04-25T15:22:24.957735+00:00", "created": "2020-04-24T15:22:25.096450+00:00", "barCode": "83640000001075401380076105302611108067159411", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "tags": ["Energy", "Winterfell"], "transactionIds": [], "status": "canceled", "type": "utility", "updated": "2020-04-24T15:22:25.096450+00:00", } }
Get a utility payment PDF receipt. You can only get a receipt for payments whose status are either success, processing or created.
id
import starkbank pdf = starkbank.utilitypayment.pdf("5949004768608256") with open("utility-payment.pdf", "wb") as file: file.write(pdf)
const starkbank = require('starkbank'); const fs = require('fs').promises; (async() => { let pdf = await starkbank.utilityPayment.pdf('5949004768608256'); await fs.writeFile('utility-payment.pdf', pdf); })();
$pdf = StarkBank\UtilityPayment::pdf("5949004768608256"); $fp = fopen('utility-payment.pdf', 'w'); fwrite($fp, $pdf); fclose($fp);
import java.io.File; import java.io.InputStream; import java.nio.file.StandardCopyOption; import com.starkbank.*; InputStream pdf = UtilityPayment.pdf("5949004768608256"); java.nio.file.Files.copy( pdf, new File("utility-payment.pdf").toPath(), StandardCopyOption.REPLACE_EXISTING );
require('starkbank') pdf = StarkBank::UtilityPayment.pdf('5949004768608256') File.open('utility-payment.pdf', 'w') { |file| file.write(pdf) }
pdf = StarkBank.UtilityPayment.pdf!("5949004768608256") file = File.open!("utility-payment.pdf", [:write]) IO.binwrite(file, pdf) File.close(file)
byte[] pdf = StarkBank.UtilityPayment.Pdf("5949004768608256"); System.IO.File.WriteAllBytes("utility-payment.pdf", pdf);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/utilitypayment" ) func main() { pdf, err := utilitypayment.Pdf("5949004768608256", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } errFile := ioutil.WriteFile("utilitypayment.pdf", pdf, 0666) if errFile != nil { fmt.Print(errFile) }
(clojure.java.io/copy (starkbank.utility-payment/pdf "5949004768608256") (clojure.java.io/file "utility-payment.pdf"))
curl --location --request GET '{{baseUrl}}/v2/utility-payment/5949004768608256/pdf' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Get a paged list of all utility payment logs. A log tracks a change in the payment entity according to its life cycle.
cursor
limit
after
before
types
paymentIds
fields
import starkbank logs = starkbank.utilitypayment.log.query( payment_ids=["5949004768608256"] ) for log in logs: print(log)
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.utilityPayment.log.query({ paymentIds:['5949004768608256'], }); for await (let log of logs) { console.log(log); } })();
$logs = StarkBank\UtilityPayment\Log::query([ "paymentIds" => ["5949004768608256"] ]); foreach($logs as $log){ print_r($log); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("paymentIds", "5949004768608256"); Generator<UtilityPayment.Log> logs = UtilityPayment.Log.query(params); for (UtilityPayment.Log log : logs){ System.out.println(log); }
require('starkbank') logs = StarkBank::UtilityPayment::Log.query( payment_ids: ['5949004768608256'] ) logs.each do |log| puts log end
logs = StarkBank.UtilityPayment.Log.query!( payment_ids: ["5949004768608256"] ) for log <- logs do log |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.UtilityPayment.Log> logs = StarkBank.UtilityPayment.Log.Query( paymentIds: new List<string> { "5949004768608256" } ); foreach(StarkBank.UtilityPayment.Log log in logs) { Console.WriteLine(log); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/utilitypayment/log" ) func main() { var params = map[string]interface{}{} params["paymentIds"] = []string{"5949004768608256"} logs := log.Query(params, nil) for log := range logs { fmt.Printf("%+v", log) } }
(def logs (starkbank.utility-payment.log/query { :payment-ids ["5949004768608256"] })) (dorun (map println logs))
curl --location --request GET '{{baseUrl}}/v2/utility-payment/log?paymentIds=5949004768608256' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( id=5369811349536768, created=2020-04-24 18:03:18.733424, errors=[], type=created, payment=UtilityPayment( amount=10874, bar_code=83640000001087401380076105302611108067159411, created=2020-04-24 18:03:18.662638, description=Electricity for the Long Night, fee=0, id=5949004768608256, line=83640000001 1 08740138007 0 61053026111 0 08067159411 9, scheduled=2020-04-25 15:00:00, status=created, tags=['energy', 'winterfell'], transaction_ids=[], type=utility, updated=2020-04-24 18:03:18.662638, ) )
Log { id: '5369811349536768', created: '2020-04-24T01:43:13.136987+00:00', type: 'created', errors: [], payment: { id: '5949004768608256', barCode: '83640000001078501380076105302611108067159411', line: '83640000001 1 07850138007 0 61053026111 0 08067159411 9', description: 'Electricity for the Long Night', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'energy', 'winterfell' ], transactionIds: [ ], amount: 10874, status: 'created', type: 'utility', created: '2020-04-24T01:43:13.038706+00:00', fee: 0, updated: '2020-04-24T01:43:13.038706+00:00', } }
StarkBank\UtilityPayment\Log Object ( [id] => 5369811349536768 [created] => DateTime Object ( [date] => 2020-04-24 19:04:46.689468 [timezone_type] => 1 [timezone] => +00:00 ) [type] => created [errors] => Array ( ) [payment] => StarkBank\UtilityPayment Object ( [id] => 5949004768608256 [line] => 83640000001 1 07540138007 0 61053026111 0 08067159411 9 [barCode] => 83640000001075401380076105302611108067159411 [description] => Electricity for the Long Night [tags] => Array ( [0] => energy [1] => winterfell ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [type] => utility [amount] => 10874 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "id": "5369811349536768", "created": "2020-04-24T13:05:53+00:00", "type": "created", "errors": [], "payment": { "id": "5949004768608256", "description": "Electricity for the Long Night", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "barCode": "83640000001075401380076105302611108067159411", "tags": ["energy", "winterfell"], "transactionIds": [], "scheduled": "2020-04-20T15:00:00+00:00", "amount": 10874, "fee": 0, "status": "canceled", "type": "utility", "created": "2020-04-13T13:05:53+00:00", "updated": "2020-04-13T13:05:53+00:00" } })
log( id: 5369811349536768, created: 2020-04-24T13:05:53+00:00, type: created, errors: [], payment: utilitypayment( id: 5949004768608256, description: Electricity for the Long Night, line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, bar_code: 83640000001075401380076105302611108067159411, tags: ["energy", "winterfell"], transaction_ids: [], scheduled: 2020-04-20T15:00:00+00:00, amount: 10874, fee: 0, status: created, type: utility, created: 2020-04-24T13:05:53+00:00, updated: 2020-04-24T13:05:53+00:00 ) )
%StarkBank.UtilityPayment.Log{ id: "5369811349536768", created: ~U[2020-04-24 18:20:15.331313Z], errors: [], type: "created", payment: %starkbank.utilitypayment{ amount: 10874, bar_code: "83640000001075401380076105302611108067159411", created: ~U[2020-04-24 18:20:15.232053Z], description: "Electricity for the Long Night", fee: 0, id: "5949004768608256", line: "83640000001 1 07540138007 0 61053026111 0 08067159411 9", scheduled: ~U[2020-04-25 15:00:00Z], status: "created", type: "utility", tags: ["energy", "winterfell"], transaction_ids: [], updated: ~U[2020-04-24 18:20:15.232053Z], } }
Log( ID: 5369811349536768, Created: 04/24/2020 18:20:39, Type: created, Errors: { }, Payment: UtilityPayment( Amount: 10874, Description: electricity payment, Line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, BarCode: 83640000001075401380076105302611108067159411, Scheduled: 04/25/2020 12:00:00, Tags: { energy winterfell }, TransactionIds: { }, Status: created, Fee: 0, Type: utility, Created: 04/24/2020 17:46:39, ID: 5949004768608256, Updated: 04/24/2020 17:46:39 ) )
{ Id:5369811349536768 Payment:{ Id:5949004768608256 Line:83640000001 1 07540138007 0 61053026111 0 08067159411 9 BarCode:83640000001075401380076105302611108067159411 Description:Electricity for the Long Night Scheduled:2020-04-25 15:00:00.000000 +0000 +0000 Tags:[energy winterfell] TransactionIds:[] Status:created Type:utility Amount:10874 Fee:0 TransactionIds:[5733517593935872 6057392487792640] Created:2020-04-24 13:05:53.00000 +0000 +0000 Updated:2020-04-24 13:05:53.00000 +0000 +0000 } Errors:[] Type:created Created:2020-04-24 17:51:54.284559 +0000 +0000 }
{:id "5369811349536768", :created "2020-04-24T13:30:07.200512+00:00", :errors [], :type "created", :payment {:description "Electricity for the Long Night", :amount 10874, :fee 0, :tags ["energy" "winterfell"], :created "2020-04-24T19:04:46.594557+00:00", :line "83640000001 1 07540138007 0 61053026111 0 08067159411 9", :status "created", :id "5949004768608256", :scheduled "2020-04-25T15:00:00+00:00", :bar-code "83640000001075401380076105302611108067159411", :updated "2020-04-24T19:04:46.594557+00:00"}}
{ "cursor": null, "logs": [ { "id": "5369811349536768", "created": "2020-04-24T23:00:08.338233+00:00", "errors": [], "type": "created", "payment": { "id": "5949004768608256", "status": "created", "fee": 0, "amount": 10874, "description": "Electricity for the Long Night", "scheduled": "2020-04-25T15:22:24.957735+00:00", "created": "2020-04-24T15:22:25.096450+00:00", "barCode": "83640000001075401380076105302611108067159411", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "tags": ["Energy", "Winterfell"], "transactionIds": [], "status": "created", "type": "utility", "updated": "2020-04-24T15:22:25.096450+00:00", } } ] }
Get a single utility payment log by its id.
id
fields
import starkbank log = starkbank.utilitypayment.log.get("5369811349536768") print(log)
const starkbank = require('starkbank'); (async() => { let log = await starkbank.utilityPayment.log.get('5369811349536768'); console.log(log); })();
$log = StarkBank\UtilityPayment\Log::get("5369811349536768"); print_r($log);
import com.starkbank.*; UtilityPayment.Log log = UtilityPayment.Log.get("5369811349536768"); System.out.println(log);
require('starkbank') log = StarkBank::UtilityPayment::Log.get('5369811349536768') puts log
log = StarkBank.UtilityPayment.Log.get!("5369811349536768") log |> IO.inspect
using System; StarkBank.UtilityPayment.Log log = StarkBank.UtilityPayment.Log.Get("5369811349536768"); Console.WriteLine(log);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/utilitypayment/log" ) func main() { log, err := log.Get("5369811349536768", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
(def log (starkbank.utility-payment.log/get "5369811349536768")) (println log)
curl --location --request GET '{{baseUrl}}/v2/utility-payment/log/5369811349536768' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( id=5369811349536768, created=2020-04-24 18:03:18.733424, errors=[], type=created, payment=UtilityPayment( amount=10874, bar_code=83640000001087401380076105302611108067159411, created=2020-04-24 18:03:18.662638, description=Electricity for the Long Night, fee=0, id=5949004768608256, line=83640000001 1 08740138007 0 61053026111 0 08067159411 9, scheduled=2020-04-25 15:00:00, status=created, tags=['energy', 'winterfell'], transaction_ids=[], type=utility, updated=2020-04-24 18:03:18.662638, ) )
Log { id: '5369811349536768', created: '2020-04-24T01:43:13.136987+00:00', type: 'created', errors: [], payment: { id: '5949004768608256', barCode: '83640000001078501380076105302611108067159411', line: '83640000001 1 07850138007 0 61053026111 0 08067159411 9', description: 'Electricity for the Long Night', scheduled: '2020-04-25T15:00:00+00:00', tags: [ 'energy', 'winterfell' ], transactionIds: [ ], amount: 10874, status: 'created', type: 'utility', created: '2020-04-24T01:43:13.038706+00:00', fee: 0, updated: '2020-04-24T01:43:13.038706+00:00', } }
StarkBank\UtilityPayment\Log Object ( [id] => 5369811349536768 [created] => DateTime Object ( [date] => 2020-04-24 19:04:46.689468 [timezone_type] => 1 [timezone] => +00:00 ) [type] => created [errors] => Array ( ) [payment] => StarkBank\UtilityPayment Object ( [id] => 5949004768608256 [line] => 83640000001 1 07540138007 0 61053026111 0 08067159411 9 [barCode] => 83640000001075401380076105302611108067159411 [description] => Electricity for the Long Night [tags] => Array ( [0] => energy [1] => winterfell ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2020-04-25T15:00:00+00:00 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [type] => utility [amount] => 10874 [fee] => 0 [created] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 19:04:46.594557 [timezone_type] => 1 [timezone] => +00:00 ) ) )
Log({ "id": "5369811349536768", "created": "2020-04-24T13:05:53+00:00", "type": "created", "errors": [], "payment": { "id": "5949004768608256", "description": "Electricity for the Long Night", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "barCode": "83640000001075401380076105302611108067159411", "tags": ["energy", "winterfell"], "transactionIds": [], "scheduled": "2020-04-20T15:00:00+00:00", "amount": 10874, "fee": 0, "status": "canceled", "type": "utility", "created": "2020-04-13T13:05:53+00:00", "updated": "2020-04-13T13:05:53+00:00" } })
log( id: 5369811349536768, created: 2020-04-24T13:05:53+00:00, type: created, errors: [], payment: utilitypayment( id: 5949004768608256, description: Electricity for the Long Night, line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, bar_code: 83640000001075401380076105302611108067159411, tags: ["energy", "winterfell"], transaction_ids: [], scheduled: 2020-04-20T15:00:00+00:00, amount: 10874, fee: 0, status: created, type: utility, created: 2020-04-24T13:05:53+00:00, updated: 2020-04-24T13:05:53+00:00 ) )
%StarkBank.UtilityPayment.Log{ id: "5369811349536768", created: ~U[2020-04-24 18:20:15.331313Z], errors: [], type: "created", payment: %starkbank.utilitypayment{ amount: 10874, bar_code: "83640000001075401380076105302611108067159411", created: ~U[2020-04-24 18:20:15.232053Z], description: "Electricity for the Long Night", fee: 0, id: "5949004768608256", line: "83640000001 1 07540138007 0 61053026111 0 08067159411 9", scheduled: ~U[2020-04-25 15:00:00Z], status: "created", type: "utility", tags: ["energy", "winterfell"], transaction_ids: [], updated: ~U[2020-04-24 18:20:15.232053Z], } }
Log( ID: 5369811349536768, Created: 04/24/2020 18:20:39, Type: created, Errors: { }, Payment: UtilityPayment( Amount: 10874, Description: electricity payment, Line: 83640000001 1 07540138007 0 61053026111 0 08067159411 9, BarCode: 83640000001075401380076105302611108067159411, Scheduled: 04/25/2020 12:00:00, Tags: { energy winterfell }, TransactionIds: { }, Status: created, Fee: 0, Type: utility, Created: 04/24/2020 17:46:39, ID: 5949004768608256, Updated: 04/24/2020 17:46:39 ) )
{ Id:5369811349536768 Payment:{ Id:5949004768608256 Line:83640000001 1 07540138007 0 61053026111 0 08067159411 9 BarCode:83640000001075401380076105302611108067159411 Description:Electricity for the Long Night Scheduled:2020-04-25 15:00:00.000000 +0000 +0000 Tags:[energy winterfell] TransactionIds:[] Status:created Type:utility Amount:10874 Fee:0 TransactionIds:[5733517593935872 6057392487792640] Created:2020-04-24 13:05:53.00000 +0000 +0000 Updated:2020-04-24 13:05:53.00000 +0000 +0000 } Errors:[] Type:created Created:2020-04-24 17:51:54.284559 +0000 +0000 }
{:id "5369811349536768", :created "2020-04-24T13:30:07.200512+00:00", :errors [], :type "created", :payment {:description "Electricity for the Long Night", :amount 10874, :fee 0, :tags ["energy" "winterfell"], :created "2020-04-24T19:04:46.594557+00:00", :line "83640000001 1 07540138007 0 61053026111 0 08067159411 9", :status "created", :id "5949004768608256", :scheduled "2020-04-25T15:00:00+00:00", :bar-code "83640000001075401380076105302611108067159411", :updated "2020-04-24T19:04:46.594557+00:00"}}
{ "log": { "id": "5369811349536768", "created": "2020-04-24T23:00:08.338233+00:00", "errors": [], "type": "created", "payment": { "id": "5949004768608256", "status": "created", "fee": 0, "amount": 10874, "description": "Electricity for the Long Night", "scheduled": "2020-04-25T15:22:24.957735+00:00", "created": "2020-04-24T15:22:25.096450+00:00", "barCode": "83640000001075401380076105302611108067159411", "line": "83640000001 1 07540138007 0 61053026111 0 08067159411 9", "tags": ["Energy", "Winterfell"], "transactionIds": [], "status": "created", "type": "utility", "updated": "2020-04-24T15:22:25.096450+00:00", } } }
Here we will explain how to create and manage tax payments, such as ISS and DAS.
Use this route to pay taxes using the available balance in your Stark Bank account.
line
barCode
description
tags
scheduled
import starkbank payments = starkbank.taxpayment.create([ starkbank.TaxPayment( bar_code="81660000005003657010074119002551100010601813", scheduled="2023-08-02", description="fix the road", tags=["take", "my", "money"], ) ]) for payment in payments: print(payment)
const starkbank = require('starkbank'); (async() => { let payments = await starkbank.taxPayment.create([ { barCode: '81660000005003657010074119002551100010601813', scheduled: '2023-08-02', description: 'fix the road', tags: ['take', 'my', 'money'], }, ]); for await (let payment of payments) { console.log(payment); } })();
use StarkBank\TaxPayment; $payments = TaxPayment::create([ new TaxPayment([ "barCode" => "81660000005003657010074119002551100010601813", "description" => "fix the road", "tags" => ["take", "my", "money"], "scheduled" => "2023-08-02" ]) ]); foreach($payments as $payment){ print_r($payment); }
import com.starkbank.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; List<TaxPayment> payments = new ArrayList<>(); HashMap<String, Object> data = new HashMap<>(); data.put("barCode", "81660000005003657010074119002551100010601813"); data.put("description", "fix the road"); data.put("tags", new String[]{"take", "my", "money"}); data.put("scheduled", "2023-08-02"); payments.add(new TaxPayment(data)); payments = TaxPayment.create(payments); for (TaxPayment payment : payments) { System.out.println(payment); }
require('starkbank') payments = StarkBank::TaxPayment.create( [ StarkBank::TaxPayment.new( bar_code: '81660000005003657010074119002551100010601813', description: 'fix the road', tags: ['take', 'my', 'money'], scheduled: '2023-08-02' ) ] ) payments.each do |payment| puts payment end
payments = StarkBank.TaxPayment.create!( [ %StarkBank.TaxPayment{ bar_code: "81660000005003657010074119002551100010601813", description: "fix the road", tags: ["take", "my", "money"], scheduled: "2023-08-02" } ] ) |> IO.inspect
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", tags: new List<string> { "take", "my", "money" }, scheduled: "2023-08-02" ) } ); foreach (StarkBank.TaxPayment payment in payments) { Console.WriteLine(payment); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/taxpayment" ) func main() { scheduled := time.Date(2023, 8, 2, 0, 0, 0, 0, time.UTC), payments, err := taxpayment.Create( []taxpayment.TaxPayment{ { BarCode: "81660000005003657010074119002551100010601813", Description: "fix the road", Tags: []string{"take", "my", "money"}, Scheduled: &scheduled, }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, payment := range payments { fmt.Printf("%+v", payment) } }
(def payments (starkbank.tax-payment/create [ { :bar-code "81660000005003657010074119002551100010601813" :scheduled "2023-08-02" :description "fix the road" :tags ["take" "my" "money"] } ] )) (println payments)
curl --location --request POST '{{baseUrl}}/v2/tax-payment' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "payments": [ { "barCode": "81660000005003657010074119002551100010601813", "tags": ["take" "my" "money"], "description": "fix the road", "scheduled": "2023-08-02" } ] }'
TaxPayment( amount=50036, bar_code=81660000005003657010074119002551100010601813, created=2023-01-24 18:03:18.662638, description=fix the road, fee=0, id=5186070702456832, line=81660000005 2 00365701007 4 41190025511 7 00010601813 8, scheduled=2023-08-02 11:00:00.000000, status=created, tags=["take", "my", "money"], transaction_ids=[], type=iss, updated=2023-01-24 18:03:18.000000 )
TaxPayment { amount: 50036, barCode: '81660000005003657010074119002551100010601813', created: '2023-01-24T18:03:18.662638+00:00', description: 'fix the road', fee: 0, id: '5186070702456832', line: '81660000005 2 00365701007 4 41190025511 7 00010601813 8', scheduled: '2023-08-02T11:00:00.000000+00:00', status: 'created', tags: [ 'take', 'my', 'money' ], transactionIds: [], type: 'iss', updated: '2023-01-24T18:03:18.662638+00:00' }
StarkBank\TaxPayment Object ( [amount] => 50036, [barCode] => 81660000005003657010074119002551100010601813, [created] => DateTime Object ( [date] => 2023-01-24 18:03:18.662638 [timezone_type] => 1 [timezone] => +00:00 ) [description] => fix the road, [fee] => 0, [id] => 5186070702456832, [line] => 81660000005 2 00365701007 4 41190025511 7 00010601813 8, [scheduled] => DateTime Object ( [date] => 2023-08-02 11:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created, [tags] => Array ( [0] => take [1] => my [2] => money ) [transaction_ids] => Array ( ) [type] => iss, [updated] => DateTime Object ( [date] => 2023-01-24 18:03:18.662638 [timezone_type] => 1 [timezone] => +00:00 ) )
TaxPayment({ "amount": 50036, "barCode": "81660000005003657010074119002551100010601813", "created": "2023-01-24T18:03:18.662638+00:00", "description": "fix the road", "fee": 0, "id": "5186070702456832", "line": "81660000005 2 00365701007 4 41190025511 7 00010601813 8", "scheduled": "2023-08-02T11:00:00.000000+00:00", "status": "created", "tags": [ "take", "my", "money" ], "transactionIds": [], "type": "iss", "updated": "2023-01-24T18:03:18.662638+00:00" })
taxpayment( amount: 50036, bar_code: 81660000005003657010074119002551100010601813, created: 2023-01-24T18:03:18.662638+00:00, description: fix the road, fee: 0, id: 5186070702456832, line: 81660000005 2 00365701007 4 41190025511 7 00010601813 8, scheduled: 2023-08-02T11:00:00.000000+00:00, status: created, tags: ["take", "my", "money"], transaction_ids: [], type: iss, updated: 2023-01-24T18:03:18.662638+00:00 )
%StarkBank.TaxPayment{ description: "fix the road", scheduled: ~U[2023-08-02 11:00:00.000000Z], line: "81660000005 2 00365701007 4 41190025511 7 00010601813 8", bar_code: "81660000005003657010074119002551100010601813", tags: ["take", "my", "money"], transaction_ids: [], amount: 50036, status: "created", type: "iss", updated: ~U[2023-01-30 18:26:20.785439Z], created: ~U[2023-01-30 18:26:20.785430Z], fee: 0, id: "5096686175125504" }
TaxPayment( Amount: 50036, BarCode: 81660000005003657010074119002551100010601813, Created: 01/24/2023 18:03:18, Description: fix the road, Fee: 0, ID: 5186070702456832, Line: 81660000005 2 00365701007 4 41190025511 7 00010601813 8, Scheduled: 08/02/2023 11:00:00, Status: created, Tags: { "take", "my", "money" }, TransactionIds: { }, Type: iss, Updated: 01/24/2023 18:03:18 )
{ Id:5186070702456832 Line:81660000005 2 00365701007 4 41190025511 7 00010601813 8 BarCode:81660000005003657010074119002551100010601813 Description:fix the road Scheduled:2023-08-02 18:18:12.955754 +0000 +0000 Tags:[take my money] Status:created Amount:50036 Fee:0 Type:iss TransactionIds:[] Updated:2023-01-24 11:16:31.994675 +0000 +0000 Created:2021-01-24 17:18:12.974157 +0000 +0000 }
{ :amount: 50036, :bar-code: "81660000005003657010074119002551100010601813", :created: "2023-01-24T18:03:18.662638+00:00", :description: "fix the road", :fee: 0, :id: "5186070702456832", :line: "81660000005 2 00365701007 4 41190025511 7 00010601813 8", :scheduled: "2023-08-02T11:00:00.000000+00:00", :status: "created", :tags: [ "take", "my", "money" ], :transaction-ids: [], :type: "iss", :updated: "2023-01-24T18:03:18.662638+00:00" }
{ "message": "Tax Payment(s) successfully created", "payments": [ { "amount": 50036, "barCode": "81660000005003657010074119002551100010601813", "created": "2023-01-24T18:03:18.662638+00:00", "description": "fix the road", "fee": 0, "id": "5186070702456832", "line": "81660000005 2 00365701007 4 41190025511 7 00010601813 8", "scheduled": "2023-08-02T11:00:00.000000+00:00", "status": "created", "tags": ["take", "my", "money"], "transactionIds": [], "type": "iss", "updated": "2023-01-24T18:03:18.662638+00:00" } ] }
Get a list of non-deleted tax payments in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
fields
import starkbank payments = starkbank.taxpayment.query( after="2023-01-01", before="2023-01-30" ) for payment in payments: print(payment)
const starkbank = require('starkbank'); (async() => { let payments = await starkbank.taxPayment.query({ after: '2023-01-01', before: '2023-01-30' }); for await (let payment of payments) { console.log(payment); } })();
use StarkBank\TaxPayment; $payments = StarkBank\TaxPayment::query([ "after" => "2023-01-01", "before" => "2023-01-30" ]); foreach($payments as $payment){ print_r($payment); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2023-01-01"); params.put("before", "2023-01-30"); Generator<TaxPayment> payments = TaxPayment.query(params); for (TaxPayment payment : payments){ System.out.println(payment); }
require('starkbank') payments = StarkBank::TaxPayment.query( after: '2023-01-01', before: '2023-01-30' ) payments.each do |payment| puts payment end
payments = StarkBank.TaxPayment.query!( after: "2023-01-01", before: "2023-01-30" ) for payment <- payments do payment |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.TaxPayment> payments = StarkBank.TaxPayment.Query( after: new DateTime(2023, 1, 1), before: new DateTime(2023, 1, 30) ); foreach(StarkBank.TaxPayment payment in payments) { Console.WriteLine(payment); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/taxpayment" ) func main() { var params = map[string]interface{}{} params["after"] = "2021-04-01" params["before"] = "2021-04-30" payments := taxpayment.Query(params, nil) for payment := range payments { fmt.Printf("%+v", payment) } }
(def payments (starkbank.tax-payment/query { :after "2023-01-01" :before "2023-01-30" })) (dorun (map println payments))
curl --location --request GET '{{baseUrl}}/v2/tax-payment?after=2023-01-01&before=2023-01-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
TaxPayment( amount=50036, bar_code=81660000005003657010074119002551100010601813, created=2023-01-24 18:03:18.662638, description=fix the road, fee=0, id=5186070702456832, line=81660000005 2 00365701007 4 41190025511 7 00010601813 8, scheduled=2023-08-02 11:00:00.000000, status=created, tags=["take", "my", "money"], transaction_ids=[], type=iss, updated=2023-01-24 18:03:18.000000 )
TaxPayment { amount: 50036, barCode: '81660000005003657010074119002551100010601813', created: '2023-01-24T18:03:18.662638+00:00', description: 'fix the road', fee: 0, id: '5186070702456832', line: '81660000005 2 00365701007 4 41190025511 7 00010601813 8', scheduled: '2023-08-02T11:00:00.000000+00:00', status: 'created', tags: [ 'take', 'my', 'money' ], transactionIds: [], type: 'iss', updated: '2023-01-24T18:03:18.662638+00:00' }
StarkBank\TaxPayment Object ( [amount] => 50036, [barCode] => 81660000005003657010074119002551100010601813, [created] => DateTime Object ( [date] => 2023-01-24 18:03:18.662638 [timezone_type] => 1 [timezone] => +00:00 ) [description] => fix the road, [fee] => 0, [id] => 5186070702456832, [line] => 81660000005 2 00365701007 4 41190025511 7 00010601813 8, [scheduled] => DateTime Object ( [date] => 2023-08-02 11:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created, [tags] => Array ( [0] => take [1] => my [2] => money ) [transaction_ids] => Array ( ) [type] => iss, [updated] => DateTime Object ( [date] => 2023-01-24 18:03:18.662638 [timezone_type] => 1 [timezone] => +00:00 ) )
TaxPayment({ "amount": 50036, "barCode": "81660000005003657010074119002551100010601813", "created": "2023-01-24T18:03:18.662638+00:00", "description": "fix the road", "fee": 0, "id": "5186070702456832", "line": "81660000005 2 00365701007 4 41190025511 7 00010601813 8", "scheduled": "2023-08-02T11:00:00.000000+00:00", "status": "created", "tags": [ "take", "my", "money" ], "transactionIds": [], "type": "iss", "updated": "2023-01-24T18:03:18.662638+00:00" })
taxpayment( amount: 50036, bar_code: 81660000005003657010074119002551100010601813, created: 2023-01-24T18:03:18.662638+00:00, description: fix the road, fee: 0, id: 5186070702456832, line: 81660000005 2 00365701007 4 41190025511 7 00010601813 8, scheduled: 2023-08-02T11:00:00.000000+00:00, status: created, tags: ["take", "my", "money"], transaction_ids: [], type: iss, updated: 2023-01-24T18:03:18.662638+00:00 )
%StarkBank.TaxPayment{ description: "fix the road", scheduled: ~U[2023-08-02 11:00:00.000000Z], line: "81660000005 2 00365701007 4 41190025511 7 00010601813 8", bar_code: "81660000005003657010074119002551100010601813", tags: ["take", "my", "money"], transaction_ids: [], amount: 50036, status: "created", type: "iss", updated: ~U[2023-01-30 18:26:20.785439Z], created: ~U[2023-01-30 18:26:20.785430Z], fee: 0, id: "5096686175125504" }
TaxPayment( Amount: 50036, BarCode: 81660000005003657010074119002551100010601813, Created: 01/24/2023 18:03:18, Description: fix the road, Fee: 0, ID: 5186070702456832, Line: 81660000005 2 00365701007 4 41190025511 7 00010601813 8, Scheduled: 08/02/2023 11:00:00, Status: created, Tags: { "take", "my", "money" }, TransactionIds: { }, Type: iss, Updated: 01/24/2023 18:03:18 )
{ Id:5186070702456832 Line:81660000005 2 00365701007 4 41190025511 7 00010601813 8 BarCode:81660000005003657010074119002551100010601813 Description:fix the road Scheduled:2023-08-02 18:18:12.955754 +0000 +0000 Tags:[take my money] Status:created Amount:50036 Fee:0 Type:iss TransactionIds:[] Updated:2023-01-24 11:16:31.994675 +0000 +0000 Created:2021-01-24 17:18:12.974157 +0000 +0000 }
{ :amount: 50036, :bar-code: "81660000005003657010074119002551100010601813", :created: "2023-01-24T18:03:18.662638+00:00", :description: "fix the road", :fee: 0, :id: "5186070702456832", :line: "81660000005 2 00365701007 4 41190025511 7 00010601813 8", :scheduled: "2023-08-02T11:00:00.000000+00:00", :status: "created", :tags: [ "take", "my", "money" ], :transaction-ids: [], :type: "iss", :updated: "2023-01-24T18:03:18.662638+00:00" }
{ "cursor": null, "payments": [ { "amount": 50036, "barCode": "81660000005003657010074119002551100010601813", "created": "2023-01-24T18:03:18.662638+00:00", "description": "fix the road", "fee": 0, "id": "5186070702456832", "line": "81660000005 2 00365701007 4 41190025511 7 00010601813 8", "scheduled": "2023-08-02T11:00:00.000000+00:00", "status": "created", "tags": ["take", "my", "money"], "transactionIds": [], "type": "iss", "updated": "2023-01-24T18:03:18.662638+00:00" } ] }
Get a single tax payment by its id.
id
fields
import starkbank payment = starkbank.taxpayment.get("5186070702456832") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.taxPayment.get('5186070702456832'); console.log(payment); })();
use StarkBank\TaxPayment; $payment = StarkBank\TaxPayment::get("5186070702456832"); print_r($payment);
import com.starkbank.*; TaxPayment payment = TaxPayment.get("5186070702456832"); System.out.println(payment);
require('starkbank') payment = StarkBank::TaxPayment.get('5186070702456832') puts payment
payment = StarkBank.TaxPayment.get!("5186070702456832") payment |> IO.inspect
using System; StarkBank.TaxPayment payment = StarkBank.TaxPayment.Get("5186070702456832"); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/taxpayment" ) func main() { payment, err := taxpayment.Get("5186070702456832", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.tax-payment/get "5186070702456832")) (println payment)
curl --location --request GET '{{baseUrl}}/v2/tax-payment/5186070702456832' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
TaxPayment( amount=50036, bar_code=81660000005003657010074119002551100010601813, created=2023-01-24 18:03:18.662638, description=fix the road, fee=0, id=5186070702456832, line=81660000005 2 00365701007 4 41190025511 7 00010601813 8, scheduled=2023-08-02 11:00:00, status=created, tags=["take", "my", "money"], transaction_ids=[], type=iss, updated=2023-01-24 18:03:18.662638 )
TaxPayment { amount: 50036, barCode: '81660000005003657010074119002551100010601813', created: '2023-01-24T18:03:18.662638+00:00', description: 'fix the road', fee: 0, id: '5186070702456832', line: '81660000005 2 00365701007 4 41190025511 7 00010601813 8', scheduled: '2023-08-02T11:00:00.000000+00:00', status: 'created', tags: [ 'take', 'my', 'money' ], transactionIds: [], type: 'iss', updated: '2023-01-24T18:03:18.662638+00:00' }
StarkBank\TaxPayment Object ( [amount] => 50036, [barCode] => 81660000005003657010074119002551100010601813, [created] => DateTime Object ( [date] => 2023-01-24 18:03:18.662638 [timezone_type] => 1 [timezone] => +00:00 ) [description] => fix the road, [fee] => 0, [id] => 5186070702456832, [line] => 81660000005 2 00365701007 4 41190025511 7 00010601813 8, [scheduled] => DateTime Object ( [date] => 2023-08-02 11:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created, [tags] => Array ( [0] => take [1] => my [2] => money ) [transaction_ids] => Array ( ) [type] => iss, [updated] => DateTime Object ( [date] => 2023-01-24 18:03:18.662638 [timezone_type] => 1 [timezone] => +00:00 ) )
TaxPayment({ "amount": 50036, "barCode": "81660000005003657010074119002551100010601813", "created": "2023-01-24T18:03:18.662638+00:00", "description": "fix the road", "fee": 0, "id": "5186070702456832", "line": "81660000005 2 00365701007 4 41190025511 7 00010601813 8", "scheduled": "2023-08-02T11:00:00.000000+00:00", "status": "created", "tags": [ "take", "my", "money" ], "transactionIds": [], "type": "iss", "updated": "2023-01-24T18:03:18.662638+00:00" })
taxpayment( amount: 50036, bar_code: 81660000005003657010074119002551100010601813, created: 2023-01-24T18:03:18.662638+00:00, description: fix the road, fee: 0, id: 5186070702456832, line: 81660000005 2 00365701007 4 41190025511 7 00010601813 8, scheduled: 2023-08-02T11:00:00.000000+00:00, status: created, tags: ["take", "my", "money"], transaction_ids: [], type: iss, updated: 2023-01-24T18:03:18.662638+00:00 )
%StarkBank.TaxPayment{ amount: 50036, bar_code: "81660000005003657010074119002551100010601813", created: ~U[2023-01-24 18:03:18.662638Z], description: "fix the road", fee: 0, id: "5186070702456832", line: "81660000005 2 00365701007 4 41190025511 7 00010601813 8", scheduled: ~U[2023-08-02 11:00:00.000000Z], status: "created", tags: ["take", "my", "money"], transaction_ids: [], type: "iss", updated: ~U[2023-01-24T18:03:18.662638Z] }
TaxPayment( Amount: 50036, BarCode: 81660000005003657010074119002551100010601813, Created: 01/24/2023 18:03:18, Description: fix the road, Fee: 0, ID: 5186070702456832, Line: 81660000005 2 00365701007 4 41190025511 7 00010601813 8, Scheduled: 08/02/2023 11:00:00, Status: created, Tags: { "take", "my", "money" }, TransactionIds: { }, Type: iss, Updated: 01/24/2023 18:03:18 )
{ Id:5186070702456832 Line:81660000005 2 00365701007 4 41190025511 7 00010601813 8 BarCode:81660000005003657010074119002551100010601813 Description:fix the road Scheduled:2023-08-02 18:18:12.955754 +0000 +0000 Tags:[take my money] Status:created Amount:50036 Fee:0 Type:iss TransactionIds:[] Updated:2023-01-24 11:16:31.994675 +0000 +0000 Created:2021-01-24 17:18:12.974157 +0000 +0000 }
{ :amount: 50036, :bar-code: "81660000005003657010074119002551100010601813", :created: "2023-01-24T18:03:18.662638+00:00", :description: "fix the road", :fee: 0, :id: "5186070702456832", :line: "81660000005 2 00365701007 4 41190025511 7 00010601813 8", :scheduled: "2023-08-02T11:00:00.000000+00:00", :status: "created", :tags: [ "take", "my", "money" ], :transaction-ids: [], :type: "iss", :updated: "2023-01-24T18:03:18.662638+00:00" }
{ "payment": { "amount": 50036, "barCode": "81660000005003657010074119002551100010601813", "created": "2023-01-24T18:03:18.662638+00:00", "description": "fix the road", "fee": 0, "id": "5186070702456832", "line": "81660000005 2 00365701007 4 41190025511 7 00010601813 8", "scheduled": "2023-08-02T11:00:00.000000+00:00", "status": "created", "tags": ["take", "my", "money"], "transactionIds": [], "type": "iss", "updated": "2023-01-24T18:03:18.662638+00:00" } }
Cancel a scheduled tax payment. You can only cancel tax payments before they start being processed.
id
import starkbank payment = starkbank.taxpayment.delete("5186070702456832") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.taxPayment.delete('5186070702456832'); console.log(payment); })();
StarkBank\TaxPayment; $payment = StarkBank\TaxPayment::delete("5186070702456832"); print_r($payment);
import com.starkbank.*; TaxPayment payment = TaxPayment.delete("5186070702456832"); System.out.println(payment);
require('starkbank') payment = StarkBank::TaxPayment.delete('5186070702456832') puts payment
payment = StarkBank.TaxPayment.delete!("5186070702456832") payment |> IO.inspect
using System; StarkBank.TaxPayment payment = StarkBank.TaxPayment.Delete("5186070702456832"); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletopayment" ) func main() { payment, err := boletopayment.Delete("5186070702456832", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.tax-payment/delete "5186070702456832")) (println payment)
curl --location --request DELETE '{{baseUrl}}/v2/tax-payment/5186070702456832' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
TaxPayment( amount=50036, bar_code=81660000005003657010074119002551100010601813, created=2023-01-24 18:03:18.662638, description=fix the road, fee=0, id=5186070702456832, line=81660000005 2 00365701007 4 41190025511 7 00010601813 8, scheduled=2023-08-02 11:00:00.000000, status=canceled, tags=["take", "my", "money"], transaction_ids=[], type=iss, updated=2023-01-26 14:44:22.522334 )
TaxPayment { amount: 50036, barCode: '81660000005003657010074119002551100010601813', created: '2023-01-24T18:03:18.662638+00:00', description: 'fix the road', fee: 0, id: '5186070702456832', line: '81660000005 2 00365701007 4 41190025511 7 00010601813 8', scheduled: '2023-08-02T11:00:00.000000+00:00', status: 'canceled', tags: [ 'take', 'my', 'money' ], transactionIds: [], type: 'iss', updated: '2023-01-26T14:44:22.522334+00:00' }
StarkBank\TaxPayment Object ( [amount] => 50036, [barCode] => 81660000005003657010074119002551100010601813, [created] => DateTime Object ( [date] => 2023-01-24 18:03:18.662638 [timezone_type] => 1 [timezone] => +00:00 ) [description] => fix the road, [fee] => 0, [id] => 5186070702456832, [line] => 81660000005 2 00365701007 4 41190025511 7 00010601813 8, [scheduled] => DateTime Object ( [date] => 2023-08-02 11:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => canceled, [tags] => Array ( [0] => take [1] => my [2] => money ) [transaction_ids] => Array ( ) [type] => iss, [updated] => DateTime Object ( [date] => 2023-01-26 14:44:22.522334 [timezone_type] => 1 [timezone] => +00:00 ) )
TaxPayment({ "amount": 50036, "barCode": "81660000005003657010074119002551100010601813", "created": "2023-01-24T18:03:18.662638+00:00", "description": "fix the road", "fee": 0, "id": "5186070702456832", "line": "81660000005 2 00365701007 4 41190025511 7 00010601813 8", "scheduled": "2023-08-02T11:00:00.000000+00:00", "status": "canceled", "tags": [ "take", "my", "money" ], "transactionIds": [], "type": "iss", "updated": "2023-01-26T14:44:22.522334+00:00" })
taxpayment( amount: 50036, bar_code: 81660000005003657010074119002551100010601813, created: 2023-01-24T18:03:18.662638+00:00, description: fix the road, fee: 0, id: 5186070702456832, line: 81660000005 2 00365701007 4 41190025511 7 00010601813 8, scheduled: 2023-08-02T11:00:00.000000+00:00, status: canceled, tags: ["take", "my", "money"], transaction_ids: [], type: iss, updated: 2023-01-26T14:44:22.522334+00:00 )
%StarkBank.TaxPayment{ amount: 50036, bar_code: "81660000005003657010074119002551100010601813", created: ~U[2023-01-24 18:03:18.662638Z], description: "fix the road", fee: 0, id: "5186070702456832", line: "81660000005 2 00365701007 4 41190025511 7 00010601813 8", scheduled: ~U[2023-08-02 11:00:00.000000Z], status: "canceled", tags: ["take", "my", "money"], transaction_ids: [], type: "iss", updated: ~U[2023-01-26T14:44:22.522334Z] }
TaxPayment( Amount: 50036, BarCode: 81660000005003657010074119002551100010601813, Created: 01/24/2023 18:03:18, Description: fix the road, Fee: 0, ID: 5186070702456832, Line: 81660000005 2 00365701007 4 41190025511 7 00010601813 8, Scheduled: 08/02/2023 11:00:00, Status: canceled, Tags: { "take", "my", "money" }, TransactionIds: { }, Type: iss, Updated: 01/26/2023 14:44:22 )
{ Id:5186070702456832 Line:81660000005 2 00365701007 4 41190025511 7 00010601813 8 BarCode:81660000005003657010074119002551100010601813 Description:fix the road Scheduled:2023-08-02 18:18:12.955754 +0000 +0000 Tags:[take my money] Status:canceled Amount:50036 Fee:0 Type:iss TransactionIds:[] Updated:2023-01-24 11:16:31.994675 +0000 +0000 Created:2021-01-24 17:18:12.974157 +0000 +0000 }
{ :amount: 50036, :bar-code: "81660000005003657010074119002551100010601813", :created: "2023-01-24T18:03:18.662638+00:00", :description: "fix the road", :fee: 0, :id: "5186070702456832", :line: "81660000005 2 00365701007 4 41190025511 7 00010601813 8", :scheduled: "2023-08-02T11:00:00.000000+00:00", :status: "canceled", :tags: [ "take", "my", "money" ], :transaction-ids: [], :type: "iss", :updated: "2023-01-26T14:44:22.522334+00:00" }
{ "message": "Tax Payment successfully deleted", "payment": { "amount": 50036, "barCode": "81660000005003657010074119002551100010601813", "created": "2023-01-24T18:03:18.662638+00:00", "description": "fix the road", "fee": 0, "id": "5186070702456832", "line": "81660000005 2 00365701007 4 41190025511 7 00010601813 8", "scheduled": "2023-08-02T11:00:00.000000+00:00", "status": "canceled", "tags": ["take", "my", "money"], "transactionIds": [], "type": "iss", "updated": "2023-01-26T14:44:22.522334+00:00" } }
Get a tax payment PDF receipt. You can only get a receipt for payments whose status are either success, processing or created.
id
import starkbank pdf = starkbank.taxpayment.pdf("5186070702456832") with open("tax-payment.pdf", "wb") as file: file.write(pdf)
const starkbank = require('starkbank'); const fs = require('fs').promises; (async() => { let pdf = await starkbank.taxPayment.pdf('5186070702456832'); await fs.writeFile('tax-payment.pdf', pdf); })();
use StarkBank\TaxPayment; $pdf = StarkBank\TaxPayment::pdf("5186070702456832"); $fp = fopen('tax-payment.pdf', 'w'); fwrite($fp, $pdf); fclose($fp);
import java.io.File; import java.io.InputStream; import java.nio.file.StandardCopyOption; import com.starkbank.*; InputStream pdf = TaxPayment.pdf("5186070702456832"); java.nio.file.Files.copy( pdf, new File("iss-payment.pdf").toPath(), StandardCopyOption.REPLACE_EXISTING );
require('starkbank') pdf = StarkBank::TaxPayment.pdf('5186070702456832') File.open('iss-payment.pdf', 'w') { |file| file.write(pdf) }
pdf = StarkBank.TaxPayment.pdf!("5186070702456832") file = File.open!("iss-payment.pdf", [:write]) IO.binwrite(file, pdf) File.close(file)
byte[] pdf = StarkBank.TaxPayment.Pdf("5186070702456832"); System.IO.File.WriteAllBytes("iss-payment.pdf", pdf);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/taxpayment" ) func main() { pdf, err := taxpayment.Pdf("5186070702456832", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } errFile := ioutil.WriteFile("taxpayment.pdf", pdf, 0666) if errFile != nil { fmt.Print(errFile) } }
(clojure.java.io/copy (starkbank.tax-payment/pdf "5186070702456832") (clojure.java.io/file "iss-payment.pdf"))
curl --location --request GET '{{baseUrl}}/v2/tax-payment/5186070702456832/pdf' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Get a paged list of all tax payment logs. A log tracks a change in the payment entity according to its life cycle.
cursor
limit
after
before
types
paymentIds
import starkbank logs = starkbank.taxpayment.log.query( payment_ids=["5133524998815744"] ) for log in logs: print(log)
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.taxPayment.log.query({ paymentIds:['5133524998815744'], }); for await (let log of logs) { console.log(log); } })();
StarkBank\TaxPayment; $logs = StarkBank\TaxPayment\Log::query([ "paymentIds" => ["5133524998815744"] ]); foreach($logs as $log){ print_r($log); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("paymentIds", "5133524998815744"); Generator<TaxPayment.Log> logs = TaxPayment.Log.query(params); for (TaxPayment.Log log : logs){ System.out.println(log); }
require('starkbank') logs = StarkBank::TaxPayment::Log.query( payment_ids: ['5133524998815744'] ) logs.each do |log| puts log end
logs = StarkBank.TaxPayment.Log.query!( payment_ids: ["5133524998815744"] ) for log <- logs do log |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.TaxPayment.Log> logs = StarkBank.TaxPayment.Log.Query( paymentIds: new List<string> { "5133524998815744" } ); foreach(StarkBank.TaxPayment.Log log in logs) { Console.WriteLine(log); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/taxpayment/log" ) func main() { var params = map[string]interface{}{} params["paymentIds"] = []string{"5133524998815744"} logs := log.Query(params, nil) for log := range logs { fmt.Printf("%+v", log) } }
(def logs (starkbank.tax-payment.log/query { :payment-ids ["5133524998815744"] })) (dorun (map println logs))
curl --location --request GET '{{baseUrl}}/v2/tax-payment/log?paymentIds=5133524998815744' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2023-01-18 16:49:06.080497, errors=[], id=5068165377687552, payment=TaxPayment( amount=8271, bar_code=85660000000827100640074119002551100010601813, created=2023-01-18 16:49:05.981612, description=paying taxes, fee=0, id=5133524998815744, line=85660000000 9 82710064007 3 41190025511 7 00010601813 8, scheduled=2023-01-20 11:00:00.000000, status=created, tags=['expensive'], transaction_ids=[], type=iss, updated=2023-01-20 15:00:01.494340 ), type=created )
Log { id: '5068165377687552', created: '2023-01-18T16:49:06.080497+00:00', type: 'created', errors: [], payment: { amount: 8271, barCode: '85660000000827100640074119002551100010601813', created: '2023-01-18T16:49:05.981612+00:00', description: 'paying taxes', fee: 0, id: '5133524998815744', line: '85660000000 9 82710064007 3 41190025511 7 00010601813 8', scheduled: '2023-01-20T11:00:00.000000+00:00', status: 'created', tags: [ 'expensive' ], transactionIds: [], type: 'iss', updated: '2023-01-20T15:00:01.494340+00:00' } }
StarkBank\TaxPayment\Log Object ( [id] => 5068165377687552 [type] => created [errors] => Array ( ) [payment] => Array ( [amount] => 8271 [barCode] => 85660000000827100640074119002551100010601813 [created] => 2023-01-18T16:49:05.981612+00:00 [description] => paying taxes [fee] => 0 [id] => 5133524998815744 [line] => 85660000000 9 82710064007 3 41190025511 7 00010601813 8 [scheduled] => DateTime Object ( [date] => 2023-08-02 11:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [tags] => Array ( [0] => expensive ) [transactionIds] => Array ( ) [type] => iss [updated] => 2023-01-20T15:00:01.494340+00:00 ) [created] => DateTime Object ( [date] => 2023-01-18 16:49:06.080497 [timezone_type] => 1 [timezone] => +00:00 ) )
Log({ "created": "2023-01-18T16:49:06.080497+00:00", "type": "created", "errors": [], "payment": { "line": "85660000000 9 82710064007 3 41190025511 7 00010601813 8", "barCode": "85660000000827100640074119002551100010601813", "description": "paying taxes", "tags": [ "expensive" ], "scheduled": "2023-01-20T11:00:00.000000+00:00", "status": "created", "amount": "8271", "transaction_ids": [], "fee": "0", "type": "iss", "updated": "2023-01-20T15:00:01.494340+00:00", "created": "2023-01-18T16:49:05.981612+00:00", "id": "5133524998815744" }, "id": "5068165377687552" })
log( id: 5068165377687552, type: created, errors: [], payment: taxpayment( id: 5133524998815744, line: 85660000000 9 82710064007 3 41190025511 7 00010601813 8, bar_code: 85660000000827100640074119002551100010601813, description: paying taxes, tags: ["expensive"], transaction_ids: [], scheduled: 2023-01-20T11:00:00.000000+00:00, status: created, amount: 8271, fee: 0, type: iss, updated: 2023-01-20T15:00:01+00:00, created: 2023-01-18T16:49:05+00:00 ), created: 2023-01-18T16:49:06+00:00 )
%StarkBank.TaxPayment.Log{ id: "5068165377687552", payment: %StarkBank.TaxPayment{ description: "paying taxes", scheduled: ~U[2023-01-20 11:00:00.000000Z], line: "85660000000 9 82710064007 3 41190025511 7 00010601813 8", bar_code: "85660000000827100640074119002551100010601813", tags: ["expensive"], transaction_ids: [], amount: 8271, status: "created", type: "iss", updated: ~U[2023-01-20 15:00:01.494340Z], created: ~U[2023-01-18 16:49:05.981612Z], fee: 0, id: "5133524998815744" }, errors: [], type: "created", created: ~U[2023-01-18 16:49:06.080497Z] }
Log( ID: 5068165377687552, Created: 01/18/2023 16:49:06, Type: created, Errors: { }, Payment: TaxPayment( Amount: 8271, Description: paying taxes, Line: 85660000000 9 82710064007 3 41190025511 7 00010601813 8, BarCode: 85660000000827100640074119002551100010601813, Scheduled: 01/20/2024 11:00:00, Tags: { expensive }, TransactionIds: { }, Type: iss, Status: created, Fee: 0, Created: 01/20/2023 15:00:01, ID: 5133524998815744 ) )
{ Id:5068165377687552 Payment:{ Id:5133524998815744 Line:85660000000 9 82710064007 3 41190025511 7 00010601813 8 BarCode:85660000000827100640074119002551100010601813 Description:paying taxes Scheduled:2023-01-20 11:00:00.000000 +0000 +0000 Tags:[expensive] Status:created Amount:8271 Fee:0 Type:iss TransactionIds:[] Updated:2023-01-18 16:49:05.981612 +0000 +0000 Created:2023-01-20 15:00:01.494340 +0000 +0000 } Errors:[] Type:created Created:2023-01-18 16:49:06.080497 +0000 +0000 }
{:id "5068165377687552", :created "2023-01-18T16:49:06.080497+00:00", :errors [], :type "created", :payment {:description "paying taxes", :amount 8271, :fee 0, :tags ["expensive"], :transaction-ids [], :type "iss", :created "2023-01-18T16:49:05.981612+00:00", :line "85660000000 9 82710064007 3 41190025511 7 00010601813 8", :status "created", :id "5133524998815744", :scheduled "2023-01-20T11:00:00.000000+00:00", :bar-code "85660000000827100640074119002551100010601813"}}
{ "cursor": null, "logs": [ { "created": "2023-01-18T16:49:06.080497+00:00", "errors": [], "id": "5068165377687552", "payment": { "amount": 8271, "barCode": "85660000000827100640074119002551100010601813", "created": "2023-01-18T16:49:05.981612+00:00", "description": "paying taxes", "fee": 0, "id": "5133524998815744", "line": "85660000000 9 82710064007 3 41190025511 7 00010601813 8", "scheduled": "2023-01-20T11:00:00.000000+00:00", "status": "created", "tags": [ "expensive" ], "transactionIds": [], "type": "iss", "updated": "2023-01-20T15:00:01.494340+00:00" }, "type": "created" } ] }
Get a single tax payment log by its id.
id
fields
import starkbank log = starkbank.taxpayment.log.get("5068165377687552") print(log)
const starkbank = require('starkbank'); (async() => { let log = await starkbank.taxPayment.log.get('5068165377687552'); console.log(log); })();
use StarkBank\TaxPayment; $log = StarkBank\TaxPayment\Log::get("5068165377687552"); print_r($log);
import com.starkbank.*; TaxPayment.Log log = TaxPayment.Log.get("5068165377687552"); System.out.println(log);
require('starkbank') log = StarkBank::TaxPayment::Log.get('5068165377687552') puts log
log = StarkBank.TaxPayment.Log.get!("5068165377687552") log |> IO.inspect
using System; StarkBank.TaxPayment.Log log = StarkBank.TaxPayment.Log.Get("5068165377687552"); Console.WriteLine(log);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/taxpayment/log" ) func main() { log, err := log.Get("5068165377687552", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
(def log (starkbank.tax-payment.log/get "5068165377687552")) (println log)
curl --location --request GET '{{baseUrl}}/v2/tax-payment/log/5068165377687552' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2023-01-18 16:49:06.080497, errors=[], id=5068165377687552, payment=TaxPayment( amount=8271, bar_code=85660000000827100640074119002551100010601813, created=2023-01-18 16:49:05.981612, description=paying taxes, fee=0, id=5133524998815744, line=85660000000 9 82710064007 3 41190025511 7 00010601813 8, scheduled=2023-01-20 11:00:00, status=created, tags=['expensive'], transaction_ids=[], type=iss, updated=2023-01-20 15:00:01.494340 ), type=created )
Log { id: '5068165377687552', created: '2023-01-18T16:49:06.080497+00:00', type: 'created', errors: [], payment: { amount: 8271, barCode: '85660000000827100640074119002551100010601813', created: '2023-01-18T16:49:05.981612+00:00', description: 'paying taxes', fee: 0, id: '5133524998815744', line: '85660000000 9 82710064007 3 41190025511 7 00010601813 8', scheduled: '2023-01-20T11:00:00+00:00', status: 'created', tags: [ 'expensive' ], transactionIds: [], type: 'iss', updated: '2023-01-20T15:00:01.494340+00:00' } }
StarkBank\TaxPayment\Log Object ( [id] => 5068165377687552 [type] => created [errors] => Array ( ) [payment] => Array ( [amount] => 8271 [barCode] => 85660000000827100640074119002551100010601813 [created] => 2023-01-18T16:49:05.981612+00:00 [description] => paying taxes [fee] => 0 [id] => 5133524998815744 [scheduled] => DateTime Object ( [date] => 2023-08-02 11:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [tags] => Array ( [0] => expensive ) [transactionIds] => Array ( ) [type] => iss [updated] => 2023-01-20T15:00:01.494340+00:00 ) [created] => DateTime Object ( [date] => 2023-01-18 16:49:06.080497 [timezone_type] => 1 [timezone] => +00:00 ) )
Log({ "created": "2023-01-18T16:49:06.080497+00:00", "type": "created", "errors": [], "payment": { "line": "85660000000 9 82710064007 3 41190025511 7 00010601813 8", "barCode": "85660000000827100640074119002551100010601813", "description": "paying taxes", "tags": [ "expensive" ], "transactionIds": [], "scheduled": "2023-01-20T11:00:00+00:00", "status": "created", "amount": "8271", "fee": "0", "type": "iss", "updated": "2023-01-20T15:00:01.494340+00:00", "created": "2023-01-18T16:49:05.981612+00:00", "id": "5133524998815744" }, "id": "5068165377687552" })
log( id: 5068165377687552, type: created, errors: [], payment: taxpayment( id: 5133524998815744, line: 85660000000 9 82710064007 3 41190025511 7 00010601813 8, bar_code: 85660000000827100640074119002551100010601813, description: paying taxes, tags: ["expensive"], transaction_ids: [], scheduled: 2023-01-20T11:00:00+00:00, status: created, amount: 8271, fee: 0, type: iss, updated: 2023-01-20T15:00:01+00:00, created: 2023-01-18T16:49:05+00:00 ), created: 2023-01-18T16:49:06+00:00 )
%StarkBank.TaxPayment.Log{ id: "5068165377687552", payment: %StarkBank.TaxPayment{ description: "paying taxes", scheduled: ~U[2023-01-20 11:00:00Z], line: "85660000000 9 82710064007 3 41190025511 7 00010601813 8", bar_code: "85660000000827100640074119002551100010601813", tags: ["expensive"], transaction_ids: [], amount: 8271, status: "created", type: "iss", updated: ~U[2023-01-20 15:00:01.494340Z], created: ~U[2023-01-18 16:49:05.981612Z], fee: 0, id: "5133524998815744" }, errors: [], type: "created", created: ~U[2023-01-18 16:49:06.080497Z] }
Log( ID: 5068165377687552, Created: 01/18/2023 16:49:06, Type: created, Errors: { }, Payment: TaxPayment( Amount: 8271, Description: paying taxes, Line: 85660000000 9 82710064007 3 41190025511 7 00010601813 8, BarCode: 85660000000827100640074119002551100010601813, Scheduled: 01/20/2023 12:00:00, Tags: { expensive }, TransactionIds: { }, Type: iss, Status: created, Fee: 0, Created: 01/20/2023 15:00:01, ID: 5133524998815744 ) )
{ Id:5068165377687552 Payment:{ Id:5133524998815744 Line:85660000000 9 82710064007 3 41190025511 7 00010601813 8 BarCode:85660000000827100640074119002551100010601813 Description:paying taxes Scheduled:2023-01-20 11:00:00.000000 +0000 +0000 Tags:[expensive] Status:created Amount:8271 Fee:0 Type:iss TransactionIds:[] Updated:2023-01-18 16:49:05.981612 +0000 +0000 Created:2023-01-20 15:00:01.494340 +0000 +0000 } Errors:[] Type:created Created:2023-01-18 16:49:06.080497 +0000 +0000 }
{:id "5068165377687552", :created "2023-01-18T16:49:06.080497+00:00", :errors [], :type "created", :payment {:description "paying taxes", :amount 8271, :fee 0, :tags ["expensive"], :transaction-ids [], :type "iss", :created "2023-01-18T16:49:05.981612+00:00", :line "85660000000 9 82710064007 3 41190025511 7 00010601813 8", :status "created", :id "5133524998815744", :scheduled "2023-01-20T11:00:00+00:00", :bar-code "85660000000827100640074119002551100010601813"}}
{ "log": { "created": "2023-01-18T16:49:06.080497+00:00", "errors": [], "id": "5068165377687552", "payment": { "amount": 8271, "barCode": "85660000000827100640074119002551100010601813", "created": "2023-01-18T16:49:05.981612+00:00", "description": "paying taxes", "fee": 0, "id": "5133524998815744", "line": "85660000000 9 82710064007 3 41190025511 7 00010601813 8", "scheduled": "2023-01-20T11:00:00+00:00", "status": "created", "tags": [ "expensive" ], "transactionIds": [], "type": "iss", "updated": "2023-01-20T15:00:01.494340+00:00" }, "type": "created" } }
Here we will explain how to manually pay DARFs without bar codes.
Use this route to pay DARFs using the available balance in your Stark Bank account.
description
revenueCode
taxId
competence
nominalAmount
fineAmount
interestAmount
due
referenceNumber
scheduled
tags
import starkbank payments = starkbank.darfpayment.create([ starkbank.DarfPayment( revenue_code="1240", tax_id="12.345.678/0001-95", competence="2021-03-01", reference_number="2340978970", nominal_amount=1234, fine_amount=12, interest_amount=34, due=datetime(2021, 5, 12, 15, 23, 26, 689377), scheduled=datetime(2021, 3, 12, 15, 23, 26, 689377) tags=["DARF", "making money"], description="take my money", ) ]) for payment in payments: print(payment)
const starkbank = require('starkbank'); (async() => { let payments = await starkbank.darfPayment.create([ { revenueCode: "1240", taxId: "12.345.678/0001-95", competence: "2021-03-01", referenceNumber: "2340978970", nominalAmount: 1234, fineAmount: 12, interestAmount: 34, due: "2021-05-12", scheduled: "2021-03-12", tags: ["DARF", "making money"], description: "take my money" } ]); for await (let payment of payments) { console.log(payment); } })();
use StarkBank\DarfPayment; $payments = DarfPayment::create([ new DarfPayment([ "description" => "take my money", "tags" => ["DARF", "making money"], "due" => "2021-05-12", "competence" => "2021-03-01", "fineAmount" => 12, "interestAmount" => 34, "nominalAmount" => 1234, "revenueCode" => "1240", "referenceNumber" => "2340978970" "taxId" => "12.345.678/0001-95", "scheduled" => "2021-03-12", ]) ]); foreach($payments as $payment){ print_r($payment); }
import com.starkbank.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; HashMap<String, Object$gt data = new HashMap<$gt(); data.put("revenueCode", "1240"); data.put("taxId", "12.345.678/0001-95"); data.put("competence", "2021-03-01"); data.put("nominalAmount", "1234"); data.put("fineAmount", 12); data.put("interestAmount", 34); data.put("referenceNumber", "2340978970"); data.put("due", "2021-05-12"); data.put("scheduled", "2021-03-12"); data.put("tags", new String[]{"DARF", "making money"}); data.put("description", "take my money"); List<DarfPayment$gt payments = new ArrayList<$gt(); payments.add(new DarfPayment(data)); payments = DarfPayment.create(payments); for (DarfPayment payment : payments) { System.out.println(payment); }
require('starkbank') payments = StarkBank::DarfPayment.create( [ StarkBank::DarfPayment.new( revenue_code: "1240", tax_id: "12.345.678/0001-95", competence: "2021-03-01", nominal_amount: 1234, fine_amount: 12, interest_amount: 34, due: "2021-05-12", scheduled: "2021-03-12", reference_number: "2340978970" tags: ["DARF", "making money"], description: "take my money", ) ] ) payments.each do |payment| puts payment end
payments = StarkBank.DarfPayment.create!( [ %StarkBank.DarfPayment{ revenue_code: "1240", tax_id: "12.345.678/0001-95", competence: "2021-03-01", reference_number: "2340978970", nominal_amount: 1234, fine_amount: 12, interest_amount: 34, due: "2021-03-12", scheduled: "2021-05-12", tags: ["DARF", "making money"], description: "take my money", } ] ) |> IO.inspect
using System; using System.Collections.Generic; List<StarkBank.DarfPayment> payments = StarkBank.DarfPayment.Create( new List<StarkBank.DarfPayment>() { new StarkBank.DarfPayment( revenueCode: "1240", taxID: "12.345.678/0001-95", competence: new DateTime(2023, 03, 01), referenceNumber: "2340978970", nominalAmount: 1234, fineAmount: 12, interestAmount: 34, due: new DateTime(2021, 05, 12), scheduled: new DateTime(2021, 03, 12), tags: new List<string> { "DARF", "making money" }, description: "take my money" ) } ); foreach (StarkBank.DarfPayment payment in payments) { Console.WriteLine(payment); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/darfpayment" ) func main() { due := time.Date(2021, 05, 12, 0, 0, 0, 0, time.UTC) scheduled := time.Date(2021, 03, 12, 0, 0, 0, 0, time.UTC) payments, err := darfpayment.Create( []darfpayment.DarfPayment{ { RevenueCode: "1240", TaxId: "12.345.678/0001-95", Competence: "2021-03-01", NominalAmount: 1234, FineAmount: 12, InterestAmount: 34, ReferenceNumber: "2340978970" Due: &due, Scheduled: &scheduled, Tags: []string{"DARF", "making money"}, Description: "take my money", }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, payment := range payments { fmt.Printf("%+v", payment) } }
(def payments (starkbank.darf-payment/create [ { :revenue-code "1240", :tax-id "12.345.678/0001-95", :competence "2021-03-01", :reference-number "2340978970", :nominal-amount 1234, :fine-amount 12, :interest-amount 34, :due "2021-05-12", :scheduled "2021-03-12", :tags ["DARF", "making money"], :description "take my money" } ] )) (println payments)
curl --location --request POST '{{baseUrl}}/v2/darf-payment' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "payments": [ { "description": take my money", "tags": ["DARF", "making money"], "scheduled": "2021-03-12", "competence": "2021-03-01", "due": "2021-05-12", "fineAmount": 12, "interestAmount": 34, "nominalAmount": 1234, "referenceNumber": "2340978970", "revenueCode": "1240", "taxId": "12.345.678/0001-95" } ] }'
DarfPayment( amount=1280, competence=2021-03-01 02:59:59.999999, created=2021-02-20 14:39:15.565841, description=take my money, due=2021-05-12 02:59:59.999999, fee=0, fine_amount=12, id=5116552814788608, interest_amount=34, nominal_amount=1234, reference_number=2340978970, revenue_code=1240, scheduled=2021-03-012 15:00:00, status=created, tags=['darf', 'making money'], tax_id=12.345.678/0001-95, transaction_ids=[], updated=2021-02-20 14:39:15.565841 )
DarfPayment { id: '5116552814788608', revenueCode: '1240', taxId: '12.345.678/0001-95', competence: '2021-03-01T02:59:59.999999+00:00', referenceNumber: '2340978970', fineAmount: 12, interestAmount: 34, due: '2021-05-12T02:59:59.999999+00:00', description: 'take my money', tags: [ 'darf', 'making money' ], scheduled: '2021-03-12T15:00:00+00:00', status: 'created', amount: 1280, nominalAmount: 1234, transactionIds: [], fee: 0, updated: '2021-02-20T14:40:10.977929+00:00', created: '2021-02-20T14:40:10.977921+00:00' }
StarkBank\DarfPayment Object ( [id] => 5116552814788608 [revenueCode] => 1240 [taxId] => 12.345.678/0001-95 [competence] => DateTime Object ( [date] => 2021-03-01 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [referenceNumber] => [fineAmount] => 12 [interestAmount] => 34 [due] => DateTime Object ( [date] => 2021-05-12 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [description] => Darf Payment Example [tags] => Array ( [0] => darf [1] => making money ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2021-03-12 15:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [amount] => 1280 [nominalAmount] => 1234 [fee] => 0 [updated] => DateTime Object ( [date] => 2021-02-20 20:32:03.626083 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-02-20 20:32:03.626074 [timezone_type] => 1 [timezone] => +00:00 ) )
DarfPayment({ "description": "take my money", "revenueCode": "1240", "taxId": "12.345.678/0001-95", "competence": "2021-03-01T02:59:59.999999+00:00", "nominalAmount": 1234, "fineAmount": 12, "interestAmount": 34, "due": "2021-05-12T02:59:59.999999+00:00", "referenceNumber": "2340978970", "scheduled": "2021-03-12T16:17:20.291274+00:00", "tags": [ "darf", "making money" ], "status": "created", "amount": "1280", "fee": "0", "transactionIds": [], "updated": "2021-02-20T16:17:20.291796+00:00", "created": "2021-02-20T16:17:20.291788+00:00", "id": "5116552814788608" })
darfpayment( id: 5116552814788608, revenue_code: 1240, tax_id: 12.345.678/0001-95, competence: 2021-03-01T02:59:59+00:00, reference_number: 2340978970, fine_amount: 12, interest_amount: 34, due: 2021-05-12T02:59:59+00:00, description: take my money, tags: ["darf", "making money"], transaction_ids: [], scheduled: 2021-03-12T15:00:00+00:00, status: created, amount: 1280, nominal_amount: 1234, fee: 0, updated: 2021-02-20T16:30:21+00:00, created: 2021-02-20T16:30:21+00:00 )
%StarkBank.DarfPayment{ revenue_code: "1240", tax_id: "12.345.678/0001-95", competence: ~U[2021-03-01 02:59:59.999999Z], reference_number: "2340978970", fine_amount: 12, interest_amount: 34, due: ~U[2021-05-12 02:59:59.999999Z], description: "take my money", tags: ["darf", "making money"], transaction_ids: [], scheduled: ~U[2021-03-12 20:44:50.956510Z], status: "created", amount: 1280, nominal_amount: 1234, id: "5116552814788608", updated: ~U[2021-02-20 20:44:50.957006Z], created: ~U[2021-02-20 20:44:50.956999Z] }
DarfPayment( RevenueCode: 1240, TaxID: 12.345.678/0001-95, Description: take my money, Competence: 01/03/2021 23:59:59, FineAmount: 12, InterestAmount: 34, Due: 12/05/2021 12:00:00, ReferenceNumber: 2340978970, NominalAmount: 1234, Tags: { darf, making money }, TransactionIds: { }, Amount: 1280, Fee: 0, Created: 20/02/2021 13:45:51, Updated: 20/02/2021 13:45:51, Scheduled: 12/03/2021 12:00:00, Status: created, ID: 5116552814788608 )
{ Id:5116552814788608 RevenueCode:1240 TaxId:12.345.678/0001-95 Competence:2021-03-01 11:16:31.994675 +0000 +0000 ReferenceNumber:2340978970 FineAmount:12 InterestAmount:34 Due:2021-05-12 11:16:31.994675 +0000 +0000 Description:take my money Tags:[darf making money] TransactionIds:[] Scheduled:2021-03-12T15:00:00+00:00 Status:created Amount:1280 NominalAmount:1234 Fee:0 Updated:2021-02-20 11:16:31.994675 +0000 +0000 Created:2021-02-20 17:18:12.974157 +0000 +0000 }
{ :id: '5116552814788608', :revenue-code: '1240', :tax-id: '12.345.678/0001-95', :competence: '2021-03-01T02:59:59.999999+00:00', :reference-number: '2340978970', :fine-amount: 12, :interest-amount: 34, :due: '2021-05-12T02:59:59.999999+00:00', :description: 'take my money', :tags: [ 'darf', 'making money' ], :scheduled: '2021-03-12T15:00:00+00:00', :status: 'created', :amount: 1280, :nominal-amount: 1234, :fee: 0, :updated: '2021-02-20T14:40:10.977929+00:00', :created: '2021-02-20T14:40:10.977921+00:00' }
{ "message": "Darf payment(s) successfully created", "payments": [ { "amount": 1280, "competence": "2021-03-01T02:59:59.999999+00:00", "created": "2021-02-20T16:51:04.528640+00:00", "description": "take my money", "due": "2021-05-12T02:59:59.999999+00:00", "fee": 0, "fineAmount": 12, "id": "5116552814788608", "interestAmount": 34, "nominalAmount": 1234, "referenceNumber": "2340978970", "revenueCode": "1240", "scheduled": "2021-03-12T15:00:00+00:00", "status": "created", "tags": ["darf", "making money"], "taxId": "12.345.678/0001-95", "transactionIds": [], "updated": "2021-02-20T16:51:04.528650+00:00" } ] }
Get a list of non-deleted DARF payments in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
tags
ids
import starkbank payments = starkbank.darfpayment.query( after="2021-02-01", before="2021-02-28" ) for payment in payments: print(payment)
const starkbank = require('starkbank'); (async() => { let payments = await starkbank.darfPayment.query({ after: '2021-02-01', before: '2021-02-28' }); for await (let payment of payments) { console.log(payment); } })();
use StarkBank\DarfPayment; $payments = StarkBank\DarfPayment::query([ "after" => "2021-02-01", "before" => "2021-02-28" ]); foreach($payments as $payment){ print_r($payment); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2021-02-01"); params.put("before", "2021-02-28"); Generator<DarfPayment> payments = DarfPayment.query(params); for (DarfPayment payment : payments){ System.out.println(payment); }
require('starkbank') payments = StarkBank::DarfPayment.query( after: '2021-02-01', before: '2021-02-28' ) payments.each do |payment| puts payment end
payments = StarkBank.DarfPayment.query!( after: "2021-02-01", before: "2021-02-28" ) for payment <- payments do payment |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.DarfPayment> payments = StarkBank.DarfPayment.Query( after: new DateTime(2021, 2, 1), before: new DateTime(2021, 2, 28) ); foreach(StarkBank.DarfPayment payment in payments) { Console.WriteLine(payment); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/darfpayment" ) func main() { var params = map[string]interface{}{} params["after"] = "2021-02-01" params["before"] = "2021-02-28" payments := darfpayment.Query(params, nil) for payment := range payments { fmt.Printf("%+v", payment) } }
(def payments (starkbank.darf-payment/query { :after "2021-02-01" :before "2021-02-28" })) (dorun (map println payments))
curl --location --request GET '{{baseUrl}}/v2/darf-payment?after=2021-02-01&before=2021-02-28' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
DarfPayment( amount=1280, competence=2021-03-01 02:59:59.999999, created=2021-02-20 14:39:15.565841, description=take my money, due=2021-05-12 02:59:59.999999, fee=0, fine_amount=12, id=5116552814788608, interest_amount=34, nominal_amount=1234, reference_number=2340978970, revenue_code=1240, scheduled=2021-03-012 15:00:00, status=created, tags=['darf', 'making money'], tax_id=12.345.678/0001-95, transaction_ids=[], updated=2021-02-20 14:39:15.565841 )
DarfPayment { id: '5116552814788608', revenueCode: '1240', taxId: '12.345.678/0001-95', competence: '2021-03-01T02:59:59.999999+00:00', referenceNumber: '2340978970', fineAmount: 12, interestAmount: 34, due: '2021-05-12T02:59:59.999999+00:00', description: 'take my money', tags: [ 'darf', 'making money' ], scheduled: '2021-03-12T15:00:00+00:00', status: 'created', amount: 1280, nominalAmount: 1234, transactionIds: [], fee: 0, updated: '2021-02-20T14:40:10.977929+00:00', created: '2021-02-20T14:40:10.977921+00:00' }
StarkBank\DarfPayment Object ( [id] => 5116552814788608 [revenueCode] => 1240 [taxId] => 12.345.678/0001-95 [competence] => DateTime Object ( [date] => 2021-03-01 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [referenceNumber] => [fineAmount] => 12 [interestAmount] => 34 [due] => DateTime Object ( [date] => 2021-05-12 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [description] => Darf Payment Example [tags] => Array ( [0] => darf [1] => making money ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2021-03-12 15:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [amount] => 1280 [nominalAmount] => 1234 [fee] => 0 [updated] => DateTime Object ( [date] => 2021-02-20 20:32:03.626083 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-02-20 20:32:03.626074 [timezone_type] => 1 [timezone] => +00:00 ) )
DarfPayment({ "description": "take my money", "revenueCode": "1240", "taxId": "12.345.678/0001-95", "competence": "2021-03-01T02:59:59.999999+00:00", "nominalAmount": 1234, "fineAmount": 12, "interestAmount": 34, "due": "2021-05-12T02:59:59.999999+00:00", "referenceNumber": "2340978970", "scheduled": "2021-03-12T16:17:20.291274+00:00", "tags": [ "darf", "making money" ], "status": "created", "amount": "1280", "fee": "0", "transactionIds": [], "updated": "2021-02-20T16:17:20.291796+00:00", "created": "2021-02-20T16:17:20.291788+00:00", "id": "5116552814788608" })
darfpayment( id: 5116552814788608, revenue_code: 1240, tax_id: 12.345.678/0001-95, competence: 2021-03-01T02:59:59+00:00, reference_number: 2340978970, fine_amount: 12, interest_amount: 34, due: 2021-05-12T02:59:59+00:00, description: take my money, tags: ["darf", "making money"], transaction_ids: [], scheduled: 2021-03-12T15:00:00+00:00, status: created, amount: 1280, nominal_amount: 1234, fee: 0, updated: 2021-02-20T16:30:21+00:00, created: 2021-02-20T16:30:21+00:00 )
%StarkBank.DarfPayment{ revenue_code: "1240", tax_id: "12.345.678/0001-95", competence: ~U[2021-03-01 02:59:59.999999Z], reference_number: "2340978970", fine_amount: 12, interest_amount: 34, due: ~U[2021-05-12 02:59:59.999999Z], description: "take my money", tags: ["darf", "making money"], transaction_ids: [], scheduled: ~U[2021-03-12 20:44:50.956510Z], status: "created", amount: 1280, nominal_amount: 1234, id: "5116552814788608", updated: ~U[2021-02-20 20:44:50.957006Z], created: ~U[2021-02-20 20:44:50.956999Z] }
DarfPayment( RevenueCode: 1240, TaxID: 12.345.678/0001-95, Description: take my money, Competence: 01/03/2021 23:59:59, FineAmount: 12, InterestAmount: 34, Due: 12/05/2021 12:00:00, ReferenceNumber: 2340978970, NominalAmount: 1234, Tags: { darf, making money }, TransactionIds: { }, Amount: 1280, Fee: 0, Created: 20/02/2021 13:45:51, Updated: 20/02/2021 13:45:51, Scheduled: 12/03/2021 12:00:00, Status: created, ID: 5116552814788608 )
{ Id:5116552814788608 RevenueCode:1240 TaxId:12.345.678/0001-95 Competence:2021-03-01 11:16:31.994675 +0000 +0000 ReferenceNumber:2340978970 FineAmount:12 InterestAmount:34 Due:2021-05-12 11:16:31.994675 +0000 +0000 Description:take my money Tags:[darf making money] TransactionIds:[] Scheduled:2021-03-12T15:00:00+00:00 Status:created Amount:1280 NominalAmount:1234 Fee:0 Updated:2021-02-20 11:16:31.994675 +0000 +0000 Created:2021-02-20 17:18:12.974157 +0000 +0000 }
{ :id: '5116552814788608', :revenue-code: '1240', :tax-id: '12.345.678/0001-95', :competence: '2021-03-01T02:59:59.999999+00:00', :reference-number: '2340978970', :fine-amount: 12, :interest-amount: 34, :due: '2021-05-12T02:59:59.999999+00:00', :description: 'take my money', :tags: [ 'darf', 'making money' ], :scheduled: '2021-03-12T15:00:00+00:00', :status: 'created', :amount: 1280, :nominal-amount: 1234, :fee: 0, :updated: '2021-02-20T14:40:10.977929+00:00', :created: '2021-02-20T14:40:10.977921+00:00' }
{ "cursor": "ClAKFAoHY3JlYXRlZBIJCMfd7sCjhP0CEjRqGGl-YXBpLW1zLXRheC1wYXltZW50LXNieHIYCxILRGFyZlBheW1lbnQYgICAqKOFmwkMGAAgAQ==", "payments": [ { "amount": 1280, "competence": "2021-03-01T02:59:59.999999+00:00", "created": "2021-02-20T16:51:04.528640+00:00", "description": "take my money", "due": "2021-05-12T02:59:59.999999+00:00", "fee": 0, "fineAmount": 12, "id": "5116552814788608", "interestAmount": 34, "nominalAmount": 1234, "referenceNumber": "2340978970", "revenueCode": "1240", "scheduled": "2021-03-12T15:00:00+00:00", "status": "created", "tags": ["darf", "making money"], "taxId": "12.345.678/0001-95", "transactionIds": [], "updated": "2021-02-20T16:51:04.528650+00:00" } ] }
Get a single DARF payment by its id.
id
fields
import starkbank payment = starkbank.darfpayment.get("5116552814788608") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.darfPayment.get('5116552814788608'); console.log(payment); })();
use StarkBank\DarfPayment; $payment = StarkBank\DarfPayment::get("5116552814788608"); print_r($payment);
import com.starkbank.*; DarfPayment payment = DarfPayment.get("5116552814788608"); System.out.println(payment);
require('starkbank') payment = StarkBank::DarfPayment.get('5116552814788608') puts payment
payment = StarkBank.DarfPayment.get!("5116552814788608") payment |> IO.inspect
using System; StarkBank.DarfPayment payment = StarkBank.DarfPayment.Get("5116552814788608"); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/darfpayment" ) func main() { payment, err := darfpayment.Get("5116552814788608", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.darf-payment/get "5116552814788608")) (println payment)
curl --location --request GET '{{baseUrl}}/v2/darf-payment/5116552814788608' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
DarfPayment( amount=1280, competence=2021-03-01 02:59:59.999999, created=2021-02-20 14:39:15.565841, description=take my money, due=2021-05-12 02:59:59.999999, fee=0, fine_amount=12, id=5116552814788608, interest_amount=34, nominal_amount=1234, reference_number=2340978970, revenue_code=1240, scheduled=2021-03-012 15:00:00, status=created, tags=['darf', 'making money'], tax_id=12.345.678/0001-95, transaction_ids=[], updated=2021-02-20 14:39:15.565841 )
DarfPayment { id: '5116552814788608', revenueCode: '1240', taxId: '12.345.678/0001-95', competence: '2021-03-01T02:59:59.999999+00:00', referenceNumber: '2340978970', fineAmount: 12, interestAmount: 34, due: '2021-05-12T02:59:59.999999+00:00', description: 'take my money', tags: [ 'darf', 'making money' ], scheduled: '2021-03-12T15:00:00+00:00', status: 'created', amount: 1280, nominalAmount: 1234, transactionIds: [], fee: 0, updated: '2021-02-20T14:40:10.977929+00:00', created: '2021-02-20T14:40:10.977921+00:00' }
StarkBank\DarfPayment Object ( [id] => 5116552814788608 [revenueCode] => 1240 [taxId] => 12.345.678/0001-95 [competence] => DateTime Object ( [date] => 2021-03-01 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [referenceNumber] => 2340978970 [fineAmount] => 12 [interestAmount] => 34 [due] => DateTime Object ( [date] => 2021-05-12 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [description] => take my money [tags] => Array ( [0] => darf [1] => making money ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2021-03-12 15:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [amount] => 1280 [nominalAmount] => 1234 [fee] => 0 [updated] => DateTime Object ( [date] => 2021-02-20 20:32:03.626083 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-02-20 20:32:03.626074 [timezone_type] => 1 [timezone] => +00:00 ) )
DarfPayment({ "description": "take my money", "revenueCode": "1240", "taxId": "12.345.678/0001-95", "competence": "2021-03-01T02:59:59.999999+00:00", "nominalAmount": 1234, "fineAmount": 12, "interestAmount": 34, "due": "2021-05-12T02:59:59.999999+00:00", "referenceNumber": "2340978970", "scheduled": "2021-03-12T16:17:20.291274+00:00", "tags": [ "darf", "making money" ], "status": "created", "amount": "1280", "fee": "0", "transactionIds": [], "updated": "2021-02-20T16:17:20.291796+00:00", "created": "2021-02-20T16:17:20.291788+00:00", "id": "5116552814788608" })
darfpayment( id: 5116552814788608, revenue_code: 1240, tax_id: 12.345.678/0001-95, competence: 2021-03-01T02:59:59+00:00, reference_number: 2340978970, fine_amount: 12, interest_amount: 34, due: 2021-05-12T02:59:59+00:00, description: take my money, tags: ["darf", "making money"], transaction_ids: ["darf", "making money"], scheduled: 2021-03-12T15:00:00+00:00, status: created, amount: 1280, nominal_amount: 1234, fee: 0, updated: 2021-02-20T16:30:21+00:00, created: 2021-02-20T16:30:21+00:00 )
%StarkBank.DarfPayment{ revenue_code: "1240", tax_id: "12.345.678/0001-95", competence: ~U[2021-03-01 02:59:59.999999Z], reference_number: "2340978970", fine_amount: 12, interest_amount: 34, due: ~U[2021-05-12 02:59:59.999999Z], description: "take my money", tags: ["darf", "making money"], transaction_ids: [], scheduled: ~U[2021-03-12 20:44:50.956510Z], status: "created", amount: 1280, nominal_amount: 1234, id: "5116552814788608", updated: ~U[2021-02-20 20:44:50.957006Z], created: ~U[2021-02-20 20:44:50.956999Z] }
DarfPayment( RevenueCode: 1240, TaxID: 12.345.678/0001-95, Description: take my money, Competence: 01/03/2021 23:59:59, FineAmount: 12, InterestAmount: 34, Due: 12/05/2021 12:00:00, ReferenceNumber: 2340978970, NominalAmount: 1234, Tags: { darf, making money }, TransactionIds: { }, Amount: 1280, Fee: 0, Created: 20/02/2021 13:45:51, Updated: 20/02/2021 13:45:51, Scheduled: 12/03/2021 12:00:00, Status: created, ID: 5116552814788608 )
{ Id:5116552814788608 RevenueCode:1240 TaxId:12.345.678/0001-95 Competence:2021-03-01 11:16:31.994675 +0000 +0000 ReferenceNumber:2340978970 FineAmount:12 InterestAmount:34 Due:2021-05-12 11:16:31.994675 +0000 +0000 Description:take my money Tags:[darf making money] TransactionIds:[] Scheduled:2021-03-12T15:00:00+00:00 Status:created Amount:1280 NominalAmount:1234 Fee:0 Updated:2021-02-20 11:16:31.994675 +0000 +0000 Created:2021-02-20 17:18:12.974157 +0000 +0000 }
{ :id: '5116552814788608', :revenue-code: '1240', :tax-id: '12.345.678/0001-95', :competence: '2021-03-01T02:59:59.999999+00:00', :reference-number: '2340978970', :fine-amount: 12, :interest-amount: 34, :due: '2021-05-12T02:59:59.999999+00:00', :description: 'take my money', :tags: [ 'darf', 'making money' ], :scheduled: '2021-03-12T15:00:00+00:00', :status: 'created', :amount: 1280, :nominal-amount: 1234, :fee: 0, :updated: '2021-02-20T14:40:10.977929+00:00', :created: '2021-02-20T14:40:10.977921+00:00' }
{ "payment": { "amount": 1280, "competence": "2021-03-01T02:59:59.999999+00:00", "created": "2021-02-20T16:51:04.528640+00:00", "description": "take my money", "due": "2021-05-12T02:59:59.999999+00:00", "fee": 0, "fineAmount": 12, "id": "5116552814788608", "interestAmount": 34, "nominalAmount": 1234, "referenceNumber": "2340978970", "revenueCode": "1240", "scheduled": "2021-03-12T15:00:00+00:00", "status": "created", "tags": ["darf", "making money"], "taxId": "12.345.678/0001-95", "transactionIds": [], "updated": "2021-02-20T16:51:04.528650+00:00" } }
Cancel a scheduled DARF payment. You can only cancel DARF payments before they start being processed.
id
import starkbank payment = starkbank.darfpayment.delete("5116552814788608") print(payment)
const starkbank = require('starkbank'); (async() => { let payment = await starkbank.darfPayment.delete('5116552814788608'); console.log(payment); })();
StarkBank\DarfPayment; $payment = StarkBank\DarfPayment::delete("5116552814788608"); print_r($payment);
import com.starkbank.*; DarfPayment payment = DarfPayment.delete("5116552814788608"); System.out.println(payment);
require('starkbank') payment = StarkBank::DarfPayment.delete('5116552814788608') puts payment
payment = StarkBank.DarfPayment.delete!("5116552814788608") payment |> IO.inspect
using System; StarkBank.DarfPayment payment = StarkBank.DarfPayment.Delete("5116552814788608"); Console.WriteLine(payment);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/boletopayment" ) func main() { payment, err := boletopayment.Delete("5116552814788608", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", payment) }
(def payment (starkbank.darf-payment/delete "5116552814788608")) (println payment)
curl --location --request DELETE '{{baseUrl}}/v2/darf-payment/5116552814788608' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
DarfPayment( amount=1280, competence=2021-03-01 02:59:59.999999, created=2021-02-20 14:39:15.565841, description=take my money, due=2021-05-12 02:59:59.999999, fee=0, fine_amount=12, id=5116552814788608, interest_amount=34, nominal_amount=1234, reference_number=2340978970, revenue_code=1240, scheduled=2021-03-012 15:00:00, status=canceled, tags=['darf', 'making money'], tax_id=12.345.678/0001-95, transaction_ids=[], updated=2021-02-20 14:39:15.565841 )
DarfPayment { id: '5116552814788608', revenueCode: '1240', taxId: '12.345.678/0001-95', competence: '2021-03-01T02:59:59.999999+00:00', referenceNumber: '2340978970', fineAmount: 12, interestAmount: 34, due: '2021-05-12T02:59:59.999999+00:00', description: 'take my money', tags: [ 'darf', 'making money' ], scheduled: '2021-03-12T15:00:00+00:00', status: 'canceled', amount: 1280, nominalAmount: 1234, transactionIds: [], fee: 0, updated: '2021-02-20T14:40:10.977929+00:00', created: '2021-02-20T14:40:10.977921+00:00' }
StarkBank\DarfPayment Object ( [id] => 5116552814788608 [revenueCode] => 1240 [taxId] => 12.345.678/0001-95 [competence] => DateTime Object ( [date] => 2021-03-01 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [referenceNumber] => [fineAmount] => 12 [interestAmount] => 34 [due] => DateTime Object ( [date] => 2021-05-12 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [description] => Darf Payment Example [tags] => Array ( [0] => darf [1] => making money ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2021-03-12 15:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => canceled [amount] => 1280 [nominalAmount] => 1234 [fee] => 0 [updated] => DateTime Object ( [date] => 2021-02-20 20:32:03.626083 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-02-20 20:32:03.626074 [timezone_type] => 1 [timezone] => +00:00 ) )
DarfPayment({ "description": "take my money", "revenueCode": "1240", "taxId": "12.345.678/0001-95", "competence": "2021-03-01T02:59:59.999999+00:00", "nominalAmount": 1234, "fineAmount": 12, "interestAmount": 34, "due": "2021-05-12T02:59:59.999999+00:00", "referenceNumber": "2340978970", "scheduled": "2021-03-12T16:17:20.291274+00:00", "tags": [ "darf", "making money" ], "status": "canceled", "amount": "1280", "fee": "0", "transactionIds": [], "updated": "2021-02-20T16:17:20.291796+00:00", "created": "2021-02-20T16:17:20.291788+00:00", "id": "5116552814788608" })
darfpayment( id: 5116552814788608, revenue_code: 1240, tax_id: 12.345.678/0001-95, competence: 2021-03-01T02:59:59+00:00, reference_number: 2340978970, fine_amount: 12, interest_amount: 34, due: 2021-05-12T02:59:59+00:00, description: take my money, tags: ["darf", "making money"], transaction_ids: [], scheduled: 2021-03-12T15:00:00+00:00, status: canceled, amount: 1280, nominal_amount: 1234, fee: 0, updated: 2021-02-20T16:30:21+00:00, created: 2021-02-20T16:30:21+00:00 )
%StarkBank.DarfPayment{ revenue_code: "1240", tax_id: "12.345.678/0001-95", competence: ~U[2021-03-01 02:59:59.999999Z], reference_number: "2340978970", fine_amount: 12, interest_amount: 34, due: ~U[2021-05-12 02:59:59.999999Z], description: "take my money", tags: ["darf", "making money"], transaction_ids: [], scheduled: ~U[2021-03-12 20:44:50.956510Z], status: "canceled", amount: 1280, nominal_amount: 1234, id: "5116552814788608", updated: ~U[2021-02-20 20:44:50.957006Z], created: ~U[2021-02-20 20:44:50.956999Z] }
DarfPayment( RevenueCode: 1240, TaxID: 12.345.678/0001-95, Description: take my money, Competence: 01/03/2021 23:59:59, FineAmount: 12, InterestAmount: 34, Due: 12/05/2021 12:00:00, ReferenceNumber: 2340978970, NominalAmount: 1234, Tags: { darf, making money }, TransactionIds: { }, Amount: 1280, Fee: 0, Created: 20/02/2021 13:45:51, Updated: 20/02/2021 13:45:51, Scheduled: 12/03/2021 12:00:00, Status: canceled, ID: 5116552814788608 )
{ Id:5116552814788608 RevenueCode:1240 TaxId:12.345.678/0001-95 Competence:2021-03-01 11:16:31.994675 +0000 +0000 ReferenceNumber:2340978970 FineAmount:12 InterestAmount:34 Due:2021-05-12 11:16:31.994675 +0000 +0000 Description:take my money Tags:[darf making money] TransactionIds:[] Scheduled:2021-03-12T15:00:00+00:00 Status:canceled Amount:1280 NominalAmount:1234 Fee:0 Updated:2021-02-20 11:16:31.994675 +0000 +0000 Created:2021-02-20 17:18:12.974157 +0000 +0000 }
{ :id: '5116552814788608', :revenue-code: '1240', :tax-id: '12.345.678/0001-95', :competence: '2021-03-01T02:59:59.999999+00:00', :reference-number: '2340978970', :fine-amount: 12, :interest-amount: 34, :due: '2021-05-12T02:59:59.999999+00:00', :description: 'take my money', :tags: [ 'darf', 'making money' ], :scheduled: '2021-03-12T15:00:00+00:00', :status: 'canceled', :amount: 1280, :nominal-amount: 1234, :fee: 0, :updated: '2021-02-20T14:40:10.977929+00:00', :created: '2021-02-20T14:40:10.977921+00:00' }
{ "message": "Darf Payment successfully deleted", "payment": { "amount": 1280, "competence": "2021-03-01T02:59:59.999999+00:00", "created": "2021-02-20T16:51:04.528640+00:00", "description": "take my money", "due": "2021-05-12T02:59:59.999999+00:00", "fee": 0, "fineAmount": 12, "id": "5116552814788608", "interestAmount": 34, "nominalAmount": 1234, "referenceNumber": "2340978970", "revenueCode": "1240", "scheduled": "2021-03-12T15:00:00+00:00", "status": "canceled", "tags": ["darf", "making money"], "taxId": "12.345.678/0001-95", "transactionIds": [], "updated": "2021-02-20T16:51:04.528650+00:00" } }
Get a DARF payment PDF receipt. You can only get a receipt for payments whose status are either success, processing or created.
id
import starkbank pdf = starkbank.darfpayment.pdf("5116552814788608") with open("darf-payment.pdf", "wb") as file: file.write(pdf)
const starkbank = require('starkbank'); const fs = require('fs').promises; (async() => { let pdf = await starkbank.darfPayment.pdf('5116552814788608'); await fs.writeFile('darf-payment.pdf', pdf); })();
use StarkBank\DarfPayment; $pdf = StarkBank\DarfPayment::pdf("5116552814788608"); $fp = fopen('darf-payment.pdf', 'w'); fwrite($fp, $pdf); fclose($fp);
import java.io.File; import java.io.InputStream; import java.nio.file.StandardCopyOption; import com.starkbank.*; InputStream pdf = DarfPayment.pdf("5116552814788608"); java.nio.file.Files.copy( pdf, new File("iss-payment.pdf").toPath(), StandardCopyOption.REPLACE_EXISTING );
require('starkbank') pdf = StarkBank::DarfPayment.pdf('5116552814788608') File.open('iss-payment.pdf', 'w') { |file| file.write(pdf) }
pdf = StarkBank.DarfPayment.pdf!("5116552814788608") file = File.open!("iss-payment.pdf", [:write]) IO.binwrite(file, pdf) File.close(file)
byte[] pdf = StarkBank.DarfPayment.Pdf("5116552814788608"); System.IO.File.WriteAllBytes("iss-payment.pdf", pdf);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/darfpayment" ) func main() { pdf, err := darfpayment.Pdf("5116552814788608", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } errFile := ioutil.WriteFile("darfpayment.pdf", pdf, 0666) if errFile != nil { fmt.Print(errFile) } }
(clojure.java.io/copy (starkbank.darf-payment/pdf "5116552814788608") (clojure.java.io/file "iss-payment.pdf"))
curl --location --request GET '{{baseUrl}}/v2/darf-payment/5116552814788608/pdf' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Get a paged list of all DARF payment logs. A log tracks a change in the payment entity according to its life cycle.
cursor
limit
after
before
types
paymentIds
import starkbank logs = starkbank.darfpayment.log.query( payment_ids=["5116552814788608"] ) for log in logs: print(log)
const starkbank = require('starkbank'); (async() => { let logs = await starkbank.darfPayment.log.query({ paymentIds:['5116552814788608'], }); for await (let log of logs) { console.log(log); } })();
StarkBank\DarfPayment; $logs = StarkBank\DarfPayment\Log::query([ "paymentIds" => ["5116552814788608"] ]); foreach($logs as $log){ print_r($log); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("paymentIds", "5116552814788608"); Generator<DarfPayment.Log> logs = DarfPayment.Log.query(params); for (DarfPayment.Log log : logs){ System.out.println(log); }
require('starkbank') logs = StarkBank::DarfPayment::Log.query( payment_ids: ['5116552814788608'] ) logs.each do |log| puts log end
logs = StarkBank.DarfPayment.Log.query!( payment_ids: ["5116552814788608"] ) for log <- logs do log |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.DarfPayment.Log> logs = StarkBank.DarfPayment.Log.Query( paymentIds: new List<string> { "5116552814788608" } ); foreach(StarkBank.DarfPayment.Log log in logs) { Console.WriteLine(log); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/darfpayment/log" ) func main() { var params = map[string]interface{}{} params["paymentIds"] = []string{"5116552814788608"} logs := log.Query(params, nil) for log := range logs { fmt.Printf("%+v", log) } }
(def logs (starkbank.darf-payment.log/query { :payment-ids ["5116552814788608"] })) (dorun (map println logs))
curl --location --request GET '{{baseUrl}}/v2/darf-payment/log?paymentIds=5116552814788608' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2021-02-20 14:39:15.565841, errors=[], id=5146850856271872, payment=DarfPayment( amount=1280, competence=2021-03-01 02:59:59.999999, created=2021-02-20 14:39:15.565841, description=take my money, due=2021-05-12 02:59:59.999999, fee=0, fine_amount=12, id=5116552814788608, interest_amount=34, nominal_amount=1234, reference_number=2340978970, revenue_code=1240, scheduled=2021-03-012 15:00:00, status=created, tags=['darf', 'making money'], tax_id=12.345.678/0001-95, transaction_ids=[], updated=2021-02-20 14:39:15.565841 ), type=created )
Log { id: '5146850856271872', created: '2021-02-20T14:40:10.977921+00:00' type: 'created', errors: [], payment: { id: '5116552814788608', revenueCode: '1240', taxId: '12.345.678/0001-95', competence: '2021-03-01T02:59:59.999999+00:00', referenceNumber: '2340978970', fineAmount: 12, interestAmount: 34, due: '2021-05-12T02:59:59.999999+00:00', description: 'take my money', tags: [ 'darf', 'making money' ], scheduled: '2021-03-12T15:00:00+00:00', status: 'created', amount: 1280, nominalAmount: 1234, transactionIds: [], fee: 0, updated: '2021-02-20T14:40:10.977929+00:00', created: '2021-02-20T14:40:10.977921+00:00' } }
StarkBank\DarfPayment\Log Object ( [id] => 5146850856271872 [type] => created [errors] => Array ( ) [payment] => Array ( [id] => 5116552814788608 [revenueCode] => 1240 [taxId] => 12.345.678/0001-95 [competence] => DateTime Object ( [date] => 2021-03-01 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [referenceNumber] => 2340978970 [fineAmount] => 12 [interestAmount] => 34 [due] => DateTime Object ( [date] => 2021-05-12 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [description] => take my money [tags] => Array ( [0] => darf [1] => making money ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2021-03-12 15:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [amount] => 1280 [nominalAmount] => 1234 [fee] => 0 [updated] => DateTime Object ( [date] => 2021-02-20 20:32:03.626083 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-02-20 20:32:03.626074 [timezone_type] => 1 [timezone] => +00:00 ) ) [created] => DateTime Object ( [date] => 2021-02-20 20:32:03.626074 [timezone_type] => 1 [timezone] => +00:00 ) )
Log({ "created": "2021-02-20T16:17:20.291788+00:00", "type": "created", "errors": [], "payment": { "description": "take my money", "revenueCode": "1240", "taxId": "12.345.678/0001-95", "competence": "2021-03-01T02:59:59.999999+00:00", "nominalAmount": 1234, "fineAmount": 12, "interestAmount": 34, "due": "2021-05-12T02:59:59.999999+00:00", "referenceNumber": "2340978970", "scheduled": "2021-03-12T16:17:20.291274+00:00", "tags": [ "darf", "making money" ], "status": "created", "amount": "1280", "fee": "0", "transactionIds": [], "updated": "2021-02-20T16:17:20.291796+00:00", "created": "2021-02-20T16:17:20.291788+00:00", "id": "5116552814788608" }, "id": "5146850856271872" })
log( id: 5146850856271872, type: created, errors: [], payment: darfpayment( id: 5116552814788608, revenue_code: 1240, tax_id: 12.345.678/0001-95, competence: 2021-03-01T02:59:59+00:00, reference_number: 2340978970, fine_amount: 12, interest_amount: 34, due: 2021-05-12T02:59:59+00:00, description: take my money, tags: ["darf", "making money"], transaction_ids: [], scheduled: 2021-03-12T15:00:00+00:00, status: created, amount: 1280, nominal_amount: 1234, fee: 0, updated: 2021-02-20T16:30:21+00:00, created: 2021-02-20T16:30:21+00:00 ), created: 2021-02-20T16:30:21+00:00 )
%StarkBank.DarfPayment.Log{ id: "5146850856271872", payment: %StarkBank.DarfPayment{ revenue_code: "1240", tax_id: "12.345.678/0001-95", competence: ~U[2021-03-01 02:59:59.999999Z], reference_number: "2340978970", fine_amount: 12, interest_amount: 34, due: ~U[2021-05-12 02:59:59.999999Z], description: "take my money", tags: ["darf", "making money"], transaction_ids: [], scheduled: ~U[2021-03-12 20:44:50.956510Z], status: "created", amount: 1280, nominal_amount: 1234, id: "5116552814788608", updated: ~U[2021-02-20 20:44:50.957006Z], created: ~U[2021-02-20 20:44:50.956999Z] }, errors: [], type: "created", created: ~U[2021-02-20 20:44:50.956999Z] }
Log( Type: created, Created: 20/02/2021 13:45:51, Errors: { }, Payment: DarfPayment( RevenueCode: 1240, TaxID: 12.345.678/0001-95, Description: take my money, Competence: 01/03/2021 23:59:59, FineAmount: 12, InterestAmount: 34, Due: 12/05/2021 12:00:00, ReferenceNumber: 2340978970, NominalAmount: 1234, Tags: { darf, making money }, TransactionIds: { }, Amount: 1280, Fee: 0, Created: 20/02/2021 13:45:51, Updated: 20/02/2021 13:45:51, Scheduled: 12/03/2021 12:00:00, Status: created, ID: 5116552814788608 ), ID: 5146850856271872 )
{ Id:5146850856271872 Payment:{ Id:5116552814788608 RevenueCode:1240 TaxId:12.345.678/0001-95 Competence:2021-03-01 11:16:31.994675 +0000 +0000 ReferenceNumber:2340978970 FineAmount:12 InterestAmount:34 Due:2021-05-12 11:16:31.994675 +0000 +0000 Description:take my money Tags:[darf making money] TransactionIds:[] Scheduled:2021-03-12T15:00:00+00:00 Status:created Amount:1280 NominalAmount:1234 Fee:0 Updated:2021-02-20 11:16:31.994675 +0000 +0000 Created:2021-02-20 17:18:12.974157 +0000 +0000 } Errors:[] Type:created Created:2021-02-20 17:18:12.974157 +0000 +0000 }
{:id "5146850856271872", :created "2023-02-07T13:45:51.076303Z+00:00", :errors [], :type "created", :payment {:id: '5116552814788608', :revenue-code: '1240', :tax-id: '12.345.678/0001-95', :competence: '2021-03-01T02:59:59.999999+00:00', :reference-number: '2340978970', :fine-amount: 12, :interest-amount: 34, :due: '2021-05-12T02:59:59.999999+00:00', :description: 'take my money', :tags: [ 'darf', 'making money' ], :scheduled: '2021-03-12T15:00:00+00:00', :status: 'created', :amount: 1280, :nominal-amount: 1234, :fee: 0, :updated: '2021-02-20T14:40:10.977929+00:00', :created: '2021-02-20T14:40:10.977921+00:00''}}
{ "cursor": null, "logs": [ { "created": "2023-02-07T16:51:04.581748+00:00", "errors": [], "id": "5146850856271872", "payment": { "amount": 1280, "competence": "2021-03-01T02:59:59.999999+00:00", "created": "2021-02-20T16:51:04.528640+00:00", "description": "take my money", "due": "2021-05-12T02:59:59.999999+00:00", "fee": 0, "fineAmount": 12, "id": "5116552814788608", "interestAmount": 34, "nominalAmount": 1234, "referenceNumber": "2340978970", "revenueCode": "1240", "scheduled": "2021-03-12T15:00:00+00:00", "status": "created", "tags": ["darf", "making money"], "taxId": "12.345.678/0001-95", "transactionIds": [], "updated": "2021-02-20T16:51:04.528650+00:00" }, "type": "created" } ] }
Get a single DARF payment log by its id.
id
fields
import starkbank log = starkbank.darfpayment.log.get("5146850856271872") print(log)
const starkbank = require('starkbank'); (async() => { let log = await starkbank.darfPayment.log.get('5146850856271872'); console.log(log); })();
use StarkBank\DarfPayment; $log = StarkBank\DarfPayment\Log::get("5146850856271872"); print_r($log);
import com.starkbank.*; DarfPayment.Log log = DarfPayment.Log.get("5146850856271872"); System.out.println(log);
require('starkbank') log = StarkBank::DarfPayment::Log.get('5146850856271872') puts log
log = StarkBank.DarfPayment.Log.get!("5146850856271872") log |> IO.inspect
using System; StarkBank.DarfPayment.Log log = StarkBank.DarfPayment.Log.Get("5146850856271872"); Console.WriteLine(log);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/darfpayment/log" ) func main() { log, err := log.Get("5146850856271872", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", log) }
(def log (starkbank.darf-payment.log/get "5146850856271872")) (println log)
curl --location --request GET '{{baseUrl}}/v2/darf-payment/log/5146850856271872' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Log( created=2021-02-20 14:39:15.565841, errors=[], id=5146850856271872, payment=DarfPayment( amount=1280, competence=2021-03-01 02:59:59.999999, created=2021-02-20 14:39:15.565841, description=take my money, due=2021-05-12 02:59:59.999999, fee=0, fine_amount=12, id=5116552814788608, interest_amount=34, nominal_amount=1234, reference_number=2340978970, revenue_code=1240, scheduled=2021-03-012 15:00:00, status=created, tags=['darf', 'making money'], tax_id=12.345.678/0001-95, transaction_ids=[], updated=2021-02-20 14:39:15.565841 ), type=created )
Log { id: '5146850856271872', created: '2021-02-20T14:40:10.977921+00:00' type: 'created', errors: [], payment: { id: '5116552814788608', revenueCode: '1240', taxId: '12.345.678/0001-95', competence: '2021-03-01T02:59:59.999999+00:00', referenceNumber: '2340978970', fineAmount: 12, interestAmount: 34, due: '2021-05-12T02:59:59.999999+00:00', description: 'take my money', tags: [ 'darf', 'making money' ], scheduled: '2021-03-12T15:00:00+00:00', status: 'created', amount: 1280, nominalAmount: 1234, transactionIds: [], fee: 0, updated: '2021-02-20T14:40:10.977929+00:00', created: '2021-02-20T14:40:10.977921+00:00' } }
StarkBank\DarfPayment\Log Object ( [id] => 5146850856271872 [type] => created [errors] => Array ( ) [payment] => Array ( [id] => 5116552814788608 [revenueCode] => 1240 [taxId] => 12.345.678/0001-95 [competence] => DateTime Object ( [date] => 2021-03-01 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [referenceNumber] => 2340978970 [fineAmount] => 12 [interestAmount] => 34 [due] => DateTime Object ( [date] => 2021-05-12 02:59:59.999999 [timezone_type] => 1 [timezone] => +00:00 ) [description] => take my money [tags] => Array ( [0] => darf [1] => making money ) [transactionIds] => Array ( ) [scheduled] => DateTime Object ( [date] => 2021-03-12 15:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [status] => created [amount] => 1280 [nominalAmount] => 1234 [fee] => 0 [updated] => DateTime Object ( [date] => 2021-02-20 20:32:03.626083 [timezone_type] => 1 [timezone] => +00:00 ) [created] => DateTime Object ( [date] => 2021-02-20 20:32:03.626074 [timezone_type] => 1 [timezone] => +00:00 ) ) [created] => DateTime Object ( [date] => 2021-02-20 20:32:03.626074 [timezone_type] => 1 [timezone] => +00:00 ) )
Log({ "created": "2021-02-20T16:17:20.291788+00:00", "type": "created", "errors": [], "payment": { "description": "take my money", "revenueCode": "1240", "taxId": "12.345.678/0001-95", "competence": "2021-03-01T02:59:59.999999+00:00", "nominalAmount": 1234, "fineAmount": 12, "interestAmount": 34, "due": "2021-05-12T02:59:59.999999+00:00", "referenceNumber": "2340978970", "scheduled": "2021-03-12T16:17:20.291274+00:00", "tags": [ "darf", "making money" ], "status": "created", "amount": "1280", "fee": "0", "transactionIds": [], "updated": "2021-02-20T16:17:20.291796+00:00", "created": "2021-02-20T16:17:20.291788+00:00", "id": "5116552814788608" }, "id": "5146850856271872" })
log( id: 5146850856271872, type: created, errors: [], payment: darfpayment( id: 5116552814788608, revenue_code: 1240, tax_id: 12.345.678/0001-95, competence: 2021-03-01T02:59:59+00:00, reference_number: 2340978970, fine_amount: 12, interest_amount: 34, due: 2021-05-12T02:59:59+00:00, description: take my money, tags: ["darf", "making money"], transaction_ids: [], scheduled: 2021-03-12T15:00:00+00:00, status: created, amount: 1280, nominal_amount: 1234, fee: 0, updated: 2021-02-20T16:30:21+00:00, created: 2021-02-20T16:30:21+00:00 ), created: 2021-02-20T16:30:21+00:00 )
%StarkBank.DarfPayment.Log{ id: "5146850856271872", payment: %StarkBank.DarfPayment{ revenue_code: "1240", tax_id: "12.345.678/0001-95", competence: ~U[2021-03-01 02:59:59.999999Z], reference_number: "2340978970", fine_amount: 12, interest_amount: 34, due: ~U[2021-05-12 02:59:59.999999Z], description: "take my money", tags: ["darf", "making money"], transaction_ids: [], scheduled: ~U[2021-03-12 20:44:50.956510Z], status: "created", amount: 1280, nominal_amount: 1234, id: "5116552814788608", updated: ~U[2021-02-20 20:44:50.957006Z], created: ~U[2021-02-20 20:44:50.956999Z] }, errors: [], type: "created", created: ~U[2021-02-20 20:44:50.956999Z] }
Log( Type: created, Created: 20/02/2021 13:45:51, Errors: { }, Payment: DarfPayment( RevenueCode: 1240, TaxID: 12.345.678/0001-95, Description: take my money, Competence: 01/03/2021 23:59:59, FineAmount: 12, InterestAmount: 34, Due: 12/05/2021 12:00:00, ReferenceNumber: 2340978970, NominalAmount: 1234, Tags: { darf, making money }, TransactionIds: { }, Amount: 1280, Fee: 0, Created: 20/02/2021 13:45:51, Updated: 20/02/2021 13:45:51, Scheduled: 12/03/2021 12:00:00, Status: created, ID: 5116552814788608 ), ID: 5146850856271872 )
{ Id:5146850856271872 Payment:{ Id:5116552814788608 RevenueCode:1240 TaxId:12.345.678/0001-95 Competence:2021-03-01 11:16:31.994675 +0000 +0000 ReferenceNumber:2340978970 FineAmount:12 InterestAmount:34 Due:2021-05-12 11:16:31.994675 +0000 +0000 Description:take my money Tags:[darf making money] TransactionIds:[] Scheduled:2021-03-12T15:00:00+00:00 Status:created Amount:1280 NominalAmount:1234 Fee:0 Updated:2021-02-20 11:16:31.994675 +0000 +0000 Created:2021-02-20 17:18:12.974157 +0000 +0000 } Errors:[] Type:created Created:2021-02-20 17:18:12.974157 +0000 +0000 }
{:id "5146850856271872", :created "2023-02-07T13:45:51.076303Z+00:00", :errors [], :type "created", :payment {:id: '5116552814788608', :revenue-code: '1240', :tax-id: '12.345.678/0001-95', :competence: '2021-03-01T02:59:59.999999+00:00', :reference-number: '2340978970', :fine-amount: 12, :interest-amount: 34, :due: '2021-05-12T02:59:59.999999+00:00', :description: 'take my money', :tags: [ 'darf', 'making money' ], :scheduled: '2021-03-12T15:00:00+00:00', :status: 'created', :amount: 1280, :nominal-amount: 1234, :fee: 0, :updated: '2021-02-20T14:40:10.977929+00:00', :created: '2021-02-20T14:40:10.977921+00:00''}}
{ "cursor": null, "logs": [ { "created": "2023-02-07T16:51:04.581748+00:00", "errors": [], "id": "5146850856271872", "payment": { "amount": 1280, "competence": "2021-03-01T02:59:59.999999+00:00", "created": "2021-02-20T16:51:04.528640+00:00", "description": "take my money", "due": "2021-05-12T02:59:59.999999+00:00", "fee": 0, "fineAmount": 12, "id": "5116552814788608", "interestAmount": 34, "nominalAmount": 1234, "referenceNumber": "2340978970", "revenueCode": "1240", "scheduled": "2021-03-12T15:00:00+00:00", "status": "created", "tags": ["darf", "making money"], "taxId": "12.345.678/0001-95", "transactionIds": [], "updated": "2021-02-20T16:51:04.528650+00:00" }, "type": "created" } ] }
A Payment Preview is used to get information from multiple types of payment to confirm any information before actually paying. If the 'scheduled' parameter is not informed, today will be assumed as the intended payment date. Right now, the 'scheduled' parameter only has effect on BrcodePreviews.
Create a payment preview to get information from a payment.
id
scheduled
import starkbank previews = starkbank.paymentpreview.create([ starkbank.PaymentPreview( id="00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A", scheduled="2023-01-29" ) ]) for preview in previews: print(preview)
const starkbank = require('starkbank'); let previews = await starkbank.paymentPreview.create([ new starkbank.PaymentPreview({ id: "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A", scheduled: '2023-01-29' }) ]); for (let preview of previews) { console.log(preview); }
use StarkBank\PaymentPreview; $previews = PaymentPreview::create([ new PaymentPreview(["id" => "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A", "scheduled" => "2023-01-29"]) ]); foreach ($previews as $preview) { print_r($preview); }
import com.starkbank.*; import java.util.HashMap; List<PaymentPreview> previews = new ArrayList<>(); previews.add(new PaymentPreview(new HashMap<String, Object>(){{ put("id", "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A"); put("scheduled", "2023-01-29"); }})); previews = (List<PaymentPreview>) PaymentPreview.create(previews); for (PaymentPreview preview : previews) { System.out.println(preview); }
require('starkbank') previews = StarkBank::PaymentPreview.create( [ StarkBank::PaymentPreview.new( id: '00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A', scheduled: '2023-01-29' ) ] ) previews.each do |preview| puts preview end
previews = StarkBank.PaymentPreview.create!( [ %StarkBank.PaymentPreview{ id: "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A", scheduled: "2023-01-29" } ] ) |> IO.inspect
using System; List<PaymentPreview> previews = PaymentPreview.Create(new List<PaymentPreview> { new PaymentPreview( id: "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A", scheduled: new DateTime(2023, 1, 29) ) }); foreach (StarkBank.PaymentPreview preview in previews) { Console.WriteLine(preview); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/paymentpreview" ) func main() { previews, err := paymentpreview.Create( []paymentpreview.PaymentPreview{ { Id: "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A", Scheduled: "2023-01-29", }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, preview := range previews { fmt.Printf("%+v", preview) } }
(def previews [ { :id "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A" :scheduled "2023-01-29" } ]) (def payment-previews (payment-preview/create previews)) (doseq [preview payment-previews] (println preview))
curl --location --request POST '{{baseUrl}}/v2/payment-preview' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "previews": [ { "id": "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A", "scheduled": "2023-01-29" } ] }'
PaymentPreview( id=00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A, payment=BrcodePreview( account_type=savings, allow_change=False, amount=1000, bank_code=01705236, discount_amount=0, fine_amount=0, interest_amount=0, name=Humberto EI, nominal_amount=1000, reconciliation_id=12345, reduction_amount=0, status=created, tax_id=27.564.801/0001-36 ), scheduled=2023-01-29, type=brcode-payment )
PaymentPreview { id: "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A", scheduled: '2023-01-29', type: 'brcode-payment', payment: { accountType: 'savings', allowChange: false, amount: 1000, bankCode: '01705236', cashAmount: 0, cashierBankCode: '', cashierType: '', discountAmount: 0, fineAmount: 0, interestAmount: 0, name: 'Humberto EI', nominalAmount: 1000, reconciliationId: '12345', reductionAmount: 0, status: 'created', taxId: '27.564.801/0001-36' } }
StarkBank\PaymentPreview Object ( [id] => 00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A [scheduled] => DateTime Object ( [date] => 2023-01-29 00:00:00.000000 [timezone_type] => 3 [timezone] => UTC ) [type] => brcode-payment [payment] => StarkBank\PaymentPreview\BrcodePreview Object ( [status] => created [name] => Humberto EI [taxId] => 27.564.801/0001-36 [bankCode] => 01705236 [accountType] => savings [allowChange] => false [amount] => 1000 [nominalAmount] => 1000 [interestAmount] => 0 [fineAmount] => 0 [reductionAmount] => 0 [discountAmount] => 0 [reconciliationId] => 12345 ) )
PaymentPreview({ "scheduled": "2023-01-29", "type": "brcode-payment", "payment": { "accountType": "savings", "allowChange": false, "amount": 1000.0, "bankCode": "01705236", "cashAmount": 0.0, "cashierBankCode": "", "cashierType": "", "discountAmount": 0.0, "fineAmount": 0.0, "interestAmount": 0.0, "name": "Humberto EI", "nominalAmount": 1000.0, "reconciliationId": "12345", "reductionAmount": 0.0, "status": "created", "taxId": "27.564.801/0001-36" }, "id": "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A" })
paymentpreview( id: 00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A, scheduled: 2023-01-29, type: brcode-payment, payment: brcodepreview( status: created, name: Humberto EI, tax_id: 27.564.801/0001-36, bank_code: 01705236, account_type: savings, allow_change: false, amount: 1000, nominal_amount: 1000, interest_amount: 0, fine_amount: 0, reduction_amount: 0, discount_amount: 0, reconciliation_id: 12345 ) )
%StarkBank.PaymentPreview{ id: "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A", scheduled: ~D[2023-01-29], type: "brcode-payment", payment: %StarkBank.PaymentPreview.BrcodePreview{ status: "created", name: "Humberto EI", tax_id: "27.564.801/0001-36", bank_code: "01705236", account_type: "savings", allow_change: false, amount: 1000, nominal_amount: 1000, interest_amount: 0, fine_amount: 0, reduction_amount: 0, discount_amount: 0, reconciliation_id: "12345" } }
PaymentPreview( ID: 00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A Scheduled: 29/01/2023 Type: brcode-payment Payment: PaymentPreview.BrcodePreview( Status: created Name: Humberto EI TaxId: 27.564.801/0001-36 BankCode: 01705236 AccountType: savings AllowChange: false Amount: 1000 NominalAmount: 1000 InterestAmount: 0 FineAmount: 0 ReductionAmount: 0 DiscountAmount: 0 ReconciliationId: 12345 ) )
{ Id:00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A Payment:{ AccountType:savings AllowChange:false Amount:1000 BankCode:01705236 FineAmount:0 InterestAmount:31 Name:Humberto EI NominalAmount:1000 ReconciliationId:12345 ReductionAmount:0 Status:created TaxId:27.564.801/0001-36 } Type:brcode-payment Scheduled:2023-01-29 00:00:00 +0000 UTC }
{ :id 00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A :scheduled 2023-01-29 :type brcode-payment :payment { :status created :name Humberto EI :tax-id 27.564.801/0001-36 :bank-code 01705236 :account-type savings :allow-change false :amount 1000 :nominal-amount 1000 :interest-amount 0 :fine-amount 0 :reduction-amount 0 :discount-amount 0 :reconciliation-id 12345 } }
{ "previews": [ { "id": "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A", "payment": { "accountType": "savings", "allowChange": false, "amount": 1000, "bankCode": "01705236", "cashAmount": 0, "cashierBankCode": "", "cashierType": "", "discountAmount": 0, "fineAmount": 0, "interestAmount": 0, "name": "Humberto EI", "nominalAmount": 1000, "reconciliationId": "12345", "reductionAmount": 0, "status": "created", "taxId": "27.564.801/0001-36" }, "scheduled": "2023-01-29", "type": "brcode-payment" } ] }
Here we will teach you how to create and manage your payment requests. The payment request is the main element of our approval flow, which can be checked out by logging into our Web Banking.
Use this route to create new payment requests in our Web Banking approval flow.
type
centerId
payment
{ "amount": 100000000, "taxId": "594.739.480-42", "name": "Daenerys Targaryen Stormborn", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8" }
due
tags
import starkbank requests = starkbank.paymentrequest.create([ starkbank.PaymentRequest( center_id="4762954029334528", payment=starkbank.Transfer( amount=100000000, bank_code="341", branch_code="2201", account_number="76543-8", tax_id="594.739.480-42", name="Daenerys Targaryen Stormborn", ), tags=["daenerys", "request/1234"] ), ]) for request in requests: print(request)
const starkbank = require('starkbank'); let transfer = new starkbank.Transfer({ amount: 100000000, taxId: "594.739.480-42", name: "Daenerys Targaryen Stormborn", bankCode: "341", branchCode: "2201", accountNumber: "76543-8" }); let requests = [ new starkbank.PaymentRequest({ centerId: '4762954029334528', payment: transfer, tags: ["daenerys", "request/1234"], }) ]; (async() => { requests = await starkbank.paymentRequest.create(requests); for await (let request of requests){ console.log(request); } })();
$requests = PaymentRequest::create([ new PaymentRequest([ "centerId" => "4762954029334528", "payment" => new Transfer([ "amount" => 100000000, "bankCode" => "341", "branchCode" => "2201", "accountNumber" => "76543-8", "taxId" => "594.739.480-42", "name" => "Daenerys Targaryen Stormborn", ]), "tags" => ["daenerys", "request/1234"], ]) ]); foreach($requests as $request){ print_r($request); }
import com.starkbank.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; HashMap<String, Object> paymentData = new HashMap<>(); paymentData.put("amount", 100000000); paymentData.put("bankCode", "341"); paymentData.put("branchCode", "2201"); paymentData.put("accountNumber", "76543-8"); paymentData.put("taxId", "594.739.480-42"); paymentData.put("name", "Daenerys Targaryen Stormborn"); Transfer payment = new Transfer(paymentData); List<PaymentRequest> requests = new ArrayList<>(); HashMap<String, Object> data = new HashMap<>(); data.put("centerId", "4762954029334528"); data.put("payment", payment); data.put("tags", new String[]{"daenerys", "request/1234"}); requests.add(new PaymentRequest(data)); requests = PaymentRequest.create(requests); for (PaymentRequest request : requests){ System.out.println(request); }
require('starkbank') requests = StarkBank::PaymentRequest.create( [ StarkBank::PaymentRequest.new( center_id: '4762954029334528', payment: StarkBank::Transfer.new( amount: 100000000, tax_id: '594.739.480-42', name: 'Daenerys Targaryen Stormborn', bank_code: '341', branch_code: '2201', account_number: '76543-8' ), tags: %w[daenerys request/1234] ) ] ) requests.each do |request| puts request end
requests = StarkBank.PaymentRequest.create!( [ %StarkBank.PaymentRequest{ center_id: "4762954029334528", payment: %StarkBank.Transfer{ amount: 100000000, bank_code: "341", branch_code: "2201", account_number: "76543-8", tax_id: "594.739.480-42", name: "Daenerys Targaryen Stormborn", }, tags: ["daenerys", "request/1234"], } ] ) |> IO.inspect for request <- requests do request |> IO.inspect end
List<StarkBank.PaymentRequest> requests = StarkBank.PaymentRequest.Create( new List<StarkBank.PaymentRequest> { new StarkBank.PaymentRequest( centerID: "4762954029334528", payment: new StarkBank.Transfer( amount: 100000000, bankCode: "341", branchCode: "2201", accountNumber: "76543-8", taxID: "594.739.480-42", name: "Daenerys Targaryen Stormborn", ) tags: new List<string> { "daenerys", "request/1234" } ) } ); foreach(StarkBank.PaymentRequest request in requests) { Console.WriteLine(request); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/paymentrequest" ) func main() { requests, err := paymentrequest.Create( []paymentrequest.PaymentRequest{ { CenterId: "4762954029334528", Payment: transfer.Transfer{ Amount: 100000000, BankCode: "341", BranchCode: "2201", AccountNumber: "76543-8", TaxId: "594.739.480-42", Name: "Daenerys Targaryen Stormborn", }, Tags: []string{"daenerys", "request/1234"}, }, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } for _, request := range requests { fmt.Printf("%+v", request) } }
(def payment { :amount 10000000000 :bank-code "341" :branch-code "2201" :account-number "76543-8" :tax-id "594.739.480-42" :name "Daenerys Targaryen Stormborn" }) (def payment-requests (starkbank.payment-request/create [{ :type "transfer" :payment payment :center-id "4762954029334528" :tags ["daenerys" "request/1234"] }])) (doseq [request payment-requests] (println request))
curl --location --request POST '{{baseUrl}}/v2/payment-request' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "requests": [ { "centerId": "4762954029334528", "type": "transfer", "payment": { "amount": 100000000, "taxId": "594.739.480-42", "name": "Daenerys Targaryen Stormborn", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8" }, "tags": ["daenerys", "request/1234"] } ] }'
PaymentRequest( actions=[ { 'pictureUrl': '', 'name': 'SDK Python', 'action': 'requested', 'type': 'project', 'id': '5414728075575296', 'email': '' }, { 'pictureUrl': '', 'name': 'Rhaegar Targaryen', 'action': 'required', 'type': 'member', 'id': '6025356662276096', 'email': 'rhaegar.targaryen@starkbank.com' } ], amount=100000000, center_id=4762954029334528, created=2020-10-23T19:36:59.345753, due=2020-10-24T03:00:00+00:00, id=5756591424929792, payment=Transfer( account_number=76543-8, amount=100000000, bank_code=341, branch_code=2201, name=Daenerys Targaryen Stormborn, tax_id=594.739.480-42 ), status=pending, tags=['daenerys', 'request/1234'], type=transfer, description=Daenerys Targaryen Stormborn (594.739.480-42), updated=2020-10-23T19:36:59.345760+00:00 )
PaymentRequest { id: '5756591424929792', centerId: '4762954029334528', due: '2020-10-24T03:00:00.000000+00:00', tags: [ 'daenerys', 'request/1234' ], amount: 100000000, status: 'pending', actions: [ { pictureUrl: '', name: 'SDK Node', action: 'requested', type: 'project', id: '5414728075575296', email: '' }, { pictureUrl: '', name: 'Rhaegar Targaryen', action: 'required', type: 'member', id: '6025356662276096', email: 'rhaegar.targaryen@starkbank.com' } ], updated: '2020-10-23T19:36:59.345753+00:00', created: '2020-10-23T19:36:59.345753+00:00', payment: { name: 'Daenerys Targaryen Stormborn', accountNumber: '76543-8', taxId: '594.739.480-42', amount: 100000000, bankCode: '341', branchCode: '2201' }, type: 'transfer', description: 'Daenerys Targaryen Stormborn (594.739.480-42)' }
StarkBank\PaymentRequest Object ( [id] => 5756591424929792 [centerId] => 4762954029334528 [due] => 2020-10-24T03:00:00.000000+00:00 [description] => Daenerys Targaryen Stormborn (594.739.480-42) [tags] => Array ( [0] => daenerys [1] => request/1234 ) [amount] => 100000000 [status] => pending [actions] => Array ( [0] => Array ( [pictureUrl] => [name] => SDK PHP [action] => requested [type] => project [id] => 5414728075575296 [email] => ) [1] => Array ( [pictureUrl] => [name] => Rhaegar Targaryen [action] => required [type] => member [id] => 6025356662276096 [email] => rhaegar.targaryen@starkbank.com ) ) [created] => DateTime Object ( [date] => 2020-10-23 19:36:59.988289 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-10-23 19:36:59.988295 [timezone_type] => 1 [timezone] => +00:00 ) [payment] => StarkBank\Transfer Object ( [amount] => 100000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 ) [type] => transfer )
PaymentRequest({ "centerId": "4762954029334528", "payment": { "amount": 100000000, "name": "Daenerys Targaryen Stormborn", "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8" }, "type": "transfer", "due": "2020-10-24T03:00:00+00:00", "tags": [ "daenerys", "request/1234" ], "amount": 100000000, "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "status": "pending", "actions": [ { "pictureUrl": "", "name": "SDK Java", "action": "requested", "type": "project", "id": "5414728075575296", "email": "" }, { "pictureUrl": "", "name": "Rhaegar Targaryen", "action": "required", "type": "member", "id": "6025356662276096", "email": "" } ], "updated": "2020-10-23T19:36:59.800963+00:00", "created": "2020-10-23T19:36:59.800957+00:00", "id": "5756591424929792" })
paymentrequest( actions: [ { "pictureUrl"=>"", "name"=>"SDK Ruby", "action"=>"requested", "type"=>"project", "id"=>"5414728075575296", "email"=>"" }, { "pictureUrl"=>"", "name"=>"Rhaegar Targaryen", "action"=>"required", "type"=>"member", "id"=>"6025356662276096", "email"=>"rhaegar.targaryen@starkbank.com" }], updated: 2020-10-23T19:36:59.084075+00:00, created: 2020-10-23T19:36:59.084069+00:00, payment: transfer( id: , amount: 100000000, name: Daenerys Targaryen Stormborn, tax_id: 594.739.480-42, bank_code: 341, branch_code: 2201, account_number: 76543-8 ), type: transfer, id: 5756591424929792, center_id: 4762954029334528, due: 2020-10-24T03:00:00.000000+00:00, tags: %[daenerys request/1234], amount: 100000000, status: pending, description: Daenerys Targaryen Stormborn (594.739.480-42), )
[ %StarkBank.PaymentRequest{ actions: [ %{ "action" => "requested", "email" => "", "id" => "5414728075575296", "name" => "SDK Elixir", "pictureUrl" => "", "type" => "project" }, %{ "action" => "required", "email" => "rhaegar.targaryen@starkbank.com", "id" => "6025356662276096", "name" => "Rhaegar Targaryen", "pictureUrl" => "", "type" => "member" } ], amount: 100000000, center_id: "4762954029334528", created: ~U[2020-10-23 19:36:59.858275Z], description: "Daenerys Targaryen Stormborn (594.739.480-42)", due: ~U[2020-10-24 03:00:00.000000Z], id: "5756591424929792", payment: %StarkBank.Transfer{ account_number: "76543-8", amount: 100000000, bank_code: "341", branch_code: "2201", name: "Daenerys Targaryen Stormborn", tax_id: "594.739.480-42" }, status: "pending", tags: ["daenerys", "request/1234"], type: "transfer", updated: ~U[2020-10-23 19:36:59.858283Z] } ]
PaymentRequest( CenterID: 4762954029334528, Payment: Transfer( Amount: 100000000, Name: Daenerys Targaryen Stormborn, TaxID: 594.739.480-42, BankCode: 341, BranchCode: 2201, AccountNumber: 76543-8 ), Type: transfer, Description: Daenerys Targaryen Stormborn (594.739.480-42), Due: 24/10/2020 03:00:00, Tags: { daenerys request/1234 }, Amount: 100000000, Status: pending, Actions: { { { pictureUrl, }, { name, SDK C# }, { action, requested }, { type, project }, { id, 5414728075575296 }, { email, } }, { { pictureUrl, }, { name, Rhaegar Targaryen }, { action, required }, { type, member }, { id, 6025356662276096 }, { email, rhaegar.targaryen@starkbank.com } } }, Updated: 23/10/2020 19:36:59, Created: 23/10/2020 19:36:59, ID: 5756591424929792 )
{ CenterId:4762954029334528 Payment:{ Name: AccountNumber:76543-8 TaxId:594.739.480-42 Amount:100000000 BankCode:341 BranchCode:2201 } Type:transfer Due:2020-10-24 03:00:00.000000 +0000 +0000 Tags:[daenerys request/1234] Amount:100000000 Status:pending Actions:[ map[ action:requested email: id:5414728075575296 name:SDK Go pictureUrl: status:active type:project ] map[ action:required email:rhaegar.targaryen@starkbank.com id:6025356662276096 name:Rhaegar Targaryen pictureUrl: status:active type:member ] ] Updated:2023-02-06 14:26:36.667405 +0000 +0000 Created:2023-02-06 14:26:36.667397 +0000 +0000 Description:Daenerys Targaryen Stormborn (594.739.480-42) }
{ :amount 100000000, :tags [daenerys request/1234], :center-id 4762954029334528, :updated 2020-10-23T19:36:59.698192+00:00, :payment { :amount 100000000, :name Daenerys Targaryen Stormborn, :account-number 76543-8, :tax-id 594.739.480-42, :bank-code 341, :branch-code 2201 }, :type transfer, :description Daenerys Targaryen Stormborn (594.739.480-42), :created 2020-10-23T19:36:59.698192+00:00, :actions [ { :name SDK Clojure, :action requested, :type project, :id 5414728075575296, :email , :pictureUrl }, { :name Rhaegar Targaryen, :action required, :type member, :id 6025356662276096, :email , :pictureUrl } ], :due 2020-10-24T03:00:00.000000+00:00, :status pending, :id 5756591424929792 }
{ "message": "Payment Request(s) successfully created", "requests": [ { "id": "5756591424929792", "centerId": "4762954029334528", "type": "transfer", "payment": { "amount": 100000000, "taxId": "594.739.480-42", "name": "Daenerys Targaryen Stormborn", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8" }, "due": "2020-10-24T03:00:00.000000+00:00", "attachments": [], "tags": ["daenerys", "request/1234"], "amount": 100000000, "actions": [ { "action": "requested", "type": "project", "id": "5414728075575296", "name": "Curl", "pictureUrl": "", "email": "" }, { "action": "required", "type": "member", "id": "6025356662276096", "name": "Rhaegar Targaryen", "pictureUrl": "", "email": "rhaegar.targaryen@starkbank.com" } ], "status": "pending", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "created": "2020-10-23T19:36:59.799815+00:00", "updated": "2020-10-23T19:36:59.799815+00:00" } ] }
Here you can list and filter payment requests created by the requesting user. We return it paged.
centerId
cursor
limit
after
before
type
status
sort
tags
ids
fields
import starkbank requests = starkbank.paymentrequest.query(center_id="4762954029334528", limit=1) for request in requests: print(request)
const starkbank = require('starkbank'); (async() => { let requests = await starkbank.paymentRequest.query({centerId: '4762954029334528', limit: 1}); for await (let request of requests){ console.log(request); } })();
use StarkBank\PaymentRequest; $requests = PaymentRequest::query(["centerId" => "4762954029334528", "limit" => 1]); foreach($requests as $request){ print_r($request); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("centerId", "4762954029334528"); params.put("limit", 1); Generator<PaymentRequest> requests = PaymentRequest.query(params); for (PaymentRequest request : requests){ System.out.println(request); }
require('starkbank') requests = StarkBank::PaymentRequest.query( center_id: '4762954029334528', limit: 1 ) requests.each do |request| puts request end
requests = StarkBank.PaymentRequest.query!( center_id: "4762954029334528", limit: 1 ) |> Enum.take(10) |> IO.inspect
using System; using System.Collections.Generic; IEnumerable<StarkBank.PaymentRequest> requests = StarkBank.PaymentRequest.Query( centerID: "4762954029334528", limit: 1 ); foreach(StarkBank.PaymentRequest request in requests) { Console.WriteLine(request); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/paymentrequest" ) func main() { var params = map[string]interface{}{} params["limit"] = 1 requests := paymentrequest.Query("4762954029334528", params, nil) for request := range requests { fmt.Printf("%+v", request) } }
(def payment-requests (starkbank.payment-request/query { :limit 1 :center-id "4762954029334528"})) (doseq [request payment-requests] (println request))
curl --location --request GET '{{baseUrl}}/v2/payment-request' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --data-raw '{ "centerId": "4762954029334528" }'
PaymentRequest( actions=[ { 'pictureUrl': '', 'name': 'SDK Python', 'action': 'requested', 'type': 'project', 'id': '5414728075575296', 'email': '' }, { 'pictureUrl': '', 'name': 'Rhaegar Targaryen', 'action': 'required', 'type': 'member', 'id': '6025356662276096', 'email': 'rhaegar.targaryen@starkbank.com' } ], amount=100000000, center_id=4762954029334528, created=2020-10-23T19:36:59.345753, due=2020-10-24T03:00:00+00:00, id=5756591424929792, payment=Transfer( account_number=76543-8, amount=100000000, bank_code=341, branch_code=2201, name=Daenerys Targaryen Stormborn, tax_id=594.739.480-42 ), status=pending, tags=['daenerys', 'request/1234'], type=transfer, description=Daenerys Targaryen Stormborn (594.739.480-42), updated=2020-10-23T19:36:59.345760+00:00 )
PaymentRequest { id: '5756591424929792', centerId: '4762954029334528', due: '2020-10-24T03:00:00.000000+00:00', tags: [ 'daenerys', 'request/1234' ], amount: 100000000, status: 'pending', actions: [ { pictureUrl: '', name: 'SDK Node', action: 'requested', type: 'project', id: '5414728075575296', email: '' }, { pictureUrl: '', name: 'Rhaegar Targaryen', action: 'required', type: 'member', id: '6025356662276096', email: 'rhaegar.targaryen@starkbank.com' } ], updated: '2020-10-23T19:36:59.345753+00:00', created: '2020-10-23T19:36:59.345753+00:00', payment: { name: 'Daenerys Targaryen Stormborn', accountNumber: '76543-8', taxId: '594.739.480-42', amount: 100000000, bankCode: '341', branchCode: '2201' }, type: 'transfer', description: 'Daenerys Targaryen Stormborn (594.739.480-42)' }
StarkBank\PaymentRequest Object ( [id] => 5756591424929792 [centerId] => 4762954029334528 [due] => 2020-10-24T03:00:00.000000+00:00 [description] => Daenerys Targaryen Stormborn (594.739.480-42) [tags] => Array ( [0] => daenerys [1] => request/1234 ) [amount] => 100000000 [status] => pending [actions] => Array ( [0] => Array ( [pictureUrl] => [name] => SDK PHP [action] => requested [type] => project [id] => 5414728075575296 [email] => ) [1] => Array ( [pictureUrl] => [name] => Rhaegar Targaryen [action] => required [type] => member [id] => 6025356662276096 [email] => rhaegar.targaryen@starkbank.com ) ) [created] => DateTime Object ( [date] => 2020-10-23 19:36:59.988289 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-10-23 19:36:59.988295 [timezone_type] => 1 [timezone] => +00:00 ) [payment] => StarkBankTransfer Object ( [amount] => 100000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 ) [type] => transfer )
PaymentRequest({ "centerId": "4762954029334528", "payment": { "amount": 100000000, "name": "Daenerys Targaryen Stormborn", "taxId": "594.739.480-42", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8" }, "type": "transfer", "due": "2020-10-24T03:00:00+00:00", "tags": [ "daenerys", "request/1234" ], "amount": 100000000, "status": "pending", "description": "Daenerys Targaryen Stormborn (594.739.480-42)" "actions": [ { "pictureUrl": "", "name": "SDK Java", "action": "requested", "type": "project", "id": "5414728075575296", "email": "" }, { "pictureUrl": "", "name": "Rhaegar Targaryen", "action": "required", "type": "member", "id": "6025356662276096", "email": "" } ], "updated": "2020-10-23T19:36:59.800963+00:00", "created": "2020-10-23T19:36:59.800957+00:00", "id": "5756591424929792" })
paymentrequest( actions: [ { "pictureUrl"=>"", "name"=>"SDK Ruby", "action"=>"requested", "type"=>"project", "id"=>"5414728075575296", "email"=>"" }, { "pictureUrl"=>"", "name"=>"Rhaegar Targaryen", "action"=>"required", "type"=>"member", "id"=>"6025356662276096", "email"=>"rhaegar.targaryen@starkbank.com" }], updated: 2020-10-23T19:36:59.084075+00:00, created: 2020-10-23T19:36:59.084069+00:00, payment: transfer( id: , amount: 100000000, name: Daenerys Targaryen Stormborn, tax_id: 594.739.480-42, bank_code: 341, branch_code: 2201, account_number: 76543-8 ), type: transfer, id: 5756591424929792, center_id: 4762954029334528, due: 2020-10-24T03:00:00.000000+00:00, tags: %[daenerys request/1234], amount: 100000000, status: pending, description: Daenerys Targaryen Stormborn (594.739.480-42), )
[ %StarkBank.PaymentRequest{ actions: [ %{ "action" => "requested", "email" => "", "id" => "5414728075575296", "name" => "SDK Elixir", "pictureUrl" => "", "type" => "project" }, %{ "action" => "required", "email" => "rhaegar.targaryen@starkbank.com", "id" => "6025356662276096", "name" => "Rhaegar Targaryen", "pictureUrl" => "", "type" => "member" } ], amount: 100000000, center_id: "4762954029334528", created: ~U[2020-10-23 19:36:59.858275Z], description: "Daenerys Targaryen Stormborn (594.739.480-42)" due: ~U[2020-10-24 03:00:00.000000Z], id: "5756591424929792", payment: %StarkBank.Transfer{ account_number: "76543-8", amount: 100000000, bank_code: "341", branch_code: "2201", name: "Daenerys Targaryen Stormborn", tax_id: "594.739.480-42" }, status: "pending", tags: ["daenerys", "request/1234"], type: "transfer", updated: ~U[2020-10-23 19:36:59.858283Z] } ]
PaymentRequest( CenterID: 4762954029334528, Payment: Transfer( Amount: 100000000, Name: Daenerys Targaryen Stormborn, TaxID: 594.739.480-42, BankCode: 341, BranchCode: 2201, AccountNumber: 76543-8 ), Type: transfer, Description: Daenerys Targaryen Stormborn (594.739.480-42), Due: 24/10/2020 03:00:00, Tags: { daenerys request/1234 }, Amount: 100000000, Status: pending, Actions: { { { pictureUrl, }, { name, SDK C# }, { action, requested }, { type, project }, { id, 5414728075575296 }, { email, } }, { { pictureUrl, }, { name, Rhaegar Targaryen }, { action, required }, { type, member }, { id, 6025356662276096 }, { email, rhaegar.targaryen@starkbank.com } } }, Updated: 23/10/2020 19:36:59, Created: 23/10/2020 19:36:59, ID: 5756591424929792 )
{ CenterId:4762954029334528 Payment:{ Name: AccountNumber:76543-8 TaxId:594.739.480-42 Amount:100000000 BankCode:341 BranchCode:2201 } Type:transfer Due:2020-10-24 03:00:00.000000 +0000 +0000 Tags:[daenerys request/1234] Amount:100000000 Status:pending Actions:[ map[ action:requested email: id:5414728075575296 name:SDK Go pictureUrl: status:active type:project ] map[ action:required email:rhaegar.targaryen@starkbank.com id:6025356662276096 name:Rhaegar Targaryen pictureUrl: status:active type:member ] ] Updated:2023-02-06 14:26:36.667405 +0000 +0000 Created:2023-02-06 14:26:36.667397 +0000 +0000 Description:Daenerys Targaryen Stormborn (594.739.480-42) }
{ :amount 100000000, :tags [daenerys request/1234], :center-id 4762954029334528, :updated 2020-10-23T19:36:59.698192+00:00, :payment { :amount 100000000, :name Daenerys Targaryen Stormborn, :account-number 76543-8, :tax-id 594.739.480-42, :bank-code 341, :branch-code 2201 }, :type transfer, :description Daenerys Targaryen Stormborn (594.739.480-42), :created 2020-10-23T19:36:59.698192+00:00, :actions [ { :name SDK Clojure, :action requested, :type project, :id 5414728075575296, :email , :pictureUrl }, { :name Rhaegar Targaryen, :action required, :type member, :id 6025356662276096, :email , :pictureUrl } ], :due 2020-10-24T03:00:00.000000+00:00, :status pending, :id 5756591424929792 }
{ "requests": [ { "id": "5756591424929792", "centerId": "4762954029334528", "type": "transfer", "payment": { "amount": 100000000, "taxId": "594.739.480-42", "name": "Daenerys Targaryen Stormborn", "bankCode": "341", "branchCode": "2201", "accountNumber": "76543-8" }, "due": "2020-10-24T03:00:00.000000+00:00", "attachments": [], "tags": ["daenerys", "request/1234"], "amount": 100000000, "actions": [ { "action": "requested", "type": "project", "id": "5414728075575296", "name": "Curl", "pictureUrl": "", "email": "" }, { "action": "required", "type": "member", "id": "6025356662276096", "name": "Rhaegar Targaryen", "pictureUrl": "", "email": "rhaegar.targaryen@starkbank.com" } ], "status": "pending", "description": "Daenerys Targaryen Stormborn (594.739.480-42)", "created": "2020-10-23T19:36:59.799815+00:00", "updated": "2020-10-23T19:36:59.799815+00:00" } ] }
You can create webhook subscriptions to receive events whenever a new log is created. We send the event by making a POST request to your endpoint URL. The event will be delivered with a digital signature (headers["Digital-Signature"]), which can be verified using the Stark Bank public key. This key is recoverable by a GET request to /v2/public-key.
{ "event": { "id": "4816763241889792", "subscription": "boleto", "isDelivered": true, "created": "2020-03-26T18:00:00.363220+00:00" "log": { "id": "5096976731340800", "created": "2020-03-26T18:00:05.165485+00:00", "errors": [], "type": "paid", "boleto": { "taxId": "20.018.183/0001-80", "overdueLimit": 5, "fine": 2.5, "id": "5730174175805440", "city": "São Paulo", "fee": 0, "streetLine2": "CJ 13", "district": "Itaim Bibi", "streetLine1": "Av. Faria Lima, 1844", "due": "2020-06-21T02:59:59.999999+00:00", "workspaceId": "5155165527080960", "interest": 1.3, "status": "paid", "tags": ["war supply", "invoice #1234"], "zipCode": "01500-000", "line": "34191.09008 64410.047308 71444.640008 7 82920000400000", "name": "Iron Bank S.A.", "created": "2020-03-25T22:22:41.106321+00:00", "barCode": "34197829200004000001090064410047307144464000", "amount": 400000, "stateCode": "SP", "descriptions": [] } }, } }
Here you can register a new webhook URL. The subscriptions refer to which kind of log will be notified to the webhook URL being registered. The subscriptions must be in transfer, boleto, boleto-payment, utility-payment, brcode-payment, boleto-holmes, deposit, darf-payment, payment-request or invoice.
url
subscriptions
import starkbank webhook = starkbank.webhook.create( url="https://winterfell.westeros.gov/events-from-stark-bank", subscriptions=[ "boleto", "boleto-payment", "transfer", "utility-payment" ] ) print(webhook)
const starkbank = require('starkbank'); (async() => { let webhook = await starkbank.webhook.create({ url: 'https://winterfell.westeros.gov/events-from-stark-bank', subscriptions: ['transfer', 'boleto', 'boleto-payment', 'utility-payment'], }); console.log(webhook); })();
$webhook = StarkBank\Webhook::create([ "url" => "https://winterfell.westeros.gov/events-from-stark-bank", "subscriptions" => ["boleto", "boleto-payment", "transfer", "utility-payment"] ]); print_r($webhook);
import com.starkbank.*; import java.util.HashMap; HashMap<String, Object> data = new HashMap<>(); data.put("url", "https://winterfell.westeros.gov/events-from-stark-bank"); data.put("subscriptions", new String[]{"boleto", "boleto-payment", "transfer", "utility-payment"}); Webhook webhook = Webhook.create(data); System.out.println(webhook);
require('starkbank') webhook = StarkBank::Webhook.create( url: 'https://winterfell.westeros.gov/events-from-stark-bank', subscriptions: %w[boleto boleto-payment transfer utility-payment] ) puts webhook
webhook = StarkBank.Webhook.create!( url: "https://winterfell.westeros.gov/events-from-stark-bank", subscriptions: [ "boleto", "boleto-payment", "transfer", "utility-payment" ] ) webhook |> IO.inspect
using System; StarkBank.Webhook webhook = StarkBank.Webhook.Create( url: "https://winterfell.westeros.gov/events-from-stark-bank", subscriptions: new List<string> { "transfer", "boleto", "boleto-payment", "utility-payment" } );
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/webhook" ) func main() { webhook, err := webhook.Create( webhook.Webhook{ Url: "https://winterfell.westeros.gov/events-from-stark-bank", Subscriptions: []string{"boleto", "boleto-payment", "transfer", "utility-payment"}, }, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", webhook) }
(def webhook (starkbank.webhook/create { :url "https://winterfell.westeros.gov/events-from-stark-bank" :subscriptions ["transfer" "boleto" "boleto-payment" "utility-payment"] })) (dorun (map println webhook))
curl --location --request POST '{{baseUrl}}/v2/webhook' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "url": "https://winterfell.westeros.gov/events-from-stark-bank", "subscriptions": ["boleto", "boleto-payment", "transfer", "utility-payment"] }'
Webhook( id=6225875037061120, subscriptions=['boleto', 'boleto-payment', 'transfer', 'utility-payment'], url=https://winterfell.westeros.gov/events-from-stark-bank )
Webhook { id: '6225875037061120', url: 'https://winterfell.westeros.gov/events-from-stark-bank', subscriptions: [ 'transfer', 'boleto', 'boleto-payment', 'utility-payment' ] }
StarkBank\Webhook Object ( [id] => 6225875037061120 [url] => https://winterfell.westeros.gov/events-from-stark-bank [subscriptions] => Array ( [0] => boleto [1] => boleto-payment [2] => transfer [3] => utility-payment ) )
Webhook({ "id": "6225875037061120", "url": "https://winterfell.westeros.gov/events-from-stark-bank", "subscriptions": ["boleto", "boleto-payment", "transfer", "utility-payment"] })
webhook( id: 6225875037061120, url: https://winterfell.westeros.gov/events-from-stark-bank, subscriptions: ["boleto", "boleto-payment", "transfer", "utility-payment"] )
%StarkBank.Webhook{ id: "6225875037061120", url: "https://winterfell.westeros.gov/events-from-stark-bank", subscriptions: [ "boleto", "boleto-payment", "transfer", "utility-payment" ] }
Webhook( Url: https://winterfell.westeros.gov/events-from-stark-bank, Subscriptions: { transfer, boleto, boleto-payment, utility-payment }, ID: 6225875037061120 )
{ Url:https://winterfell.westeros.gov/events-from-stark-bank Subscriptions:[boleto boleto-payment transfer utility-payment] Id:6225875037061120 }
{:id "6225875037061120", :url "https://winterfell.westeros.gov/events-from-stark-bank", :subscriptions ["boleto" "boleto-payment" "transfer" "utility-payment"]}
{ "message": "Webhook successfully created", "webhook": { "id": "6225875037061120", "url": "https://winterfell.westeros.gov/events-from-stark-bank", "subscriptions": [ "boleto", "boleto-payment", "transfer", "utility-payment" ] } }
Get a list of non-deleted webhooks in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
fields
import starkbank webhooks = starkbank.webhook.query() for webhook in webhooks: print(webhook)
const starkbank = require('starkbank'); (async() => { let webhooks = await starkbank.webhook.query(); for await (let webhook of webhooks) { console.log(webhook); } })();
$webhooks = StarkBank\Webhook::query(); foreach($webhooks as $webhook){ print_r($webhook); }
import com.starkbank.*; import com.starkbank.utils.Generator; Generator<Webhook> webhooks = Webhook.query(); for (Webhook webhook : webhooks){ System.out.println(webhook); }
require('starkbank') webhooks = StarkBank::Webhook.query() webhooks.each do |webhook| puts webhook end
webhooks = StarkBank.Webhook.query!() for webhook <- webhooks do webhook |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.Webhook> webhooks = StarkBank.Webhook.Query(); foreach(StarkBank.Webhook webhook in webhooks) { Console.WriteLine(webhook); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/webhook" ) func main() { webhooks := webhook.Query(nil, nil) for webhook := range webhooks { fmt.Printf("%+v", webhook) } }
(def webhooks (starkbank.webhook/query)) (dorun (map println webhooks))
curl --location --request GET '{{baseUrl}}/v2/webhook' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Webhook( id=6225875037061120, subscriptions=['boleto', 'boleto-payment', 'transfer', 'utility-payment'], url=https://winterfell.westeros.gov/events-from-stark-bank )
Webhook { url: 'https://winterfell.westeros.gov/events-from-stark-bank', subscriptions: [ 'transfer', 'boleto', 'boleto-payment', 'utility-payment' ], id: '6225875037061120' }
StarkBank\Webhook Object ( [id] => 6225875037061120 [url] => https://winterfell.westeros.gov/events-from-stark-bank [subscriptions] => Array ( [0] => boleto [1] => boleto-payment [2] => transfer [3] => utility-payment ) )
Webhook({ "id": "6225875037061120", "url": "https://winterfell.westeros.gov/events-from-stark-bank", "subscriptions": ["boleto", "boleto-payment", "transfer", "utility-payment"] })
webhook( id: 6225875037061120, url: https://winterfell.westeros.gov/events-from-stark-bank, subscriptions: ["boleto", "boleto-payment", "transfer", "utility-payment"] )
%StarkBank.Webhook{ id: "4844331563220992", url: "https://winterfell.westeros.gov/events-from-stark-bank", subscriptions: [ "boleto", "boleto-payment", "transfer", "utility-payment" ] }
Webhook( Url: https://webhook.site/60e9c18e-4b5c-4369-bda1-ab5fcd8e1b29, Subscriptions: { transfer, boleto, boleto-payment, utility-payment }, ID: 6225875037061120 )
{ Url:https://winterfell.westeros.gov/events-from-stark-bank Subscriptions:[boleto boleto-payment transfer utility-payment] Id:6225875037061120 }
{:id "6225875037061120", :url "https://winterfell.westeros.gov/events-from-stark-bank", :subscriptions ["boleto" "boleto-payment" "transfer" "utility-payment"]}
{ "cursor": null, "webhooks": [ { "id": "6225875037061120", "url": "https://winterfell.westeros.gov/events-from-stark-bank", "subscriptions": [ "boleto", "boleto-payment", "transfer", "utility-payment" ] } ] }
Get a single Webhook by its id.
id
fields
import starkbank webhook = starkbank.webhook.get("6225875037061120") print(webhook)
const starkbank = require('starkbank'); (async() => { let webhook = await starkbank.webhook.get('6225875037061120'); console.log(webhook); })();
$webhook = StarkBank\Webhook::get("6225875037061120"); print_r($webhook);
import com.starkbank.*; Webhook webhook = Webhook.get("6225875037061120"); System.out.println(webhook);
require('starkbank') webhook = StarkBank::Webhook.get('6225875037061120') puts webhook
webhook = StarkBank.Webhook.get!("6225875037061120") webhook |> IO.inspect
using System; StarkBank.Webhook webhook = StarkBank.Webhook.Get("6225875037061120"); Console.WriteLine(webhook);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/webhook" ) func main() { webhook, err := webhook.Get("6225875037061120", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", webhook) }
(def webhook (starkbank.webhook/get "6225875037061120")) (println webhook)
curl --location --request GET '{{baseUrl}}/v2/webhook/6225875037061120' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Webhook( id=6225875037061120, subscriptions=['boleto', 'boleto-payment', 'transfer', 'utility-payment'], url=https://winterfell.westeros.gov/events-from-stark-bank )
Webhook { id: '6225875037061120', url: 'https://winterfell.westeros.gov/events-from-stark-bank', subscriptions: [ 'boleto', 'boleto-payment', 'transfer', 'utility-payment' ] }
StarkBank\Webhook Object ( [id] => 6225875037061120 [url] => https://winterfell.westeros.gov/events-from-stark-bank [subscriptions] => Array ( [0] => boleto [1] => boleto-payment [2] => transfer [3] => utility-payment ) )
Webhook({ "id": "6225875037061120", "url": "https://winterfell.westeros.gov/events-from-stark-bank", "subscriptions": ["boleto", "boleto-payment", "transfer", "utility-payment"] })
webhook( id: 6225875037061120, url: https://winterfell.westeros.gov/events-from-stark-bank, subscriptions: ["boleto", "boleto-payment", "transfer", "utility-payment"] )
%StarkBank.Webhook{ id: "6225875037061120", url: "https://winterfell.westeros.gov/events-from-stark-bank", subscriptions: [ "boleto", "boleto-payment", "transfer", "utility-payment" ] }
Webhook( Url: https://webhook.site/60e9c18e-4b5c-4369-bda1-ab5fcd8e1b29, Subscriptions: { transfer, boleto, boleto-payment, utility-payment }, ID: 6225875037061120 )
{ Url:https://winterfell.westeros.gov/events-from-stark-bank Subscriptions:[boleto boleto-payment transfer utility-payment] Id:6225875037061120 }
{:id "6225875037061120", :url "https://winterfell.westeros.gov/events-from-stark-bank", :subscriptions ["boleto" "boleto-payment" "transfer" "utility-payment"]}
{ "webhook": { "id": "6225875037061120", "url": "https://winterfell.westeros.gov/events-from-stark-bank", "subscriptions": [ "boleto", "boleto-payment", "transfer", "utility-payment" ] } }
Delete a single Webhook subscription.
id
import starkbank webhook = starkbank.webhook.delete("6225875037061120") print(webhook)
const starkbank = require('starkbank'); (async() => { let webhook = await starkbank.webhook.delete('6225875037061120'); console.log(webhook); })();
$webhook = StarkBank\Webhook::delete("6225875037061120"); print_r($webhook);
import com.starkbank.*; Webhook webhook = Webhook.delete("6225875037061120"); System.out.println(webhook);
require('starkbank') webhook = StarkBank::Webhook.delete('6225875037061120') puts webhook
webhook = StarkBank.Webhook.delete!("6225875037061120") webhook |> IO.inspect
using System; StarkBank.Webhook webhook = StarkBank.Webhook.Delete("6225875037061120"); Console.WriteLine(webhook);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/webhook" ) func main() { webhook, err := webhook.Delete("6225875037061120", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", webhook) }
(def webhook (starkbank.webhook/delete "6225875037061120")) (println webhook)
curl --location --request DELETE '{{baseUrl}}/v2/webhook/6225875037061120' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Webhook( id=6225875037061120, subscriptions=['boleto', 'boleto-payment', 'transfer', 'utility-payment'], url=https://winterfell.westeros.gov/events-from-stark-bank )
Webhook { id: '6225875037061120', url: 'https://winterfell.westeros.gov/events-from-stark-bank', subscriptions: [ 'boleto', 'boleto-payment', 'transfer', 'utility-payment' ] }
StarkBank\Webhook Object ( [id] => 6225875037061120 [url] => https://winterfell.westeros.gov/events-from-stark-bank [subscriptions] => Array ( [0] => boleto [1] => boleto-payment [2] => transfer [3] => utility-payment ) )
Webhook({ "id": "6225875037061120", "url": "https://winterfell.westeros.gov/events-from-stark-bank", "subscriptions": ["boleto", "boleto-payment", "transfer", "utility-payment"] })
webhook( id: 6225875037061120, url: https://winterfell.westeros.gov/events-from-stark-bank, subscriptions: ["boleto", "boleto-payment", "transfer", "utility-payment"] )
%StarkBank.Webhook{ id: "6225875037061120", url: "https://winterfell.westeros.gov/events-from-stark-bank", subscriptions: [ "boleto", "boleto-payment", "transfer", "utility-payment" ] }
Webhook( Url: https://webhook.site/60e9c18e-4b5c-4369-bda1-ab5fcd8e1b29, Subscriptions: { transfer, boleto, boleto-payment, utility-payment }, ID: 6225875037061120 )
{ Url:https://winterfell.westeros.gov/events-from-stark-bank Subscriptions:[boleto boleto-payment transfer utility-payment] Id:6225875037061120 }
{:id "6225875037061120", :url "https://winterfell.westeros.gov/events-from-stark-bank", :subscriptions ["boleto" "boleto-payment" "transfer" "utility-payment"]}
{ "message": "Webhook successfully deleted", "webhook": { "id": "6225875037061120", "url": "https://winterfell.westeros.gov/events-from-stark-bank", "subscriptions": [ "boleto", "boleto-payment", "transfer", "utility-payment" ] } }
Every time a log is created, a corresponding event will be generated and sent to you by webhook,
if the appropriate subscription was set. Therefore, the event represents an occurrence in your workspace.
if event.subscription == "transfer": print(event.log.transfer) elif event.subscription == "boleto": print(event.log.boleto) elif event.subscription == "boleto-payment": print(event.log.payment) elif event.subscription == "utility-payment": print(event.log.payment)
if (event.subscription === 'transfer') { console.log(event.log.transfer); } else if (event.subscription === 'boleto') { console.log(event.log.boleto); } else if (event.subscription === 'boleto-payment') { console.log(event.log.payment); } else if (event.subscription === 'utility-payment') { console.log(event.log.payment); }
if ($event->subscription == "transfer"){ print_r($event->log->transfer); } elseif ($event->subscription == "boleto"){ print_r($event->log->boleto); } elseif ($event->subscription == "boleto-payment"){ print_r($event->log->payment); } elseif ($event->subscription == "utility-payment"){ print_r($event->log->payment); }
switch (event.subscription) { case "transfer": { Transfer.Log log = ((Event.TransferEvent) event).log; System.out.println(log.transfer); break; } case "boleto": { Boleto.Log log = ((Event.BoletoEvent) event).log; System.out.println(log.boleto); break; } case "boleto-payment": { BoletoPayment.Log log = ((Event.BoletoPaymentEvent) event).log; System.out.println(log.payment); break; } case "utility-payment": { UtilityPayment.Log log = ((Event.UtilityPaymentEvent) event).log; System.out.println(log.payment); break; } }
if event.subscription == 'transfer' puts event.log.transfer elsif event.subscription == 'boleto' puts event.log.boleto elsif event.subscription == 'boleto-payment' puts event.log.payment elsif event.subscription == 'utility-payment' puts event.log.payment end
case event.subscription do "transfer" -> event.log.transfer "boleto" -> event.log.boleto "boleto-payment" -> event.log.payment "utility-payment" -> event.log.payment end |> IO.inspect
if (eventObject.Subscription == "transfer") { StarkBank.Transfer.Log log = eventObject.Log as StarkBank.Transfer.Log; Console.WriteLine(log.Transfer); } else if (eventObject.Subscription == "boleto") { StarkBank.Boleto.Log log = eventObject.Log as StarkBank.Boleto.Log; Console.WriteLine(log.Boleto); } else if (eventObject.Subscription == "boleto-payment") { StarkBank.BoletoPayment.Log log = eventObject.Log as StarkBank.BoletoPayment.Log; Console.WriteLine(log.Payment); } else if (eventObject.Subscription == "utility-payment") { StarkBank.UtilityPayment.Log log = eventObject.Log as StarkBank.UtilityPayment.Log; Console.WriteLine(log.Payment); }
if event.Subscription == "transfer" { fmt.Println(event.Log) } else if event.Subscription == "boleto" { fmt.Println(event.Log) } else if event.Subscription == "boleto-payment" { fmt.Println(event.Log) } else if event.Subscription == "utility-payment" { fmt.Println(event.Log) }
(case (:subscription event) "transfer" (println (:transfer (:log event))) "boleto" (println (:boleto (:log event))) "boleto-payment" (println (:payment (:log event))) "utility-payment" (println (:payment (:log event))))
{ "event": { "id": "5344245984526336", "isDelivered": false, "subscription": "transfer", "created": "2020-03-11T00:14:23.201602+00:00", "log": { "id": "5344245984526336", "errors": [], "type": "success", "created": "2020-03-11T00:14:22.104676+00:00", "transfer": { "id": "5907195937947648", "status": "success", "amount": 10000000, "name": "Jon Snow", "bankCode": "001", "branchCode": "5897" "accountNumber": "10000-0", "taxId": "580.822.679-17", "tags": ["jon", "snow", "knows-nothing"], "created": "2020-03-11T00:14:21.548876+00:00", "updated": "2020-03-11T00:14:22.104702+00:00", "transactionIds": ["6671637889941504"], "fee": 200, } } } }
Get a list of non-deleted events in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
isDelivered
fields
import starkbank events = starkbank.event.query( is_delivered=False, after="2020-04-01", before="2020-04-30" ) for event in events: print(event)
const starkbank = require('starkbank'); (async() => { let events = await starkbank.event.query({ isDelivered: false, after: '2020-04-01', before: '2020-04-30', }); for await (let event of events) { console.log(event); } })();
$events = StarkBank\Event::query([ "isDelivered" => false, "after" => "2020-04-01", "before" => "2020-04-30" ]); foreach($events as $event){ print_r($event); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("isDelivered", false); params.put("after", "2020-04-01"); params.put("before", "2020-04-30"); Generator<Event> events = Event.query(params); for (Event event : events){ System.out.println(event); }
require('starkbank') events = StarkBank::Event.query( after: '2020-04-01', before: '2020-04-30', is_delivered: false ) events.each do |event| puts event end
events = StarkBank.Event.query!( after: "2020-04-01", before: "2020-04-30", is_delivered: false ) for event <- events do event |> IO.inspect end
using System; using System.Collections.Generic; IEnumerable<StarkBank.Event> events = StarkBank.Event.Query( after: new DateTime(2020, 4, 1), before: new DateTime(2020, 4, 30), isDelivered: false ); foreach(StarkBank.Event eventObject in events) { Console.WriteLine(eventObject); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/event" ) func main() { var params = map[string]interface{}{} params["isDelivered"] = false params["after"] = "2020-04-01" params["before"] = "2020-04-30" events := event.Query(params, nil) for event := range events { fmt.Printf("%+v", event) } }
(def events (starkbank.event/query { :after "2020-03-20" :before "2020-04-30" :is-delivered false })) (dorun (map println events))
curl --location --request GET '{{baseUrl}}/v2/event' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Event( id=4537025176797184, is_delivered=False, subscription=transfer, created=2020-04-24 17:49:10.181589, log=Log( id=5662318377566208, created=2020-04-24 17:49:09.348444, errors=[], type=sending, transfer=Transfer( id=5950134772826112, account_number=76543-8, amount=100000000, bank_code=341, branch_code=2201, created=2020-04-24 17:49:08.748893, fee=200, name=Daenerys Targaryen Stormborn, status=processing, tags=['daenerys', 'invoice/1234'], tax_id=594.739.480-42, transaction_ids=['5991715760504832'], updated=2020-04-24 17:49:09.632271 ) ), workspace_id=1231231231231231 )
Event { id: '4537025176797184', created: '2020-04-24T17:49:10.847726+00:00', isDelivered: false, subscription: 'transfer', log: { id: '5662318377566208', errors: [], type: 'sending', created: '2020-04-24T17:49:09.884128+00:00', payment: { id: '5950134772826112' accountNumber: '76543-8', amount: 10785, bankCode: '341', branchCode: '2201', created: '2020-04-24T17:49:08.038706+00:00', fee: 200, name: 'Daenerys Targaryen Stormborn', status: 'processing', tags: ['daenerys', 'invoice/1234'], taxId: '594.739.480-42', transactionIds: ['5991715760504832'], updated: '2020-04-24T17:49:09.038706+00:00', } }, workspaceId='1231231231231231' }
StarkBank\Event Object ( [id] => 4537025176797184 [isDelivered] => false [subscription] => transfer [created] => DateTime Object ( [date] => 2020-04-24 17:49:10.616917 [timezone_type] => 1 [timezone] => +00:00 ) [log] => StarkBank\Transfer\Log Object ( [id] => 5662318377566208 [created] => DateTime Object ( [date] => 2020-04-24 17:49:09.844960 [timezone_type] => 1 [timezone] => +00:00 ) [type] => sending [errors] => Array ( ) [transfer] => StarkBank\Transfer Object ( [id] => 5950134772826112 [amount] => 100000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 [tags] => Array ( [0] => daenerys [1] => invoice/1234 ) [fee] => 200 [status] => processing [transactionIds] => Array ( [0] => 5991715760504832 ) [created] => DateTime Object ( [date] => 2020-04-24 17:49:08.277606 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 17:49:09.090932 [timezone_type] => 1 [timezone] => +00:00 ) ) ) [workspaceId] => 1231231231231231 )
Event({ "id": "4537025176797184", "created": "2020-04-24T17:49:10+00:00", "isDelivered": false, "subscription": "transfer", "log": { "id": "5662318377566208", "created": "2020-04-24T17:49:13+00:00", "type": "registered", "errors": [], "transfer": { "id": "5429309233692672", "accountNumber": "76543-8", "amount": 100000000, "bankCode": "341", "branchCode": "2201", "created": "2020-04-24T17:49:13+00:00" "fee": 200, "name": "Daenerys Targaryen Stormborn", "status": "processing", "tags": ["daenerys", "invoice/1234"], "taxId": "594.739.480-42", "transactionIds": ["5991715760504832"], "updated": "2020-04-24T17:49:13+00:00" } }, "workspaceId": 1231231231231231 })
event( id: 4537025176797184, created: 2020-04-24T17:49:10+00:00, is_delivered: false, subscription: transfer, log: log( id: 5662318377566208, created: 2020-04-24T17:49:09+00:00, type: sending, errors: [], transfer: transfer( id: 5950134772826112, account_number: 76543-8, amount: 100000000, bank_code: 341, branch_code: 2201, created: 2020-04-24T17:49:09+00:00 fee: 200, name: Daenerys Targaryen Stormborn, status: processing, tags: ["daenerys", "invoice/1234"], tax_id: 594.739.480-42, transaction_ids: ["5991715760504832"], updated: 2020-04-24T17:49:09+00:00 ) ), workspace_id: 1231231231231231 )
%StarkBank.Event{ id: "4537025176797184", is_delivered: false, subscription: "transfer", created: ~U[2020-04-24 17:49:09.594656Z], log: %StarkBank.Transfer.Log{ id: "5662318377566208", created: ~U[2020-04-24 17:49:09.049096Z], errors: [], type: "sending", payment: %StarkBank.Transfer{ id: "5950134772826112", account_number: 76543-8, amount: 11631, bank_code: "341", branch_code: "2201", created: ~U[2020-04-24 17:49:09.713657Z], fee: 200, name: "Daenerys Targaryen Stormborn", status: "processing", tags: ["daenerys", "invoice/1234"], tax_id: "594.739.480-42" transaction_ids: ["5991715760504832"], updated: ~U[2020-04-24 17:49:09.713657Z] } }, workspace_id: "1231231231231231" }
Event( ID: 4537025176797184, IsDelivered: False, Subscription: transfer, Created: 04/24/2020 17:49:09, Log: Log( ID: 5662318377566208, Created: 04/24/2020 17:49:09, Type: sending, Errors: { }, Transfer: Transfer( ID: 5950134772826112 AccountNumber: 76543-8, Amount: 100000000, BankCode: 341, BranchCode: 2201, Created: 04/24/2020 17:49:09, Fee: 200, Name: Daenerys Targaryen Stormborn, Status: processing, Tags: { daenerys, invoice/1234 }, TaxID: 594.739.480-42, TransactionIds: { 5991715760504832 }, Updated: 04/24/2020 17:49:09 ) ), WorkspaceId: 1231231231231231 )
{ Id:4537025176797184 Log:{ Id:5662318377566208 Transfer:{ Id:5950134772826112 AccountNumber:76543-8 Amount:1000000 BankCode:341 BranchCode:2201 Created:2020-04-24 17:49:10.38386 +0000 +0000 Fine:200 Name:Daenerys Targaryen Stormborn Status:processing Tags:[daenerys invoice/1234] TaxId:594.739.480-42 TransactionIds:[5991715760504832] Created:2020-04-24 17:49:09.38386 +0000 +0000 } Errors:[] Type:sending Created:2020-04-24 17:49:09.126413 +0000 +0000 } Created:2020-04-24 17:49:09.464471 +0000 +0000 IsDelivered:false Subscription:transfer WorkspaceId:1231231231231231 }
{:id "4537025176797184", :created "2020-04-24T17:49:09.359338+00:00", :is-delivered false, :subscription "transfer", :log {:id "5662318377566208", :created "2020-04-24T17:49:09.703951+00:00", :errors [], :type "sending", :transfer {:id "5950134772826112", :account-number 76543-8, :amount 100000000, :bank-code "341", :branch-code "2201", :created "2020-04-24T17:49:09.128124+00:00", :fee 200, :name "Daenerys Targaryen Stormborn", :status "processing", :tags ["daenerys" "invoice/1234"], :transaction-ids ["5991715760504832"], :updated "2020-04-24T17:49:09.128124+00:00"}} :workspace-id "1231231231231231"}
{ "cursor": null, "events": [ { "id": "4537025176797184", "isDelivered": false, "subscription": "transfer", "created": "2020-04-24T17:49:00.201602+00:00", "log": { "id": "5662318377566208", "errors": [], "type": "sending", "created": "2020-04-24T17:49:09.751122+00:00", "transfer": { "id": "5950134772826112", "accountNumber": "76543-8", "amount": 100000000, "bankCode": "341", "branchCode": "2201", "created": "2020-04-24T17:49:09.130246+00:00", "fee": 200, "name": "Daenerys Targaryen Stormborn", "status": "processing", "taxId": "594.739.480-42", "tags": ["daenerys", "invoice/1234"], "transactionIds": ["5991715760504832"], "updated": "2020-04-24T17:49:02.130255+00:00", } }, "workspaceId": "1231231231231231" } ] }
Get a single Event by its id.
id
fields
import starkbank event = starkbank.event.get("4537025176797184") print(event)
const starkbank = require('starkbank'); (async() => { let event = await starkbank.event.get('4537025176797184'); console.log(event); })();
$event = StarkBank\Event::get("4537025176797184"); print_r($event);
import com.starkbank.*; Event event = Event.get("4537025176797184"); System.out.println(event);
require('starkbank') event = StarkBank::Event.get('4537025176797184') puts event
event = StarkBank.Event.get!("4537025176797184") event |> IO.inspect
using System; StarkBank.Event eventObject = StarkBank.Event.Get("4537025176797184"); Console.WriteLine(eventObject);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/event" ) func main() { event, err := event.Get("4537025176797184", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", event) }
(def event (starkbank.event/get "4537025176797184")) (println event)
curl --location --request GET '{{baseUrl}}/v2/event/4537025176797184' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Event( id=4537025176797184, is_delivered=False, subscription=transfer, created=2020-04-24 17:49:10.181589, log=Log( id=5662318377566208, created=2020-04-24 17:49:09.348444, errors=[], type=sending, transfer=Transfer( id=5950134772826112, account_number=76543-8, amount=100000000, bank_code=341, branch_code=2201, created=2020-04-24 17:49:08.748893, fee=200, name=Daenerys Targaryen Stormborn, status=processing, tags=['daenerys', 'invoice/1234'], tax_id=594.739.480-42, transaction_ids=['5991715760504832'], updated=2020-04-24 17:49:09.632271 ) ), workspace_id=1231231231231231 )
Event { id: '4537025176797184', created: '2020-04-24T17:49:10.847726+00:00', isDelivered: false, subscription: 'transfer', log: { id: '5662318377566208', errors: [], type: 'sending', created: '2020-04-24T17:49:09.884128+00:00', payment: { id: '5950134772826112' accountNumber: '76543-8', amount: 10785, bankCode: '341', branchCode: '2201', created: '2020-04-24T17:49:08.038706+00:00', fee: 200, name: 'Daenerys Targaryen Stormborn', status: 'processing', tags: ['daenerys', 'invoice/1234'], taxId: '594.739.480-42', transactionIds: ['5991715760504832'], updated: '2020-04-24T17:49:09.038706+00:00', } }, workspaceId='1231231231231231' }
StarkBank\Event Object ( [id] => 4537025176797184 [isDelivered] => false [subscription] => transfer [created] => DateTime Object ( [date] => 2020-04-24 17:49:10.616917 [timezone_type] => 1 [timezone] => +00:00 ) [log] => StarkBank\Transfer\Log Object ( [id] => 5662318377566208 [created] => DateTime Object ( [date] => 2020-04-24 17:49:09.844960 [timezone_type] => 1 [timezone] => +00:00 ) [type] => sending [errors] => Array ( ) [transfer] => StarkBankTransfer Object ( [id] => 5950134772826112 [amount] => 100000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 [tags] => Array ( [0] => daenerys [1] => invoice/1234 ) [fee] => 200 [status] => processing [transactionIds] => Array ( [0] => 5991715760504832 ) [created] => DateTime Object ( [date] => 2020-04-24 17:49:08.277606 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 17:49:09.090932 [timezone_type] => 1 [timezone] => +00:00 ) ) ) [workspaceId] => 1231231231231231 )
Event({ "id": "4537025176797184", "created": "2020-04-24T17:49:10+00:00", "isDelivered": false, "subscription": "transfer", "log": { "id": "5662318377566208", "created": "2020-04-24T17:49:13+00:00", "type": "registered", "errors": [], "transfer": { "id": "5429309233692672", "accountNumber": "76543-8", "amount": 100000000, "bankCode": "341", "branchCode": "2201", "created": "2020-04-24T17:49:13+00:00" "fee": 200, "name": "Daenerys Targaryen Stormborn", "status": "processing", "tags": ["daenerys", "invoice/1234"], "taxId": "594.739.480-42", "transactionIds": ["5991715760504832"], "updated": "2020-04-24T17:49:13+00:00" } }, "workspaceId": 1231231231231231 })
event( id: 4537025176797184, created: 2020-04-24T17:49:10+00:00, is_delivered: false, subscription: transfer, log: log( id: 5662318377566208, created: 2020-04-24T17:49:09+00:00, type: sending, errors: [], transfer: transfer( id: 5950134772826112, account_number: 76543-8, amount: 100000000, bank_code: 341, branch_code: 2201, created: 2020-04-24T17:49:09+00:00 fee: 200, name: Daenerys Targaryen Stormborn, status: processing, tags: ["daenerys", "invoice/1234"], tax_id: 594.739.480-42, transaction_ids: ["5991715760504832"], updated: 2020-04-24T17:49:09+00:00 ) ), workspace_id: 1231231231231231 )
%StarkBank.Event{ id: "4537025176797184", is_delivered: false, subscription: "transfer", created: ~U[2020-04-24 17:49:09.594656Z], log: %StarkBank.Transfer.Log{ id: "5662318377566208", created: ~U[2020-04-24 17:49:09.049096Z], errors: [], type: "sending", payment: %StarkBank.Transfer{ id: "5950134772826112", account_number: 76543-8, amount: 11631, bank_code: "341", branch_code: "2201", created: ~U[2020-04-24 17:49:09.713657Z], fee: 200, name: "Daenerys Targaryen Stormborn", status: "processing", tags: ["daenerys", "invoice/1234"], tax_id: "594.739.480-42" transaction_ids: ["5991715760504832"], updated: ~U[2020-04-24 17:49:09.713657Z] } }, workspace_id: "1231231231231231" }
Event( ID: 4537025176797184, IsDelivered: False, Subscription: transfer, Created: 04/24/2020 17:49:09, Log: Log( ID: 5662318377566208, Created: 04/24/2020 17:49:09, Type: sending, Errors: { }, Transfer: Transfer( ID: 5950134772826112 AccountNumber: 76543-8, Amount: 100000000, BankCode: 341, BranchCode: 2201, Created: 04/24/2020 17:49:09, Fee: 200, Name: Daenerys Targaryen Stormborn, Status: processing, Tags: { daenerys, invoice/1234 }, TaxID: 594.739.480-42, TransactionIds: { 5991715760504832 }, Updated: 04/24/2020 17:49:09 ) ), WorkspaceId: 1231231231231231 )
{ Id:4537025176797184 Log:{ Id:5662318377566208 Transfer:{ Id:5950134772826112 AccountNumber:76543-8 Amount:1000000 BankCode:341 BranchCode:2201 Created:2020-04-24 17:49:10.38386 +0000 +0000 Fine:200 Name:Daenerys Targaryen Stormborn Status:processing Tags:[daenerys invoice/1234] TaxId:594.739.480-42 TransactionIds:[5991715760504832] Created:2020-04-24 17:49:09.38386 +0000 +0000 } Errors:[] Type:sending Created:2020-04-24 17:49:09.126413 +0000 +0000 } Created:2020-04-24 17:49:09.464471 +0000 +0000 IsDelivered:false Subscription:transfer WorkspaceId:1231231231231231 }
{:id "4537025176797184", :created "2020-04-24T17:49:09.359338+00:00", :is-delivered false, :subscription "transfer", :log {:id "5662318377566208", :created "2020-04-24T17:49:09.703951+00:00", :errors [], :type "sending", :transfer {:id "5950134772826112", :account-number 76543-8, :amount 100000000, :bank-code "341", :branch-code "2201", :created "2020-04-24T17:49:09.128124+00:00", :fee 200, :name "Daenerys Targaryen Stormborn", :status "processing", :tags ["daenerys" "invoice/1234"], :transaction-ids ["5991715760504832"], :updated "2020-04-24T17:49:09.128124+00:00"}} :workspace-id "1231231231231231"}
{ "message": "Event successfully deleted", "event": { "id": "4537025176797184", "isDelivered": false, "subscription": "transfer", "created": "2020-04-24T17:49:00.201602+00:00", "log": { "id": "5662318377566208", "errors": [], "type": "sending", "created": "2020-04-24T17:49:09.751122+00:00", "transfer": { "id": "5950134772826112", "accountNumber": "76543-8", "amount": 100000000, "bankCode": "341", "branchCode": "2201", "created": "2020-04-24T17:49:09.130246+00:00", "fee": 200, "name": "Daenerys Targaryen Stormborn", "status": "processing", "taxId": "594.739.480-42", "tags": ["daenerys", "invoice/1234"], "transactionIds": ["5991715760504832"], "updated": "2020-04-24T17:49:02.130255+00:00", } }, "workspaceId": "1231231231231231" } }
Delete a single Event from the event list.
id
import starkbank event = starkbank.event.delete("4537025176797184") print(event)
const starkbank = require('starkbank'); (async() => { let event = await starkbank.event.delete('4537025176797184'); console.log(event); })();
$event = StarkBank\Event::delete("4537025176797184"); print_r($event);
import com.starkbank.*; Event event = Event.delete("4537025176797184"); System.out.println(event);
require('starkbank') event = StarkBank::Event.delete('4537025176797184') puts event
event = StarkBank.Event.delete!("4537025176797184") event |> IO.inspect
using System; StarkBank.Event eventObject = StarkBank.Event.Delete("4537025176797184"); Console.WriteLine(eventObject);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/event" ) func main() { event, err := event.Delete("4537025176797184", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", event) }
(def event (starkbank.event/delete "4537025176797184")) (println event)
curl --location --request DELETE '{{baseUrl}}/v2/event/4537025176797184' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Event( id=4537025176797184, is_delivered=False, subscription=transfer, created=2020-04-24 17:49:10.181589, log=Log( id=5662318377566208, created=2020-04-24 17:49:09.348444, errors=[], type=sending, transfer=Transfer( id=5950134772826112, account_number=76543-8, amount=100000000, bank_code=341, branch_code=2201, created=2020-04-24 17:49:08.748893, fee=200, name=Daenerys Targaryen Stormborn, status=processing, tags=['daenerys', 'invoice/1234'], tax_id=594.739.480-42, transaction_ids=['5991715760504832'], updated=2020-04-24 17:49:09.632271 ) ), workspace_id=1231231231231231 )
Event { id: '4537025176797184', created: '2020-04-24T17:49:10.847726+00:00', isDelivered: false, subscription: 'transfer', log: { id: '5662318377566208', errors: [], type: 'sending', created: '2020-04-24T17:49:09.884128+00:00', payment: { id: '5950134772826112' accountNumber: '76543-8', amount: 10785, bankCode: '341', branchCode: '2201', created: '2020-04-24T17:49:08.038706+00:00', fee: 200, name: 'Daenerys Targaryen Stormborn', status: 'processing', tags: ['daenerys', 'invoice/1234'], taxId: '594.739.480-42', transactionIds: ['5991715760504832'], updated: '2020-04-24T17:49:09.038706+00:00', } }, workspaceId='1231231231231231' }
StarkBank\Event Object ( [id] => 4537025176797184 [isDelivered] => false [subscription] => transfer [created] => DateTime Object ( [date] => 2020-04-24 17:49:10.616917 [timezone_type] => 1 [timezone] => +00:00 ) [log] => StarkBank\Transfer\Log Object ( [id] => 5662318377566208 [created] => DateTime Object ( [date] => 2020-04-24 17:49:09.844960 [timezone_type] => 1 [timezone] => +00:00 ) [type] => sending [errors] => Array ( ) [transfer] => StarkBank\Transfer Object ( [id] => 5950134772826112 [amount] => 100000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 [tags] => Array ( [0] => daenerys [1] => invoice/1234 ) [fee] => 200 [status] => processing [transactionIds] => Array ( [0] => 5991715760504832 ) [created] => DateTime Object ( [date] => 2020-04-24 17:49:08.277606 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 17:49:09.090932 [timezone_type] => 1 [timezone] => +00:00 ) ) ) [workspaceId] => 1231231231231231 )
Event({ "id": "4537025176797184", "created": "2020-04-24T17:49:10+00:00", "isDelivered": false, "subscription": "transfer", "log": { "id": "5662318377566208", "created": "2020-04-24T17:49:13+00:00", "type": "registered", "errors": [], "transfer": { "id": "5429309233692672", "accountNumber": "76543-8", "amount": 100000000, "bankCode": "341", "branchCode": "2201", "created": "2020-04-24T17:49:13+00:00" "fee": 200, "name": "Daenerys Targaryen Stormborn", "status": "processing", "tags": ["daenerys", "invoice/1234"], "taxId": "594.739.480-42", "transactionIds": ["5991715760504832"], "updated": "2020-04-24T17:49:13+00:00" } }, "workspaceId": 1231231231231231 })
event( id: 4537025176797184, created: 2020-04-24T17:49:10+00:00, is_delivered: false, subscription: transfer, log: log( id: 5662318377566208, created: 2020-04-24T17:49:09+00:00, type: sending, errors: [], transfer: transfer( id: 5950134772826112, account_number: 76543-8, amount: 100000000, bank_code: 341, branch_code: 2201, created: 2020-04-24T17:49:09+00:00 fee: 200, name: Daenerys Targaryen Stormborn, status: processing, tags: ["daenerys", "invoice/1234"], tax_id: 594.739.480-42, transaction_ids: ["5991715760504832"], updated: 2020-04-24T17:49:09+00:00 ) ), workspace_id: 1231231231231231 )
%StarkBank.Event{ id: "4537025176797184", is_delivered: false, subscription: "transfer", created: ~U[2020-04-24 17:49:09.594656Z], log: %StarkBank.Transfer.Log{ id: "5662318377566208", created: ~U[2020-04-24 17:49:09.049096Z], errors: [], type: "sending", payment: %StarkBank.Transfer{ id: "5950134772826112", account_number: 76543-8, amount: 11631, bank_code: "341", branch_code: "2201", created: ~U[2020-04-24 17:49:09.713657Z], fee: 200, name: "Daenerys Targaryen Stormborn", status: "processing", tags: ["daenerys", "invoice/1234"], tax_id: "594.739.480-42" transaction_ids: ["5991715760504832"], updated: ~U[2020-04-24 17:49:09.713657Z] } }, workspace_id: "1231231231231231" }
Event( ID: 4537025176797184, IsDelivered: False, Subscription: transfer, Created: 04/24/2020 17:49:09, Log: Log( ID: 5662318377566208, Created: 04/24/2020 17:49:09, Type: sending, Errors: { }, Transfer: Transfer( ID: 5950134772826112 AccountNumber: 76543-8, Amount: 100000000, BankCode: 341, BranchCode: 2201, Created: 04/24/2020 17:49:09, Fee: 200, Name: Daenerys Targaryen Stormborn, Status: processing, Tags: { daenerys, invoice/1234 }, TaxID: 594.739.480-42, TransactionIds: { 5991715760504832 }, Updated: 04/24/2020 17:49:09 ) ), WorkspaceId: 1231231231231231 )
{ Id:4537025176797184 Log:{ Id:5662318377566208 Transfer:{ Id:5950134772826112 AccountNumber:76543-8 Amount:1000000 BankCode:341 BranchCode:2201 Created:2020-04-24 17:49:10.38386 +0000 +0000 Fine:200 Name:Daenerys Targaryen Stormborn Status:processing Tags:[daenerys invoice/1234] TaxId:594.739.480-42 TransactionIds:[5991715760504832] Created:2020-04-24 17:49:09.38386 +0000 +0000 } Errors:[] Type:sending Created:2020-04-24 17:49:09.126413 +0000 +0000 } Created:2020-04-24 17:49:09.464471 +0000 +0000 IsDelivered:false Subscription:transfer WorkspaceId:1231231231231231 }
{:id "4537025176797184", :created "2020-04-24T17:49:09.359338+00:00", :is-delivered false, :subscription "transfer", :log {:id "5662318377566208", :created "2020-04-24T17:49:09.703951+00:00", :errors [], :type "sending", :transfer {:id "5950134772826112", :account-number 76543-8, :amount 100000000, :bank-code "341", :branch-code "2201", :created "2020-04-24T17:49:09.128124+00:00", :fee 200, :name "Daenerys Targaryen Stormborn", :status "processing", :tags ["daenerys" "invoice/1234"], :transaction-ids ["5991715760504832"], :updated "2020-04-24T17:49:09.128124+00:00"}} :workspace-id "1231231231231231"}
{ "message": "Event successfully deleted", "event": { "id": "4537025176797184", "isDelivered": false, "subscription": "transfer", "created": "2020-04-24T17:49:00.201602+00:00", "log": { "id": "5662318377566208", "errors": [], "type": "sending", "created": "2020-04-24T17:49:09.751122+00:00", "transfer": { "id": "5950134772826112", "accountNumber": "76543-8", "amount": 100000000, "bankCode": "341", "branchCode": "2201", "created": "2020-04-24T17:49:09.130246+00:00", "fee": 200, "name": "Daenerys Targaryen Stormborn", "status": "processing", "taxId": "594.739.480-42", "tags": ["daenerys", "invoice/1234"], "transactionIds": ["5991715760504832"], "updated": "2020-04-24T17:49:02.130255+00:00", } }, "workspaceId": "1231231231231231" } }
The only information you can update in an Event is the isDelivered property. This can be useful when, after experiencing server downtime on your side, you list all events with isDelivered=false, process them, and then set them as delivered to restabilize your operations.
id
isDelivered
import starkbank event = starkbank.event.update("4537025176797184", is_delivered=True) print(event)
const starkbank = require('starkbank'); (async() => { let event = await starkbank.event.update('4537025176797184', {isDelivered: true}); console.log(event); })();
$event = StarkBank\Event::update( "4537025176797184", ["isDelivered" => true] ); print_r($event);
import com.starkbank.*; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("isDelivered", true); Event event = Event.update("4537025176797184", params); System.out.println(event);
require('starkbank') event = StarkBank::Event.update( '4537025176797184', is_delivered: true ) puts event
event = StarkBank.Event.update!("4537025176797184", is_delivered: true) event |> IO.inspect
using System; StarkBank.Event eventObject = StarkBank.Event.Update( "4537025176797184", isDelivered: true ); Console.WriteLine(eventObject);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/event" ) func main() { patchData := map[string]interface{}{} patchData["isDelivered"] = true event, err := event.Update("4537025176797184", patchData, nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", event) }
(def event (starkbank.event/update "4537025176797184" {:is-delivered true})) (println event)
curl --location --request PATCH '{{baseUrl}}/v2/event/4537025176797184' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}' --header 'Content-Type: application/json' --data-raw '{ "isDelivered": true }'
Event( id=4537025176797184, is_delivered=True, subscription=transfer, created=2020-04-24 17:49:10.181589, log=Log( id=5662318377566208, created=2020-04-24 17:49:09.348444, errors=[], type=sending, transfer=Transfer( id=5950134772826112, account_number=76543-8, amount=100000000, bank_code=341, branch_code=2201, created=2020-04-24 17:49:08.748893, fee=200, name=Daenerys Targaryen Stormborn, status=processing, tags=['daenerys', 'invoice/1234'], tax_id=594.739.480-42, transaction_ids=['5991715760504832'], updated=2020-04-24 17:49:09.632271 ) ), workspace_id=1231231231231231 )
Event { id: '4537025176797184', created: '2020-04-24T17:49:10.847726+00:00', isDelivered: true, subscription: 'transfer', log: { id: '5662318377566208', errors: [], type: 'sending', created: '2020-04-24T17:49:09.884128+00:00', payment: { id: '5950134772826112' accountNumber: '76543-8', amount: 10785, bankCode: '341', branchCode: '2201', created: '2020-04-24T17:49:08.038706+00:00', fee: 200, name: 'Daenerys Targaryen Stormborn', status: 'processing', tags: ['daenerys', 'invoice/1234'], taxId: '594.739.480-42', transactionIds: ['5991715760504832'], updated: '2020-04-24T17:49:09.038706+00:00', } }, workspaceId='1231231231231231' }
StarkBank\Event Object ( [id] => 4537025176797184 [isDelivered] => true [subscription] => transfer [created] => DateTime Object ( [date] => 2020-04-24 17:49:10.616917 [timezone_type] => 1 [timezone] => +00:00 ) [log] => StarkBankTransferLog Object ( [id] => 5662318377566208 [created] => DateTime Object ( [date] => 2020-04-24 17:49:09.844960 [timezone_type] => 1 [timezone] => +00:00 ) [type] => sending [errors] => Array ( ) [transfer] => StarkBankTransfer Object ( [id] => 5950134772826112 [amount] => 100000000 [name] => Daenerys Targaryen Stormborn [taxId] => 594.739.480-42 [bankCode] => 341 [branchCode] => 2201 [accountNumber] => 76543-8 [tags] => Array ( [0] => daenerys [1] => invoice/1234 ) [fee] => 200 [status] => processing [transactionIds] => Array ( [0] => 5991715760504832 ) [created] => DateTime Object ( [date] => 2020-04-24 17:49:08.277606 [timezone_type] => 1 [timezone] => +00:00 ) [updated] => DateTime Object ( [date] => 2020-04-24 17:49:09.090932 [timezone_type] => 1 [timezone] => +00:00 ) ) ) [workspaceId] => 1231231231231231 )
Event({ "id": "4537025176797184", "created": "2020-04-24T17:49:10+00:00", "isDelivered": true, "subscription": "transfer", "log": { "id": "5662318377566208", "created": "2020-04-24T17:49:13+00:00", "type": "registered", "errors": [], "transfer": { "id": "5429309233692672", "accountNumber": "76543-8", "amount": 100000000, "bankCode": "341", "branchCode": "2201", "created": "2020-04-24T17:49:13+00:00" "fee": 200, "name": "Daenerys Targaryen Stormborn", "status": "processing", "tags": ["daenerys", "invoice/1234"], "taxId": "594.739.480-42", "transactionIds": ["5991715760504832"], "updated": "2020-04-24T17:49:13+00:00" } }, "workspaceId": 1231231231231231 })
event( id: 4537025176797184, created: 2020-04-24T17:49:10+00:00, is_delivered: true, subscription: transfer, log: log( id: 5662318377566208, created: 2020-04-24T17:49:09+00:00, type: sending, errors: [], transfer: transfer( id: 5950134772826112, account_number: 76543-8, amount: 100000000, bank_code: 341, branch_code: 2201, created: 2020-04-24T17:49:09+00:00 fee: 200, name: Daenerys Targaryen Stormborn, status: processing, tags: ["daenerys", "invoice/1234"], tax_id: 594.739.480-42, transaction_ids: ["5991715760504832"], updated: 2020-04-24T17:49:09+00:00 ) ), workspace_id: 1231231231231231 )
%StarkBank.Event{ id: "4537025176797184", is_delivered: true, subscription: "transfer", created: ~U[2020-04-24 17:49:09.594656Z], log: %StarkBank.Transfer.Log{ id: "5662318377566208", created: ~U[2020-04-24 17:49:09.049096Z], errors: [], type: "sending", payment: %StarkBank.Transfer{ id: "5950134772826112", account_number: 76543-8, amount: 11631, bank_code: "341", branch_code: "2201", created: ~U[2020-04-24 17:49:09.713657Z], fee: 200, name: "Daenerys Targaryen Stormborn", status: "processing", tags: ["daenerys", "invoice/1234"], tax_id: "594.739.480-42" transaction_ids: ["5991715760504832"], updated: ~U[2020-04-24 17:49:09.713657Z] } }, workspace_id: "1231231231231231" }
Event( ID: 4537025176797184, IsDelivered: true, Subscription: transfer, Created: 04/24/2020 17:49:09, Log: Log( ID: 5662318377566208, Created: 04/24/2020 17:49:09, Type: sending, Errors: { }, Transfer: Transfer( ID: 5950134772826112 AccountNumber: 76543-8, Amount: 100000000, BankCode: 341, BranchCode: 2201, Created: 04/24/2020 17:49:09, Fee: 200, Name: Daenerys Targaryen Stormborn, Status: processing, Tags: { daenerys, invoice/1234 }, TaxID: 594.739.480-42, TransactionIds: { 5991715760504832 }, Updated: 04/24/2020 17:49:09 ) ), WorkspaceId: 1231231231231231 )
{ Id:4537025176797184 Log:{ Id:5662318377566208 Transfer:{ Id:5950134772826112 AccountNumber:76543-8 Amount:1000000 BankCode:341 BranchCode:2201 Created:2020-04-24 17:49:10.38386 +0000 +0000 Fine:200 Name:Daenerys Targaryen Stormborn Status:processing Tags:[daenerys invoice/1234] TaxId:594.739.480-42 TransactionIds:[5991715760504832] Created:2020-04-24 17:49:09.38386 +0000 +0000 } Errors:[] Type:sending Created:2020-04-24 17:49:09.126413 +0000 +0000 } Created:2020-04-24 17:49:09.464471 +0000 +0000 IsDelivered:true Subscription:transfer WorkspaceId:1231231231231231 }
{:id "4537025176797184", :created "2020-04-24T17:49:09.359338+00:00", :is-delivered true, :subscription "transfer", :log {:id "5662318377566208", :created "2020-04-24T17:49:09.703951+00:00", :errors [], :type "sending", :transfer {:id "5950134772826112", :account-number 76543-8, :amount 100000000, :bank-code "341", :branch-code "2201", :created "2020-04-24T17:49:09.128124+00:00", :fee 200, :name "Daenerys Targaryen Stormborn", :status "processing", :tags ["daenerys" "invoice/1234"], :transaction-ids ["5991715760504832"], :updated "2020-04-24T17:49:09.128124+00:00"}} :workspace-id "1231231231231231"}
{ "message": "Event successfully patched", "event": { "id": "4537025176797184", "isDelivered": true, "subscription": "transfer", "created": "2020-04-24T17:49:00.201602+00:00", "log": { "id": "5662318377566208", "errors": [], "type": "sending", "created": "2020-04-24T17:49:09.751122+00:00", "transfer": { "id": "5950134772826112", "accountNumber": "76543-8", "amount": 100000000, "bankCode": "341", "branchCode": "2201", "created": "2020-04-24T17:49:09.130246+00:00", "fee": 200, "name": "Daenerys Targaryen Stormborn", "status": "processing", "taxId": "594.739.480-42", "tags": ["daenerys", "invoice/1234"], "transactionIds": ["5991715760504832"], "updated": "2020-04-24T17:49:02.130255+00:00", } }, "workspaceId": "1231231231231231 } }
When an Event delivery fails, an event attempt will be registered. It carries information meant to help you debug event reception issues.
Get information on failed webhook event delivery attempts.
cursor
limit
after
before
eventIds
webhookIds
fields
import starkbank attempts = starkbank.event.attempt.query(after="2020-01-30") for attempt in attempts: print(attempt)
const starkbank = require('starkbank'); (async() => { let attempts = await starkbank.event.attempt.query(after="2020-01-30"); for await (let attempt of attempts) { console.log(attempt); } })();
use StarkBank\Event\Attempt; $attempts = Attempt::query(["after" => "2020-01-30"]); foreach($attempts as $attempt){ print_r($attempt); }
import com.starkbank.*; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("after", "2020-01-30"); Generator<Event.Attempt> attempts = Event.Attempt.query(params); for (Event.Attempt attempt: attempts) { System.out.println(attempt); }
require('starkbank') event attempts = StarkBank::Event Attempt.query( after: '2020-01-30' ) event attempts.each do |event attempt| puts event attempt end
for attempt <- StarkBank.Event.Attempt.query!(after: "2020-01-30") do attempt |> IO.inspect end
using System; List<StarkBank.Event.Attempt> attempts = StarkBank.Event.Attempt.Query(after: "2020-01-30").ToList(); foreach(StarkBank.Event.Attempt attempt in attempts) { Console.WriteLine(attempt); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/event/attempt" ) func main() { var params = map[string]interface{}{} params["after"] = "2020-01-30" attempts := attempt.Query(params, nil) for attempt := range attempts { fmt.Printf("%+v", attempt) } }
(def attempts (starkbank.event.attempt/query {:after ["2020-01-30"]})) (printn attempts)
curl --location --request GET '{{baseUrl}}/v2/event/attempt?after=2020-01-30' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Attempt( id=4737439230853120, code=invalidHttpStatus, message=HTTP POST request returned status 404, webhook_id=5187231165710336 event_id=6488144706797568, created=2020-01-30 12:35:59.322499, )
Attempt { id: '4737439230853120', code: 'invalidHttpStatus', message: 'HTTP POST request returned status 404', webhookId: '5187231165710336', eventId: '6488144706797568', created: '2020-01-30T12:35:59.482776+00:00' }
StarkBank\Event\Attempt Object ( [id] => 4737439230853120 [code] => invalidHttpStatus [message] => HTTP POST request returned status 404 [webhookId] => 5187231165710336 [eventId] => 6488144706797568 [created] => DateTime Object ( [date] => 2020-01-30 12:35:56.363127 [timezone_type] => 1 [timezone] => +00:00 ) )
Attempt({ "id": "4737439230853120" "code": "invalidHttpStatus", "message": "HTTP POST request returned status 404", "webhookId": "5187231165710336", "eventId": "6488144706797568", "created": "2020-01-30T16:26:05.589545+00:00", })
attempt( id: 4737439230853120, code: invalidHttpStatus, message: HTTP POST request returned status 404, event_id: 6488144706797568, webhook_id: 5187231165710336, created: 2020-01-30T12:00:48+00:00 )
%StarkBank.Event.Attempt{ id: "4737439230853120", code: "invalidHttpStatus", message: "HTTP POST request returned status 404", webhook_id: "5187231165710336", event_id: "6488144706797568", created: ~U[2020-01-30 16:26:05.589545Z] }
Attempt( Code: invalidHttpStatus, Message: HTTP POST request returned status 404, EventId: 6488144706797568, WebhookId: 5187231165710336, Created: 30/01/2020 16:26:05, ID: 4737439230853120 )
{ Id:4737439230853120 Code:invalidHttpStatus Message:HTTP POST request returned status 404 EventId:6488144706797568 WebhookId:5187231165710336 Created:2020-01-30 22:20:08.047237 +0000 +0000 }
{ :code invalidHttpStatus, :message HTTP POST request returned status 404, :eventId 6488144706797568, :webhookId 5187231165710336, :created 2020-01-30T16:26:05.589545+00:00, :id 4737439230853120 }
{ "attempts": [ { "code": "invalidHttpStatus", "created": "2020-01-30T16:26:05.589545+00:00", "eventId": "6488144706797568", "id": "4737439230853120", "message": "HTTP POST request returned status 404", "webhookId": "5187231165710336" } ], "cursor": "CkgKFAoHY3JlYXRlZBIJCJmQ-5LC7_wCEixqFGl-YXBpLW1zLXdlYmhvb2stc2J4chQLEgdBdHRlbXB0GICAgLTx4oIJDBgAIAE=" }
Get a single event attempt by its id.
id
fields
import starkbank attempt = starkbank.event.attempt.get("4737439230853120") print(attempt)
const starkbank = require('starkbank'); (async() => { let attempt = await starkbank.event.attempt.get("4737439230853120") console.log(attempt); })();
use StarkBank\Event\Attempt; $attempt = Attempt::get("4737439230853120"); print_r($attempt);
import com.starkbank.*; Event.Attempt attempt = Event.Attempt.get("4737439230853120"); System.out.println(attempt);
require('starkbank') attempt = StarkBank::Event::Attempt.get('4737439230853120') puts attempt
StarkBank.Event.Attempt.get("4737439230853120") |> IO.inspect
using System; StarkBank.Event.Attempt attempt = Starkbank.Event.Attempt.Get("4737439230853120"); Console.WriteLine(attempt);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/event/attempt" ) func main() { attempt, err := attempt.Get("4737439230853120", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", attempt) }
(def attempt (starkbank.event.attempt/get "4737439230853120")) (print attempt)
curl --location --request GET '{{baseUrl}}/v2/event/attempt/4737439230853120' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Attempt( id=4737439230853120, code=invalidHttpStatus, message=HTTP POST request returned status 404, webhook_id=5187231165710336 event_id=6488144706797568, created=2020-01-30 12:35:59.322499, )
Attempt { id: '4737439230853120', code: 'invalidHttpStatus', message: 'HTTP POST request returned status 404', webhookId: '5187231165710336', eventId: '6488144706797568', created: '2020-01-30T12:35:59.482776+00:00' }
StarkBank\Event\Attempt Object ( [id] => 4737439230853120 [code] => invalidHttpStatus [message] => HTTP POST request returned status 404 [webhookId] => 5187231165710336 [eventId] => 6488144706797568 [created] => DateTime Object ( [date] => 2020-01-30 12:35:56.363127 [timezone_type] => 1 [timezone] => +00:00 ) )
Attempt({ "id": "4737439230853120" "code": "invalidHttpStatus", "message": "HTTP POST request returned status 404", "webhookId": "5187231165710336", "eventId": "6488144706797568", "created": "2020-01-30T16:26:05.589545+00:00", })
attempt( id: 4737439230853120, code: invalidHttpStatus, message: HTTP POST request returned status 404, event_id: 6488144706797568, webhook_id: 5187231165710336, created: 2020-01-30T12:00:48+00:00 )
%StarkBank.Event.Attempt{ id: "4737439230853120", code: "invalidHttpStatus", message: "HTTP POST request returned status 404", webhook_id: "5187231165710336", event_id: "6488144706797568", created: ~U[2020-01-30 16:26:05.589545Z] }
Attempt( Code: invalidHttpStatus, Message: HTTP POST request returned status 404, EventId: 6488144706797568, WebhookId: 5187231165710336, Created: 30/01/2020 16:26:05, ID: 4737439230853120 )
{ Id:4737439230853120 Code:invalidHttpStatus Message:HTTP POST request returned status 404 EventId:6488144706797568 WebhookId:5187231165710336 Created:2020-01-30 22:20:08.047237 +0000 +0000 }
{ :code invalidHttpStatus, :message HTTP POST request returned status 404, :eventId 6488144706797568, :webhookId 5187231165710336, :created 2020-01-30T16:26:05.589545+00:00, :id 4737439230853120 }
{ "attempt": { "code": "invalidHttpStatus", "created": "2020-01-30T16:26:05.589545+00:00", "eventId": "6488144706797568", "id": "4737439230853120", "message": "HTTP POST request returned status 404", "webhookId": "5187231165710336" } }
The Pix keys are saved in the DICT (Diretório de Identificadores de Contas Transacionais), the centralized Pix service managed by Bacen (Brazilian Central Bank) that allows you to search for transactional accounts with convenient addressing keys.
Get a list of the DICT Keys you own (or have owned) in chunks of at most 100. If you need smaller chunks, use the limit parameter.
cursor
limit
after
before
status
type
ids
fields
import starkbank dict_keys = starkbank.dictkey.query( status="registered", limit= 1, type= "evp" ) for dict_key in dict_keys: print(dict_key)
const starkbank = require('starkbank'); (async() => { let dictKeys = await starkbank.dictKey.query({ limit: 1, type: 'evp', status: 'registered', }); for await (let dictKey of dictKeys) { console.log(dictKey); } })();
use StarkBank\DictKey; $dictKeys = iterator_to_array( DictKey::query([ "limit" => 1, "type" => "evp", "status" => "registered" ]) ); foreach($dictKeys as $dictKey) { print_r($dictKey); }
import com.starkbank.*; import com.starkbank.utils.Generator; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("status", "registered"); params.put("limit", 1); params.put("type", "evp"); Generator<DictKey> dictKeys = DictKey.query(params); for (DictKey dictKey : dictKeys) { System.out.println(dictKey); }
require('starkbank') dict_keys = StarkBank::DictKey.query( status: 'registered', type: 'evp', limit: 1 ) dict_keys.each do |dict_key| puts dict_key end
dict_key = StarkBank.DictKey.query!( limit: 1, status: "registered", type: "evp" ) |> Enum.take(1) |> IO.inspect
using System; using System.Collections.Generic; IEnumerable<StarkBank.DictKey> dictKeys = StarkBank.DictKey.Query( status: "registered", type: "evp", limit: 1 ); foreach(StarkBank.DictKey dictKey in dictKeys) { Console.WriteLine(dictKey); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/dictkey" ) func main() { var params = map[string]interface{}{} params["status"] = "registered" params["limit"] = 1 params["type"] = "evp" keys := dictkey.Query(params, nil) for key := range keys { fmt.Printf("%+v", key) } }
(def dict-keys (starkbank.dict-key/query {:limit 1, :status ["registered"] :type "evp"})) (doseq [dict-key dict-keys] (println dict-key))
curl --location --request GET '{{baseUrl}}/v2/dict-key?limit=1&status=registered&type=evp' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
DictKey( account_number=*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy, account_type=checking, branch_code=*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl, id=1aa1aaaa-a11a-1111-a111-1a1aa111aaaa, ispb=67372284, name=Jon Snow, owner_type=naturalPerson, status=registered, tax_id=***.456.789-**, type=evp )
DictKey { id: '1aa1aaaa-a11a-1111-a111-1a1aa111aaaa', type: 'evp', accountType: 'checking', name: 'Jon Snow', taxId: '***.456.789-**', ownerType: 'naturalPerson', ispb: '67372284', branchCode: '*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl', accountNumber: '*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy', status: 'registered' }
StarkBank\DictKey Object ( [id] => 1aa1aaaa-a11a-1111-a111-1a1aa111aaaa [type] => evp [accountType] => checking [name] => Jon Snow [taxId] => ***.456.789-** [ownerType] => naturalPerson [ispb] => 67372284 [branchCode] => *ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl [accountNumber] => *ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy [status] => registered )
DictKey({ "type": "evp", "accountType": "checking", "name": "Jon Snow", "taxId": "***.456.789-**", "ownerType": "naturalPerson", "ispb": "67372284", "branchCode": "*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl", "accountNumber": "*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy", "status": "registered", "id": "1aa1aaaa-a11a-1111-a111-1a1aa111aaaa" })
dictkey( id: 1aa1aaaa-a11a-1111-a111-1a1aa111aaaa, type: evp, account_type: checking, name: Jon Snow, tax_id: ***.456.789-**, owner_type: naturalPerson, ispb: 67372284, branch_code: *ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl, account_number: *ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy, status: registered )
%StarkBank.DictKey{ accountNumber: "*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy", accountType: "checking", branchCode: "*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl", id: "1aa1aaaa-a11a-1111-a111-1a1aa111aaaa", ispb: "67372284", name: "Jon Snow", ownerType: "naturalPerson", status: "registered", taxId: "***.456.789-**", type: "evp" }
DictKey( Type: evp, AccountType: cheking, Name: Jon Snow, TaxId: ***.456.789-**, OwnerType: naturalPerson, Ispb: 67372284, BranchCode: *ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl, AccountNumber: *ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy, Status: registered, ID: 1aa1aaaa-a11a-1111-a111-1a1aa111aaaa )
{ Id:1aa1aaaa-a11a-1111-a111-1a1aa111aaaa Type:evp Name:Jon Snow TaxId:***.456.789-** OwnerType:naturalPerson Ispb:67372284 BranchCode:*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl AccountNumber:*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy AccountType:checking Status:registered }
{ :branch-code *ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl, :owner-type naturalPerson, :name Jon Snow, :tax-id ***.456.789-**, :type evp, :status registered, :account-type checking, :id 1aa1aaaa-a11a-1111-a111-1a1aa111aaaa, :ispb 67372284, :account-number *ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy }
{ "key": { "status": "registered", "accountNumber": "*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy", "ownerType": "naturalPerson", "taxId": "***.456.789-***", "accountType": "checking", "branchCode": "*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl", "ispb": "67372284", "name": "Jon Snow", "id": "1aa1aaaa-a11a-1111-a111-1a1aa111aaaa", "type": "evp" } }
Get a single DICT key by its id. This method includes keys you do not own. You can use it to retrieve a key's information before creating Transfers.
id
import starkbank dictkey = starkbank.dictkey.get("jon.snow@starkbank.com") print(dictkey)
const starkbank = require('starkbank'); (async() => { let dictKey = await starkbank.dictKey.get('jon.snow@starkbank.com'); console.log(dictKey); })();
$dictKey = DictKey::get('jon.snow@starkbank.com'); print_r($dictKey);
import com.starkbank.*; DictKey dictKey = DictKey.get("jon.snow@starkbank.com"); System.out.println(dictKey);
require('starkbank') dict_key = StarkBank::DictKey.get('jon.snow@starkbank.com') puts dict_key
dict_key = StarkBank.DictKey.get!("jon.snow@starkbank.com") dict_key |> IO.inspect
using System; StarkBank.DictKey dictKey = StarkBank.DictKey.Get("jon.snow@starkbank.com"); Console.WriteLine(dictKey);
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/dictkey" ) func main() { key, err := dictkey.Get("jon.snow@starkbank.com", nil) if err.Errors != nil { for _, e := range err.Errors { panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message)) } } fmt.Printf("%+v", key) }
(def dict-key (starkbank.dict-key/get "tony@starkbank.com")) (println dict-key)
curl --location --request GET '{{baseUrl}}/v2/dict-key/jon.snow@starkbank.com' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
DictKey( account_number=*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy, account_type=checking, branch_code=*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl, id=jon.snow@starkbank.com, ispb=67372284, name=Jon Snow, owner_type=naturalPerson, status=registered, tax_id=***.456.789-**, type=email )
DictKey { id: 'jon.snow@starkbank.com', type: 'email', accountType: 'checking', name: 'Jon Snow', taxId: '***.456.789-**', ownerType: 'naturalPerson', ispb: '67372284', branchCode: '*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl', accountNumber: '*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy', status: 'registered' }
StarkBank\DictKey Object ( [id] => jon.snow@starkbank.com [type] => email [accountType] => checking [name] => Jon Snow [taxId] => ***.456.789-** [ownerType] => naturalPerson [ispb] => 67372284 [branchCode] => *ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl [accountNumber] => *ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy [status] => registered )
DictKey({ "type": "email", "accountType": "checking", "name": "Jon Snow", "taxId": "***.456.789-**", "ownerType": "naturalPerson", "ispb": "67372284", "branchCode": "*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl", "accountNumber": "*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy", "status": "registered", "id": "jon.snow@starkbank.com" })
dictkey( id: jon.snow@starkbank.com, type: email, account_type: checking, name: Jon Snow, tax_id: ***.456.789-**, owner_type: naturalPerson, ispb: 67372284, branch_code: *ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl, account_number: *ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy, status: registered )
%StarkBank.DictKey{ accountNumber: "*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy", accountType: "checking", branchCode: "*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl", id: "jon.snow@starkbank.com", ispb: "67372284", name: "Jon Snow", ownerType: "naturalPerson", status: "registered", taxId: "***.456.789-**", type: "email" }
DictKey( Type: email, AccountType: checking, Name: Jon Snow, TaxId: ***.456.789-**, OwnerType: naturalPerson, Ispb: 67372284, BranchCode: *ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl, AccountNumber: *ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy, Status: registered, ID: jon.snow@starkbank.com )
{ Id:jon.snow@starkbank.com Type:email Name:Jon Snow TaxId:***.456.789-** OwnerType:naturalPerson Ispb:67372284 BranchCode:*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl AccountNumber:*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy AccountType:checking Status:registered }
{ :branch-code *ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl, :owner-type naturalPerson, :name Jon Snow, :tax-id ***.201.821-**, :type email, :status registered, :account-type checking, :id jon.snow@starkbank.com, :ispb 67372284, :account-number *ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy }
{ "key": { "status": "registered", "accountNumber": "*ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy", "ownerType": "naturalPerson", "taxId": "***.456.789-**", "accountType": "checking", "branchCode": "*ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl", "ispb": "67372284", "name": "Jon Snow", "id": "jon.snow@starkbank.com", "type": "email" } }
A Institution is used to query institutions registered by the Brazilian Central Bank for Pix and TED transactions.
Get a list of institutions.
limit
search
spiCodes
strCodes
import starkbank institutions = starkbank.institution.query(search="stark") for institution in institutions: print(institution)
const starkbank = require('starkbank'); (async() => { let institutions = await starkbank.institution.query({ search: 'stark' }); for (let institution of institutions) { console.log(institution); } })();
use StarkBank\Institution; $institutions = Institution::query(["search" => "stark"]); foreach($institutions as $institution){ print_r($institution); }
import com.starkbank.*; import java.util.HashMap; HashMap<String, Object> params = new HashMap<>(); params.put("search", "stark"); List<Institution> institutions = Institution.query(params); for (Institution institution : institutions) { System.out.println(institution); }
require('starkbank') institutions = StarkBank::Institution.query(search: 'stark').to_a institutions.each do |institution| puts institution end
institutions = StarkBank.Institution.query(search: "stark") |> IO.inspect
using System; using System.Collections.Generic; List<StarkBank.Institution> institutions = StarkBank.Institution.Query(search: "stark"); foreach(StarkBank.Institution.Log institution in institutions) { Console.WriteLine(institution); }
package main import ( "fmt" "github.com/starkbank/sdk-go/starkbank/institution" ) func main() { var params = map[string]interface{}{} params["search"] = "stark" institutions := institution.Query(params, nil) for institution := range institutions { fmt.Printf("%+v", institution) } }
(def institutions (institution/query {:search "stark"})) (println institutions)
curl --location --request GET '{{baseUrl}}/v2/institution?search=stark' --header 'Access-Id: {{accessId}}' --header 'Access-Time: {{accessTime}}' --header 'Access-Signature: {{accessSignature}}'
Institution( display_name=Stark Bank, name=Stark Bank S.A., spi_code=20018183, str_code= )
Institution { displayName: 'Stark Bank', name: 'Stark Bank S.A.', spiCode: '20018183', strCode: '' }
StarkBank\Institution Object ( [displayName] => Stark Bank [name] => Stark Bank S.A. [spiCode] => 20018183 [strCode] => )
Institution({ "displayName": "Stark Bank", "name": "Stark Bank S.A.", "spiCode": "20018183", "strCode": "" })
institution( display_name: Stark Bank, name: Stark Bank S.A., spi_code: 20018183, str_code: )
%StarkBank.Institution{ display_name: "Stark Bank", name: "Stark Bank S.A.", spi_code: "20018183", str_code: "" }
Institution( DisplayName: Stark Bank, Name: Stark Bank S.A., SpiCode: 20018183, StrCode: )
{ DisplayName:Stark Bank Name:Stark Bank S.A. SpiCode:20018183 StrCode: }
{:display-name "Stark Bank", :name "Stark Bank S.A.", :spi-code "20018183", :str-code "" }
{ "cursor": null, "institutions": [ { "displayName": "Stark Bank", "name": "Stark Bank S.A.", "spiCode": "20018183", "strCode": "" } ] }
Some of our responses will be signed using our own private key, such as the messages we send by webhook. In order to verify that it was really us that generated the message, you can get our public key and verify the provided signature and content.
Get a list of the Stark Bank public keys ordered by creation date from newest to oldest. The most recent public key is the one currently in use by the API. The olders keys can be used to verify older messages.
{ "cursor": null, "publicKeys": [ { "content": "-----BEGIN PUBLIC KEY-----\\nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEQA+bOEY57yQGYdcF0q7Ia/JPc0Hr8Il0\\n/pbETwvDSM+7yCkqTPDRsdptMMaoK9UEXILOaXq9Ot5azrgQEcTetg==\\n-----END PUBLIC KEY-----", "created": "2020-03-27T03:31:00+00:00" }, { "content": "-----BEGIN PUBLIC KEY-----\\nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAE9QNcKNouU2iBpsVRTer9MA/nStS/KV44\\nXQdqsO44BpKieHtAWrRRwz+czNZk0UUICGFRpWtgzs+FtvB/W31bfQ==\\n-----END PUBLIC KEY-----", "created": "2020-01-01T03:04:00+00:00" } ] }