API Reference

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.1 specification? You can download our yaml file right here.

You can also try our Postman collection. Download it here.

BASE URL - Production
https://api.starkinfra.com
BASE URL - Sandbox
https://sandbox.api.starkinfra.com
CLIENT LIBRARIES

Python

pip install starkinfra

Javascript

npm install starkinfra

PHP

composer require starkinfra/sdk

Java

compile "com.starkinfra:sdk:{latest-version}"

Ruby

gem install starkinfra

Elixir

{:starkinfra, "~> {latest-version}"}

C#

Install-Package starkinfra

Go

go get -u github.com/starkinfra/sdk-go

Clojure

[starkinfra/sdk "{latest-version}"]

Curl

Tech Support

If you have any questions about our API or SDKs, feel free to email us. We will respond to you quickly, pinky promise.

We are here to help you integrate with us ASAP. We also love feedback, so don't be shy about sharing your thoughts with us.

CONTACT US
help@starkinfra.com

Testing in Sandbox

In order to send any request to Stark Infra, 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):

Create a Workspace in Sandbox

Your initial balance is zero. You can add balance by creating Pix Requests, as they will be processed automatically in the Sandbox environment within a few minutes.

BASE URL - Sandbox
https://sandbox.api.starkinfra.com

Moving to Production

Sandbox and Production share the same code but are isolated from each other as they are running on 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.

Note 1: Since we will be talking about real money here, we strongly recommend integrating in Sandbox first.

Note 2: The response times are different in each environment as we emulate the results in Sandbox, while in Production we depend on other financial institutions to operate.

You can request an account in Production here:

Create a Workspace in Production
BASE URL - Production
https://api.starkinfra.com

Versioning

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 consider the following changes to be backward-compatible:

  • Adding new API resources;
  • Adding new optional request parameters;
  • Making a mandatory request parameter optional;
  • Adding new properties to existing API responses;
  • Changing the order of properties in existing API responses;
  • Adding new events to webhooks (that means your webhook listener should gracefully handle unfamiliar event types).
Current API Version
v2

Authentication

At Stark Bank, we do not use static API keys or access tokens.

Instead, all API requests are authenticated using ECDSA digital signatures with the secp256k1 curve and SHA-256 digest.

Each request is signed locally on your server using your private key, which is never transmitted. The signature is sent with the request, and we verify it using your registered public key.

Our SDKs automatically handle request signing.

Credential Types:

Projects: Bound to a specific Workspace, recommended for most integrations, and only a workspace admin can register.

Organizations: Bound to your company’s Tax ID, can manage multiple Workspaces, and only a legal representative can register.

Setup:

1. Generate a private and public keys, learn how.

2. Upload your public key in our Web Banking (Sandbox or Production).

3. Configure your SDK with your Project ID or Organization ID and your private key.

Security:

1. Keep your private key secure at all times. Never share it with anyone — including Stark Bank — and never hard-code it in your source code. Store it in a Hardware Security Module (HSM) whenever possible. Otherwise, keep it encrypted, such as in an environment variable or secure database.

2. Restrict API access by configuring allowed IP addresses when registering your public key.

Python

import starkbank

# Example key only — replace with your own.
# Never hardcode private keys in source. Store them in an HSM,
# or at minimum in an encrypted KMS.
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
  

Javascript

const starkbank = require('starkbank');

// Example key only — replace with your own.
// Never hardcode private keys in source. Store them in an HSM,
// or at minimum in an encrypted KMS.
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;
  

PHP

use StarkBank\Project;
use StarkBank\Organization;
use StarkBank\Settings;

// Example key only — replace with your own.
// Never hardcode private keys in source. Store them in an HSM,
// or at minimum in an encrypted KMS.
$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);
  

Java

import com.starkbank.*;

// Example key only — replace with your own.
// Never hardcode private keys in source. Store them in an HSM,
// or at minimum in an encrypted KMS.
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;
  

Ruby

require('starkbank')

# Example key only — replace with your own.
# Never hardcode private keys in source. Store them in an HSM,
# or at minimum in an encrypted KMS.
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
  

Elixir

# file config/config.exs

import Config

# Example key only — replace with your own.
# Never hardcode private keys in source. Store them in an HSM,
# or at minimum in an encrypted KMS.
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
  ]
  

C#

// Example key only — replace with your own.
// Never hardcode private keys in source. Store them in an HSM,
// or at minimum in an encrypted KMS.
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;
  

Go

import (
    "github.com/starkbank/core-go/starkcore/user/project"
    "github.com/starkbank/core-go/starkcore/user/organization"
    "github.com/starkbank/sdk-go/starkbank"
)

// Example key only — replace with your own.
// Never hardcode private keys in source. Store them in an HSM,
// or at minimum in an encrypted KMS.
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
  

Clojure

(ns my-lib.core
  (:use starkbank.core))

; Example key only — replace with your own.
; Never hardcode private keys in source. Store them in an HSM,
; or at minimum in an encrypted KMS.
(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)
  

Curl

--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  

Do it yourself

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

Feeling adventurous? Check out our Digital Signature libraries.

CUSTOM HEADERS
Access-Id
Static string that identifies the user:

project/{projectId} for projects;

organization/{organizationId} for organizations;

organization/{organizationId}/workspace/{workspaceId} for organizations operating inside a Workspace;
Access-Time
Current Unix-Time: the number of seconds since 1 January 1970.
Access-Signature
Base64-encoded ECDSA signature
Access-Id Example
project/12345
Access-Time Example
1584041509
Access-Signature Example
MEYCIQC5wiR/fEmwJHscoQ1a4gn9w/qiYQlr8qsdo95MsfgFNwIhAIi4jJ3bzhg+6QEu8g5qK0SNSzIi9JwRuDuP2NZYpLP3

Static IP list

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:

Production
- 35.199.76.124
- 34.85.188.162
Sandbox
- 35.247.226.240
- 35.245.182.229

Errors

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.

HTTP STATUS CODE SUMMARY
StatusDescription
200Everything went right
400Your input is incorrect. We will send you a json explaining what went wrong.
500Something went wrong on our side. Our engineering team will be notified and act to fix the problem ASAP.
418Geek test. Discover the easter egg.
ERROR SAMPLE
{
    "errors": [
        {
            "code": "invalidEmail",
            "message": "Your email address should look like “person@domain.com”."
        },
        {
            "code": "invalidName",
            "message": "Your name must have at least 6 characters."
        }
    ]
}

Supported Languages

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.

Accept-Language Header
CodeLanguage
en-USUS English (default)
pt-BRBrazilian Portuguese

Pagination

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.

Example: Handling cursors
path = "https://sandbox.api.starkinfra.com/v2/pix-request"

response = requests.get(path)
pixRequestList = response["requests"]
cursor = response["cursor"]

print(cursor)  # CkYKFAoHY3JlYXRlZBIJCMWGnoWVoukCEipqE2l-YXBpLW1zLWNoYXJnZS1zYnhyEwsSBkNoYXJnZRiAgICC28rtCAwYACAB

nextResponse = request.get(path + "?cursor=" + cursor)
pixRequestList += nextResponse["requests"]
nextCursor = nextResponse["cursor"]

...

Date & Time

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.

Example
2018-12-29T18:27:12.343531+00:00

Pix Request

A Pix Request represents an inbound or outbound Pix payment in the Brazilian instant payment system.

Here we will show you how to create and manage them.

The Pix Request Status

After creation, you can use asynchronous Webhooks to monitor status changes of a Pix Request.

Outbound Pix Requests (the ones you send) follow this life cycle:

pix-request-outbound-status

Inbound Pix Requests (the ones you receive and authorize) follow this life cycle:

pix-request-inbound-status

StatusDescription
CreatedThe Pix Request was registered at Stark Infra.
ProcessingThe Pix Request is being processed.
SuccessThe Pix Request was completed and settled.
FailedThe Pix Request failed or was denied.

The Pix Request Logs

Every time we change a Pix Request, we create a Log. Logs are useful for understanding the life cycle of each Pix Request, and we fire a Webhook to your registered URL whenever a new Log is created. The possible Pix Request Logs:

pix-request-outbound-log

For inbound Pix Requests:

pix-request-inbound-log

Log typeStatusDescription
SuccessSuccessThe Pix Request was completed successfully.
FailedFailedThe Pix Request failed.
DeniedFailedThe inbound Pix Request authorization was denied.

The Pix Request Object

Attributes

id STRING

Unique id for the Pix request.

amount INTEGER

Amount in cents to be transferred. Example: 100 (R$1.00).

endToEndId STRING

Unique end-to-end ID assigned by the Pix system.

fee INTEGER

Fee charged in cents for this Pix request.

flow STRING

Direction of the Pix request. Options: "in" (received), "out" (sent).

method STRING

Method through which this Pix was processed. Options: "manual", "dict", "initiator", "dynamicQrcode", "staticQrcode", "payerQrcode", "subscription", "contactless", "staticContactless".

externalId STRING

Unique external ID to prevent duplicates.

initiatorTaxId STRING

Tax ID of the payment initiator.

receiverBankCode STRING

Bank ISPB code of the receiver.

receiverBranchCode STRING

Branch code of the receiver's bank account.

receiverAccountNumber STRING

Account number of the receiver.

receiverAccountType STRING

Account type of the receiver. Options: "checking", "savings", "salary", "payment".

receiverName STRING

Full name of the receiver.

receiverTaxId STRING

CPF or CNPJ of the receiver.

senderBankCode STRING

Bank ISPB code of the sender.

senderBranchCode STRING

Branch code of the sender's bank account.

senderAccountNumber STRING

Account number of the sender.

senderAccountType STRING

Account type of the sender. Options: "checking", "savings", "salary", "payment".

senderName STRING

Full name of the sender.

senderTaxId STRING

CPF or CNPJ of the sender.

status STRING

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

tags LIST OF STRINGS

Tags associated with the Pix request.

description STRING

Description of the Pix request.

reconciliationId STRING

Reconciliation ID for the Pix request.

cashAmount INTEGER

Amount in cents to be withdrawal when paying. Example: 1000 (R$10.00).

cashierType STRING

Cashier's type for Pix Cash-out and Pix Change. Options: "merchant", "participant", "other".

cashierBankCode STRING

Cashier's bank ISPB code for Pix Cash-out and Pix Change.

priority STRING

Pix request processing priority. Options: "high", "low".

reason STRING

Reason why this Pix request was created. Options: "customerRequest", "subscriptionFlaw", "fraud".

created STRING

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

updated STRING

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

Create Pix Requests

Send Pix payments to any Pix-enabled bank account in Brazil.

To create a manual Pix Request you need the receiver's account information. If you only have a Pix Key, use Get a Pix Key to retrieve the required information before creating the Pix Request.

Every time a participant sends you a Pix, an inbound Pix Request is created and a synchronous POST authorization request is sent to your registered pixRequestUrl, which you must answer with approval or denial within 1 second (HTTP 200) or it is denied by default. Approve with status "approved"; deny with status "denied" and a reason such as "invalidAccountNumber".

You can create up to 100 Pix requests in a single request.

Parameters

amount REQUIRED

Amount in cents to be transferred. Example: 100 (R$1.00).

externalId REQUIRED

Unique string to prevent duplicates. Repeated externalIds will cause failures.

endToEndId REQUIRED

Unique end-to-end ID generated for the Pix request.

senderAccountNumber REQUIRED

Account number of the sender.

senderBranchCode REQUIRED

Branch code of the sender's bank account.

senderAccountType REQUIRED

Account type of the sender. Options: "checking", "savings", "salary", "payment".

senderName REQUIRED

Full name of the sender.

senderTaxId REQUIRED

CPF or CNPJ of the sender.

receiverAccountNumber REQUIRED

Account number of the receiver.

receiverAccountType REQUIRED

Account type of the receiver. Options: "checking", "savings", "salary", "payment".

receiverBankCode REQUIRED

Bank ISPB code of the receiver.

receiverTaxId REQUIRED

CPF or CNPJ of the receiver.

receiverBranchCode OPTIONAL

Branch code of the receiver's bank account.

receiverName OPTIONAL

Full name of the receiver.

description OPTIONAL

Description of the Pix request.

initiatorTaxId OPTIONAL

Tax ID of the payment initiator.

reconciliationId OPTIONAL

Reconciliation ID for internal reference.

method OPTIONAL

Method through which this Pix should be processed. Options: "manual", "dict", "initiator", "dynamicQrcode", "staticQrcode", "payerQrcode", "subscription", "contactless", "staticContactless".

cashAmount OPTIONAL

Amount in cents to be withdrawal when paying. Example: 1000 (R$10.00).

cashierType OPTIONAL

Cashier's type for Pix Cash-out and Pix Change. Options: "merchant", "participant", "other".

cashierBankCode OPTIONAL

Cashier's bank ISPB code for Pix Cash-out and Pix Change.

priority OPTIONAL

Pix request processing priority. Options: "high", "low".

reason OPTIONAL

Reason why this Pix request was created. Options: "customerRequest", "subscriptionFlaw", "fraud".

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/pix-request
REQUEST

Python

import starkinfra

requests = starkinfra.pixrequest.create([
    starkinfra.PixRequest(
        amount=1000,
        external_id="my-external-id-1",
        end_to_end_id="E20018183202201011000r01",
        sender_account_number="00000-0",
        sender_branch_code="0001",
        sender_account_type="checking",
        sender_name="Arya Stark",
        sender_tax_id="012.345.678-90",
        receiver_account_number="10000-0",
        receiver_account_type="checking",
        receiver_bank_code="20018183",
        receiver_tax_id="98.765.432/0001-10",
        receiver_branch_code="0001",
        receiver_name="Jon Snow",
        tags=["transfer", "pix"]
    )
])

for request in requests:
    print(request)
  

Javascript

const starkinfra = require('starkinfra')

const requests = await starkinfra.pixRequest.create([
    {
        amount: 1000,
        externalId: "my-external-id-1",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverName: "Jon Snow",
        receiverTaxId: "012.345.678-90",
        tags: ["transfer", "pix"]
    }
])

for (const request of requests) {
    console.log(request)
}
  

PHP

 1000,
        "externalId" => "my-external-id-1",
        "receiverBankCode" => "20018183",
        "receiverBranchCode" => "0001",
        "receiverAccountNumber" => "10000-0",
        "receiverAccountType" => "checking",
        "receiverName" => "Jon Snow",
        "receiverTaxId" => "012.345.678-90",
        "tags" => ["transfer", "pix"]
    ])
]);

foreach ($requests as $request) {
    print_r($request);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;

List requests = PixRequest.create(
    Arrays.asList(
        new PixRequest.Builder()
            .amount(1000L)
            .externalId("my-external-id-1")
            .receiverBankCode("20018183")
            .receiverBranchCode("0001")
            .receiverAccountNumber("10000-0")
            .receiverAccountType("checking")
            .receiverName("Jon Snow")
            .receiverTaxId("012.345.678-90")
            .tags(Arrays.asList("transfer", "pix"))
            .build()
    )
);

for (PixRequest request : requests) {
    System.out.println(request);
}
  

Ruby

require('starkinfra')

requests = StarkInfra::PixRequest.create([
    StarkInfra::PixRequest.new(
        amount: 1000,
        external_id: "my-external-id-1",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_name: "Jon Snow",
        receiver_tax_id: "012.345.678-90",
        tags: ["transfer", "pix"]
    )
])

requests.each do |request|
    puts request
end
  

Elixir

requests = StarkInfra.PixRequest.create!([
    %StarkInfra.PixRequest{
        amount: 1000,
        external_id: "my-external-id-1",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_name: "Jon Snow",
        receiver_tax_id: "012.345.678-90",
        tags: ["transfer", "pix"]
    }
])

for request <- requests do
    IO.inspect(request)
end
  

C#

using StarkInfra;
using System.Collections.Generic;

List requests = PixRequest.Create(
    new List {
        new PixRequest(
            amount: 1000,
            externalId: "my-external-id-1",
            receiverBankCode: "20018183",
            receiverBranchCode: "0001",
            receiverAccountNumber: "10000-0",
            receiverAccountType: "checking",
            receiverName: "Jon Snow",
            receiverTaxId: "012.345.678-90",
            tags: new List { "transfer", "pix" }
        )
    }
);

foreach (PixRequest request in requests) {
    Console.WriteLine(request);
}
  

Go

package main

import (
    "fmt"
    PixRequest "github.com/starkinfra/sdk-go/starkinfra/pixrequest"
)

requests, err := PixRequest.Create(
    []PixRequest.PixRequest{
        {
            Amount:                1000,
            ExternalId:            "my-external-id-1",
            ReceiverBankCode:      "20018183",
            ReceiverBranchCode:    "0001",
            ReceiverAccountNumber: "10000-0",
            ReceiverAccountType:   "checking",
            ReceiverName:          "Jon Snow",
            ReceiverTaxId:         "012.345.678-90",
            Tags:                  []string{"transfer", "pix"},
        },
    }, nil)

for _, request := range requests {
    fmt.Println(request)
}
  

Clojure

(def requests
    (starkinfra.pix-request/create
        [{:amount 1000
          :external-id "my-external-id-1"
          :receiver-bank-code "20018183"
          :receiver-branch-code "0001"
          :receiver-account-number "10000-0"
          :receiver-account-type "checking"
          :receiver-name "Jon Snow"
          :receiver-tax-id "012.345.678-90"
          :tags ["transfer" "pix"]}]))

(doseq [request requests]
    (println request))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-request' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requests": [
        {
            "amount": 1000,
            "externalId": "my-external-id-1",
            "receiverBankCode": "20018183",
            "receiverBranchCode": "0001",
            "receiverAccountNumber": "10000-0",
            "receiverAccountType": "checking",
            "receiverName": "Jon Snow",
            "receiverTaxId": "012.345.678-90",
            "tags": ["transfer", "pix"]
        }
    ]
}'
  
RESPONSE

Python

[
    PixRequest(
        id="5656565656565656",
        amount=1000,
        end_to_end_id="E20018183202201011000r01",
        fee=0,
        flow="out",
        method="manual",
        external_id="my-external-id-1",
        initiator_tax_id="",
        receiver_bank_code="20018183",
        receiver_branch_code="0001",
        receiver_account_number="10000-0",
        receiver_account_type="checking",
        receiver_name="Jon Snow",
        receiver_tax_id="98.765.432/0001-10",
        sender_bank_code="34052649",
        sender_branch_code="0001",
        sender_account_number="00000-0",
        sender_account_type="checking",
        sender_name="Arya Stark",
        sender_tax_id="012.345.678-90",
        status="created",
        tags=["transfer", "pix"],
        description="",
        reconciliation_id="",
        cash_amount=0,
        cashier_type="",
        cashier_bank_code="",
        priority="high",
        reason="customerRequest",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-external-id-1",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverName: "Jon Snow",
        receiverTaxId: "012.345.678-90",
        status: "created",
        flow: "out",
        tags: ["transfer", "pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

PHP

[
    PixRequest Object (
        [id] => 5656565656565656
        [amount] => 1000
        [externalId] => my-external-id-1
        [receiverBankCode] => 20018183
        [receiverBranchCode] => 0001
        [receiverAccountNumber] => 10000-0
        [receiverAccountType] => checking
        [receiverName] => Jon Snow
        [receiverTaxId] => 012.345.678-90
        [status] => created
        [flow] => out
        [tags] => Array ( [0] => transfer [1] => pix )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
]
  

Java

[
    PixRequest(
        id=5656565656565656,
        amount=1000,
        externalId=my-external-id-1,
        receiverBankCode=20018183,
        receiverBranchCode=0001,
        receiverAccountNumber=10000-0,
        receiverAccountType=checking,
        receiverName=Jon Snow,
        receiverTaxId=012.345.678-90,
        status=created,
        flow=out,
        tags=[transfer, pix],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    )
]
  

Ruby

[
    starkinfra_pix_request: {
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-external-id-1",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_name: "Jon Snow",
        receiver_tax_id: "012.345.678-90",
        status: "created",
        flow: "out",
        tags: ["transfer", "pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Elixir

[
    %StarkInfra.PixRequest{
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-external-id-1",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_name: "Jon Snow",
        receiver_tax_id: "012.345.678-90",
        status: "created",
        flow: "out",
        tags: ["transfer", "pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

C#

[
    PixRequest(
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-external-id-1",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverName: "Jon Snow",
        receiverTaxId: "012.345.678-90",
        status: "created",
        flow: "out",
        tags: [ "transfer", "pix" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    )
]
  

Go

[
    {
        Id: "5656565656565656",
        Amount: 1000,
        ExternalId: "my-external-id-1",
        ReceiverBankCode: "20018183",
        ReceiverBranchCode: "0001",
        ReceiverAccountNumber: "10000-0",
        ReceiverAccountType: "checking",
        ReceiverName: "Jon Snow",
        ReceiverTaxId: "012.345.678-90",
        Status: "created",
        Flow: "out",
        Tags: ["transfer", "pix"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Clojure

[
    {:id "5656565656565656"
     :amount 1000
     :external-id "my-external-id-1"
     :receiver-bank-code "20018183"
     :receiver-branch-code "0001"
     :receiver-account-number "10000-0"
     :receiver-account-type "checking"
     :receiver-name "Jon Snow"
     :receiver-tax-id "012.345.678-90"
     :status "created"
     :flow "out"
     :tags ["transfer" "pix"]
     :created "2022-01-01T00:00:00+00:00"
     :updated "2022-01-01T00:00:00+00:00"}
]
  

Curl

{
    "requests": [
        {
            "id": "5656565656565656",
            "amount": 1000,
            "externalId": "my-external-id-1",
            "receiverBankCode": "20018183",
            "receiverBranchCode": "0001",
            "receiverAccountNumber": "10000-0",
            "receiverAccountType": "checking",
            "receiverName": "Jon Snow",
            "receiverTaxId": "012.345.678-90",
            "status": "created",
            "flow": "out",
            "tags": ["transfer", "pix"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

List Pix Requests

List and filter all Pix requests. Results are paged.

Every time a participant sends you a Pix, an inbound Pix Request is created and a synchronous POST authorization request is sent to your registered pixRequestUrl, which you must answer with approval or denial within 1 second (HTTP 200) or it is denied by default. Approve with status "approved"; deny with status "denied" and a reason such as "invalidAccountNumber".

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

endToEndIds OPTIONAL

Filter by end-to-end IDs.

externalIds OPTIONAL

Filter by external IDs.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ids OPTIONAL

List of strings to get specific entities by ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter by status.

tags OPTIONAL

Filter entities that contain the specified tags.

ENDPOINT
GET /v2/pix-request
REQUEST

Python

import starkinfra

requests = starkinfra.pixrequest.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    status=["success"],
    tags=["pix"]
)

for request in requests:
    print(request)
  

Javascript

const starkinfra = require('starkinfra')

const requests = await starkinfra.pixRequest.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "success",
    flow: "out",
    tags: ["pix"]
})

for await (const request of requests) {
    console.log(request)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "status" => "success",
    "flow" => "out",
    "tags" => ["pix"]
]);

foreach ($requests as $request) {
    print_r($request);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("status", "success");
params.put("flow", "out");

Generator requests = PixRequest.query(params);

for (PixRequest request : requests) {
    System.out.println(request);
}
  

Ruby

require('starkinfra')

requests = StarkInfra::PixRequest.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "success",
    flow: "out",
    tags: ["pix"]
)

requests.each do |request|
    puts request
end
  

Elixir

requests = StarkInfra.PixRequest.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "success",
    flow: "out",
    tags: ["pix"]
)

for request <- requests do
    IO.inspect(request)
end
  

C#

using StarkInfra;

IEnumerable requests = PixRequest.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    status: "success",
    flow: "out",
    tags: new List { "pix" }
);

foreach (PixRequest request in requests) {
    Console.WriteLine(request);
}
  

Go

package main

import (
    "fmt"
    PixRequest "github.com/starkinfra/sdk-go/starkinfra/pixrequest"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
    "status": "success",
    "flow":   "out",
}

requests := PixRequest.Query(params, nil)

for request := range requests {
    fmt.Println(request)
}
  

Clojure

(def requests
    (starkinfra.pix-request/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :status "success"
        :flow "out"
        :tags ["pix"]
    }))

(doseq [request requests]
    (println request))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-request?limit=10&after=2022-01-01&before=2022-12-31&status=success&flow=out' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python



PixRequest(
    id="5656565656565656",
    amount=1000,
    end_to_end_id="E20018183202201011000r01",
    fee=0,
    flow="out",
    method="manual",
    status="success",
    tags=["pix"],
    priority="high",
    reason="customerRequest",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    amount: 1000,
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixRequest Object (
    [id] => 5656565656565656
    [amount] => 1000
    [status] => success
    [flow] => out
    [tags] => Array ( [0] => pix )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixRequest(
    id=5656565656565656,
    amount=1000,
    status=success,
    flow=out,
    tags=[pix],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    amount: 1000,
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixRequest{
    id: "5656565656565656",
    amount: 1000,
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixRequest(
    id: "5656565656565656",
    amount: 1000,
    status: "success",
    flow: "out",
    tags: [ "pix" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Amount: 1000,
    Status: "success",
    Flow: "out",
    Tags: ["pix"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :amount 1000
 :status "success"
 :flow "out"
 :tags ["pix"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "cursor": null,
    "requests": [
        {
            "id": "5656565656565656",
            "amount": 1000,
            "status": "success",
            "flow": "out",
            "tags": ["pix"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

Get a Pix Request

Get a single Pix request by its id.

Parameters

id REQUIRED

Id of the Pix request entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-request/:id
REQUEST

Python

import starkinfra

request = starkinfra.pixrequest.get("5656565656565656")

print(request)
  

Javascript

const starkinfra = require('starkinfra')

const request = await starkinfra.pixRequest.get("5656565656565656")

console.log(request)
  

PHP

Java

import com.starkinfra.*;

PixRequest request = PixRequest.get("5656565656565656");

System.out.println(request);
  

Ruby

require('starkinfra')

request = StarkInfra::PixRequest.get("5656565656565656")

puts request
  

Elixir

request = StarkInfra.PixRequest.get!("5656565656565656")

IO.inspect(request)
  

C#

using StarkInfra;

PixRequest request = PixRequest.Get("5656565656565656");

Console.WriteLine(request);
  

Go

package main

import (
    "fmt"
    PixRequest "github.com/starkinfra/sdk-go/starkinfra/pixrequest"
)

request, err := PixRequest.Get("5656565656565656", nil)

fmt.Println(request)
  

Clojure

(def request
    (starkinfra.pix-request/get "5656565656565656"))

(println request)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-request/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixRequest(
    id="5656565656565656",
    amount=1000,
    end_to_end_id="E20018183202201011000r01",
    fee=0,
    flow="out",
    method="manual",
    external_id="my-external-id-1",
    initiator_tax_id="",
    receiver_bank_code="20018183",
    receiver_branch_code="0001",
    receiver_account_number="10000-0",
    receiver_account_type="checking",
    receiver_name="Jon Snow",
    receiver_tax_id="98.765.432/0001-10",
    sender_bank_code="34052649",
    sender_branch_code="0001",
    sender_account_number="00000-0",
    sender_account_type="checking",
    sender_name="Arya Stark",
    sender_tax_id="012.345.678-90",
    status="success",
    tags=["pix"],
    description="",
    reconciliation_id="",
    cash_amount=0,
    cashier_type="",
    cashier_bank_code="",
    priority="high",
    reason="customerRequest",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    amount: 1000,
    externalId: "my-external-id-1",
    receiverBankCode: "20018183",
    receiverBranchCode: "0001",
    receiverAccountNumber: "10000-0",
    receiverAccountType: "checking",
    receiverName: "Jon Snow",
    receiverTaxId: "012.345.678-90",
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixRequest Object (
    [id] => 5656565656565656
    [amount] => 1000
    [externalId] => my-external-id-1
    [receiverBankCode] => 20018183
    [receiverBranchCode] => 0001
    [receiverAccountNumber] => 10000-0
    [receiverAccountType] => checking
    [receiverName] => Jon Snow
    [receiverTaxId] => 012.345.678-90
    [status] => success
    [flow] => out
    [tags] => Array ( [0] => pix )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixRequest(
    id=5656565656565656,
    amount=1000,
    externalId=my-external-id-1,
    receiverBankCode=20018183,
    receiverBranchCode=0001,
    receiverAccountNumber=10000-0,
    receiverAccountType=checking,
    receiverName=Jon Snow,
    receiverTaxId=012.345.678-90,
    status=success,
    flow=out,
    tags=[pix],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    amount: 1000,
    external_id: "my-external-id-1",
    receiver_bank_code: "20018183",
    receiver_branch_code: "0001",
    receiver_account_number: "10000-0",
    receiver_account_type: "checking",
    receiver_name: "Jon Snow",
    receiver_tax_id: "012.345.678-90",
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixRequest{
    id: "5656565656565656",
    amount: 1000,
    external_id: "my-external-id-1",
    receiver_bank_code: "20018183",
    receiver_branch_code: "0001",
    receiver_account_number: "10000-0",
    receiver_account_type: "checking",
    receiver_name: "Jon Snow",
    receiver_tax_id: "012.345.678-90",
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixRequest(
    id: "5656565656565656",
    amount: 1000,
    externalId: "my-external-id-1",
    receiverBankCode: "20018183",
    receiverBranchCode: "0001",
    receiverAccountNumber: "10000-0",
    receiverAccountType: "checking",
    receiverName: "Jon Snow",
    receiverTaxId: "012.345.678-90",
    status: "success",
    flow: "out",
    tags: [ "pix" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Amount: 1000,
    ExternalId: "my-external-id-1",
    ReceiverBankCode: "20018183",
    ReceiverBranchCode: "0001",
    ReceiverAccountNumber: "10000-0",
    ReceiverAccountType: "checking",
    ReceiverName: "Jon Snow",
    ReceiverTaxId: "012.345.678-90",
    Status: "success",
    Flow: "out",
    Tags: ["pix"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :amount 1000
 :external-id "my-external-id-1"
 :receiver-bank-code "20018183"
 :receiver-branch-code "0001"
 :receiver-account-number "10000-0"
 :receiver-account-type "checking"
 :receiver-name "Jon Snow"
 :receiver-tax-id "012.345.678-90"
 :status "success"
 :flow "out"
 :tags ["pix"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "request": {
        "id": "5656565656565656",
        "amount": 1000,
        "externalId": "my-external-id-1",
        "receiverBankCode": "20018183",
        "receiverBranchCode": "0001",
        "receiverAccountNumber": "10000-0",
        "receiverAccountType": "checking",
        "receiverName": "Jon Snow",
        "receiverTaxId": "012.345.678-90",
        "status": "success",
        "flow": "out",
        "tags": ["pix"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

List Pix Request Logs

Get a paged list of all Pix request logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

limit OPTIONAL

Number of results per cursor. Max = 100.

requestIds OPTIONAL

Array of Pix request ids linked to the logs.

types OPTIONAL

Filter logs by log types.

ENDPOINT
GET /v2/pix-request/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixrequest.log.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    types=["success"],
    request_ids=["5656565656565656"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.pixRequest.log.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["success"]
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "types" => ["success"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");

Generator logs = PixRequest.Log.query(params);

for (PixRequest.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::PixRequest::Log.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["success"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.PixRequest.Log.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["success"]
)

for log <- logs do
    IO.inspect(log)
end
  

C#

using StarkInfra;

IEnumerable logs = PixRequest.Log.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    types: new List { "success" }
);

foreach (PixRequest.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    PixRequestLog "github.com/starkinfra/sdk-go/starkinfra/pixrequest/log"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
}

logs := PixRequestLog.Query(params, nil)

for log := range logs {
    fmt.Println(log)
}
  

Clojure

(def logs
    (starkinfra.pix-request.log/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :types ["success"]
    }))

(doseq [log logs]
    (println log))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-request/log?limit=10&after=2022-01-01&before=2022-12-31&types=success' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    type="success",
    errors=[],
    request=PixRequest(
        id="5656565656565656",
        amount=1000,
        end_to_end_id="E20018183202201011000r01",
        fee=0,
        flow="out",
        method="manual",
        external_id="my-external-id-1",
        initiator_tax_id="",
        receiver_bank_code="20018183",
        receiver_branch_code="0001",
        receiver_account_number="10000-0",
        receiver_account_type="checking",
        receiver_name="Jon Snow",
        receiver_tax_id="98.765.432/0001-10",
        sender_bank_code="34052649",
        sender_branch_code="0001",
        sender_account_number="00000-0",
        sender_account_type="checking",
        sender_name="Arya Stark",
        sender_tax_id="012.345.678-90",
        status="success",
        tags=["pix"],
        description="",
        reconciliation_id="",
        cash_amount=0,
        cashier_type="",
        cashier_bank_code="",
        priority="high",
        reason="customerRequest",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    ),
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "success",
    request: {
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-external-id-1",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverName: "Jon Snow",
        receiverTaxId: "012.345.678-90",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => success
    [request] => PixRequest Object (
        [id] => 5656565656565656
        [amount] => 1000
        [externalId] => my-external-id-1
        [receiverBankCode] => 20018183
        [receiverBranchCode] => 0001
        [receiverAccountNumber] => 10000-0
        [receiverAccountType] => checking
        [receiverName] => Jon Snow
        [receiverTaxId] => 012.345.678-90
        [status] => success
        [flow] => out
        [tags] => Array ( [0] => pix )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=success,
    request=PixRequest(
        id=5656565656565656,
        amount=1000,
        externalId=my-external-id-1,
        receiverBankCode=20018183,
        receiverBranchCode=0001,
        receiverAccountNumber=10000-0,
        receiverAccountType=checking,
        receiverName=Jon Snow,
        receiverTaxId=012.345.678-90,
        status=success,
        flow=out,
        tags=[pix],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "success",
    request: {
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-external-id-1",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_name: "Jon Snow",
        receiver_tax_id: "012.345.678-90",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixRequest.Log{
    id: "6767676767676767",
    type: "success",
    request: %StarkInfra.PixRequest{
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-external-id-1",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_name: "Jon Snow",
        receiver_tax_id: "012.345.678-90",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixRequest.Log(
    id: "6767676767676767",
    type: "success",
    request: PixRequest(
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-external-id-1",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverName: "Jon Snow",
        receiverTaxId: "012.345.678-90",
        status: "success",
        flow: "out",
        tags: [ "pix" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "success",
    Request: {
        Id: "5656565656565656",
        Amount: 1000,
        ExternalId: "my-external-id-1",
        ReceiverBankCode: "20018183",
        ReceiverBranchCode: "0001",
        ReceiverAccountNumber: "10000-0",
        ReceiverAccountType: "checking",
        ReceiverName: "Jon Snow",
        ReceiverTaxId: "012.345.678-90",
        Status: "success",
        Flow: "out",
        Tags: ["pix"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "success"
 :request {:id "5656565656565656"
           :amount 1000
           :external-id "my-external-id-1"
           :receiver-bank-code "20018183"
           :receiver-branch-code "0001"
           :receiver-account-number "10000-0"
           :receiver-account-type "checking"
           :receiver-name "Jon Snow"
           :receiver-tax-id "012.345.678-90"
           :status "success"
           :flow "out"
           :tags ["pix"]
           :created "2022-01-01T00:00:00+00:00"
           :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "success",
            "request": {
                "id": "5656565656565656",
                "amount": 1000,
                "externalId": "my-external-id-1",
                "receiverBankCode": "20018183",
                "receiverBranchCode": "0001",
                "receiverAccountNumber": "10000-0",
                "receiverAccountType": "checking",
                "receiverName": "Jon Snow",
                "receiverTaxId": "012.345.678-90",
                "status": "success",
                "flow": "out",
                "tags": ["pix"],
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:00:00+00:00"
            },
            "created": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Request Log

Get a single Pix request log by its id.

Parameters

id REQUIRED

Id of the log entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-request/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixrequest.log.get("6767676767676767")

print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.pixRequest.log.get("6767676767676767")

console.log(log)
  

PHP

Java

import com.starkinfra.*;

PixRequest.Log log = PixRequest.Log.get("6767676767676767");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::PixRequest::Log.get("6767676767676767")

puts log
  

Elixir

log = StarkInfra.PixRequest.Log.get!("6767676767676767")

IO.inspect(log)
  

C#

using StarkInfra;

PixRequest.Log log = PixRequest.Log.Get("6767676767676767");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    PixRequestLog "github.com/starkinfra/sdk-go/starkinfra/pixrequest/log"
)

log, err := PixRequestLog.Get("6767676767676767", nil)

fmt.Println(log)
  

Clojure

(def log
    (starkinfra.pix-request.log/get "6767676767676767"))

(println log)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-request/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    type="success",
    errors=[],
    request=PixRequest(
        id="5656565656565656",
        amount=1000,
        end_to_end_id="E20018183202201011000r01",
        fee=0,
        flow="out",
        method="manual",
        external_id="my-external-id-1",
        initiator_tax_id="",
        receiver_bank_code="20018183",
        receiver_branch_code="0001",
        receiver_account_number="10000-0",
        receiver_account_type="checking",
        receiver_name="Jon Snow",
        receiver_tax_id="98.765.432/0001-10",
        sender_bank_code="34052649",
        sender_branch_code="0001",
        sender_account_number="00000-0",
        sender_account_type="checking",
        sender_name="Arya Stark",
        sender_tax_id="012.345.678-90",
        status="success",
        tags=["pix"],
        description="",
        reconciliation_id="",
        cash_amount=0,
        cashier_type="",
        cashier_bank_code="",
        priority="high",
        reason="customerRequest",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    ),
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "success",
    request: {
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-external-id-1",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverName: "Jon Snow",
        receiverTaxId: "012.345.678-90",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => success
    [request] => PixRequest Object (
        [id] => 5656565656565656
        [amount] => 1000
        [externalId] => my-external-id-1
        [receiverBankCode] => 20018183
        [receiverBranchCode] => 0001
        [receiverAccountNumber] => 10000-0
        [receiverAccountType] => checking
        [receiverName] => Jon Snow
        [receiverTaxId] => 012.345.678-90
        [status] => success
        [flow] => out
        [tags] => Array ( [0] => pix )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=success,
    request=PixRequest(
        id=5656565656565656,
        amount=1000,
        externalId=my-external-id-1,
        receiverBankCode=20018183,
        receiverBranchCode=0001,
        receiverAccountNumber=10000-0,
        receiverAccountType=checking,
        receiverName=Jon Snow,
        receiverTaxId=012.345.678-90,
        status=success,
        flow=out,
        tags=[pix],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "success",
    request: {
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-external-id-1",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_name: "Jon Snow",
        receiver_tax_id: "012.345.678-90",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixRequest.Log{
    id: "6767676767676767",
    type: "success",
    request: %StarkInfra.PixRequest{
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-external-id-1",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_name: "Jon Snow",
        receiver_tax_id: "012.345.678-90",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixRequest.Log(
    id: "6767676767676767",
    type: "success",
    request: PixRequest(
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-external-id-1",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverName: "Jon Snow",
        receiverTaxId: "012.345.678-90",
        status: "success",
        flow: "out",
        tags: [ "pix" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "success",
    Request: {
        Id: "5656565656565656",
        Amount: 1000,
        ExternalId: "my-external-id-1",
        ReceiverBankCode: "20018183",
        ReceiverBranchCode: "0001",
        ReceiverAccountNumber: "10000-0",
        ReceiverAccountType: "checking",
        ReceiverName: "Jon Snow",
        ReceiverTaxId: "012.345.678-90",
        Status: "success",
        Flow: "out",
        Tags: ["pix"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "success"
 :request {:id "5656565656565656"
           :amount 1000
           :external-id "my-external-id-1"
           :receiver-bank-code "20018183"
           :receiver-branch-code "0001"
           :receiver-account-number "10000-0"
           :receiver-account-type "checking"
           :receiver-name "Jon Snow"
           :receiver-tax-id "012.345.678-90"
           :status "success"
           :flow "out"
           :tags ["pix"]
           :created "2022-01-01T00:00:00+00:00"
           :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "success",
        "request": {
            "id": "5656565656565656",
            "amount": 1000,
            "externalId": "my-external-id-1",
            "receiverBankCode": "20018183",
            "receiverBranchCode": "0001",
            "receiverAccountNumber": "10000-0",
            "receiverAccountType": "checking",
            "receiverName": "Jon Snow",
            "receiverTaxId": "012.345.678-90",
            "status": "success",
            "flow": "out",
            "tags": ["pix"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        },
        "created": "2022-01-01T00:01:00+00:00"
    }
}
  

Pix Reversal

A Pix Reversal allows you to reverse a previously made Pix transfer, sending the funds back to the original sender.

Here we will show you how to create and manage them.

The Pix Reversal Status

After creation, you can use asynchronous Webhooks to monitor status changes of a Pix Reversal.

Outbound Pix Reversals (the ones you send) follow this life cycle:

pix-reversal-outbound-status

Inbound Pix Reversals (the ones you receive and authorize) follow this life cycle:

pix-reversal-inbound-status

StatusDescription
CreatedThe Pix Reversal creation request was registered at Stark Infra.
ProcessingThe Pix Reversal is being processed.
SuccessThe Pix Reversal was completed.
FailedThe Pix Reversal failed or was denied.

The Pix Reversal Logs

Every time we change a Pix Reversal, we create a Log. Logs are useful for understanding the life cycle of each Pix Reversal, and we fire a Webhook whenever a new Log is created. The possible Pix Reversal Logs:

pix-reversal-outbound-log

For inbound Pix Reversals:

pix-reversal-inbound-log

Log typeStatusDescription
SuccessSuccessThe Pix Reversal was completed.
FailedFailedThe Pix Reversal failed.

The Pix Reversal Object

Attributes

id STRING

Unique id for the Pix reversal.

amount INTEGER

Amount in cents to be reversed.

externalId STRING

Unique external ID to prevent duplicates.

endToEndId STRING

End-to-end ID of the original Pix request to be reversed.

returnId STRING

Central Bank return ID generated for the Pix reversal.

reason STRING

Reason for the reversal. Options: "fraud", "bankError", "cashierError", "customerRequest".

status STRING

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

tags LIST OF STRINGS

Tags associated with the Pix reversal.

fee INTEGER

Fee charged in cents for this reversal.

flow STRING

Direction of the reversal. Options: "in" (received), "out" (sent).

description STRING

Description of the reversal.

created STRING

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

updated STRING

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

Create Pix Reversals

Reverse a Pix payment by providing the original end-to-end ID.

Pix Reversals can only be created for inbound Pix Requests with status success. Reference the original Pix Request by passing its endToEndId.

When a participant reverses a Pix you successfully sent, an authorization request is sent to your pixReversalUrl (which must differ from your pixRequestUrl); answer within 1 second (HTTP 200) or it is denied by default; if no pixReversalUrl is registered, inbound Pix Reversals are accepted by default.

You can create up to 100 reversals in a single request.

Parameters

amount REQUIRED

Amount in cents to be reversed.

endToEndId REQUIRED

End-to-end ID of the original Pix request to be reversed.

externalId REQUIRED

Unique string to prevent duplicates.

reason REQUIRED

Reason for the reversal. Options: "fraud", "bankError", "cashierError", "customerRequest".

description OPTIONAL

Description of the reversal.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/pix-reversal
REQUEST

Python

import starkinfra

reversals = starkinfra.pixreversal.create([
    starkinfra.PixReversal(
        amount=1000,
        external_id="my-reversal-id-1",
        end_to_end_id="E20018183202201060100rq1feOMJqtZ",
        reason="fraud",
        description="reversing a fraudulent transfer",
        tags=["reversal", "pix"]
    )
])

for reversal in reversals:
    print(reversal)
  

Javascript

const starkinfra = require('starkinfra')

const reversals = await starkinfra.pixReversal.create([
    {
        amount: 1000,
        externalId: "my-reversal-id-1",
        endToEndId: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        tags: ["reversal", "pix"]
    }
])

for (const reversal of reversals) {
    console.log(reversal)
}
  

PHP

 1000,
        "externalId" => "my-reversal-id-1",
        "endToEndId" => "E20018183202201060100rq1feOMJqtZ",
        "reason" => "fraud",
        "tags" => ["reversal", "pix"]
    ])
]);

foreach ($reversals as $reversal) {
    print_r($reversal);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;

List reversals = PixReversal.create(
    Arrays.asList(
        new PixReversal.Builder()
            .amount(1000L)
            .externalId("my-reversal-id-1")
            .endToEndId("E20018183202201060100rq1feOMJqtZ")
            .reason("fraud")
            .tags(Arrays.asList("reversal", "pix"))
            .build()
    )
);

for (PixReversal reversal : reversals) {
    System.out.println(reversal);
}
  

Ruby

require('starkinfra')

reversals = StarkInfra::PixReversal.create([
    StarkInfra::PixReversal.new(
        amount: 1000,
        external_id: "my-reversal-id-1",
        end_to_end_id: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        tags: ["reversal", "pix"]
    )
])

reversals.each do |reversal|
    puts reversal
end
  

Elixir

reversals = StarkInfra.PixReversal.create!([
    %StarkInfra.PixReversal{
        amount: 1000,
        external_id: "my-reversal-id-1",
        end_to_end_id: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        tags: ["reversal", "pix"]
    }
])

for reversal <- reversals do
    IO.inspect(reversal)
end
  

C#

using StarkInfra;
using System.Collections.Generic;

List reversals = PixReversal.Create(
    new List {
        new PixReversal(
            amount: 1000,
            externalId: "my-reversal-id-1",
            endToEndId: "E20018183202201060100rq1feOMJqtZ",
            reason: "fraud",
            tags: new List { "reversal", "pix" }
        )
    }
);

foreach (PixReversal reversal in reversals) {
    Console.WriteLine(reversal);
}
  

Go

package main

import (
    "fmt"
    PixReversal "github.com/starkinfra/sdk-go/starkinfra/pixreversal"
)

reversals, err := PixReversal.Create(
    []PixReversal.PixReversal{
        {
            Amount:      1000,
            ExternalId:  "my-reversal-id-1",
            EndToEndId:  "E20018183202201060100rq1feOMJqtZ",
            Reason:      "fraud",
            Tags:        []string{"reversal", "pix"},
        },
    }, nil)

for _, reversal := range reversals {
    fmt.Println(reversal)
}
  

Clojure

(def reversals
    (starkinfra.pix-reversal/create
        [{:amount 1000
          :external-id "my-reversal-id-1"
          :end-to-end-id "E20018183202201060100rq1feOMJqtZ"
          :reason "fraud"
          :tags ["reversal" "pix"]}]))

(doseq [reversal reversals]
    (println reversal))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-reversal' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reversals": [
        {
            "amount": 1000,
            "externalId": "my-reversal-id-1",
            "endToEndId": "E20018183202201060100rq1feOMJqtZ",
            "reason": "fraud",
            "tags": ["reversal", "pix"]
        }
    ]
}'
  
RESPONSE

Python

[
    PixReversal(
        id="5656565656565656",
        amount=1000,
        external_id="my-reversal-id-1",
        end_to_end_id="E20018183202201060100rq1feOMJqtZ",
        return_id="D20018183202202030109X3OoBHG74wo",
        reason="fraud",
        status="created",
        flow="out",
        fee=0,
        description="reversing a fraudulent transfer",
        tags=["reversal", "pix"],
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-reversal-id-1",
        endToEndId: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "created",
        flow: "out",
        tags: ["reversal", "pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

PHP

[
    PixReversal Object (
        [id] => 5656565656565656
        [amount] => 1000
        [externalId] => my-reversal-id-1
        [endToEndId] => E20018183202201060100rq1feOMJqtZ
        [reason] => fraud
        [status] => created
        [flow] => out
        [tags] => Array ( [0] => reversal [1] => pix )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
]
  

Java

[
    PixReversal(
        id=5656565656565656,
        amount=1000,
        externalId=my-reversal-id-1,
        endToEndId=E20018183202201060100rq1feOMJqtZ,
        reason=fraud,
        status=created,
        flow=out,
        tags=[reversal, pix],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    )
]
  

Ruby

[
    starkinfra_pix_reversal: {
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-reversal-id-1",
        end_to_end_id: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "created",
        flow: "out",
        tags: ["reversal", "pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Elixir

[
    %StarkInfra.PixReversal{
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-reversal-id-1",
        end_to_end_id: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "created",
        flow: "out",
        tags: ["reversal", "pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

C#

[
    PixReversal(
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-reversal-id-1",
        endToEndId: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "created",
        flow: "out",
        tags: [ "reversal", "pix" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    )
]
  

Go

[
    {
        Id: "5656565656565656",
        Amount: 1000,
        ExternalId: "my-reversal-id-1",
        EndToEndId: "E20018183202201060100rq1feOMJqtZ",
        Reason: "fraud",
        Status: "created",
        Flow: "out",
        Tags: ["reversal", "pix"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Clojure

[
    {:id "5656565656565656"
     :amount 1000
     :external-id "my-reversal-id-1"
     :end-to-end-id "E20018183202201060100rq1feOMJqtZ"
     :reason "fraud"
     :status "created"
     :flow "out"
     :tags ["reversal" "pix"]
     :created "2022-01-01T00:00:00+00:00"
     :updated "2022-01-01T00:00:00+00:00"}
]
  

Curl

{
    "reversals": [
        {
            "id": "5656565656565656",
            "amount": 1000,
            "externalId": "my-reversal-id-1",
            "endToEndId": "E20018183202201060100rq1feOMJqtZ",
            "reason": "fraud",
            "status": "created",
            "flow": "out",
            "tags": ["reversal", "pix"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

List Pix Reversals

List and filter all Pix reversals. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

externalIds OPTIONAL

Filter by external IDs.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ids OPTIONAL

List of strings to get specific entities by ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter by status.

tags OPTIONAL

Filter entities that contain the specified tags.

ENDPOINT
GET /v2/pix-reversal
REQUEST

Python

import starkinfra

reversals = starkinfra.pixreversal.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    status=["success"],
    external_ids=["my-reversal-id-1"],
    tags=["pix"]
)

for reversal in reversals:
    print(reversal)
  

Javascript

const starkinfra = require('starkinfra')

const reversals = await starkinfra.pixReversal.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "success",
    flow: "out",
    tags: ["pix"]
})

for await (const reversal of reversals) {
    console.log(reversal)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "status" => "success",
    "flow" => "out",
    "tags" => ["pix"]
]);

foreach ($reversals as $reversal) {
    print_r($reversal);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("status", "success");
params.put("flow", "out");

Generator reversals = PixReversal.query(params);

for (PixReversal reversal : reversals) {
    System.out.println(reversal);
}
  

Ruby

require('starkinfra')

reversals = StarkInfra::PixReversal.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "success",
    flow: "out",
    tags: ["pix"]
)

reversals.each do |reversal|
    puts reversal
end
  

Elixir

reversals = StarkInfra.PixReversal.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "success",
    flow: "out",
    tags: ["pix"]
)

for reversal <- reversals do
    IO.inspect(reversal)
end
  

C#

using StarkInfra;

IEnumerable reversals = PixReversal.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    status: "success",
    flow: "out",
    tags: new List { "pix" }
);

foreach (PixReversal reversal in reversals) {
    Console.WriteLine(reversal);
}
  

Go

package main

import (
    "fmt"
    PixReversal "github.com/starkinfra/sdk-go/starkinfra/pixreversal"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
    "status": "success",
    "flow":   "out",
}

reversals := PixReversal.Query(params, nil)

for reversal := range reversals {
    fmt.Println(reversal)
}
  

Clojure

(def reversals
    (starkinfra.pix-reversal/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :status "success"
        :flow "out"
        :tags ["pix"]
    }))

(doseq [reversal reversals]
    (println reversal))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-reversal?limit=10&after=2022-01-01&before=2022-12-31&status=success&flow=out' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python



PixReversal(
    id="5656565656565656",
    amount=1000,
    external_id="my-reversal-id-1",
    end_to_end_id="E20018183202201060100rq1feOMJqtZ",
    return_id="D20018183202202030109X3OoBHG74wo",
    reason="fraud",
    status="success",
    flow="out",
    fee=0,
    description="reversing a fraudulent transfer",
    tags=["pix"],
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    amount: 1000,
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixReversal Object (
    [id] => 5656565656565656
    [amount] => 1000
    [status] => success
    [flow] => out
    [tags] => Array ( [0] => pix )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixReversal(
    id=5656565656565656,
    amount=1000,
    status=success,
    flow=out,
    tags=[pix],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    amount: 1000,
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixReversal{
    id: "5656565656565656",
    amount: 1000,
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixReversal(
    id: "5656565656565656",
    amount: 1000,
    status: "success",
    flow: "out",
    tags: [ "pix" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Amount: 1000,
    Status: "success",
    Flow: "out",
    Tags: ["pix"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :amount 1000
 :status "success"
 :flow "out"
 :tags ["pix"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "cursor": null,
    "reversals": [
        {
            "id": "5656565656565656",
            "amount": 1000,
            "status": "success",
            "flow": "out",
            "tags": ["pix"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

Get a Pix Reversal

Get a single Pix reversal by its id.

Parameters

id REQUIRED

Id of the Pix reversal entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-reversal/:id
REQUEST

Python

import starkinfra

reversal = starkinfra.pixreversal.get("5656565656565656")

print(reversal)
  

Javascript

const starkinfra = require('starkinfra')

const reversal = await starkinfra.pixReversal.get("5656565656565656")

console.log(reversal)
  

PHP

Java

import com.starkinfra.*;

PixReversal reversal = PixReversal.get("5656565656565656");

System.out.println(reversal);
  

Ruby

require('starkinfra')

reversal = StarkInfra::PixReversal.get("5656565656565656")

puts reversal
  

Elixir

reversal = StarkInfra.PixReversal.get!("5656565656565656")

IO.inspect(reversal)
  

C#

using StarkInfra;

PixReversal reversal = PixReversal.Get("5656565656565656");

Console.WriteLine(reversal);
  

Go

package main

import (
    "fmt"
    PixReversal "github.com/starkinfra/sdk-go/starkinfra/pixreversal"
)

reversal, err := PixReversal.Get("5656565656565656", nil)

fmt.Println(reversal)
  

Clojure

(def reversal
    (starkinfra.pix-reversal/get "5656565656565656"))

(println reversal)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-reversal/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixReversal(
    id="5656565656565656",
    amount=1000,
    external_id="my-reversal-id-1",
    end_to_end_id="E20018183202201060100rq1feOMJqtZ",
    return_id="D20018183202202030109X3OoBHG74wo",
    reason="fraud",
    status="success",
    flow="out",
    fee=0,
    description="reversing a fraudulent transfer",
    tags=["pix"],
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    amount: 1000,
    externalId: "my-reversal-id-1",
    endToEndId: "E20018183202201060100rq1feOMJqtZ",
    reason: "fraud",
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixReversal Object (
    [id] => 5656565656565656
    [amount] => 1000
    [externalId] => my-reversal-id-1
    [endToEndId] => E20018183202201060100rq1feOMJqtZ
    [reason] => fraud
    [status] => success
    [flow] => out
    [tags] => Array ( [0] => pix )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixReversal(
    id=5656565656565656,
    amount=1000,
    externalId=my-reversal-id-1,
    endToEndId=E20018183202201060100rq1feOMJqtZ,
    reason=fraud,
    status=success,
    flow=out,
    tags=[pix],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    amount: 1000,
    external_id: "my-reversal-id-1",
    end_to_end_id: "E20018183202201060100rq1feOMJqtZ",
    reason: "fraud",
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixReversal{
    id: "5656565656565656",
    amount: 1000,
    external_id: "my-reversal-id-1",
    end_to_end_id: "E20018183202201060100rq1feOMJqtZ",
    reason: "fraud",
    status: "success",
    flow: "out",
    tags: ["pix"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixReversal(
    id: "5656565656565656",
    amount: 1000,
    externalId: "my-reversal-id-1",
    endToEndId: "E20018183202201060100rq1feOMJqtZ",
    reason: "fraud",
    status: "success",
    flow: "out",
    tags: [ "pix" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Amount: 1000,
    ExternalId: "my-reversal-id-1",
    EndToEndId: "E20018183202201060100rq1feOMJqtZ",
    Reason: "fraud",
    Status: "success",
    Flow: "out",
    Tags: ["pix"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :amount 1000
 :external-id "my-reversal-id-1"
 :end-to-end-id "E20018183202201060100rq1feOMJqtZ"
 :reason "fraud"
 :status "success"
 :flow "out"
 :tags ["pix"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "reversal": {
        "id": "5656565656565656",
        "amount": 1000,
        "externalId": "my-reversal-id-1",
        "endToEndId": "E20018183202201060100rq1feOMJqtZ",
        "reason": "fraud",
        "status": "success",
        "flow": "out",
        "tags": ["pix"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

List Pix Reversal Logs

Get a paged list of all Pix reversal logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

limit OPTIONAL

Number of results per cursor. Max = 100.

reversalIds OPTIONAL

Array of Pix reversal ids linked to the logs.

types OPTIONAL

Filter logs by log types.

ENDPOINT
GET /v2/pix-reversal/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixreversal.log.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    types=["success"],
    reversal_ids=["5656565656565656"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.pixReversal.log.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["success"]
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "types" => ["success"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");

Generator logs = PixReversal.Log.query(params);

for (PixReversal.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::PixReversal::Log.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["success"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.PixReversal.Log.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["success"]
)

for log <- logs do
    IO.inspect(log)
end
  

C#

using StarkInfra;

IEnumerable logs = PixReversal.Log.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    types: new List { "success" }
);

foreach (PixReversal.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    PixReversalLog "github.com/starkinfra/sdk-go/starkinfra/pixreversal/log"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
}

logs := PixReversalLog.Query(params, nil)

for log := range logs {
    fmt.Println(log)
}
  

Clojure

(def logs
    (starkinfra.pix-reversal.log/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :types ["success"]
    }))

(doseq [log logs]
    (println log))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-reversal/log?limit=10&after=2022-01-01&before=2022-12-31&types=success' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    type="success",
    reversal=PixReversal(
        id="5656565656565656",
        amount=1000,
        external_id="my-reversal-id-1",
        end_to_end_id="E20018183202201060100rq1feOMJqtZ",
        return_id="D20018183202202030109X3OoBHG74wo",
        reason="fraud",
        status="success",
        flow="out",
        fee=0,
        description="reversing a fraudulent transfer",
        tags=["pix"],
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    ),
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "success",
    reversal: {
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-reversal-id-1",
        endToEndId: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => success
    [reversal] => PixReversal Object (
        [id] => 5656565656565656
        [amount] => 1000
        [externalId] => my-reversal-id-1
        [endToEndId] => E20018183202201060100rq1feOMJqtZ
        [reason] => fraud
        [status] => success
        [flow] => out
        [tags] => Array ( [0] => pix )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=success,
    reversal=PixReversal(
        id=5656565656565656,
        amount=1000,
        externalId=my-reversal-id-1,
        endToEndId=E20018183202201060100rq1feOMJqtZ,
        reason=fraud,
        status=success,
        flow=out,
        tags=[pix],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "success",
    reversal: {
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-reversal-id-1",
        end_to_end_id: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixReversal.Log{
    id: "6767676767676767",
    type: "success",
    reversal: %StarkInfra.PixReversal{
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-reversal-id-1",
        end_to_end_id: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixReversal.Log(
    id: "6767676767676767",
    type: "success",
    reversal: PixReversal(
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-reversal-id-1",
        endToEndId: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "success",
        flow: "out",
        tags: [ "pix" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "success",
    Reversal: {
        Id: "5656565656565656",
        Amount: 1000,
        ExternalId: "my-reversal-id-1",
        EndToEndId: "E20018183202201060100rq1feOMJqtZ",
        Reason: "fraud",
        Status: "success",
        Flow: "out",
        Tags: ["pix"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "success"
 :reversal {:id "5656565656565656"
            :amount 1000
            :external-id "my-reversal-id-1"
            :end-to-end-id "E20018183202201060100rq1feOMJqtZ"
            :reason "fraud"
            :status "success"
            :flow "out"
            :tags ["pix"]
            :created "2022-01-01T00:00:00+00:00"
            :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "success",
            "reversal": {
                "id": "5656565656565656",
                "amount": 1000,
                "externalId": "my-reversal-id-1",
                "endToEndId": "E20018183202201060100rq1feOMJqtZ",
                "reason": "fraud",
                "status": "success",
                "flow": "out",
                "tags": ["pix"],
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:00:00+00:00"
            },
            "created": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Reversal Log

Get a single Pix reversal log by its id.

Parameters

id REQUIRED

Id of the log entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-reversal/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixreversal.log.get("6767676767676767")

print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.pixReversal.log.get("6767676767676767")

console.log(log)
  

PHP

Java

import com.starkinfra.*;

PixReversal.Log log = PixReversal.Log.get("6767676767676767");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::PixReversal::Log.get("6767676767676767")

puts log
  

Elixir

log = StarkInfra.PixReversal.Log.get!("6767676767676767")

IO.inspect(log)
  

C#

using StarkInfra;

PixReversal.Log log = PixReversal.Log.Get("6767676767676767");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    PixReversalLog "github.com/starkinfra/sdk-go/starkinfra/pixreversal/log"
)

log, err := PixReversalLog.Get("6767676767676767", nil)

fmt.Println(log)
  

Clojure

(def log
    (starkinfra.pix-reversal.log/get "6767676767676767"))

(println log)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-reversal/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    type="success",
    reversal=PixReversal(
        id="5656565656565656",
        amount=1000,
        external_id="my-reversal-id-1",
        end_to_end_id="E20018183202201060100rq1feOMJqtZ",
        return_id="D20018183202202030109X3OoBHG74wo",
        reason="fraud",
        status="success",
        flow="out",
        fee=0,
        description="reversing a fraudulent transfer",
        tags=["pix"],
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    ),
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "success",
    reversal: {
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-reversal-id-1",
        endToEndId: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => success
    [reversal] => PixReversal Object (
        [id] => 5656565656565656
        [amount] => 1000
        [externalId] => my-reversal-id-1
        [endToEndId] => E20018183202201060100rq1feOMJqtZ
        [reason] => fraud
        [status] => success
        [flow] => out
        [tags] => Array ( [0] => pix )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=success,
    reversal=PixReversal(
        id=5656565656565656,
        amount=1000,
        externalId=my-reversal-id-1,
        endToEndId=E20018183202201060100rq1feOMJqtZ,
        reason=fraud,
        status=success,
        flow=out,
        tags=[pix],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "success",
    reversal: {
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-reversal-id-1",
        end_to_end_id: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixReversal.Log{
    id: "6767676767676767",
    type: "success",
    reversal: %StarkInfra.PixReversal{
        id: "5656565656565656",
        amount: 1000,
        external_id: "my-reversal-id-1",
        end_to_end_id: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "success",
        flow: "out",
        tags: ["pix"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixReversal.Log(
    id: "6767676767676767",
    type: "success",
    reversal: PixReversal(
        id: "5656565656565656",
        amount: 1000,
        externalId: "my-reversal-id-1",
        endToEndId: "E20018183202201060100rq1feOMJqtZ",
        reason: "fraud",
        status: "success",
        flow: "out",
        tags: [ "pix" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "success",
    Reversal: {
        Id: "5656565656565656",
        Amount: 1000,
        ExternalId: "my-reversal-id-1",
        EndToEndId: "E20018183202201060100rq1feOMJqtZ",
        Reason: "fraud",
        Status: "success",
        Flow: "out",
        Tags: ["pix"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "success"
 :reversal {:id "5656565656565656"
            :amount 1000
            :external-id "my-reversal-id-1"
            :end-to-end-id "E20018183202201060100rq1feOMJqtZ"
            :reason "fraud"
            :status "success"
            :flow "out"
            :tags ["pix"]
            :created "2022-01-01T00:00:00+00:00"
            :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "success",
        "reversal": {
            "id": "5656565656565656",
            "amount": 1000,
            "externalId": "my-reversal-id-1",
            "endToEndId": "E20018183202201060100rq1feOMJqtZ",
            "reason": "fraud",
            "status": "success",
            "flow": "out",
            "tags": ["pix"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        },
        "created": "2022-01-01T00:01:00+00:00"
    }
}
  

Pix Internal Transaction Report

A Pix Internal Transaction Report lets Direct and Indirect participants report transactions that were settled internally on the participant, such as transfers between two Indirect participants of the same Direct participant or between accounts of the same participant.

Here we will show you how to create and manage them.

The Pix Internal Transaction Report Status

After creation, you can use asynchronous Webhooks to monitor status changes. A Pix Internal Transaction Report follows the life cycle below:

pix-internal-transaction-report-status

StatusDescription
CreatedThe Pix internal transaction report was registered at Stark Infra.
ProcessingThe Pix internal transaction report was sent to Bacen and is awaiting a response.
SuccessThe Pix internal transaction report was accepted by Bacen.
FailedThe Pix internal transaction report was rejected by Bacen.

The Pix Internal Transaction Report Logs

Every time we change a Pix Internal Transaction Report, we create a Log. Logs are useful for understanding the life cycle of each report. Whenever a new Log is created, we fire a Webhook to your registered URL. Check the diagram below to understand the possible Pix Internal Transaction Report Logs:

pix-internal-transaction-report-log

Log typeStatusDescription
CreatedCreatedThe Pix internal transaction report was registered and queued to be sent.
SentProcessingThe Pix internal transaction report was sent to Bacen.
SuccessSuccessThe Pix internal transaction report was accepted by Bacen.
FailedFailedThe Pix internal transaction report was rejected by Bacen.

The Pix Internal Transaction Report Object

Attributes

id STRING

Unique id for the Pix internal transaction report.

referenceType STRING

Origin of the report's reference id. Options: "request" (derived from endToEndId), "reversal" (derived from returnId).

amount INTEGER

Transaction amount in cents. Example: 100 (R$1.00).

endToEndId STRING

End-to-end id of the reported Pix transaction.

returnId STRING

Return id of the reported transaction. Present when referenceType is "reversal".

method STRING

Type of the reported transaction. Options: "manual", "dict", "initiator", "dynamicQrcode", "staticQrcode", "payerQrcode", "subscription", "contactless", "staticContactless".

senderBankCode STRING

Bank ISPB code of the sender.

senderBranchCode STRING

Branch code of the sender's bank account.

senderAccountNumber STRING

Account number of the sender.

senderAccountType STRING

Account type of the sender. Options: "checking", "savings", "salary", "payment", "other".

senderTaxId STRING

CPF or CNPJ of the sender.

receiverBankCode STRING

Bank ISPB code of the receiver.

receiverBranchCode STRING

Branch code of the receiver's bank account.

receiverAccountNumber STRING

Account number of the receiver.

receiverAccountType STRING

Account type of the receiver. Options: "checking", "savings", "salary", "payment", "other".

receiverTaxId STRING

CPF or CNPJ of the receiver.

receiverKeyId STRING

Pix key of the receiver, when the transaction used one.

status STRING

Current status of the report. Options: "created", "processing", "success", "failed".

created STRING

Datetime of the original transaction, supplied at creation. Example: "2020-04-23T23:00:00.000000+00:00".

updated STRING

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

Create Pix Internal Transaction Reports

Report transactions that were settled internally on the participant, such as transfers between two Indirect participants of the same Direct participant or between accounts of the same participant.

You can create up to 100 reports in a single request.

Parameters

referenceType REQUIRED

Origin of the report's reference id. Options: "request" (use with endToEndId), "reversal" (use with returnId).

amount REQUIRED

Transaction amount in cents. Example: 100 (R$1.00).

endToEndId REQUIRED

End-to-end id of the reported Pix transaction.

method REQUIRED

Type of the reported transaction. Options: "manual", "dict", "initiator", "dynamicQrcode", "staticQrcode", "payerQrcode", "subscription", "contactless", "staticContactless".

created REQUIRED

Datetime of the original transaction.

senderBankCode REQUIRED

Bank ISPB code of the sender.

senderBranchCode REQUIRED

Branch code of the sender's bank account.

senderAccountNumber REQUIRED

Account number of the sender.

senderAccountType REQUIRED

Account type of the sender. Options: "checking", "savings", "salary", "payment", "other".

senderTaxId REQUIRED

CPF or CNPJ of the sender.

receiverBankCode REQUIRED

Bank ISPB code of the receiver.

receiverBranchCode REQUIRED

Branch code of the receiver's bank account.

receiverAccountNumber REQUIRED

Account number of the receiver.

receiverAccountType REQUIRED

Account type of the receiver. Options: "checking", "savings", "salary", "payment", "other".

receiverTaxId REQUIRED

CPF or CNPJ of the receiver.

returnId OPTIONAL

Return id of the reported transaction. Required when referenceType is "reversal".

receiverKeyId OPTIONAL

Pix key of the receiver, when the transaction used one.

ENDPOINT
POST /v2/pix-internal-transaction-report
REQUEST

Python

import starkinfra

reports = starkinfra.pixinternaltransactionreport.create([
    starkinfra.PixInternalTransactionReport(
        reference_type="request",
        amount=1000,
        end_to_end_id="E20018183202201011000r01",
        method="manual",
        created="2022-01-01T00:00:00+00:00",
        sender_bank_code="34052649",
        sender_branch_code="0001",
        sender_account_number="00000-0",
        sender_account_type="checking",
        sender_tax_id="012.345.678-90",
        receiver_bank_code="20018183",
        receiver_branch_code="0001",
        receiver_account_number="10000-0",
        receiver_account_type="checking",
        receiver_tax_id="20.018.183/0001-80",
        receiver_key_id="20.018.183/0001-80"
    )
])

for report in reports:
    print(report)
  

Javascript

const starkinfra = require('starkinfra')

const reports = await starkinfra.pixInternalTransactionReport.create([
    {
        referenceType: "request",
        amount: 1000,
        endToEndId: "E20018183202201011000r01",
        method: "manual",
        created: "2022-01-01T00:00:00+00:00",
        senderBankCode: "34052649",
        senderBranchCode: "0001",
        senderAccountNumber: "00000-0",
        senderAccountType: "checking",
        senderTaxId: "012.345.678-90",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverTaxId: "20.018.183/0001-80",
        receiverKeyId: "20.018.183/0001-80"
    }
])

for (const report of reports) {
    console.log(report)
}
  

PHP

 "request",
        "amount" => 1000,
        "endToEndId" => "E20018183202201011000r01",
        "method" => "manual",
        "created" => "2022-01-01T00:00:00+00:00",
        "senderBankCode" => "34052649",
        "senderBranchCode" => "0001",
        "senderAccountNumber" => "00000-0",
        "senderAccountType" => "checking",
        "senderTaxId" => "012.345.678-90",
        "receiverBankCode" => "20018183",
        "receiverBranchCode" => "0001",
        "receiverAccountNumber" => "10000-0",
        "receiverAccountType" => "checking",
        "receiverTaxId" => "20.018.183/0001-80",
        "receiverKeyId" => "20.018.183/0001-80"
    ])
]);

foreach ($reports as $report) {
    print_r($report);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;

List reports = PixInternalTransactionReport.create(
    Arrays.asList(
        new PixInternalTransactionReport.Builder()
            .referenceType("request")
            .amount(1000L)
            .endToEndId("E20018183202201011000r01")
            .method("manual")
            .created("2022-01-01T00:00:00+00:00")
            .senderBankCode("34052649")
            .senderBranchCode("0001")
            .senderAccountNumber("00000-0")
            .senderAccountType("checking")
            .senderTaxId("012.345.678-90")
            .receiverBankCode("20018183")
            .receiverBranchCode("0001")
            .receiverAccountNumber("10000-0")
            .receiverAccountType("checking")
            .receiverTaxId("20.018.183/0001-80")
            .receiverKeyId("20.018.183/0001-80")
            .build()
    )
);

for (PixInternalTransactionReport report : reports) {
    System.out.println(report);
}
  

Ruby

require('starkinfra')

reports = StarkInfra::PixInternalTransactionReport.create([
    StarkInfra::PixInternalTransactionReport.new(
        reference_type: "request",
        amount: 1000,
        end_to_end_id: "E20018183202201011000r01",
        method: "manual",
        created: "2022-01-01T00:00:00+00:00",
        sender_bank_code: "34052649",
        sender_branch_code: "0001",
        sender_account_number: "00000-0",
        sender_account_type: "checking",
        sender_tax_id: "012.345.678-90",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_tax_id: "20.018.183/0001-80",
        receiver_key_id: "20.018.183/0001-80"
    )
])

reports.each do |report|
    puts report
end
  

Elixir

reports = StarkInfra.PixInternalTransactionReport.create!([
    %StarkInfra.PixInternalTransactionReport{
        reference_type: "request",
        amount: 1000,
        end_to_end_id: "E20018183202201011000r01",
        method: "manual",
        created: "2022-01-01T00:00:00+00:00",
        sender_bank_code: "34052649",
        sender_branch_code: "0001",
        sender_account_number: "00000-0",
        sender_account_type: "checking",
        sender_tax_id: "012.345.678-90",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_tax_id: "20.018.183/0001-80",
        receiver_key_id: "20.018.183/0001-80"
    }
])

for report <- reports do
    IO.inspect(report)
end
  

C#

using StarkInfra;
using System.Collections.Generic;

List reports = PixInternalTransactionReport.Create(
    new List {
        new PixInternalTransactionReport(
            referenceType: "request",
            amount: 1000,
            endToEndId: "E20018183202201011000r01",
            method: "manual",
            created: "2022-01-01T00:00:00+00:00",
            senderBankCode: "34052649",
            senderBranchCode: "0001",
            senderAccountNumber: "00000-0",
            senderAccountType: "checking",
            senderTaxId: "012.345.678-90",
            receiverBankCode: "20018183",
            receiverBranchCode: "0001",
            receiverAccountNumber: "10000-0",
            receiverAccountType: "checking",
            receiverTaxId: "20.018.183/0001-80",
            receiverKeyId: "20.018.183/0001-80"
        )
    }
);

foreach (PixInternalTransactionReport report in reports) {
    Console.WriteLine(report);
}
  

Go

package main

import (
    "fmt"
    PixInternalTransactionReport "github.com/starkinfra/sdk-go/starkinfra/pixinternaltransactionreport"
)

reports, err := PixInternalTransactionReport.Create(
    []PixInternalTransactionReport.PixInternalTransactionReport{
        {
            ReferenceType:         "request",
            Amount:                1000,
            EndToEndId:            "E20018183202201011000r01",
            Method:                "manual",
            Created:               "2022-01-01T00:00:00+00:00",
            SenderBankCode:        "34052649",
            SenderBranchCode:      "0001",
            SenderAccountNumber:   "00000-0",
            SenderAccountType:     "checking",
            SenderTaxId:           "012.345.678-90",
            ReceiverBankCode:      "20018183",
            ReceiverBranchCode:    "0001",
            ReceiverAccountNumber: "10000-0",
            ReceiverAccountType:   "checking",
            ReceiverTaxId:         "20.018.183/0001-80",
            ReceiverKeyId:         "20.018.183/0001-80",
        },
    }, nil)

for _, report := range reports {
    fmt.Println(report)
}
  

Clojure

(def reports
    (starkinfra.pix-internal-transaction-report/create
        [{:reference-type "request"
          :amount 1000
          :end-to-end-id "E20018183202201011000r01"
          :method "manual"
          :created "2022-01-01T00:00:00+00:00"
          :sender-bank-code "34052649"
          :sender-branch-code "0001"
          :sender-account-number "00000-0"
          :sender-account-type "checking"
          :sender-tax-id "012.345.678-90"
          :receiver-bank-code "20018183"
          :receiver-branch-code "0001"
          :receiver-account-number "10000-0"
          :receiver-account-type "checking"
          :receiver-tax-id "20.018.183/0001-80"
          :receiver-key-id "20.018.183/0001-80"}]))

(doseq [report reports]
    (println report))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-internal-transaction-report' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reports": [
        {
            "referenceType": "request",
            "amount": 1000,
            "endToEndId": "E20018183202201011000r01",
            "method": "manual",
            "created": "2022-01-01T00:00:00+00:00",
            "senderBankCode": "34052649",
            "senderBranchCode": "0001",
            "senderAccountNumber": "00000-0",
            "senderAccountType": "checking",
            "senderTaxId": "012.345.678-90",
            "receiverBankCode": "20018183",
            "receiverBranchCode": "0001",
            "receiverAccountNumber": "10000-0",
            "receiverAccountType": "checking",
            "receiverTaxId": "20.018.183/0001-80",
            "receiverKeyId": "20.018.183/0001-80"
        }
    ]
}'
  
RESPONSE

Python

[
    PixInternalTransactionReport(
        id="5656565656565656",
        reference_type="request",
        amount=1000,
        end_to_end_id="E20018183202201011000r01",
        return_id="",
        method="manual",
        sender_bank_code="34052649",
        sender_branch_code="0001",
        sender_account_number="00000-0",
        sender_account_type="checking",
        sender_tax_id="012.345.678-90",
        receiver_bank_code="20018183",
        receiver_branch_code="0001",
        receiver_account_number="10000-0",
        receiver_account_type="checking",
        receiver_tax_id="20.018.183/0001-80",
        receiver_key_id="20.018.183/0001-80",
        status="created",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5656565656565656",
        referenceType: "request",
        amount: 1000,
        endToEndId: "E20018183202201011000r01",
        method: "manual",
        senderBankCode: "34052649",
        senderBranchCode: "0001",
        senderAccountNumber: "00000-0",
        senderAccountType: "checking",
        senderTaxId: "012.345.678-90",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverTaxId: "20.018.183/0001-80",
        receiverKeyId: "20.018.183/0001-80",
        status: "created",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

PHP

[
    PixInternalTransactionReport Object (
        [id] => 5656565656565656
        [referenceType] => request
        [amount] => 1000
        [endToEndId] => E20018183202201011000r01
        [method] => manual
        [senderBankCode] => 34052649
        [senderBranchCode] => 0001
        [senderAccountNumber] => 00000-0
        [senderAccountType] => checking
        [senderTaxId] => 012.345.678-90
        [receiverBankCode] => 20018183
        [receiverBranchCode] => 0001
        [receiverAccountNumber] => 10000-0
        [receiverAccountType] => checking
        [receiverTaxId] => 20.018.183/0001-80
        [receiverKeyId] => 20.018.183/0001-80
        [status] => created
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
]
  

Java

[
    PixInternalTransactionReport(
        id=5656565656565656,
        referenceType=request,
        amount=1000,
        endToEndId=E20018183202201011000r01,
        method=manual,
        senderBankCode=34052649,
        senderBranchCode=0001,
        senderAccountNumber=00000-0,
        senderAccountType=checking,
        senderTaxId=012.345.678-90,
        receiverBankCode=20018183,
        receiverBranchCode=0001,
        receiverAccountNumber=10000-0,
        receiverAccountType=checking,
        receiverTaxId=20.018.183/0001-80,
        receiverKeyId=20.018.183/0001-80,
        status=created,
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    )
]
  

Ruby

[
    starkinfra_pix_internal_transaction_report: {
        id: "5656565656565656",
        reference_type: "request",
        amount: 1000,
        end_to_end_id: "E20018183202201011000r01",
        method: "manual",
        sender_bank_code: "34052649",
        sender_branch_code: "0001",
        sender_account_number: "00000-0",
        sender_account_type: "checking",
        sender_tax_id: "012.345.678-90",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_tax_id: "20.018.183/0001-80",
        receiver_key_id: "20.018.183/0001-80",
        status: "created",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Elixir

[
    %StarkInfra.PixInternalTransactionReport{
        id: "5656565656565656",
        reference_type: "request",
        amount: 1000,
        end_to_end_id: "E20018183202201011000r01",
        method: "manual",
        sender_bank_code: "34052649",
        sender_branch_code: "0001",
        sender_account_number: "00000-0",
        sender_account_type: "checking",
        sender_tax_id: "012.345.678-90",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_tax_id: "20.018.183/0001-80",
        receiver_key_id: "20.018.183/0001-80",
        status: "created",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

C#

[
    PixInternalTransactionReport(
        id: "5656565656565656",
        referenceType: "request",
        amount: 1000,
        endToEndId: "E20018183202201011000r01",
        method: "manual",
        senderBankCode: "34052649",
        senderBranchCode: "0001",
        senderAccountNumber: "00000-0",
        senderAccountType: "checking",
        senderTaxId: "012.345.678-90",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverTaxId: "20.018.183/0001-80",
        receiverKeyId: "20.018.183/0001-80",
        status: "created",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    )
]
  

Go

[
    {
        Id: "5656565656565656",
        ReferenceType: "request",
        Amount: 1000,
        EndToEndId: "E20018183202201011000r01",
        Method: "manual",
        SenderBankCode: "34052649",
        SenderBranchCode: "0001",
        SenderAccountNumber: "00000-0",
        SenderAccountType: "checking",
        SenderTaxId: "012.345.678-90",
        ReceiverBankCode: "20018183",
        ReceiverBranchCode: "0001",
        ReceiverAccountNumber: "10000-0",
        ReceiverAccountType: "checking",
        ReceiverTaxId: "20.018.183/0001-80",
        ReceiverKeyId: "20.018.183/0001-80",
        Status: "created",
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Clojure

[
    {:id "5656565656565656"
     :reference-type "request"
     :amount 1000
     :end-to-end-id "E20018183202201011000r01"
     :method "manual"
     :sender-bank-code "34052649"
     :sender-branch-code "0001"
     :sender-account-number "00000-0"
     :sender-account-type "checking"
     :sender-tax-id "012.345.678-90"
     :receiver-bank-code "20018183"
     :receiver-branch-code "0001"
     :receiver-account-number "10000-0"
     :receiver-account-type "checking"
     :receiver-tax-id "20.018.183/0001-80"
     :receiver-key-id "20.018.183/0001-80"
     :status "created"
     :created "2022-01-01T00:00:00+00:00"
     :updated "2022-01-01T00:00:00+00:00"}
]
  

Curl

{
    "reports": [
        {
            "id": "5656565656565656",
            "referenceType": "request",
            "amount": 1000,
            "endToEndId": "E20018183202201011000r01",
            "method": "manual",
            "senderBankCode": "34052649",
            "senderBranchCode": "0001",
            "senderAccountNumber": "00000-0",
            "senderAccountType": "checking",
            "senderTaxId": "012.345.678-90",
            "receiverBankCode": "20018183",
            "receiverBranchCode": "0001",
            "receiverAccountNumber": "10000-0",
            "receiverAccountType": "checking",
            "receiverTaxId": "20.018.183/0001-80",
            "receiverKeyId": "20.018.183/0001-80",
            "status": "created",
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

List Pix Internal Transaction Reports

List and filter all Pix internal transaction reports. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

ids OPTIONAL

List of ids to get specific entities. Max = 100.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter by status. Options: "created", "processing", "success", "failed".

referenceIds OPTIONAL

Filter by reference ids (endToEndId or returnId). Max = 30.

referenceTypes OPTIONAL

Filter by reference types. Options: "request", "reversal". Max = 30.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-internal-transaction-report
REQUEST

Python

import starkinfra

reports = starkinfra.pixinternaltransactionreport.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    status=["success"],
    ids=["5656565656565656"]
)

for report in reports:
    print(report)
  

Javascript

const starkinfra = require('starkinfra')

const reports = await starkinfra.pixInternalTransactionReport.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "success",
    ids: ["5656565656565656"]
})

for await (const report of reports) {
    console.log(report)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "status" => "success",
    "ids" => ["5656565656565656"]
]);

foreach ($reports as $report) {
    print_r($report);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("status", "success");

Generator reports = PixInternalTransactionReport.query(params);

for (PixInternalTransactionReport report : reports) {
    System.out.println(report);
}
  

Ruby

require('starkinfra')

reports = StarkInfra::PixInternalTransactionReport.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "success",
    ids: ["5656565656565656"]
)

reports.each do |report|
    puts report
end
  

Elixir

reports = StarkInfra.PixInternalTransactionReport.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "success",
    ids: ["5656565656565656"]
)

for report <- reports do
    IO.inspect(report)
end
  

C#

using StarkInfra;

IEnumerable reports = PixInternalTransactionReport.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    status: "success",
    ids: new List { "5656565656565656" }
);

foreach (PixInternalTransactionReport report in reports) {
    Console.WriteLine(report);
}
  

Go

package main

import (
    "fmt"
    PixInternalTransactionReport "github.com/starkinfra/sdk-go/starkinfra/pixinternaltransactionreport"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
    "status": "success",
}

reports := PixInternalTransactionReport.Query(params, nil)

for report := range reports {
    fmt.Println(report)
}
  

Clojure

(def reports
    (starkinfra.pix-internal-transaction-report/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :status "success"
        :ids ["5656565656565656"]
    }))

(doseq [report reports]
    (println report))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-internal-transaction-report?limit=10&after=2022-01-01&before=2022-12-31&status=success' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python



PixInternalTransactionReport(
    id="5656565656565656",
    reference_type="request",
    amount=1000,
    end_to_end_id="E20018183202201011000r01",
    method="manual",
    status="success",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    referenceType: "request",
    amount: 1000,
    endToEndId: "E20018183202201011000r01",
    method: "manual",
    status: "success",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixInternalTransactionReport Object (
    [id] => 5656565656565656
    [referenceType] => request
    [amount] => 1000
    [endToEndId] => E20018183202201011000r01
    [method] => manual
    [status] => success
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixInternalTransactionReport(
    id=5656565656565656,
    referenceType=request,
    amount=1000,
    endToEndId=E20018183202201011000r01,
    method=manual,
    status=success,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    reference_type: "request",
    amount: 1000,
    end_to_end_id: "E20018183202201011000r01",
    method: "manual",
    status: "success",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixInternalTransactionReport{
    id: "5656565656565656",
    reference_type: "request",
    amount: 1000,
    end_to_end_id: "E20018183202201011000r01",
    method: "manual",
    status: "success",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixInternalTransactionReport(
    id: "5656565656565656",
    referenceType: "request",
    amount: 1000,
    endToEndId: "E20018183202201011000r01",
    method: "manual",
    status: "success",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    ReferenceType: "request",
    Amount: 1000,
    EndToEndId: "E20018183202201011000r01",
    Method: "manual",
    Status: "success",
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :reference-type "request"
 :amount 1000
 :end-to-end-id "E20018183202201011000r01"
 :method "manual"
 :status "success"
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "cursor": null,
    "reports": [
        {
            "id": "5656565656565656",
            "referenceType": "request",
            "amount": 1000,
            "endToEndId": "E20018183202201011000r01",
            "method": "manual",
            "status": "success",
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

Get a Pix Internal Transaction Report

Get a single Pix internal transaction report by its id.

Parameters

id REQUIRED

Id of the Pix internal transaction report entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-internal-transaction-report/:id
REQUEST

Python

import starkinfra

report = starkinfra.pixinternaltransactionreport.get("5656565656565656")

print(report)
  

Javascript

const starkinfra = require('starkinfra')

const report = await starkinfra.pixInternalTransactionReport.get("5656565656565656")

console.log(report)
  

PHP

Java

import com.starkinfra.*;

PixInternalTransactionReport report = PixInternalTransactionReport.get("5656565656565656");

System.out.println(report);
  

Ruby

require('starkinfra')

report = StarkInfra::PixInternalTransactionReport.get("5656565656565656")

puts report
  

Elixir

report = StarkInfra.PixInternalTransactionReport.get!("5656565656565656")

IO.inspect(report)
  

C#

using StarkInfra;

PixInternalTransactionReport report = PixInternalTransactionReport.Get("5656565656565656");

Console.WriteLine(report);
  

Go

package main

import (
    "fmt"
    PixInternalTransactionReport "github.com/starkinfra/sdk-go/starkinfra/pixinternaltransactionreport"
)

report, err := PixInternalTransactionReport.Get("5656565656565656", nil)

fmt.Println(report)
  

Clojure

(def report
    (starkinfra.pix-internal-transaction-report/get "5656565656565656"))

(println report)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-internal-transaction-report/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixInternalTransactionReport(
    id="5656565656565656",
    reference_type="request",
    amount=1000,
    end_to_end_id="E20018183202201011000r01",
    return_id="",
    method="manual",
    sender_bank_code="34052649",
    sender_branch_code="0001",
    sender_account_number="00000-0",
    sender_account_type="checking",
    sender_tax_id="012.345.678-90",
    receiver_bank_code="20018183",
    receiver_branch_code="0001",
    receiver_account_number="10000-0",
    receiver_account_type="checking",
    receiver_tax_id="20.018.183/0001-80",
    receiver_key_id="20.018.183/0001-80",
    status="success",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    referenceType: "request",
    amount: 1000,
    endToEndId: "E20018183202201011000r01",
    method: "manual",
    senderBankCode: "34052649",
    senderBranchCode: "0001",
    senderAccountNumber: "00000-0",
    senderAccountType: "checking",
    senderTaxId: "012.345.678-90",
    receiverBankCode: "20018183",
    receiverBranchCode: "0001",
    receiverAccountNumber: "10000-0",
    receiverAccountType: "checking",
    receiverTaxId: "20.018.183/0001-80",
    receiverKeyId: "20.018.183/0001-80",
    status: "success",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixInternalTransactionReport Object (
    [id] => 5656565656565656
    [referenceType] => request
    [amount] => 1000
    [endToEndId] => E20018183202201011000r01
    [method] => manual
    [senderBankCode] => 34052649
    [senderBranchCode] => 0001
    [senderAccountNumber] => 00000-0
    [senderAccountType] => checking
    [senderTaxId] => 012.345.678-90
    [receiverBankCode] => 20018183
    [receiverBranchCode] => 0001
    [receiverAccountNumber] => 10000-0
    [receiverAccountType] => checking
    [receiverTaxId] => 20.018.183/0001-80
    [receiverKeyId] => 20.018.183/0001-80
    [status] => success
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixInternalTransactionReport(
    id=5656565656565656,
    referenceType=request,
    amount=1000,
    endToEndId=E20018183202201011000r01,
    method=manual,
    senderBankCode=34052649,
    senderBranchCode=0001,
    senderAccountNumber=00000-0,
    senderAccountType=checking,
    senderTaxId=012.345.678-90,
    receiverBankCode=20018183,
    receiverBranchCode=0001,
    receiverAccountNumber=10000-0,
    receiverAccountType=checking,
    receiverTaxId=20.018.183/0001-80,
    receiverKeyId=20.018.183/0001-80,
    status=success,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    reference_type: "request",
    amount: 1000,
    end_to_end_id: "E20018183202201011000r01",
    method: "manual",
    sender_bank_code: "34052649",
    sender_branch_code: "0001",
    sender_account_number: "00000-0",
    sender_account_type: "checking",
    sender_tax_id: "012.345.678-90",
    receiver_bank_code: "20018183",
    receiver_branch_code: "0001",
    receiver_account_number: "10000-0",
    receiver_account_type: "checking",
    receiver_tax_id: "20.018.183/0001-80",
    receiver_key_id: "20.018.183/0001-80",
    status: "success",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixInternalTransactionReport{
    id: "5656565656565656",
    reference_type: "request",
    amount: 1000,
    end_to_end_id: "E20018183202201011000r01",
    method: "manual",
    sender_bank_code: "34052649",
    sender_branch_code: "0001",
    sender_account_number: "00000-0",
    sender_account_type: "checking",
    sender_tax_id: "012.345.678-90",
    receiver_bank_code: "20018183",
    receiver_branch_code: "0001",
    receiver_account_number: "10000-0",
    receiver_account_type: "checking",
    receiver_tax_id: "20.018.183/0001-80",
    receiver_key_id: "20.018.183/0001-80",
    status: "success",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixInternalTransactionReport(
    id: "5656565656565656",
    referenceType: "request",
    amount: 1000,
    endToEndId: "E20018183202201011000r01",
    method: "manual",
    senderBankCode: "34052649",
    senderBranchCode: "0001",
    senderAccountNumber: "00000-0",
    senderAccountType: "checking",
    senderTaxId: "012.345.678-90",
    receiverBankCode: "20018183",
    receiverBranchCode: "0001",
    receiverAccountNumber: "10000-0",
    receiverAccountType: "checking",
    receiverTaxId: "20.018.183/0001-80",
    receiverKeyId: "20.018.183/0001-80",
    status: "success",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    ReferenceType: "request",
    Amount: 1000,
    EndToEndId: "E20018183202201011000r01",
    Method: "manual",
    SenderBankCode: "34052649",
    SenderBranchCode: "0001",
    SenderAccountNumber: "00000-0",
    SenderAccountType: "checking",
    SenderTaxId: "012.345.678-90",
    ReceiverBankCode: "20018183",
    ReceiverBranchCode: "0001",
    ReceiverAccountNumber: "10000-0",
    ReceiverAccountType: "checking",
    ReceiverTaxId: "20.018.183/0001-80",
    ReceiverKeyId: "20.018.183/0001-80",
    Status: "success",
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :reference-type "request"
 :amount 1000
 :end-to-end-id "E20018183202201011000r01"
 :method "manual"
 :sender-bank-code "34052649"
 :sender-branch-code "0001"
 :sender-account-number "00000-0"
 :sender-account-type "checking"
 :sender-tax-id "012.345.678-90"
 :receiver-bank-code "20018183"
 :receiver-branch-code "0001"
 :receiver-account-number "10000-0"
 :receiver-account-type "checking"
 :receiver-tax-id "20.018.183/0001-80"
 :receiver-key-id "20.018.183/0001-80"
 :status "success"
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "report": {
        "id": "5656565656565656",
        "referenceType": "request",
        "amount": 1000,
        "endToEndId": "E20018183202201011000r01",
        "method": "manual",
        "senderBankCode": "34052649",
        "senderBranchCode": "0001",
        "senderAccountNumber": "00000-0",
        "senderAccountType": "checking",
        "senderTaxId": "012.345.678-90",
        "receiverBankCode": "20018183",
        "receiverBranchCode": "0001",
        "receiverAccountNumber": "10000-0",
        "receiverAccountType": "checking",
        "receiverTaxId": "20.018.183/0001-80",
        "receiverKeyId": "20.018.183/0001-80",
        "status": "success",
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

List Pix Internal Transaction Report Logs

Get a paged list of all Pix internal transaction report logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

ids OPTIONAL

Filter by log ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

types OPTIONAL

Filter logs by log types. Options: "created", "sent", "success", "failed".

reportIds OPTIONAL

Filter logs by Pix internal transaction report ids.

ENDPOINT
GET /v2/pix-internal-transaction-report/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixinternaltransactionreport.log.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    types=["success"],
    report_ids=["5656565656565656"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.pixInternalTransactionReport.log.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["success"]
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "types" => ["success"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");

Generator logs = PixInternalTransactionReport.Log.query(params);

for (PixInternalTransactionReport.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::PixInternalTransactionReport::Log.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["success"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.PixInternalTransactionReport.Log.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["success"]
)

for log <- logs do
    IO.inspect(log)
end
  

C#

using StarkInfra;

IEnumerable logs = PixInternalTransactionReport.Log.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    types: new List { "success" }
);

foreach (PixInternalTransactionReport.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    PixInternalTransactionReportLog "github.com/starkinfra/sdk-go/starkinfra/pixinternaltransactionreport/log"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
}

logs := PixInternalTransactionReportLog.Query(params, nil)

for log := range logs {
    fmt.Println(log)
}
  

Clojure

(def logs
    (starkinfra.pix-internal-transaction-report.log/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :types ["success"]
    }))

(doseq [log logs]
    (println log))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-internal-transaction-report/log?limit=10&after=2022-01-01&before=2022-12-31&types=success' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    type="success",
    errors=[],
    report=PixInternalTransactionReport(
        id="5656565656565656",
        reference_type="request",
        amount=1000,
        end_to_end_id="E20018183202201011000r01",
        return_id="",
        method="manual",
        sender_bank_code="34052649",
        sender_branch_code="0001",
        sender_account_number="00000-0",
        sender_account_type="checking",
        sender_tax_id="012.345.678-90",
        receiver_bank_code="20018183",
        receiver_branch_code="0001",
        receiver_account_number="10000-0",
        receiver_account_type="checking",
        receiver_tax_id="20.018.183/0001-80",
        receiver_key_id="20.018.183/0001-80",
        status="success",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    ),
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "success",
    report: {
        id: "5656565656565656",
        referenceType: "request",
        amount: 1000,
        endToEndId: "E20018183202201011000r01",
        method: "manual",
        senderBankCode: "34052649",
        senderBranchCode: "0001",
        senderAccountNumber: "00000-0",
        senderAccountType: "checking",
        senderTaxId: "012.345.678-90",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverTaxId: "20.018.183/0001-80",
        receiverKeyId: "20.018.183/0001-80",
        status: "success",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => success
    [report] => PixInternalTransactionReport Object (
        [id] => 5656565656565656
        [referenceType] => request
        [amount] => 1000
        [endToEndId] => E20018183202201011000r01
        [method] => manual
        [senderBankCode] => 34052649
        [senderBranchCode] => 0001
        [senderAccountNumber] => 00000-0
        [senderAccountType] => checking
        [senderTaxId] => 012.345.678-90
        [receiverBankCode] => 20018183
        [receiverBranchCode] => 0001
        [receiverAccountNumber] => 10000-0
        [receiverAccountType] => checking
        [receiverTaxId] => 20.018.183/0001-80
        [receiverKeyId] => 20.018.183/0001-80
        [status] => success
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=success,
    report=PixInternalTransactionReport(
        id=5656565656565656,
        referenceType=request,
        amount=1000,
        endToEndId=E20018183202201011000r01,
        method=manual,
        senderBankCode=34052649,
        senderBranchCode=0001,
        senderAccountNumber=00000-0,
        senderAccountType=checking,
        senderTaxId=012.345.678-90,
        receiverBankCode=20018183,
        receiverBranchCode=0001,
        receiverAccountNumber=10000-0,
        receiverAccountType=checking,
        receiverTaxId=20.018.183/0001-80,
        receiverKeyId=20.018.183/0001-80,
        status=success,
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "success",
    report: {
        id: "5656565656565656",
        reference_type: "request",
        amount: 1000,
        end_to_end_id: "E20018183202201011000r01",
        method: "manual",
        sender_bank_code: "34052649",
        sender_branch_code: "0001",
        sender_account_number: "00000-0",
        sender_account_type: "checking",
        sender_tax_id: "012.345.678-90",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_tax_id: "20.018.183/0001-80",
        receiver_key_id: "20.018.183/0001-80",
        status: "success",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixInternalTransactionReport.Log{
    id: "6767676767676767",
    type: "success",
    report: %StarkInfra.PixInternalTransactionReport{
        id: "5656565656565656",
        reference_type: "request",
        amount: 1000,
        end_to_end_id: "E20018183202201011000r01",
        method: "manual",
        sender_bank_code: "34052649",
        sender_branch_code: "0001",
        sender_account_number: "00000-0",
        sender_account_type: "checking",
        sender_tax_id: "012.345.678-90",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_tax_id: "20.018.183/0001-80",
        receiver_key_id: "20.018.183/0001-80",
        status: "success",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixInternalTransactionReport.Log(
    id: "6767676767676767",
    type: "success",
    report: PixInternalTransactionReport(
        id: "5656565656565656",
        referenceType: "request",
        amount: 1000,
        endToEndId: "E20018183202201011000r01",
        method: "manual",
        senderBankCode: "34052649",
        senderBranchCode: "0001",
        senderAccountNumber: "00000-0",
        senderAccountType: "checking",
        senderTaxId: "012.345.678-90",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverTaxId: "20.018.183/0001-80",
        receiverKeyId: "20.018.183/0001-80",
        status: "success",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "success",
    Report: {
        Id: "5656565656565656",
        ReferenceType: "request",
        Amount: 1000,
        EndToEndId: "E20018183202201011000r01",
        Method: "manual",
        SenderBankCode: "34052649",
        SenderBranchCode: "0001",
        SenderAccountNumber: "00000-0",
        SenderAccountType: "checking",
        SenderTaxId: "012.345.678-90",
        ReceiverBankCode: "20018183",
        ReceiverBranchCode: "0001",
        ReceiverAccountNumber: "10000-0",
        ReceiverAccountType: "checking",
        ReceiverTaxId: "20.018.183/0001-80",
        ReceiverKeyId: "20.018.183/0001-80",
        Status: "success",
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "success"
 :report {:id "5656565656565656"
          :reference-type "request"
          :amount 1000
          :end-to-end-id "E20018183202201011000r01"
          :method "manual"
          :sender-bank-code "34052649"
          :sender-branch-code "0001"
          :sender-account-number "00000-0"
          :sender-account-type "checking"
          :sender-tax-id "012.345.678-90"
          :receiver-bank-code "20018183"
          :receiver-branch-code "0001"
          :receiver-account-number "10000-0"
          :receiver-account-type "checking"
          :receiver-tax-id "20.018.183/0001-80"
          :receiver-key-id "20.018.183/0001-80"
          :status "success"
          :created "2022-01-01T00:00:00+00:00"
          :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "success",
            "report": {
                "id": "5656565656565656",
                "referenceType": "request",
                "amount": 1000,
                "endToEndId": "E20018183202201011000r01",
                "method": "manual",
                "senderBankCode": "34052649",
                "senderBranchCode": "0001",
                "senderAccountNumber": "00000-0",
                "senderAccountType": "checking",
                "senderTaxId": "012.345.678-90",
                "receiverBankCode": "20018183",
                "receiverBranchCode": "0001",
                "receiverAccountNumber": "10000-0",
                "receiverAccountType": "checking",
                "receiverTaxId": "20.018.183/0001-80",
                "receiverKeyId": "20.018.183/0001-80",
                "status": "success",
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:00:00+00:00"
            },
            "created": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Internal Transaction Report Log

Get a single Pix internal transaction report log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/pix-internal-transaction-report/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixinternaltransactionreport.log.get("6767676767676767")

print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.pixInternalTransactionReport.log.get("6767676767676767")

console.log(log)
  

PHP

Java

import com.starkinfra.*;

PixInternalTransactionReport.Log log = PixInternalTransactionReport.Log.get("6767676767676767");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::PixInternalTransactionReport::Log.get("6767676767676767")

puts log
  

Elixir

log = StarkInfra.PixInternalTransactionReport.Log.get!("6767676767676767")

IO.inspect(log)
  

C#

using StarkInfra;

PixInternalTransactionReport.Log log = PixInternalTransactionReport.Log.Get("6767676767676767");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    PixInternalTransactionReportLog "github.com/starkinfra/sdk-go/starkinfra/pixinternaltransactionreport/log"
)

log, err := PixInternalTransactionReportLog.Get("6767676767676767", nil)

fmt.Println(log)
  

Clojure

(def log
    (starkinfra.pix-internal-transaction-report.log/get "6767676767676767"))

(println log)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-internal-transaction-report/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    type="success",
    errors=[],
    report=PixInternalTransactionReport(
        id="5656565656565656",
        reference_type="request",
        amount=1000,
        end_to_end_id="E20018183202201011000r01",
        return_id="",
        method="manual",
        sender_bank_code="34052649",
        sender_branch_code="0001",
        sender_account_number="00000-0",
        sender_account_type="checking",
        sender_tax_id="012.345.678-90",
        receiver_bank_code="20018183",
        receiver_branch_code="0001",
        receiver_account_number="10000-0",
        receiver_account_type="checking",
        receiver_tax_id="20.018.183/0001-80",
        receiver_key_id="20.018.183/0001-80",
        status="success",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    ),
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "success",
    report: {
        id: "5656565656565656",
        referenceType: "request",
        amount: 1000,
        endToEndId: "E20018183202201011000r01",
        method: "manual",
        senderBankCode: "34052649",
        senderBranchCode: "0001",
        senderAccountNumber: "00000-0",
        senderAccountType: "checking",
        senderTaxId: "012.345.678-90",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverTaxId: "20.018.183/0001-80",
        receiverKeyId: "20.018.183/0001-80",
        status: "success",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => success
    [report] => PixInternalTransactionReport Object (
        [id] => 5656565656565656
        [referenceType] => request
        [amount] => 1000
        [endToEndId] => E20018183202201011000r01
        [method] => manual
        [senderBankCode] => 34052649
        [senderBranchCode] => 0001
        [senderAccountNumber] => 00000-0
        [senderAccountType] => checking
        [senderTaxId] => 012.345.678-90
        [receiverBankCode] => 20018183
        [receiverBranchCode] => 0001
        [receiverAccountNumber] => 10000-0
        [receiverAccountType] => checking
        [receiverTaxId] => 20.018.183/0001-80
        [receiverKeyId] => 20.018.183/0001-80
        [status] => success
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=success,
    report=PixInternalTransactionReport(
        id=5656565656565656,
        referenceType=request,
        amount=1000,
        endToEndId=E20018183202201011000r01,
        method=manual,
        senderBankCode=34052649,
        senderBranchCode=0001,
        senderAccountNumber=00000-0,
        senderAccountType=checking,
        senderTaxId=012.345.678-90,
        receiverBankCode=20018183,
        receiverBranchCode=0001,
        receiverAccountNumber=10000-0,
        receiverAccountType=checking,
        receiverTaxId=20.018.183/0001-80,
        receiverKeyId=20.018.183/0001-80,
        status=success,
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "success",
    report: {
        id: "5656565656565656",
        reference_type: "request",
        amount: 1000,
        end_to_end_id: "E20018183202201011000r01",
        method: "manual",
        sender_bank_code: "34052649",
        sender_branch_code: "0001",
        sender_account_number: "00000-0",
        sender_account_type: "checking",
        sender_tax_id: "012.345.678-90",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_tax_id: "20.018.183/0001-80",
        receiver_key_id: "20.018.183/0001-80",
        status: "success",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixInternalTransactionReport.Log{
    id: "6767676767676767",
    type: "success",
    report: %StarkInfra.PixInternalTransactionReport{
        id: "5656565656565656",
        reference_type: "request",
        amount: 1000,
        end_to_end_id: "E20018183202201011000r01",
        method: "manual",
        sender_bank_code: "34052649",
        sender_branch_code: "0001",
        sender_account_number: "00000-0",
        sender_account_type: "checking",
        sender_tax_id: "012.345.678-90",
        receiver_bank_code: "20018183",
        receiver_branch_code: "0001",
        receiver_account_number: "10000-0",
        receiver_account_type: "checking",
        receiver_tax_id: "20.018.183/0001-80",
        receiver_key_id: "20.018.183/0001-80",
        status: "success",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixInternalTransactionReport.Log(
    id: "6767676767676767",
    type: "success",
    report: PixInternalTransactionReport(
        id: "5656565656565656",
        referenceType: "request",
        amount: 1000,
        endToEndId: "E20018183202201011000r01",
        method: "manual",
        senderBankCode: "34052649",
        senderBranchCode: "0001",
        senderAccountNumber: "00000-0",
        senderAccountType: "checking",
        senderTaxId: "012.345.678-90",
        receiverBankCode: "20018183",
        receiverBranchCode: "0001",
        receiverAccountNumber: "10000-0",
        receiverAccountType: "checking",
        receiverTaxId: "20.018.183/0001-80",
        receiverKeyId: "20.018.183/0001-80",
        status: "success",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "success",
    Report: {
        Id: "5656565656565656",
        ReferenceType: "request",
        Amount: 1000,
        EndToEndId: "E20018183202201011000r01",
        Method: "manual",
        SenderBankCode: "34052649",
        SenderBranchCode: "0001",
        SenderAccountNumber: "00000-0",
        SenderAccountType: "checking",
        SenderTaxId: "012.345.678-90",
        ReceiverBankCode: "20018183",
        ReceiverBranchCode: "0001",
        ReceiverAccountNumber: "10000-0",
        ReceiverAccountType: "checking",
        ReceiverTaxId: "20.018.183/0001-80",
        ReceiverKeyId: "20.018.183/0001-80",
        Status: "success",
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "success"
 :report {:id "5656565656565656"
          :reference-type "request"
          :amount 1000
          :end-to-end-id "E20018183202201011000r01"
          :method "manual"
          :sender-bank-code "34052649"
          :sender-branch-code "0001"
          :sender-account-number "00000-0"
          :sender-account-type "checking"
          :sender-tax-id "012.345.678-90"
          :receiver-bank-code "20018183"
          :receiver-branch-code "0001"
          :receiver-account-number "10000-0"
          :receiver-account-type "checking"
          :receiver-tax-id "20.018.183/0001-80"
          :receiver-key-id "20.018.183/0001-80"
          :status "success"
          :created "2022-01-01T00:00:00+00:00"
          :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "success",
        "report": {
            "id": "5656565656565656",
            "referenceType": "request",
            "amount": 1000,
            "endToEndId": "E20018183202201011000r01",
            "method": "manual",
            "senderBankCode": "34052649",
            "senderBranchCode": "0001",
            "senderAccountNumber": "00000-0",
            "senderAccountType": "checking",
            "senderTaxId": "012.345.678-90",
            "receiverBankCode": "20018183",
            "receiverBranchCode": "0001",
            "receiverAccountNumber": "10000-0",
            "receiverAccountType": "checking",
            "receiverTaxId": "20.018.183/0001-80",
            "receiverKeyId": "20.018.183/0001-80",
            "status": "success",
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        },
        "created": "2022-01-01T00:01:00+00:00"
    }
}
  

Static Brcode

A Static Brcode is a QR Code that can receive multiple Pix payments with a fixed or open amount.

Here we will show you how to create and manage them.

The Static Brcode Object

Attributes

id STRING

Unique id for the static Brcode.

name STRING

Receiver name displayed in the QR code.

keyId STRING

Pix key to which payments will be directed.

city STRING

City of the receiver.

amount INTEGER

Fixed amount in cents. Leave empty for open amount QR codes.

reconciliationId STRING

Reconciliation ID included in the QR code.

cashierBankCode STRING

Bank ISPB code of the cashier for Pix Saque/Troco operations.

type STRING

Type of the static Brcode. Options: "instant", "instantAndOrSubscription".

description STRING

Description of the static Brcode.

tags LIST OF STRINGS

Tags associated with the static Brcode.

uuid STRING

Unique UUID used to identify this QR code.

url STRING

URL for the QR code image.

created STRING

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

updated STRING

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

Create Static Brcodes

Create static Pix QR codes for receiving payments.

You can create up to 100 static Brcodes in a single request.

Parameters

keyId REQUIRED

Pix key to which payments will be directed.

name REQUIRED

Receiver name displayed in the QR code.

city REQUIRED

City of the receiver.

amount OPTIONAL

Fixed amount in cents. Leave empty for open amount QR codes.

cashierBankCode OPTIONAL

Bank ISPB code of the cashier for Pix Saque/Troco operations.

type OPTIONAL

Type of the static Brcode. Options: "instant", "instantAndOrSubscription". Defaults to "instant".

description OPTIONAL

Description of the static Brcode.

reconciliationId OPTIONAL

Reconciliation ID included in the QR code.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/static-brcode
REQUEST

Python

import starkinfra

brcodes = starkinfra.staticbrcode.create([
    starkinfra.StaticBrcode(
        name="Jon Snow",
        key_id="+5511989898989",
        city="São Paulo",
        amount=1000,
        cashier_bank_code="20018183",
        type="instant",
        reconciliation_id="my-reconciliation-id",
        description="Payment for services",
        tags=["invoice", "payment"]
    )
])

for brcode in brcodes:
    print(brcode)
  

Javascript

const starkinfra = require('starkinfra')

const brcodes = await starkinfra.staticBrcode.create([
    {
        name: "Jon Snow",
        keyId: "+5511989898989",
        city: "São Paulo",
        amount: 1000,
        reconciliationId: "my-reconciliation-id",
        description: "Payment for services",
        tags: ["invoice", "payment"]
    }
])

for (const brcode of brcodes) {
    console.log(brcode)
}
  

PHP

 "Jon Snow",
        "keyId" => "+5511989898989",
        "city" => "São Paulo",
        "amount" => 1000,
        "reconciliationId" => "my-reconciliation-id",
        "description" => "Payment for services",
        "tags" => ["invoice", "payment"]
    ])
]);

foreach ($brcodes as $brcode) {
    print_r($brcode);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;

List brcodes = StaticBrcode.create(
    Arrays.asList(
        new StaticBrcode.Builder()
            .name("Jon Snow")
            .keyId("+5511989898989")
            .city("São Paulo")
            .amount(1000L)
            .reconciliationId("my-reconciliation-id")
            .description("Payment for services")
            .tags(Arrays.asList("invoice", "payment"))
            .build()
    )
);

for (StaticBrcode brcode : brcodes) {
    System.out.println(brcode);
}
  

Ruby

require('starkinfra')

brcodes = StarkInfra::StaticBrcode.create([
    StarkInfra::StaticBrcode.new(
        name: "Jon Snow",
        key_id: "+5511989898989",
        city: "São Paulo",
        amount: 1000,
        reconciliation_id: "my-reconciliation-id",
        description: "Payment for services",
        tags: ["invoice", "payment"]
    )
])

brcodes.each do |brcode|
    puts brcode
end
  

Elixir

brcodes = StarkInfra.StaticBrcode.create!([
    %StarkInfra.StaticBrcode{
        name: "Jon Snow",
        key_id: "+5511989898989",
        city: "São Paulo",
        amount: 1000,
        reconciliation_id: "my-reconciliation-id",
        description: "Payment for services",
        tags: ["invoice", "payment"]
    }
])

for brcode <- brcodes do
    IO.inspect(brcode)
end
  

C#

using StarkInfra;
using System.Collections.Generic;

List brcodes = StaticBrcode.Create(
    new List {
        new StaticBrcode(
            name: "Jon Snow",
            keyId: "+5511989898989",
            city: "São Paulo",
            amount: 1000,
            reconciliationId: "my-reconciliation-id",
            description: "Payment for services",
            tags: new List { "invoice", "payment" }
        )
    }
);

foreach (StaticBrcode brcode in brcodes) {
    Console.WriteLine(brcode);
}
  

Go

package main

import (
    "fmt"
    StaticBrcode "github.com/starkinfra/sdk-go/starkinfra/staticbrcode"
)

brcodes, err := StaticBrcode.Create(
    []StaticBrcode.StaticBrcode{
        {
            Name:             "Jon Snow",
            KeyId:            "+5511989898989",
            City:             "São Paulo",
            Amount:           1000,
            ReconciliationId: "my-reconciliation-id",
            Description:      "Payment for services",
            Tags:             []string{"invoice", "payment"},
        },
    }, nil)

for _, brcode := range brcodes {
    fmt.Println(brcode)
}
  

Clojure

(def brcodes
    (starkinfra.static-brcode/create
        [{:name "Jon Snow"
          :key-id "+5511989898989"
          :city "São Paulo"
          :amount 1000
          :reconciliation-id "my-reconciliation-id"
          :description "Payment for services"
          :tags ["invoice" "payment"]}]))

(doseq [brcode brcodes]
    (println brcode))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/static-brcode' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "brcodes": [
        {
            "name": "Jon Snow",
            "keyId": "+5511989898989",
            "city": "São Paulo",
            "amount": 1000,
            "reconciliationId": "my-reconciliation-id",
            "description": "Payment for services",
            "tags": ["invoice", "payment"]
        }
    ]
}'
  
RESPONSE

Python

[
    StaticBrcode(
        id="5656565656565656",
        name="Jon Snow",
        key_id="+5511989898989",
        city="São Paulo",
        amount=1000,
        reconciliation_id="my-reconciliation-id",
        cashier_bank_code="20018183",
        type="instant",
        description="Payment for services",
        tags=["invoice", "payment"],
        uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        url="https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5656565656565656",
        name: "Jon Snow",
        keyId: "+5511989898989",
        city: "São Paulo",
        amount: 1000,
        reconciliationId: "my-reconciliation-id",
        description: "Payment for services",
        tags: ["invoice", "payment"],
        uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

PHP

[
    StaticBrcode Object (
        [id] => 5656565656565656
        [name] => Jon Snow
        [keyId] => +5511989898989
        [city] => São Paulo
        [amount] => 1000
        [reconciliationId] => my-reconciliation-id
        [description] => Payment for services
        [tags] => Array ( [0] => invoice [1] => payment )
        [uuid] => a1b2c3d4-e5f6-7890-abcd-ef1234567890
        [url] => https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
]
  

Java

[
    StaticBrcode(
        id=5656565656565656,
        name=Jon Snow,
        keyId=+5511989898989,
        city=São Paulo,
        amount=1000,
        reconciliationId=my-reconciliation-id,
        description=Payment for services,
        tags=[invoice, payment],
        uuid=a1b2c3d4-e5f6-7890-abcd-ef1234567890,
        url=https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png,
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    )
]
  

Ruby

[
    {
        id: "5656565656565656",
        name: "Jon Snow",
        key_id: "+5511989898989",
        city: "São Paulo",
        amount: 1000,
        reconciliation_id: "my-reconciliation-id",
        description: "Payment for services",
        tags: ["invoice", "payment"],
        uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Elixir

[
    %StarkInfra.StaticBrcode{
        id: "5656565656565656",
        name: "Jon Snow",
        key_id: "+5511989898989",
        city: "São Paulo",
        amount: 1000,
        reconciliation_id: "my-reconciliation-id",
        description: "Payment for services",
        tags: ["invoice", "payment"],
        uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

C#

[
    StaticBrcode(
        id: "5656565656565656",
        name: "Jon Snow",
        keyId: "+5511989898989",
        city: "São Paulo",
        amount: 1000,
        reconciliationId: "my-reconciliation-id",
        description: "Payment for services",
        tags: [ "invoice", "payment" ],
        uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    )
]
  

Go

[
    {
        Id: "5656565656565656",
        Name: "Jon Snow",
        KeyId: "+5511989898989",
        City: "São Paulo",
        Amount: 1000,
        ReconciliationId: "my-reconciliation-id",
        Description: "Payment for services",
        Tags: ["invoice", "payment"],
        Uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        Url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Clojure

[
    {:id "5656565656565656"
     :name "Jon Snow"
     :key-id "+5511989898989"
     :city "São Paulo"
     :amount 1000
     :reconciliation-id "my-reconciliation-id"
     :description "Payment for services"
     :tags ["invoice" "payment"]
     :uuid "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
     :url "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png"
     :created "2022-01-01T00:00:00+00:00"
     :updated "2022-01-01T00:00:00+00:00"}
]
  

Curl

{
    "brcodes": [
        {
            "id": "5656565656565656",
            "name": "Jon Snow",
            "keyId": "+5511989898989",
            "city": "São Paulo",
            "amount": 1000,
            "reconciliationId": "my-reconciliation-id",
            "description": "Payment for services",
            "tags": ["invoice", "payment"],
            "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "url": "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

List Static Brcodes

List and filter all static Brcodes. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

limit OPTIONAL

Number of results per cursor. Max = 100.

tags OPTIONAL

Filter entities that contain the specified tags.

uuids OPTIONAL

Filter by UUIDs.

ENDPOINT
GET /v2/static-brcode
REQUEST

Python

import starkinfra

brcodes = starkinfra.staticbrcode.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    uuids=["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
    tags=["invoice"]
)

for brcode in brcodes:
    print(brcode)
  

Javascript

const starkinfra = require('starkinfra')

const brcodes = await starkinfra.staticBrcode.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    tags: ["invoice"]
})

for await (const brcode of brcodes) {
    console.log(brcode)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "tags" => ["invoice"]
]);

foreach ($brcodes as $brcode) {
    print_r($brcode);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");

Generator brcodes = StaticBrcode.query(params);

for (StaticBrcode brcode : brcodes) {
    System.out.println(brcode);
}
  

Ruby

require('starkinfra')

brcodes = StarkInfra::StaticBrcode.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    tags: ["invoice"]
)

brcodes.each do |brcode|
    puts brcode
end
  

Elixir

brcodes = StarkInfra.StaticBrcode.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    tags: ["invoice"]
)

for brcode <- brcodes do
    IO.inspect(brcode)
end
  

C#

using StarkInfra;

IEnumerable brcodes = StaticBrcode.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    tags: new List { "invoice" }
);

foreach (StaticBrcode brcode in brcodes) {
    Console.WriteLine(brcode);
}
  

Go

package main

import (
    "fmt"
    StaticBrcode "github.com/starkinfra/sdk-go/starkinfra/staticbrcode"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
}

brcodes := StaticBrcode.Query(params, nil)

for brcode := range brcodes {
    fmt.Println(brcode)
}
  

Clojure

(def brcodes
    (starkinfra.static-brcode/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :tags ["invoice"]
    }))

(doseq [brcode brcodes]
    (println brcode))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/static-brcode?limit=10&after=2022-01-01&before=2022-12-31' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

StaticBrcode(
    id="5656565656565656",
    name="Jon Snow",
    key_id="+5511989898989",
    city="São Paulo",
    amount=1000,
    reconciliation_id="my-reconciliation-id",
    cashier_bank_code="20018183",
    type="instant",
    description="Payment for services",
    tags=["invoice"],
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    url="https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    name: "Jon Snow",
    keyId: "+5511989898989",
    city: "São Paulo",
    amount: 1000,
    uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    tags: ["invoice"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

StaticBrcode Object (
    [id] => 5656565656565656
    [name] => Jon Snow
    [keyId] => +5511989898989
    [city] => São Paulo
    [amount] => 1000
    [uuid] => a1b2c3d4-e5f6-7890-abcd-ef1234567890
    [url] => https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png
    [tags] => Array ( [0] => invoice )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

StaticBrcode(
    id=5656565656565656,
    name=Jon Snow,
    keyId=+5511989898989,
    city=São Paulo,
    amount=1000,
    uuid=a1b2c3d4-e5f6-7890-abcd-ef1234567890,
    url=https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png,
    tags=[invoice],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    name: "Jon Snow",
    key_id: "+5511989898989",
    city: "São Paulo",
    amount: 1000,
    uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    tags: ["invoice"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.StaticBrcode{
    id: "5656565656565656",
    name: "Jon Snow",
    key_id: "+5511989898989",
    city: "São Paulo",
    amount: 1000,
    uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    tags: ["invoice"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

StaticBrcode(
    id: "5656565656565656",
    name: "Jon Snow",
    keyId: "+5511989898989",
    city: "São Paulo",
    amount: 1000,
    uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    tags: [ "invoice" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Name: "Jon Snow",
    KeyId: "+5511989898989",
    City: "São Paulo",
    Amount: 1000,
    Uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    Url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    Tags: ["invoice"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :name "Jon Snow"
 :key-id "+5511989898989"
 :city "São Paulo"
 :amount 1000
 :uuid "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
 :url "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png"
 :tags ["invoice"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "cursor": null,
    "brcodes": [
        {
            "id": "5656565656565656",
            "name": "Jon Snow",
            "keyId": "+5511989898989",
            "city": "São Paulo",
            "amount": 1000,
            "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "url": "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
            "tags": ["invoice"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

Get a Static Brcode

Get a single static Brcode by its UUID.

Parameters

uuid REQUIRED

UUID of the static Brcode.

ENDPOINT
GET /v2/static-brcode/:uuid
REQUEST

Python

import starkinfra

brcode = starkinfra.staticbrcode.get("a1b2c3d4-e5f6-7890-abcd-ef1234567890")

print(brcode)
  

Javascript

const starkinfra = require('starkinfra')

const brcode = await starkinfra.staticBrcode.get("a1b2c3d4-e5f6-7890-abcd-ef1234567890")

console.log(brcode)
  

PHP

Java

import com.starkinfra.*;

StaticBrcode brcode = StaticBrcode.get("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

System.out.println(brcode);
  

Ruby

require('starkinfra')

brcode = StarkInfra::StaticBrcode.get("a1b2c3d4-e5f6-7890-abcd-ef1234567890")

puts brcode
  

Elixir

brcode = StarkInfra.StaticBrcode.get!("a1b2c3d4-e5f6-7890-abcd-ef1234567890")

IO.inspect(brcode)
  

C#

using StarkInfra;

StaticBrcode brcode = StaticBrcode.Get("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Console.WriteLine(brcode);
  

Go

package main

import (
    "fmt"
    StaticBrcode "github.com/starkinfra/sdk-go/starkinfra/staticbrcode"
)

brcode, err := StaticBrcode.Get("a1b2c3d4-e5f6-7890-abcd-ef1234567890", nil)

fmt.Println(brcode)
  

Clojure

(def brcode
    (starkinfra.static-brcode/get "a1b2c3d4-e5f6-7890-abcd-ef1234567890"))

(println brcode)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/static-brcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

StaticBrcode(
    id="5656565656565656",
    name="Jon Snow",
    key_id="+5511989898989",
    city="São Paulo",
    amount=1000,
    reconciliation_id="my-reconciliation-id",
    cashier_bank_code="20018183",
    type="instant",
    description="Payment for services",
    tags=["invoice", "payment"],
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    url="https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    name: "Jon Snow",
    keyId: "+5511989898989",
    city: "São Paulo",
    amount: 1000,
    reconciliationId: "my-reconciliation-id",
    description: "Payment for services",
    tags: ["invoice", "payment"],
    uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

StaticBrcode Object (
    [id] => 5656565656565656
    [name] => Jon Snow
    [keyId] => +5511989898989
    [city] => São Paulo
    [amount] => 1000
    [reconciliationId] => my-reconciliation-id
    [description] => Payment for services
    [tags] => Array ( [0] => invoice [1] => payment )
    [uuid] => a1b2c3d4-e5f6-7890-abcd-ef1234567890
    [url] => https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

StaticBrcode(
    id=5656565656565656,
    name=Jon Snow,
    keyId=+5511989898989,
    city=São Paulo,
    amount=1000,
    reconciliationId=my-reconciliation-id,
    description=Payment for services,
    tags=[invoice, payment],
    uuid=a1b2c3d4-e5f6-7890-abcd-ef1234567890,
    url=https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    name: "Jon Snow",
    key_id: "+5511989898989",
    city: "São Paulo",
    amount: 1000,
    reconciliation_id: "my-reconciliation-id",
    description: "Payment for services",
    tags: ["invoice", "payment"],
    uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.StaticBrcode{
    id: "5656565656565656",
    name: "Jon Snow",
    key_id: "+5511989898989",
    city: "São Paulo",
    amount: 1000,
    reconciliation_id: "my-reconciliation-id",
    description: "Payment for services",
    tags: ["invoice", "payment"],
    uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

StaticBrcode(
    id: "5656565656565656",
    name: "Jon Snow",
    keyId: "+5511989898989",
    city: "São Paulo",
    amount: 1000,
    reconciliationId: "my-reconciliation-id",
    description: "Payment for services",
    tags: [ "invoice", "payment" ],
    uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Name: "Jon Snow",
    KeyId: "+5511989898989",
    City: "São Paulo",
    Amount: 1000,
    ReconciliationId: "my-reconciliation-id",
    Description: "Payment for services",
    Tags: ["invoice", "payment"],
    Uuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    Url: "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :name "Jon Snow"
 :key-id "+5511989898989"
 :city "São Paulo"
 :amount 1000
 :reconciliation-id "my-reconciliation-id"
 :description "Payment for services"
 :tags ["invoice" "payment"]
 :uuid "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
 :url "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png"
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "brcode": {
        "id": "5656565656565656",
        "name": "Jon Snow",
        "keyId": "+5511989898989",
        "city": "São Paulo",
        "amount": 1000,
        "reconciliationId": "my-reconciliation-id",
        "description": "Payment for services",
        "tags": ["invoice", "payment"],
        "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "url": "https://brcode.starkinfra.com/static-qrcode/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

Dynamic Brcode

A Dynamic Brcode is a QR Code that returns payment details dynamically from your server when scanned.

The "subscription", "subscriptionAndInstant" and "dueAndOrSubscription" types let a Dynamic Brcode initiate a Pix Automático recurring authorization.

Here we will show you how to create and manage them.

The Dynamic Brcode Object

Attributes

id STRING

Unique id for the dynamic Brcode.

name STRING

Receiver name displayed in the QR code.

city STRING

City of the receiver.

externalId STRING

Your internal ID for this Brcode, used to prevent duplicates.

type STRING

Type of dynamic Brcode. Options: "instant", "due", "subscription", "subscriptionAndInstant", "dueAndOrSubscription".

tags LIST OF STRINGS

Tags associated with the dynamic Brcode.

uuid STRING

Unique UUID used to identify this QR code.

url STRING

URL for the QR code image.

created STRING

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

updated STRING

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

Create Dynamic Brcodes

Create dynamic Pix QR codes that fetch payment details from your server.

You can create up to 100 dynamic Brcodes in a single request.

Parameters

city REQUIRED

City of the receiver.

externalId REQUIRED

Your internal ID used to match payment callbacks and to prevent duplicates.

name REQUIRED

Receiver name displayed in the QR code.

type OPTIONAL

Type of dynamic Brcode. Options: "instant", "due", "subscription", "subscriptionAndInstant", "dueAndOrSubscription". Defaults to "instant" when omitted.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/dynamic-brcode
REQUEST

Python

import starkinfra

brcodes = starkinfra.dynamicbrcode.create([
    starkinfra.DynamicBrcode(
        name="Jon Snow",
        city="São Paulo",
        external_id="my-dynamic-brcode-id-1",
        type="subscription",
        tags=["dynamic", "subscription"]
    )
])

for brcode in brcodes:
    print(brcode)
  

Javascript

const starkinfra = require('starkinfra')

const brcodes = await starkinfra.dynamicBrcode.create([
    {
        name: "Jon Snow",
        city: "São Paulo",
        externalId: "my-dynamic-brcode-id-1",
        type: "instant",
        tags: ["dynamic", "instant"]
    }
])

for (const brcode of brcodes) {
    console.log(brcode)
}
  

PHP

 "Jon Snow",
        "city" => "São Paulo",
        "externalId" => "my-dynamic-brcode-id-1",
        "type" => "instant",
        "tags" => ["dynamic", "instant"]
    ])
]);

foreach ($brcodes as $brcode) {
    print_r($brcode);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;

List brcodes = DynamicBrcode.create(
    Arrays.asList(
        new DynamicBrcode.Builder()
            .name("Jon Snow")
            .city("São Paulo")
            .externalId("my-dynamic-brcode-id-1")
            .type("instant")
            .tags(Arrays.asList("dynamic", "instant"))
            .build()
    )
);

for (DynamicBrcode brcode : brcodes) {
    System.out.println(brcode);
}
  

Ruby

require('starkinfra')

brcodes = StarkInfra::DynamicBrcode.create([
    StarkInfra::DynamicBrcode.new(
        name: "Jon Snow",
        city: "São Paulo",
        external_id: "my-dynamic-brcode-id-1",
        type: "instant",
        tags: ["dynamic", "instant"]
    )
])

brcodes.each do |brcode|
    puts brcode
end
  

Elixir

brcodes = StarkInfra.DynamicBrcode.create!([
    %StarkInfra.DynamicBrcode{
        name: "Jon Snow",
        city: "São Paulo",
        external_id: "my-dynamic-brcode-id-1",
        type: "instant",
        tags: ["dynamic", "instant"]
    }
])

for brcode <- brcodes do
    IO.inspect(brcode)
end
  

C#

using StarkInfra;
using System.Collections.Generic;

List brcodes = DynamicBrcode.Create(
    new List {
        new DynamicBrcode(
            name: "Jon Snow",
            city: "São Paulo",
            externalId: "my-dynamic-brcode-id-1",
            type: "instant",
            tags: new List { "dynamic", "instant" }
        )
    }
);

foreach (DynamicBrcode brcode in brcodes) {
    Console.WriteLine(brcode);
}
  

Go

package main

import (
    "fmt"
    DynamicBrcode "github.com/starkinfra/sdk-go/starkinfra/dynamicbrcode"
)

brcodes, err := DynamicBrcode.Create(
    []DynamicBrcode.DynamicBrcode{
        {
            Name:       "Jon Snow",
            City:       "São Paulo",
            ExternalId: "my-dynamic-brcode-id-1",
            Type:       "instant",
            Tags:       []string{"dynamic", "instant"},
        },
    }, nil)

for _, brcode := range brcodes {
    fmt.Println(brcode)
}
  

Clojure

(def brcodes
    (starkinfra.dynamic-brcode/create
        [{:name "Jon Snow"
          :city "São Paulo"
          :external-id "my-dynamic-brcode-id-1"
          :type "instant"
          :tags ["dynamic" "instant"]}]))

(doseq [brcode brcodes]
    (println brcode))
  

Curl

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": [
        {
            "name": "Jon Snow",
            "city": "São Paulo",
            "externalId": "my-dynamic-brcode-id-1",
            "type": "instant",
            "tags": ["dynamic", "instant"]
        }
    ]
}'
  
RESPONSE

Python

[
    DynamicBrcode(
        id="5656565656565656",
        name="Jon Snow",
        city="São Paulo",
        external_id="my-dynamic-brcode-id-1",
        type="subscription",
        tags=["dynamic", "subscription"],
        uuid="b2c3d4e5-f6a7-8901-bcde-f12345678901",
        url="https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5656565656565656",
        name: "Jon Snow",
        city: "São Paulo",
        externalId: "my-dynamic-brcode-id-1",
        type: "instant",
        tags: ["dynamic", "instant"],
        uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

PHP

[
    DynamicBrcode Object (
        [id] => 5656565656565656
        [name] => Jon Snow
        [city] => São Paulo
        [externalId] => my-dynamic-brcode-id-1
        [type] => instant
        [tags] => Array ( [0] => dynamic [1] => instant )
        [uuid] => b2c3d4e5-f6a7-8901-bcde-f12345678901
        [url] => https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
]
  

Java

[
    DynamicBrcode(
        id=5656565656565656,
        name=Jon Snow,
        city=São Paulo,
        externalId=my-dynamic-brcode-id-1,
        type=instant,
        tags=[dynamic, instant],
        uuid=b2c3d4e5-f6a7-8901-bcde-f12345678901,
        url=https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png,
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    )
]
  

Ruby

[
    {
        id: "5656565656565656",
        name: "Jon Snow",
        city: "São Paulo",
        external_id: "my-dynamic-brcode-id-1",
        type: "instant",
        tags: ["dynamic", "instant"],
        uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Elixir

[
    %StarkInfra.DynamicBrcode{
        id: "5656565656565656",
        name: "Jon Snow",
        city: "São Paulo",
        external_id: "my-dynamic-brcode-id-1",
        type: "instant",
        tags: ["dynamic", "instant"],
        uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

C#

[
    DynamicBrcode(
        id: "5656565656565656",
        name: "Jon Snow",
        city: "São Paulo",
        externalId: "my-dynamic-brcode-id-1",
        type: "instant",
        tags: [ "dynamic", "instant" ],
        uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    )
]
  

Go

[
    {
        Id: "5656565656565656",
        Name: "Jon Snow",
        City: "São Paulo",
        ExternalId: "my-dynamic-brcode-id-1",
        Type: "instant",
        Tags: ["dynamic", "instant"],
        Uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        Url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Clojure

[
    {:id "5656565656565656"
     :name "Jon Snow"
     :city "São Paulo"
     :external-id "my-dynamic-brcode-id-1"
     :type "instant"
     :tags ["dynamic" "instant"]
     :uuid "b2c3d4e5-f6a7-8901-bcde-f12345678901"
     :url "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png"
     :created "2022-01-01T00:00:00+00:00"
     :updated "2022-01-01T00:00:00+00:00"}
]
  

Curl

{
    "brcodes": [
        {
            "id": "5656565656565656",
            "name": "Jon Snow",
            "city": "São Paulo",
            "externalId": "my-dynamic-brcode-id-1",
            "type": "instant",
            "tags": ["dynamic", "instant"],
            "uuid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
            "url": "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

List Dynamic Brcodes

List and filter all dynamic Brcodes. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

externalIds OPTIONAL

Filter by external IDs.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ids OPTIONAL

List of strings to get specific entities by ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

tags OPTIONAL

Filter entities that contain the specified tags.

uuids OPTIONAL

Filter by UUIDs.

ENDPOINT
GET /v2/dynamic-brcode
REQUEST

Python

import starkinfra

brcodes = starkinfra.dynamicbrcode.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    tags=["dynamic"]
)

for brcode in brcodes:
    print(brcode)
  

Javascript

const starkinfra = require('starkinfra')

const brcodes = await starkinfra.dynamicBrcode.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    tags: ["dynamic"]
})

for await (const brcode of brcodes) {
    console.log(brcode)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "tags" => ["dynamic"]
]);

foreach ($brcodes as $brcode) {
    print_r($brcode);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");

Generator brcodes = DynamicBrcode.query(params);

for (DynamicBrcode brcode : brcodes) {
    System.out.println(brcode);
}
  

Ruby

require('starkinfra')

brcodes = StarkInfra::DynamicBrcode.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    tags: ["dynamic"]
)

brcodes.each do |brcode|
    puts brcode
end
  

Elixir

brcodes = StarkInfra.DynamicBrcode.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    tags: ["dynamic"]
)

for brcode <- brcodes do
    IO.inspect(brcode)
end
  

C#

using StarkInfra;

IEnumerable brcodes = DynamicBrcode.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    tags: new List { "dynamic" }
);

foreach (DynamicBrcode brcode in brcodes) {
    Console.WriteLine(brcode);
}
  

Go

package main

import (
    "fmt"
    DynamicBrcode "github.com/starkinfra/sdk-go/starkinfra/dynamicbrcode"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
}

brcodes := DynamicBrcode.Query(params, nil)

for brcode := range brcodes {
    fmt.Println(brcode)
}
  

Clojure

(def brcodes
    (starkinfra.dynamic-brcode/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :tags ["dynamic"]
    }))

(doseq [brcode brcodes]
    (println brcode))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/dynamic-brcode?limit=10&after=2022-01-01&before=2022-12-31' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

DynamicBrcode(
    id="5656565656565656",
    name="Jon Snow",
    city="São Paulo",
    external_id="my-dynamic-brcode-id-1",
    type="instant",
    tags=["dynamic"],
    uuid="b2c3d4e5-f6a7-8901-bcde-f12345678901",
    url="https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    name: "Jon Snow",
    city: "São Paulo",
    externalId: "my-dynamic-brcode-id-1",
    type: "instant",
    tags: ["dynamic"],
    uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

DynamicBrcode Object (
    [id] => 5656565656565656
    [name] => Jon Snow
    [city] => São Paulo
    [externalId] => my-dynamic-brcode-id-1
    [type] => instant
    [tags] => Array ( [0] => dynamic )
    [uuid] => b2c3d4e5-f6a7-8901-bcde-f12345678901
    [url] => https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

DynamicBrcode(
    id=5656565656565656,
    name=Jon Snow,
    city=São Paulo,
    externalId=my-dynamic-brcode-id-1,
    type=instant,
    tags=[dynamic],
    uuid=b2c3d4e5-f6a7-8901-bcde-f12345678901,
    url=https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    name: "Jon Snow",
    city: "São Paulo",
    external_id: "my-dynamic-brcode-id-1",
    type: "instant",
    tags: ["dynamic"],
    uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.DynamicBrcode{
    id: "5656565656565656",
    name: "Jon Snow",
    city: "São Paulo",
    external_id: "my-dynamic-brcode-id-1",
    type: "instant",
    tags: ["dynamic"],
    uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

DynamicBrcode(
    id: "5656565656565656",
    name: "Jon Snow",
    city: "São Paulo",
    externalId: "my-dynamic-brcode-id-1",
    type: "instant",
    tags: [ "dynamic" ],
    uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Name: "Jon Snow",
    City: "São Paulo",
    ExternalId: "my-dynamic-brcode-id-1",
    Type: "instant",
    Tags: ["dynamic"],
    Uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    Url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :name "Jon Snow"
 :city "São Paulo"
 :external-id "my-dynamic-brcode-id-1"
 :type "instant"
 :tags ["dynamic"]
 :uuid "b2c3d4e5-f6a7-8901-bcde-f12345678901"
 :url "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png"
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "cursor": null,
    "brcodes": [
        {
            "id": "5656565656565656",
            "name": "Jon Snow",
            "city": "São Paulo",
            "externalId": "my-dynamic-brcode-id-1",
            "type": "instant",
            "tags": ["dynamic"],
            "uuid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
            "url": "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

Get a Dynamic Brcode

Get a single dynamic Brcode by its UUID.

Parameters

uuid REQUIRED

UUID of the dynamic Brcode.

ENDPOINT
GET /v2/dynamic-brcode/:uuid
REQUEST

Python

import starkinfra

brcode = starkinfra.dynamicbrcode.get("b2c3d4e5-f6a7-8901-bcde-f12345678901")

print(brcode)
  

Javascript

const starkinfra = require('starkinfra')

const brcode = await starkinfra.dynamicBrcode.get("b2c3d4e5-f6a7-8901-bcde-f12345678901")

console.log(brcode)
  

PHP

Java

import com.starkinfra.*;

DynamicBrcode brcode = DynamicBrcode.get("b2c3d4e5-f6a7-8901-bcde-f12345678901");

System.out.println(brcode);
  

Ruby

require('starkinfra')

brcode = StarkInfra::DynamicBrcode.get("b2c3d4e5-f6a7-8901-bcde-f12345678901")

puts brcode
  

Elixir

brcode = StarkInfra.DynamicBrcode.get!("b2c3d4e5-f6a7-8901-bcde-f12345678901")

IO.inspect(brcode)
  

C#

using StarkInfra;

DynamicBrcode brcode = DynamicBrcode.Get("b2c3d4e5-f6a7-8901-bcde-f12345678901");

Console.WriteLine(brcode);
  

Go

package main

import (
    "fmt"
    DynamicBrcode "github.com/starkinfra/sdk-go/starkinfra/dynamicbrcode"
)

brcode, err := DynamicBrcode.Get("b2c3d4e5-f6a7-8901-bcde-f12345678901", nil)

fmt.Println(brcode)
  

Clojure

(def brcode
    (starkinfra.dynamic-brcode/get "b2c3d4e5-f6a7-8901-bcde-f12345678901"))

(println brcode)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/dynamic-brcode/b2c3d4e5-f6a7-8901-bcde-f12345678901' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

DynamicBrcode(
    id="5656565656565656",
    name="Jon Snow",
    city="São Paulo",
    external_id="my-dynamic-brcode-id-1",
    type="instant",
    tags=["dynamic", "instant"],
    uuid="b2c3d4e5-f6a7-8901-bcde-f12345678901",
    url="https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    name: "Jon Snow",
    city: "São Paulo",
    externalId: "my-dynamic-brcode-id-1",
    type: "instant",
    tags: ["dynamic", "instant"],
    uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

DynamicBrcode Object (
    [id] => 5656565656565656
    [name] => Jon Snow
    [city] => São Paulo
    [externalId] => my-dynamic-brcode-id-1
    [type] => instant
    [tags] => Array ( [0] => dynamic [1] => instant )
    [uuid] => b2c3d4e5-f6a7-8901-bcde-f12345678901
    [url] => https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

DynamicBrcode(
    id=5656565656565656,
    name=Jon Snow,
    city=São Paulo,
    externalId=my-dynamic-brcode-id-1,
    type=instant,
    tags=[dynamic, instant],
    uuid=b2c3d4e5-f6a7-8901-bcde-f12345678901,
    url=https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    name: "Jon Snow",
    city: "São Paulo",
    external_id: "my-dynamic-brcode-id-1",
    type: "instant",
    tags: ["dynamic", "instant"],
    uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.DynamicBrcode{
    id: "5656565656565656",
    name: "Jon Snow",
    city: "São Paulo",
    external_id: "my-dynamic-brcode-id-1",
    type: "instant",
    tags: ["dynamic", "instant"],
    uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

DynamicBrcode(
    id: "5656565656565656",
    name: "Jon Snow",
    city: "São Paulo",
    externalId: "my-dynamic-brcode-id-1",
    type: "instant",
    tags: [ "dynamic", "instant" ],
    uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Name: "Jon Snow",
    City: "São Paulo",
    ExternalId: "my-dynamic-brcode-id-1",
    Type: "instant",
    Tags: ["dynamic", "instant"],
    Uuid: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    Url: "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :name "Jon Snow"
 :city "São Paulo"
 :external-id "my-dynamic-brcode-id-1"
 :type "instant"
 :tags ["dynamic" "instant"]
 :uuid "b2c3d4e5-f6a7-8901-bcde-f12345678901"
 :url "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png"
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "brcode": {
        "id": "5656565656565656",
        "name": "Jon Snow",
        "city": "São Paulo",
        "externalId": "my-dynamic-brcode-id-1",
        "type": "instant",
        "tags": ["dynamic", "instant"],
        "uuid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "url": "https://brcode.starkinfra.com/dynamic-qrcode/b2c3d4e5-f6a7-8901-bcde-f12345678901.png",
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

Brcode Preview

A Brcode Preview allows you to fetch the information encoded in a QR code before initiating a Pix payment or accepting a Pix Subscription.

Here we will show you how to retrieve Brcode previews.

The Brcode Preview Object

Attributes

id STRING

QR code content (the EMV string from the QR code).

payerId STRING

CPF or CNPJ of the payer.

endToEndId STRING

Unique end-to-end ID of the Pix transaction associated with this preview.

status STRING

Status of the QR code. Options: "active", "paid", "canceled", "unknown".

name STRING

Receiver name.

taxId STRING

CPF or CNPJ of the receiver.

bankCode STRING

Bank ISPB code of the receiver.

branchCode STRING

Branch code of the receiver's account.

accountNumber STRING

Account number of the receiver.

accountType STRING

Account type of the receiver.

amount INTEGER

Amount in cents to be paid.

nominalAmount INTEGER

Nominal amount in cents before discounts, fines and interest.

amountType STRING

Type of amount. Options: "fixed", "minimum".

reconciliationId STRING

Reconciliation ID from the QR code.

description STRING

Description of the payment.

cashierType STRING

Cashier type for Pix Saque/Troco. Options: "merchant", "other", "participant".

cashierBankCode STRING

Bank ISPB code of the cashier.

cashAmount INTEGER

Cash amount in cents for Pix Saque/Troco.

discountAmount INTEGER

Discount amount in cents.

fineAmount INTEGER

Fine amount in cents for late payment.

interestAmount INTEGER

Interest amount in cents for late payment.

reductionAmount INTEGER

Reduction (abatement) amount in cents.

due STRING

Due date and time for payment of the dynamic QR code. Example: "2020-04-23T23:00:00.000000+00:00".

expired STRING

Date and time after which the dynamic QR code is considered expired. Example: "2020-04-23T23:00:00.000000+00:00".

keyId STRING

Pix key of the receiver.

data LIST OF OBJECTS

List of additional data objects with key and value.

scheduled STRING

Date and time the payment is scheduled for. Example: "2020-04-23T23:00:00.000000+00:00".

jws STRING

JWS (JSON Web Signature) of the dynamic QR code. Returned only when "jws" is passed in the expand query parameter.

subscription.bacenId STRING

Central Bank identifier of the recurring authorization. The subscription fields are returned only when the Brcode initiates a Pix Automático recurring authorization.

subscription.amount INTEGER

Fixed amount in cents pulled on each cycle. 0 when the amount is variable.

subscription.amountMinLimit INTEGER

Minimum amount in cents allowed per pull when the amount is variable.

subscription.interval STRING

Billing interval. Options: "week", "month", "quarter", "semester", "year".

subscription.description STRING

Description presented to the payer.

subscription.referenceCode STRING

Free reference code for the subscription.

subscription.installmentStart STRING

Date when the recurring authorization starts.

subscription.installmentEnd STRING

Date when the recurring authorization ends.

subscription.pullRetryLimit INTEGER

Maximum number of pull retries allowed per cycle.

subscription.receiverName STRING

Name of the receiver (creditor).

subscription.receiverTaxId STRING

CPF or CNPJ of the receiver.

subscription.receiverBankCode STRING

Bank ISPB code of the receiver.

subscription.senderFinalName STRING

Name of the final payer, when applicable.

subscription.senderFinalTaxId STRING

CPF or CNPJ of the final payer, when applicable.

subscription.type STRING

Subscription type. Options: "qrcode", "qrcodeAndPayment", "paymentAndOrQrcode".

subscription.status STRING

Current status. Options: "created", "approved", "denied", "expired", "canceled".

subscription.created STRING

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

subscription.updated STRING

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

Create Brcode Previews

Fetch and preview the details of one or more Pix QR codes before payment.

You can preview up to 100 Brcodes in a single request.

Parameters

id REQUIRED

QR code content (the EMV string from the QR code).

payerId REQUIRED

CPF or CNPJ of the payer for dynamic QR codes.

scheduled OPTIONAL

Date the payment is scheduled to be processed. This affects the preview values for due dynamic QR codes. Example: "2022-01-31".

endToEndId OPTIONAL

Unique end-to-end ID of the Pix transaction associated with this preview. One will be generated if none is provided.

cityCode OPTIONAL

IBGE city code of the payer, with 7 digits. Example: "5300108".

expand OPTIONAL

Entity fields to expand in the response. Options: "jws".

ENDPOINT
POST /v2/brcode-preview
REQUEST

Python

import starkinfra

previews = starkinfra.brcodepreview.create([
    starkinfra.BrcodePreview(
        id="00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5905Stark6009Sao Paulo62070503***63041D3D",
        payer_id="012.345.678-90",
        end_to_end_id="E20018183202201201450u34sDGd19lz",
        scheduled="2022-01-31"
    )
])

for preview in previews:
    print(preview)
  

Javascript

const starkinfra = require('starkinfra')

const previews = await starkinfra.brcodePreview.create([
    {
        id: "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5905Stark6009Sao Paulo62070503***63041D3D",
        payerId: "012.345.678-90"
    }
])

for (const preview of previews) {
    console.log(preview)
}
  

PHP

 "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5905Stark6009Sao Paulo62070503***63041D3D",
        "payerId" => "012.345.678-90"
    ])
]);

foreach ($previews as $preview) {
    print_r($preview);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;

List previews = BrcodePreview.create(
    Arrays.asList(
        new BrcodePreview.Builder()
            .id("00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5905Stark6009Sao Paulo62070503***63041D3D")
            .payerId("012.345.678-90")
            .build()
    )
);

for (BrcodePreview preview : previews) {
    System.out.println(preview);
}
  

Ruby

require('starkinfra')

previews = StarkInfra::BrcodePreview.create([
    StarkInfra::BrcodePreview.new(
        id: "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5905Stark6009Sao Paulo62070503***63041D3D",
        payer_id: "012.345.678-90"
    )
])

previews.each do |preview|
    puts preview
end
  

Elixir

previews = StarkInfra.BrcodePreview.create!([
    %StarkInfra.BrcodePreview{
        id: "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5905Stark6009Sao Paulo62070503***63041D3D",
        payer_id: "012.345.678-90"
    }
])

for preview <- previews do
    IO.inspect(preview)
end
  

C#

using StarkInfra;
using System.Collections.Generic;

List previews = BrcodePreview.Create(
    new List {
        new BrcodePreview(
            id: "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5905Stark6009Sao Paulo62070503***63041D3D",
            payerId: "012.345.678-90"
        )
    }
);

foreach (BrcodePreview preview in previews) {
    Console.WriteLine(preview);
}
  

Go

package main

import (
    "fmt"
    BrcodePreview "github.com/starkinfra/sdk-go/starkinfra/brcodepreview"
)

previews, err := BrcodePreview.Create(
    []BrcodePreview.BrcodePreview{
        {
            Id:      "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5905Stark6009Sao Paulo62070503***63041D3D",
            PayerId: "012.345.678-90",
        },
    }, nil)

for _, preview := range previews {
    fmt.Println(preview)
}
  

Clojure

(def previews
    (starkinfra.brcode-preview/create
        [{:id "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5905Stark6009Sao Paulo62070503***63041D3D"
          :payer-id "012.345.678-90"}]))

(doseq [preview previews]
    (println preview))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/brcode-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.005802BR5905Stark6009Sao Paulo62070503***63041D3D",
            "payerId": "012.345.678-90"
        }
    ]
}'
  
RESPONSE

Python

[
    BrcodePreview(
        id="00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5905Stark6009Sao Paulo62070503***63041D3D",
        payer_id="012.345.678-90",
        end_to_end_id="E20018183202201201450u34sDGd19lz",
        status="active",
        name="Jon Snow",
        tax_id="012.345.678-90",
        bank_code="20018183",
        branch_code="0001",
        account_number="10000-0",
        account_type="checking",
        amount=1000,
        nominal_amount=1000,
        amount_type="fixed",
        reconciliation_id="my-reconciliation-id",
        description="Payment for services",
        cashier_type="merchant",
        cashier_bank_code="20018183",
        cash_amount=0,
        discount_amount=0,
        fine_amount=0,
        interest_amount=0,
        reduction_amount=0,
        due="2022-01-31T00:00:00+00:00",
        expired="2022-02-01T00:00:00+00:00",
        key_id="+5511989898989",
        data=[
            {"key": "additional-info", "value": "order #12345"}
        ],
        scheduled="2022-01-31T00:00:00+00:00",
        jws="eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...",
        subscription=Subscription(
            bacen_id="RR20220101200181830000000000001",
            amount=1000,
            amount_min_limit=0,
            interval="month",
            description="Subscription for services",
            reference_code="contract-12345",
            installment_start="2022-01-01T00:00:00+00:00",
            installment_end="2023-01-01T00:00:00+00:00",
            pull_retry_limit=3,
            receiver_name="Stark Bank S.A.",
            receiver_tax_id="20.018.183/0001-80",
            receiver_bank_code="20018183",
            sender_final_name="Jon Snow",
            sender_final_tax_id="012.345.678-90",
            type="qrcodeAndPayment",
            status="approved",
            created="2022-01-01T00:00:00+00:00",
            updated="2022-01-01T00:00:00+00:00"
        )
    )
]
  

Javascript

[
    {
        status: "active",
        name: "Jon Snow",
        taxId: "012.345.678-90",
        bankCode: "20018183",
        branchCode: "0001",
        accountNumber: "10000-0",
        accountType: "checking",
        allowChange: false,
        amount: 1000,
        amountType: "fixed",
        reconciliationId: "my-reconciliation-id",
        description: "Payment for services",
        keyId: "+5511989898989",
        subscription: {
            bacenId: "RR20220101200181830000000000001",
            amount: 1000,
            amountMinLimit: 0,
            interval: "month",
            description: "Subscription for services",
            referenceCode: "contract-12345",
            installmentStart: "2022-01-01T00:00:00+00:00",
            installmentEnd: "2023-01-01T00:00:00+00:00",
            pullRetryLimit: 3,
            receiverName: "Stark Bank S.A.",
            receiverTaxId: "20.018.183/0001-80",
            receiverBankCode: "20018183",
            senderFinalName: "Jon Snow",
            senderFinalTaxId: "012.345.678-90",
            type: "qrcodeAndPayment",
            status: "approved",
            created: "2022-01-01T00:00:00+00:00",
            updated: "2022-01-01T00:00:00+00:00"
        }
    }
]
  

PHP

[
    BrcodePreview Object (
        [status] => active
        [name] => Jon Snow
        [taxId] => 012.345.678-90
        [bankCode] => 20018183
        [branchCode] => 0001
        [accountNumber] => 10000-0
        [accountType] => checking
        [allowChange] =>
        [amount] => 1000
        [amountType] => fixed
        [reconciliationId] => my-reconciliation-id
        [description] => Payment for services
        [keyId] => +5511989898989
        [subscription] => Subscription Object (
            [bacenId] => RR20220101200181830000000000001
            [amount] => 1000
            [amountMinLimit] => 0
            [interval] => month
            [description] => Subscription for services
            [referenceCode] => contract-12345
            [installmentStart] => 2022-01-01T00:00:00+00:00
            [installmentEnd] => 2023-01-01T00:00:00+00:00
            [pullRetryLimit] => 3
            [receiverName] => Stark Bank S.A.
            [receiverTaxId] => 20.018.183/0001-80
            [receiverBankCode] => 20018183
            [senderFinalName] => Jon Snow
            [senderFinalTaxId] => 012.345.678-90
            [type] => qrcodeAndPayment
            [status] => approved
            [created] => 2022-01-01T00:00:00+00:00
            [updated] => 2022-01-01T00:00:00+00:00
        )
    )
]
  

Java

[
    BrcodePreview(
        status=active,
        name=Jon Snow,
        taxId=012.345.678-90,
        bankCode=20018183,
        branchCode=0001,
        accountNumber=10000-0,
        accountType=checking,
        allowChange=false,
        amount=1000,
        amountType=fixed,
        reconciliationId=my-reconciliation-id,
        description=Payment for services,
        keyId=+5511989898989,
        subscription=Subscription(
            bacenId=RR20220101200181830000000000001,
            amount=1000,
            amountMinLimit=0,
            interval=month,
            description=Subscription for services,
            referenceCode=contract-12345,
            installmentStart=2022-01-01T00:00:00+00:00,
            installmentEnd=2023-01-01T00:00:00+00:00,
            pullRetryLimit=3,
            receiverName=Stark Bank S.A.,
            receiverTaxId=20.018.183/0001-80,
            receiverBankCode=20018183,
            senderFinalName=Jon Snow,
            senderFinalTaxId=012.345.678-90,
            type=qrcodeAndPayment,
            status=approved,
            created=2022-01-01T00:00:00+00:00,
            updated=2022-01-01T00:00:00+00:00
        )
    )
]
  

Ruby

[
    {
        status: "active",
        name: "Jon Snow",
        tax_id: "012.345.678-90",
        bank_code: "20018183",
        branch_code: "0001",
        account_number: "10000-0",
        account_type: "checking",
        allow_change: false,
        amount: 1000,
        amount_type: "fixed",
        reconciliation_id: "my-reconciliation-id",
        description: "Payment for services",
        key_id: "+5511989898989",
        subscription: {
            bacen_id: "RR20220101200181830000000000001",
            amount: 1000,
            amount_min_limit: 0,
            interval: "month",
            description: "Subscription for services",
            reference_code: "contract-12345",
            installment_start: "2022-01-01T00:00:00+00:00",
            installment_end: "2023-01-01T00:00:00+00:00",
            pull_retry_limit: 3,
            receiver_name: "Stark Bank S.A.",
            receiver_tax_id: "20.018.183/0001-80",
            receiver_bank_code: "20018183",
            sender_final_name: "Jon Snow",
            sender_final_tax_id: "012.345.678-90",
            type: "qrcodeAndPayment",
            status: "approved",
            created: "2022-01-01T00:00:00+00:00",
            updated: "2022-01-01T00:00:00+00:00"
        }
    }
]
  

Elixir

[
    %StarkInfra.BrcodePreview{
        status: "active",
        name: "Jon Snow",
        tax_id: "012.345.678-90",
        bank_code: "20018183",
        branch_code: "0001",
        account_number: "10000-0",
        account_type: "checking",
        allow_change: false,
        amount: 1000,
        amount_type: "fixed",
        reconciliation_id: "my-reconciliation-id",
        description: "Payment for services",
        key_id: "+5511989898989",
        subscription: %StarkInfra.Subscription{
            bacen_id: "RR20220101200181830000000000001",
            amount: 1000,
            amount_min_limit: 0,
            interval: "month",
            description: "Subscription for services",
            reference_code: "contract-12345",
            installment_start: "2022-01-01T00:00:00+00:00",
            installment_end: "2023-01-01T00:00:00+00:00",
            pull_retry_limit: 3,
            receiver_name: "Stark Bank S.A.",
            receiver_tax_id: "20.018.183/0001-80",
            receiver_bank_code: "20018183",
            sender_final_name: "Jon Snow",
            sender_final_tax_id: "012.345.678-90",
            type: "qrcodeAndPayment",
            status: "approved",
            created: "2022-01-01T00:00:00+00:00",
            updated: "2022-01-01T00:00:00+00:00"
        }
    }
]
  

C#

[
    BrcodePreview(
        status: "active",
        name: "Jon Snow",
        taxId: "012.345.678-90",
        bankCode: "20018183",
        branchCode: "0001",
        accountNumber: "10000-0",
        accountType: "checking",
        allowChange: false,
        amount: 1000,
        amountType: "fixed",
        reconciliationId: "my-reconciliation-id",
        description: "Payment for services",
        keyId: "+5511989898989",
        subscription: new Subscription(
            bacenId: "RR20220101200181830000000000001",
            amount: 1000,
            amountMinLimit: 0,
            interval: "month",
            description: "Subscription for services",
            referenceCode: "contract-12345",
            installmentStart: "2022-01-01T00:00:00+00:00",
            installmentEnd: "2023-01-01T00:00:00+00:00",
            pullRetryLimit: 3,
            receiverName: "Stark Bank S.A.",
            receiverTaxId: "20.018.183/0001-80",
            receiverBankCode: "20018183",
            senderFinalName: "Jon Snow",
            senderFinalTaxId: "012.345.678-90",
            type: "qrcodeAndPayment",
            status: "approved",
            created: "2022-01-01T00:00:00+00:00",
            updated: "2022-01-01T00:00:00+00:00"
        )
    )
]
  

Go

[
    {
        Status: "active",
        Name: "Jon Snow",
        TaxId: "012.345.678-90",
        BankCode: "20018183",
        BranchCode: "0001",
        AccountNumber: "10000-0",
        AccountType: "checking",
        AllowChange: false,
        Amount: 1000,
        AmountType: "fixed",
        ReconciliationId: "my-reconciliation-id",
        Description: "Payment for services",
        KeyId: "+5511989898989",
        Subscription: Subscription{
            BacenId: "RR20220101200181830000000000001",
            Amount: 1000,
            AmountMinLimit: 0,
            Interval: "month",
            Description: "Subscription for services",
            ReferenceCode: "contract-12345",
            InstallmentStart: "2022-01-01T00:00:00+00:00",
            InstallmentEnd: "2023-01-01T00:00:00+00:00",
            PullRetryLimit: 3,
            ReceiverName: "Stark Bank S.A.",
            ReceiverTaxId: "20.018.183/0001-80",
            ReceiverBankCode: "20018183",
            SenderFinalName: "Jon Snow",
            SenderFinalTaxId: "012.345.678-90",
            Type: "qrcodeAndPayment",
            Status: "approved",
            Created: "2022-01-01T00:00:00+00:00",
            Updated: "2022-01-01T00:00:00+00:00"
        }
    }
]
  

Clojure

[
    {:status "active"
     :name "Jon Snow"
     :tax-id "012.345.678-90"
     :bank-code "20018183"
     :branch-code "0001"
     :account-number "10000-0"
     :account-type "checking"
     :allow-change false
     :amount 1000
     :amount-type "fixed"
     :reconciliation-id "my-reconciliation-id"
     :description "Payment for services"
     :key-id "+5511989898989"
     :subscription {:bacen-id "RR20220101200181830000000000001"
                    :amount 1000
                    :amount-min-limit 0
                    :interval "month"
                    :description "Subscription for services"
                    :reference-code "contract-12345"
                    :installment-start "2022-01-01T00:00:00+00:00"
                    :installment-end "2023-01-01T00:00:00+00:00"
                    :pull-retry-limit 3
                    :receiver-name "Stark Bank S.A."
                    :receiver-tax-id "20.018.183/0001-80"
                    :receiver-bank-code "20018183"
                    :sender-final-name "Jon Snow"
                    :sender-final-tax-id "012.345.678-90"
                    :type "qrcodeAndPayment"
                    :status "approved"
                    :created "2022-01-01T00:00:00+00:00"
                    :updated "2022-01-01T00:00:00+00:00"}}
]
  

Curl

{
    "previews": [
        {
            "status": "active",
            "name": "Jon Snow",
            "taxId": "012.345.678-90",
            "bankCode": "20018183",
            "branchCode": "0001",
            "accountNumber": "10000-0",
            "accountType": "checking",
            "allowChange": false,
            "amount": 1000,
            "amountType": "fixed",
            "reconciliationId": "my-reconciliation-id",
            "description": "Payment for services",
            "keyId": "+5511989898989",
            "subscription": {
                "bacenId": "RR20220101200181830000000000001",
                "amount": 1000,
                "amountMinLimit": 0,
                "interval": "month",
                "description": "Subscription for services",
                "referenceCode": "contract-12345",
                "installmentStart": "2022-01-01T00:00:00+00:00",
                "installmentEnd": "2023-01-01T00:00:00+00:00",
                "pullRetryLimit": 3,
                "receiverName": "Stark Bank S.A.",
                "receiverTaxId": "20.018.183/0001-80",
                "receiverBankCode": "20018183",
                "senderFinalName": "Jon Snow",
                "senderFinalTaxId": "012.345.678-90",
                "type": "qrcodeAndPayment",
                "status": "approved",
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:00:00+00:00"
            }
        }
    ]
}
  

Pix Pull Subscription

A Pix Pull Subscription is a recurring authorization (Pix Automático) that lets a receiver pull Pix payments from a payer's account on a defined schedule.

Here we will show you how to create and manage them.

The Pix Pull Subscription Status

You can use asynchronous Webhooks to monitor status changes. A Pix Pull Subscription follows this life cycle:

pix-pull-subscription-status

StatusDescription
CreatedThe subscription was created in Stark Infra.
PendingThe subscription was delivered to the payer PSP and awaits the payer's answer.
FailedThe subscription was not accepted by the payer PSP.
DeniedThe subscription was denied by the payer.
ApprovedThe subscription was approved by the payer.
ActiveThe subscription was approved and recognized by Stark Infra; Pix Pull Requests can now be created.
ExpiredThe subscription reached its end date and is no longer active.
CanceledThe subscription was canceled (by the payer, receiver or a PSP).

The Pix Pull Subscription Logs

Every time we change a Pix Pull Subscription, we create a Log. Logs are useful for understanding its life cycle, and we fire a Webhook whenever a new Log is created. The possible logs:

pix-pull-subscription-logs

Log typeStatusDescription
CreatedCreatedCreated in Stark Infra.
DeliveringCreatedSent to the other PSP.
DeliveredPendingDelivered to the payer PSP.
FailedFailedNot accepted by the payer PSP or a process failure occurred.
ApprovedPendingApproved by the payer.
DeniedDeniedDenied by the payer or payer PSP.
ConfirmedActiveApproved and recognized by Stark Infra.
ExpiredExpiredReached its end date.
CancelingActiveCancellation request sent to the other PSP.
CanceledCanceledThe subscription was canceled.

The Pix Pull Subscription Object

Attributes

id STRING

Unique id for the Pix pull subscription.

bacenId STRING

Central Bank identifier of the recurring authorization.

amount INTEGER

Fixed amount in cents pulled on each cycle. 0 when the amount is variable.

amountMinLimit INTEGER

Minimum amount in cents allowed per pull when the amount is variable.

interval STRING

Billing interval. Options: "week", "month", "quarter", "semester", "year".

description STRING

Description presented to the payer.

referenceCode STRING

Free reference code for the subscription.

installmentStart STRING

Date when the recurring authorization starts.

installmentEnd STRING

Date when the recurring authorization ends.

due STRING

Due datetime for the payer to approve the authorization.

pullRetryLimit INTEGER

Maximum number of pull retries allowed per cycle.

type STRING

Subscription type. Options: "push", "qrcode", "qrcodeAndPayment", "paymentAndOrQrcode".

externalId STRING

Unique external id to prevent duplicates.

receiverName STRING

Name of the receiver (creditor).

receiverTaxId STRING

CPF or CNPJ of the receiver.

receiverBankCode STRING

Bank ISPB code of the receiver.

senderTaxId STRING

CPF or CNPJ of the payer (debtor).

senderAccountNumber STRING

Account number of the payer.

senderBranchCode STRING

Branch code of the payer's account.

senderBankCode STRING

Bank ISPB code of the payer.

senderFinalName STRING

Name of the final payer, when different from the account holder.

senderFinalTaxId STRING

CPF or CNPJ of the final payer, when different from the account holder.

senderCityCode STRING

IBGE city code of the payer.

status STRING

Current status. Options: "created", "pending", "approved", "active", "failed", "denied", "canceled", "expired".

tags LIST OF STRINGS

Tags associated with the Pix pull subscription.

flow STRING

Direction of the subscription. Options: "out" (you are the receiver), "in" (you are the payer).

created STRING

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

updated STRING

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

Create Pix Pull Subscriptions

Create recurring Pix authorizations (Pix Automático).

Authorization is obtained through one of four journeys via the subscription type: push (push notification to the payer's bank), qrcode (QR Code with direct authorization), qrcodeAndPayment (QR Code with authorization upon payment), and paymentAndOrQrcode (billing QR Code with an authorization offer).

Parameters

subscriptions REQUIRED

List of 1 to 100 subscription objects to create. Each object accepts the parameters described below.

type REQUIRED

Subscription type. Options: "push", "qrcode", "qrcodeAndPayment", "paymentAndOrQrcode".

externalId REQUIRED

Unique string to prevent duplicates.

bacenId REQUIRED

Central Bank identifier of the recurring authorization.

referenceCode REQUIRED

Free reference code for the subscription.

interval REQUIRED

Billing interval. Options: "week", "month", "quarter", "semester", "year".

installmentStart REQUIRED

Date when the recurring authorization starts.

receiverName REQUIRED

Name of the receiver (creditor).

receiverTaxId REQUIRED

CPF or CNPJ of the receiver.

senderTaxId REQUIRED

CPF or CNPJ of the payer (debtor).

senderAccountNumber REQUIRED

Account number of the payer.

senderBranchCode REQUIRED

Branch code of the payer's account.

amount OPTIONAL

Fixed amount in cents pulled on each cycle. Omit for a variable amount.

amountMinLimit OPTIONAL

Minimum amount in cents allowed per pull when the amount is variable.

pullRetryLimit OPTIONAL

Maximum number of pull retries allowed per cycle.

installmentEnd OPTIONAL

Date when the recurring authorization ends.

due OPTIONAL

Due datetime for the payer to approve the authorization.

description OPTIONAL

Description presented to the payer.

senderBankCode OPTIONAL

Bank ISPB code of the payer.

senderFinalName OPTIONAL

Name of the final payer, when different from the account holder.

senderFinalTaxId OPTIONAL

CPF or CNPJ of the final payer, when different from the account holder.

senderCityCode OPTIONAL

IBGE city code of the payer.

receiverBankCode OPTIONAL

Bank ISPB code of the receiver.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/pix-pull-subscription
REQUEST

Python

import starkinfra

subscriptions = starkinfra.pixpullsubscription.create([
    starkinfra.PixPullSubscription(
        type="push",
        external_id="my-subscription-id-1",
        bacen_id="RR20220101200181830000000000001",
        reference_code="contract-12345",
        interval="month",
        installment_start="2022-01-01",
        amount=1000,
        receiver_name="Iron Bank S.A.",
        receiver_tax_id="20.018.183/0001-80",
        sender_tax_id="012.345.678-90",
        sender_account_number="00000-0",
        sender_branch_code="0001",
        tags=["automatic", "pix"]
    )
])

for subscription in subscriptions:
    print(subscription)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-pull-subscription' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "subscriptions": [
        {
            "type": "push",
            "externalId": "my-subscription-id-1",
            "bacenId": "RR20220101200181830000000000001",
            "referenceCode": "contract-12345",
            "interval": "month",
            "installmentStart": "2022-01-01",
            "amount": 1000,
            "receiverName": "Iron Bank S.A.",
            "receiverTaxId": "20.018.183/0001-80",
            "senderTaxId": "012.345.678-90",
            "senderAccountNumber": "00000-0",
            "senderBranchCode": "0001",
            "tags": ["automatic", "pix"]
        }
    ]
}'
  
RESPONSE

Python

[
    PixPullSubscription(
        id="5656565656565656",
        bacen_id="RR20220101200181830000000000001",
        amount=1000,
        amount_min_limit=0,
        interval="month",
        description="",
        reference_code="contract-12345",
        installment_start="2022-01-01T00:00:00+00:00",
        installment_end="",
        due="",
        pull_retry_limit=3,
        type="push",
        external_id="my-subscription-id-1",
        receiver_name="Iron Bank S.A.",
        receiver_tax_id="20.018.183/0001-80",
        receiver_bank_code="20018183",
        sender_tax_id="012.345.678-90",
        sender_account_number="00000-0",
        sender_branch_code="0001",
        sender_bank_code="00000000",
        sender_final_name="",
        sender_final_tax_id="",
        sender_city_code="",
        status="created",
        tags=["automatic", "pix"],
        flow="out",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    )
]
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Subscriptions successfully created",
    "subscriptions": [
        {
            "id": "5656565656565656",
            "bacenId": "RR20220101200181830000000000001",
            "amount": 1000,
            "amountMinLimit": 0,
            "interval": "month",
            "description": "",
            "referenceCode": "contract-12345",
            "installmentStart": "2022-01-01T00:00:00+00:00",
            "installmentEnd": "",
            "due": "",
            "pullRetryLimit": 3,
            "type": "push",
            "externalId": "my-subscription-id-1",
            "receiverName": "Iron Bank S.A.",
            "receiverTaxId": "20.018.183/0001-80",
            "receiverBankCode": "20018183",
            "senderTaxId": "012.345.678-90",
            "senderAccountNumber": "00000-0",
            "senderBranchCode": "0001",
            "senderBankCode": "00000000",
            "senderFinalName": "",
            "senderFinalTaxId": "",
            "senderCityCode": "",
            "status": "created",
            "tags": ["automatic", "pix"],
            "flow": "out",
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

List Pix Pull Subscriptions

List and filter all Pix pull subscriptions. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

ids OPTIONAL

List of strings to get specific entities by ids.

externalIds OPTIONAL

Filter by the external ids provided on creation.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter by status.

tags OPTIONAL

Filter entities that contain the specified tags.

flows OPTIONAL

Filter by flow direction. Options: "in", "out".

ENDPOINT
GET /v2/pix-pull-subscription
REQUEST

Python

import starkinfra

subscriptions = starkinfra.pixpullsubscription.query(
    limit=10,
    status="active"
)

for subscription in subscriptions:
    print(subscription)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-pull-subscription?limit=10&status=active' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixPullSubscription(
    id="5656565656565656",
    bacen_id="RR20220101200181830000000000001",
    amount=1000,
    amount_min_limit=0,
    interval="month",
    description="",
    reference_code="contract-12345",
    installment_start="2022-01-01T00:00:00+00:00",
    installment_end="",
    due="",
    pull_retry_limit=3,
    type="push",
    external_id="my-subscription-id-1",
    receiver_name="Iron Bank S.A.",
    receiver_tax_id="20.018.183/0001-80",
    receiver_bank_code="20018183",
    sender_tax_id="012.345.678-90",
    sender_account_number="00000-0",
    sender_branch_code="0001",
    sender_bank_code="00000000",
    sender_final_name="",
    sender_final_tax_id="",
    sender_city_code="",
    status="active",
    tags=["automatic", "pix"],
    flow="out",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-02T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": null,
    "subscriptions": [
        {
            "id": "5656565656565656",
            "bacenId": "RR20220101200181830000000000001",
            "amount": 1000,
            "amountMinLimit": 0,
            "interval": "month",
            "description": "",
            "referenceCode": "contract-12345",
            "installmentStart": "2022-01-01T00:00:00+00:00",
            "installmentEnd": "",
            "due": "",
            "pullRetryLimit": 3,
            "type": "push",
            "externalId": "my-subscription-id-1",
            "receiverName": "Iron Bank S.A.",
            "receiverTaxId": "20.018.183/0001-80",
            "receiverBankCode": "20018183",
            "senderTaxId": "012.345.678-90",
            "senderAccountNumber": "00000-0",
            "senderBranchCode": "0001",
            "senderBankCode": "00000000",
            "senderFinalName": "",
            "senderFinalTaxId": "",
            "senderCityCode": "",
            "status": "active",
            "tags": ["automatic", "pix"],
            "flow": "out",
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-02T00:00:00+00:00"
        }
    ]
}
  

Get a Pix Pull Subscription

Get a single Pix pull subscription by its id.

Parameters

id REQUIRED

Id of the Pix pull subscription entity.

ENDPOINT
GET /v2/pix-pull-subscription/:id
REQUEST

Python

import starkinfra

subscription = starkinfra.pixpullsubscription.get("5656565656565656")

print(subscription)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-pull-subscription/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixPullSubscription(
    id="5656565656565656",
    bacen_id="RR20220101200181830000000000001",
    amount=1000,
    amount_min_limit=0,
    interval="month",
    description="",
    reference_code="contract-12345",
    installment_start="2022-01-01T00:00:00+00:00",
    installment_end="",
    due="",
    pull_retry_limit=3,
    type="push",
    external_id="my-subscription-id-1",
    receiver_name="Iron Bank S.A.",
    receiver_tax_id="20.018.183/0001-80",
    receiver_bank_code="20018183",
    sender_tax_id="012.345.678-90",
    sender_account_number="00000-0",
    sender_branch_code="0001",
    sender_bank_code="00000000",
    sender_final_name="",
    sender_final_tax_id="",
    sender_city_code="",
    status="active",
    tags=["automatic", "pix"],
    flow="out",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-02T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "subscription": {
        "id": "5656565656565656",
        "bacenId": "RR20220101200181830000000000001",
        "amount": 1000,
        "amountMinLimit": 0,
        "interval": "month",
        "description": "",
        "referenceCode": "contract-12345",
        "installmentStart": "2022-01-01T00:00:00+00:00",
        "installmentEnd": "",
        "due": "",
        "pullRetryLimit": 3,
        "type": "push",
        "externalId": "my-subscription-id-1",
        "receiverName": "Iron Bank S.A.",
        "receiverTaxId": "20.018.183/0001-80",
        "receiverBankCode": "20018183",
        "senderTaxId": "012.345.678-90",
        "senderAccountNumber": "00000-0",
        "senderBranchCode": "0001",
        "senderBankCode": "00000000",
        "senderFinalName": "",
        "senderFinalTaxId": "",
        "senderCityCode": "",
        "status": "active",
        "tags": ["automatic", "pix"],
        "flow": "out",
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-02T00:00:00+00:00"
    }
}
  

Update a Pix Pull Subscription

Approve, deny or activate a Pix pull subscription. The allowed status transitions depend on whether you are the payer or the receiver.

When confirming a received subscription, include the senderCityCode field.

Parameters

id REQUIRED

Id of the Pix pull subscription entity.

status REQUIRED

New status. The payer may set "approved" or "denied"; the receiver may set "active".

reason OPTIONAL

Reason for the status change, required when denying. The available values depend on whether you are the sender or the receiver. Options: "invalidSenderAccountNumber", "accountClosed", "accountBlocked", "invalidBranchCode", "notRecognizedBySender", "userRejected", "notOffered".

senderCityCode OPTIONAL

IBGE city code of the payer, provided when approving.

ENDPOINT
PATCH /v2/pix-pull-subscription/:id
REQUEST

Python

import starkinfra

subscription = starkinfra.pixpullsubscription.update(
    "5656565656565656",
    status="approved",
    sender_city_code="3550308"
)

print(subscription)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request PATCH '{{baseUrl}}/v2/pix-pull-subscription/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "status": "approved",
    "senderCityCode": "3550308"
}'
  
RESPONSE

Python

PixPullSubscription(
    id="5656565656565656",
    bacen_id="RR20220101200181830000000000001",
    amount=1000,
    amount_min_limit=0,
    interval="month",
    description="",
    reference_code="contract-12345",
    installment_start="2022-01-01T00:00:00+00:00",
    installment_end="",
    due="",
    pull_retry_limit=3,
    type="push",
    external_id="my-subscription-id-1",
    receiver_name="Iron Bank S.A.",
    receiver_tax_id="20.018.183/0001-80",
    receiver_bank_code="20018183",
    sender_tax_id="012.345.678-90",
    sender_account_number="00000-0",
    sender_branch_code="0001",
    sender_bank_code="00000000",
    sender_final_name="",
    sender_final_tax_id="",
    sender_city_code="3550308",
    status="approved",
    tags=["automatic", "pix"],
    flow="out",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-02T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Subscription successfully updated",
    "subscription": {
        "id": "5656565656565656",
        "bacenId": "RR20220101200181830000000000001",
        "amount": 1000,
        "amountMinLimit": 0,
        "interval": "month",
        "description": "",
        "referenceCode": "contract-12345",
        "installmentStart": "2022-01-01T00:00:00+00:00",
        "installmentEnd": "",
        "due": "",
        "pullRetryLimit": 3,
        "type": "push",
        "externalId": "my-subscription-id-1",
        "receiverName": "Iron Bank S.A.",
        "receiverTaxId": "20.018.183/0001-80",
        "receiverBankCode": "20018183",
        "senderTaxId": "012.345.678-90",
        "senderAccountNumber": "00000-0",
        "senderBranchCode": "0001",
        "senderBankCode": "00000000",
        "senderFinalName": "",
        "senderFinalTaxId": "",
        "senderCityCode": "3550308",
        "status": "approved",
        "tags": ["automatic", "pix"],
        "flow": "out",
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-02T00:00:00+00:00"
    }
}
  

Cancel a Pix Pull Subscription

Cancel a Pix pull subscription.

Parameters

id REQUIRED

Id of the Pix pull subscription entity.

reason OPTIONAL

Reason for the cancellation. The available values depend on whether you are the sender or the receiver. Options: "accountClosed", "receiverOrganizationClosed", "receiverInternalError", "senderDeceased", "fraud", "senderUserRequested", "receiverUserRequested", "paymentNotFound".

ENDPOINT
DELETE /v2/pix-pull-subscription/:id
REQUEST

Python

import starkinfra

subscription = starkinfra.pixpullsubscription.cancel("5656565656565656")

print(subscription)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request DELETE '{{baseUrl}}/v2/pix-pull-subscription/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixPullSubscription(
    id="5656565656565656",
    bacen_id="RR20220101200181830000000000001",
    amount=1000,
    amount_min_limit=0,
    interval="month",
    description="",
    reference_code="contract-12345",
    installment_start="2022-01-01T00:00:00+00:00",
    installment_end="",
    due="",
    pull_retry_limit=3,
    type="push",
    external_id="my-subscription-id-1",
    receiver_name="Iron Bank S.A.",
    receiver_tax_id="20.018.183/0001-80",
    receiver_bank_code="20018183",
    sender_tax_id="012.345.678-90",
    sender_account_number="00000-0",
    sender_branch_code="0001",
    sender_bank_code="00000000",
    sender_final_name="",
    sender_final_tax_id="",
    sender_city_code="",
    status="canceled",
    tags=["automatic", "pix"],
    flow="out",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-03T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Subscription successfully canceled",
    "subscription": {
        "id": "5656565656565656",
        "bacenId": "RR20220101200181830000000000001",
        "amount": 1000,
        "amountMinLimit": 0,
        "interval": "month",
        "description": "",
        "referenceCode": "contract-12345",
        "installmentStart": "2022-01-01T00:00:00+00:00",
        "installmentEnd": "",
        "due": "",
        "pullRetryLimit": 3,
        "type": "push",
        "externalId": "my-subscription-id-1",
        "receiverName": "Iron Bank S.A.",
        "receiverTaxId": "20.018.183/0001-80",
        "receiverBankCode": "20018183",
        "senderTaxId": "012.345.678-90",
        "senderAccountNumber": "00000-0",
        "senderBranchCode": "0001",
        "senderBankCode": "00000000",
        "senderFinalName": "",
        "senderFinalTaxId": "",
        "senderCityCode": "",
        "status": "canceled",
        "tags": ["automatic", "pix"],
        "flow": "out",
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-03T00:00:00+00:00"
    }
}
  

List Pix Pull Subscription Logs

Get a paged list of all Pix pull subscription logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

subscriptionIds OPTIONAL

Filter logs by the Pix pull subscription ids they belong to.

limit OPTIONAL

Number of results per cursor. Max = 100.

types OPTIONAL

Filter by log types. Options: "created", "delivering", "delivered", "approved", "confirmed", "failed", "denied", "canceling", "canceled", "expired".

ENDPOINT
GET /v2/pix-pull-subscription/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixpullsubscription.log.query(
    limit=10,
    types=["approved"]
)

for log in logs:
    print(log)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-pull-subscription/log?limit=10&types=approved' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    subscription=PixPullSubscription(
        id="5656565656565656",
        bacen_id="RR20220101200181830000000000001",
        amount=1000,
        amount_min_limit=0,
        interval="month",
        description="",
        reference_code="contract-12345",
        installment_start="2022-01-01T00:00:00+00:00",
        installment_end="",
        due="",
        pull_retry_limit=3,
        type="push",
        external_id="my-subscription-id-1",
        receiver_name="Iron Bank S.A.",
        receiver_tax_id="20.018.183/0001-80",
        receiver_bank_code="20018183",
        sender_tax_id="012.345.678-90",
        sender_account_number="00000-0",
        sender_branch_code="0001",
        sender_bank_code="00000000",
        sender_final_name="",
        sender_final_tax_id="",
        sender_city_code="",
        status="approved",
        tags=["automatic", "pix"],
        flow="out",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-02T00:00:00+00:00"
    ),
    type="approved",
    errors=[],
    reason="",
    created="2022-01-02T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "approved",
            "created": "2022-01-02T00:00:00+00:00",
            "subscription": {
                "id": "5656565656565656",
                "bacenId": "RR20220101200181830000000000001",
                "amount": 1000,
                "amountMinLimit": 0,
                "interval": "month",
                "description": "",
                "referenceCode": "contract-12345",
                "installmentStart": "2022-01-01T00:00:00+00:00",
                "installmentEnd": "",
                "due": "",
                "pullRetryLimit": 3,
                "type": "push",
                "externalId": "my-subscription-id-1",
                "receiverName": "Iron Bank S.A.",
                "receiverTaxId": "20.018.183/0001-80",
                "receiverBankCode": "20018183",
                "senderTaxId": "012.345.678-90",
                "senderAccountNumber": "00000-0",
                "senderBranchCode": "0001",
                "senderBankCode": "00000000",
                "senderFinalName": "",
                "senderFinalTaxId": "",
                "senderCityCode": "",
                "status": "approved",
                "tags": ["automatic", "pix"],
                "flow": "out",
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-02T00:00:00+00:00"
            },
            "errors": [],
            "reason": ""
        }
    ]
}
  

Get a Pix Pull Subscription Log

Get a single Pix pull subscription log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/pix-pull-subscription/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixpullsubscription.log.get("6767676767676767")

print(log)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-pull-subscription/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    subscription=PixPullSubscription(
        id="5656565656565656",
        bacen_id="RR20220101200181830000000000001",
        amount=1000,
        amount_min_limit=0,
        interval="month",
        description="",
        reference_code="contract-12345",
        installment_start="2022-01-01T00:00:00+00:00",
        installment_end="",
        due="",
        pull_retry_limit=3,
        type="push",
        external_id="my-subscription-id-1",
        receiver_name="Iron Bank S.A.",
        receiver_tax_id="20.018.183/0001-80",
        receiver_bank_code="20018183",
        sender_tax_id="012.345.678-90",
        sender_account_number="00000-0",
        sender_branch_code="0001",
        sender_bank_code="00000000",
        sender_final_name="",
        sender_final_tax_id="",
        sender_city_code="",
        status="approved",
        tags=["automatic", "pix"],
        flow="out",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-02T00:00:00+00:00"
    ),
    type="approved",
    errors=[],
    reason="",
    created="2022-01-02T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "approved",
        "created": "2022-01-02T00:00:00+00:00",
        "subscription": {
            "id": "5656565656565656",
            "bacenId": "RR20220101200181830000000000001",
            "amount": 1000,
            "amountMinLimit": 0,
            "interval": "month",
            "description": "",
            "referenceCode": "contract-12345",
            "installmentStart": "2022-01-01T00:00:00+00:00",
            "installmentEnd": "",
            "due": "",
            "pullRetryLimit": 3,
            "type": "push",
            "externalId": "my-subscription-id-1",
            "receiverName": "Iron Bank S.A.",
            "receiverTaxId": "20.018.183/0001-80",
            "receiverBankCode": "20018183",
            "senderTaxId": "012.345.678-90",
            "senderAccountNumber": "00000-0",
            "senderBranchCode": "0001",
            "senderBankCode": "00000000",
            "senderFinalName": "",
            "senderFinalTaxId": "",
            "senderCityCode": "",
            "status": "approved",
            "tags": ["automatic", "pix"],
            "flow": "out",
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-02T00:00:00+00:00"
        },
        "errors": [],
        "reason": ""
    }
}
  

Pix Pull Request

A Pix Pull Request is a single charge issued against an active Pix Pull Subscription (Pix Automático), pulling a payment from the payer's account.

Here we will show you how to create and manage them.

The Pix Pull Request Status

You can use asynchronous Webhooks to monitor status changes. A Pix Pull Request follows this life cycle:

pix-pull-request-status

StatusDescription
CreatedThe Pix Pull Request was created in Stark Infra.
ProcessingThe request was delivered to the payer PSP.
ScheduledThe request was scheduled by the payer PSP.
DeniedThe request was denied by the payer PSP.
SuccessThe request was settled.
FailedThe request was unsuccessful.
CanceledThe request was canceled.
ExpiredThe request expired.

The Pix Pull Request Logs

Every time we change a Pix Pull Request, we create a Log. Logs are useful for understanding its life cycle, and we fire a Webhook whenever a new Log is created. The possible logs:

pix-pull-request-logs

Log typeStatusDescription
CreatedCreatedCreated in Stark Infra.
SentProcessingDelivered to the payer PSP.
ScheduledScheduledScheduled by the payer PSP.
DeniedDeniedDenied by the payer PSP.
SuccessSuccessThe request was settled.
CancelingScheduledCancellation requested.
CanceledCanceledThe request was canceled.
ExpiredExpiredThe request expired.

The Pix Pull Request Object

Attributes

id STRING

Unique id for the Pix pull request.

amount INTEGER

Amount in cents to be pulled.

description STRING

Description of the pull request.

due STRING

Due datetime for the pull.

endToEndId STRING

End-to-end id of the Pix pull request.

reconciliationId STRING

Reconciliation id (txid) of the pull.

subscriptionId STRING

Id of the Pix pull subscription this request belongs to.

subscriptionBacenId STRING

Central Bank id of the related subscription.

receiverName STRING

Name of the receiver (creditor).

receiverTaxId STRING

CPF or CNPJ of the receiver.

receiverBankCode STRING

Bank ISPB code of the receiver.

receiverAccountNumber STRING

Account number of the receiver.

receiverBranchCode STRING

Branch code of the receiver's account.

receiverAccountType STRING

Type of the receiver's account.

senderTaxId STRING

CPF or CNPJ of the payer (debtor).

senderBankCode STRING

Bank ISPB code of the payer.

senderFinalName STRING

Name of the final payer, when different from the account holder.

senderFinalTaxId STRING

CPF or CNPJ of the final payer, when different from the account holder.

attemptType STRING

Pull attempt type. Options: "default", "scheduledRetry", "instantRetry".

tags LIST OF STRINGS

Tags associated with the Pix pull request.

flow STRING

Direction of the pull request. Options: "out" (you are the receiver), "in" (you are the payer).

status STRING

Current status. Options: "created", "processing", "scheduled", "denied", "success", "failed", "canceled", "expired".

created STRING

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

updated STRING

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

Create Pix Pull Requests

Issue charges against active Pix pull subscriptions.

As the receiver bank, create a Pix Pull Request to instruct a debit from the payer's account on a scheduled date. Stark Infra verifies that the subscription is approved, the amount is within the authorized limit, the settlement date matches the subscription's charge cycle, payer/receiver details match the contract, the request is made between 10 and 2 days before settlement, and there is no other scheduled request for the same cycle.

Parameters

requests REQUIRED

List of Pix pull request objects to be created. Min = 1, Max = 100. The parameters below describe the fields of each object.

subscriptionId REQUIRED

Id of the active Pix pull subscription to charge.

amount REQUIRED

Amount in cents to be pulled.

due REQUIRED

Due datetime for the pull.

attemptType REQUIRED

Pull attempt type. Options: "default", "scheduledRetry", "instantRetry".

endToEndId REQUIRED

End-to-end id of the Pix pull request.

reconciliationId REQUIRED

Reconciliation id (txid) of the pull.

receiverAccountNumber REQUIRED

Account number of the receiver.

receiverAccountType REQUIRED

Type of the receiver's account.

receiverBankCode OPTIONAL

Bank ISPB code of the receiver.

receiverBranchCode OPTIONAL

Branch code of the receiver's account.

description OPTIONAL

Description of the pull request.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/pix-pull-request
REQUEST

Python

import starkinfra

requests = starkinfra.pixpullrequest.create([
    starkinfra.PixPullRequest(
        subscription_id="5656565656565656",
        amount=1000,
        due="2022-02-01T00:00:00+00:00",
        attempt_type="default",
        end_to_end_id="E20018183202201010000000000001",
        reconciliation_id="txid1234567890",
        receiver_account_number="00000-0",
        receiver_account_type="checking",
        tags=["automatic", "pix"]
    )
])

for request in requests:
    print(request)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-pull-request' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requests": [
        {
            "subscriptionId": "5656565656565656",
            "amount": 1000,
            "due": "2022-02-01T00:00:00+00:00",
            "attemptType": "default",
            "endToEndId": "E20018183202201010000000000001",
            "reconciliationId": "txid1234567890",
            "receiverAccountNumber": "00000-0",
            "receiverAccountType": "checking",
            "tags": ["automatic", "pix"]
        }
    ]
}'
  
RESPONSE

Python

[
    PixPullRequest(
        id="4646464646464646",
        amount=1000,
        description="",
        due="2022-02-01T00:00:00+00:00",
        end_to_end_id="E20018183202201010000000000001",
        reconciliation_id="txid1234567890",
        subscription_id="5656565656565656",
        subscription_bacen_id="RR20220101200181830000000000001",
        receiver_name="Iron Bank S.A.",
        receiver_tax_id="20.018.183/0001-80",
        receiver_bank_code="20018183",
        receiver_account_number="00000-0",
        receiver_branch_code="0001",
        receiver_account_type="checking",
        sender_tax_id="012.345.678-90",
        sender_bank_code="00000000",
        sender_final_name="",
        sender_final_tax_id="",
        attempt_type="default",
        tags=["automatic", "pix"],
        flow="out",
        status="created",
        created="2022-01-15T00:00:00+00:00",
        updated="2022-01-15T00:00:00+00:00"
    )
]
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Requests successfully created",
    "requests": [
        {
            "id": "4646464646464646",
            "amount": 1000,
            "description": "",
            "due": "2022-02-01T00:00:00+00:00",
            "endToEndId": "E20018183202201010000000000001",
            "reconciliationId": "txid1234567890",
            "subscriptionId": "5656565656565656",
            "subscriptionBacenId": "RR20220101200181830000000000001",
            "receiverName": "Iron Bank S.A.",
            "receiverTaxId": "20.018.183/0001-80",
            "receiverBankCode": "20018183",
            "receiverAccountNumber": "00000-0",
            "receiverBranchCode": "0001",
            "receiverAccountType": "checking",
            "senderTaxId": "012.345.678-90",
            "senderBankCode": "00000000",
            "senderFinalName": "",
            "senderFinalTaxId": "",
            "attemptType": "default",
            "tags": ["automatic", "pix"],
            "flow": "out",
            "status": "created",
            "created": "2022-01-15T00:00:00+00:00",
            "updated": "2022-01-15T00:00:00+00:00"
        }
    ]
}
  

List Pix Pull Requests

List and filter all Pix pull requests. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

ids OPTIONAL

List of strings to get specific entities by ids.

subscriptionIds OPTIONAL

Filter by the Pix pull subscription ids the requests belong to.

endToEndIds OPTIONAL

Filter by the end-to-end ids of the requests.

externalIds OPTIONAL

Filter by the external ids of the requests.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter by status.

tags OPTIONAL

Filter entities that contain the specified tags.

attemptTypes OPTIONAL

Filter by attempt type. Options: "default", "scheduledRetry", "instantRetry".

flows OPTIONAL

Filter by flow direction. Options: "in", "out".

ENDPOINT
GET /v2/pix-pull-request
REQUEST

Python

import starkinfra

requests = starkinfra.pixpullrequest.query(
    limit=10,
    subscription_ids=["5656565656565656"]
)

for request in requests:
    print(request)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-pull-request?limit=10&subscriptionIds=5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixPullRequest(
    id="4646464646464646",
    amount=1000,
    description="",
    due="2022-02-01T00:00:00+00:00",
    end_to_end_id="E20018183202201010000000000001",
    reconciliation_id="txid1234567890",
    subscription_id="5656565656565656",
    subscription_bacen_id="RR20220101200181830000000000001",
    receiver_name="Iron Bank S.A.",
    receiver_tax_id="20.018.183/0001-80",
    receiver_bank_code="20018183",
    receiver_account_number="00000-0",
    receiver_branch_code="0001",
    receiver_account_type="checking",
    sender_tax_id="012.345.678-90",
    sender_bank_code="00000000",
    sender_final_name="",
    sender_final_tax_id="",
    attempt_type="default",
    tags=["automatic", "pix"],
    flow="out",
    status="success",
    created="2022-01-15T00:00:00+00:00",
    updated="2022-02-01T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": null,
    "requests": [
        {
            "id": "4646464646464646",
            "amount": 1000,
            "description": "",
            "due": "2022-02-01T00:00:00+00:00",
            "endToEndId": "E20018183202201010000000000001",
            "reconciliationId": "txid1234567890",
            "subscriptionId": "5656565656565656",
            "subscriptionBacenId": "RR20220101200181830000000000001",
            "receiverName": "Iron Bank S.A.",
            "receiverTaxId": "20.018.183/0001-80",
            "receiverBankCode": "20018183",
            "receiverAccountNumber": "00000-0",
            "receiverBranchCode": "0001",
            "receiverAccountType": "checking",
            "senderTaxId": "012.345.678-90",
            "senderBankCode": "00000000",
            "senderFinalName": "",
            "senderFinalTaxId": "",
            "attemptType": "default",
            "tags": ["automatic", "pix"],
            "flow": "out",
            "status": "success",
            "created": "2022-01-15T00:00:00+00:00",
            "updated": "2022-02-01T00:00:00+00:00"
        }
    ]
}
  

Get a Pix Pull Request

Get a single Pix pull request by its id.

Parameters

id REQUIRED

Id of the Pix pull request entity.

ENDPOINT
GET /v2/pix-pull-request/:id
REQUEST

Python

import starkinfra

request = starkinfra.pixpullrequest.get("4646464646464646")

print(request)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-pull-request/4646464646464646' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixPullRequest(
    id="4646464646464646",
    amount=1000,
    description="",
    due="2022-02-01T00:00:00+00:00",
    end_to_end_id="E20018183202201010000000000001",
    reconciliation_id="txid1234567890",
    subscription_id="5656565656565656",
    subscription_bacen_id="RR20220101200181830000000000001",
    receiver_name="Iron Bank S.A.",
    receiver_tax_id="20.018.183/0001-80",
    receiver_bank_code="20018183",
    receiver_account_number="00000-0",
    receiver_branch_code="0001",
    receiver_account_type="checking",
    sender_tax_id="012.345.678-90",
    sender_bank_code="00000000",
    sender_final_name="",
    sender_final_tax_id="",
    attempt_type="default",
    tags=["automatic", "pix"],
    flow="out",
    status="success",
    created="2022-01-15T00:00:00+00:00",
    updated="2022-02-01T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "request": {
        "id": "4646464646464646",
        "amount": 1000,
        "description": "",
        "due": "2022-02-01T00:00:00+00:00",
        "endToEndId": "E20018183202201010000000000001",
        "reconciliationId": "txid1234567890",
        "subscriptionId": "5656565656565656",
        "subscriptionBacenId": "RR20220101200181830000000000001",
        "receiverName": "Iron Bank S.A.",
        "receiverTaxId": "20.018.183/0001-80",
        "receiverBankCode": "20018183",
        "receiverAccountNumber": "00000-0",
        "receiverBranchCode": "0001",
        "receiverAccountType": "checking",
        "senderTaxId": "012.345.678-90",
        "senderBankCode": "00000000",
        "senderFinalName": "",
        "senderFinalTaxId": "",
        "attemptType": "default",
        "tags": ["automatic", "pix"],
        "flow": "out",
        "status": "success",
        "created": "2022-01-15T00:00:00+00:00",
        "updated": "2022-02-01T00:00:00+00:00"
    }
}
  

Update a Pix Pull Request

Schedule or deny a Pix pull request. Only the payer may update a pull request.

Parameters

id REQUIRED

Id of the Pix pull request entity.

status REQUIRED

New status. Options: "scheduled", "denied".

reason OPTIONAL

Reason for the status change, required when denying. Options: "senderAccountClosed", "senderAccountBlocked", "amountNotAllowed".

ENDPOINT
PATCH /v2/pix-pull-request/:id
REQUEST

Python

import starkinfra

request = starkinfra.pixpullrequest.update(
    "4646464646464646",
    status="denied",
    reason="senderAccountClosed"
)

print(request)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request PATCH '{{baseUrl}}/v2/pix-pull-request/4646464646464646' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "status": "denied",
    "reason": "senderAccountClosed"
}'
  
RESPONSE

Python

PixPullRequest(
    id="4646464646464646",
    amount=1000,
    description="",
    due="2022-02-01T00:00:00+00:00",
    end_to_end_id="E20018183202201010000000000001",
    reconciliation_id="txid1234567890",
    subscription_id="5656565656565656",
    subscription_bacen_id="RR20220101200181830000000000001",
    receiver_name="Iron Bank S.A.",
    receiver_tax_id="20.018.183/0001-80",
    receiver_bank_code="20018183",
    receiver_account_number="00000-0",
    receiver_branch_code="0001",
    receiver_account_type="checking",
    sender_tax_id="012.345.678-90",
    sender_bank_code="00000000",
    sender_final_name="",
    sender_final_tax_id="",
    attempt_type="default",
    tags=["automatic", "pix"],
    flow="in",
    status="denied",
    created="2022-01-15T00:00:00+00:00",
    updated="2022-01-16T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Request successfully updated",
    "request": {
        "id": "4646464646464646",
        "amount": 1000,
        "description": "",
        "due": "2022-02-01T00:00:00+00:00",
        "endToEndId": "E20018183202201010000000000001",
        "reconciliationId": "txid1234567890",
        "subscriptionId": "5656565656565656",
        "subscriptionBacenId": "RR20220101200181830000000000001",
        "receiverName": "Iron Bank S.A.",
        "receiverTaxId": "20.018.183/0001-80",
        "receiverBankCode": "20018183",
        "receiverAccountNumber": "00000-0",
        "receiverBranchCode": "0001",
        "receiverAccountType": "checking",
        "senderTaxId": "012.345.678-90",
        "senderBankCode": "00000000",
        "senderFinalName": "",
        "senderFinalTaxId": "",
        "attemptType": "default",
        "tags": ["automatic", "pix"],
        "flow": "in",
        "status": "denied",
        "created": "2022-01-15T00:00:00+00:00",
        "updated": "2022-01-16T00:00:00+00:00"
    }
}
  

Cancel a Pix Pull Request

Cancel a Pix pull request.

Parameters

id REQUIRED

Id of the Pix pull request entity.

reason REQUIRED

Reason for the cancellation. The available values depend on whether you are the sender or the receiver. Options: "accountClosed", "accountBlocked", "pixRequestFailed", "other", "senderUserRequested", "receiverUserRequested".

ENDPOINT
DELETE /v2/pix-pull-request/:id
REQUEST

Python

import starkinfra

request = starkinfra.pixpullrequest.cancel(
    "4646464646464646",
    reason="senderAccountClosed"
)

print(request)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request DELETE '{{baseUrl}}/v2/pix-pull-request/4646464646464646' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixPullRequest(
    id="4646464646464646",
    amount=1000,
    description="",
    due="2022-02-01T00:00:00+00:00",
    end_to_end_id="E20018183202201010000000000001",
    reconciliation_id="txid1234567890",
    subscription_id="5656565656565656",
    subscription_bacen_id="RR20220101200181830000000000001",
    receiver_name="Iron Bank S.A.",
    receiver_tax_id="20.018.183/0001-80",
    receiver_bank_code="20018183",
    receiver_account_number="00000-0",
    receiver_branch_code="0001",
    receiver_account_type="checking",
    sender_tax_id="012.345.678-90",
    sender_bank_code="00000000",
    sender_final_name="",
    sender_final_tax_id="",
    attempt_type="default",
    tags=["automatic", "pix"],
    flow="out",
    status="canceled",
    created="2022-01-15T00:00:00+00:00",
    updated="2022-01-16T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Request successfully canceled",
    "request": {
        "id": "4646464646464646",
        "amount": 1000,
        "description": "",
        "due": "2022-02-01T00:00:00+00:00",
        "endToEndId": "E20018183202201010000000000001",
        "reconciliationId": "txid1234567890",
        "subscriptionId": "5656565656565656",
        "subscriptionBacenId": "RR20220101200181830000000000001",
        "receiverName": "Iron Bank S.A.",
        "receiverTaxId": "20.018.183/0001-80",
        "receiverBankCode": "20018183",
        "receiverAccountNumber": "00000-0",
        "receiverBranchCode": "0001",
        "receiverAccountType": "checking",
        "senderTaxId": "012.345.678-90",
        "senderBankCode": "00000000",
        "senderFinalName": "",
        "senderFinalTaxId": "",
        "attemptType": "default",
        "tags": ["automatic", "pix"],
        "flow": "out",
        "status": "canceled",
        "created": "2022-01-15T00:00:00+00:00",
        "updated": "2022-01-16T00:00:00+00:00"
    }
}
  

List Pix Pull Request Logs

Get a paged list of all Pix pull request logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

requestIds OPTIONAL

Filter logs by the Pix pull request ids they belong to.

limit OPTIONAL

Number of results per cursor. Max = 100.

types OPTIONAL

Filter by log types. Options: "created", "sent", "scheduled", "denied", "success", "failed", "canceling", "canceled", "expired".

ENDPOINT
GET /v2/pix-pull-request/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixpullrequest.log.query(
    limit=10,
    types=["success"]
)

for log in logs:
    print(log)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-pull-request/log?limit=10&types=success' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="5757575757575757",
    request=PixPullRequest(
        id="4646464646464646",
        amount=1000,
        description="",
        due="2022-02-01T00:00:00+00:00",
        end_to_end_id="E20018183202201010000000000001",
        reconciliation_id="txid1234567890",
        subscription_id="5656565656565656",
        subscription_bacen_id="RR20220101200181830000000000001",
        receiver_name="Iron Bank S.A.",
        receiver_tax_id="20.018.183/0001-80",
        receiver_bank_code="20018183",
        receiver_account_number="00000-0",
        receiver_branch_code="0001",
        receiver_account_type="checking",
        sender_tax_id="012.345.678-90",
        sender_bank_code="00000000",
        sender_final_name="",
        sender_final_tax_id="",
        attempt_type="default",
        tags=["automatic", "pix"],
        flow="out",
        status="success",
        created="2022-01-15T00:00:00+00:00",
        updated="2022-02-01T00:00:00+00:00"
    ),
    type="success",
    errors=[],
    reason="",
    description="The Pix Pull Request was settled.",
    created="2022-02-01T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "5757575757575757",
            "type": "success",
            "created": "2022-02-01T00:00:00+00:00",
            "request": {
                "id": "4646464646464646",
                "amount": 1000,
                "description": "",
                "due": "2022-02-01T00:00:00+00:00",
                "endToEndId": "E20018183202201010000000000001",
                "reconciliationId": "txid1234567890",
                "subscriptionId": "5656565656565656",
                "subscriptionBacenId": "RR20220101200181830000000000001",
                "receiverName": "Iron Bank S.A.",
                "receiverTaxId": "20.018.183/0001-80",
                "receiverBankCode": "20018183",
                "receiverAccountNumber": "00000-0",
                "receiverBranchCode": "0001",
                "receiverAccountType": "checking",
                "senderTaxId": "012.345.678-90",
                "senderBankCode": "00000000",
                "senderFinalName": "",
                "senderFinalTaxId": "",
                "attemptType": "default",
                "tags": ["automatic", "pix"],
                "flow": "out",
                "status": "success",
                "created": "2022-01-15T00:00:00+00:00",
                "updated": "2022-02-01T00:00:00+00:00"
            },
            "description": "The Pix Pull Request was settled.",
            "errors": [],
            "reason": ""
        }
    ]
}
  

Get a Pix Pull Request Log

Get a single Pix pull request log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/pix-pull-request/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixpullrequest.log.get("5757575757575757")

print(log)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-pull-request/log/5757575757575757' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="5757575757575757",
    request=PixPullRequest(
        id="4646464646464646",
        amount=1000,
        description="",
        due="2022-02-01T00:00:00+00:00",
        end_to_end_id="E20018183202201010000000000001",
        reconciliation_id="txid1234567890",
        subscription_id="5656565656565656",
        subscription_bacen_id="RR20220101200181830000000000001",
        receiver_name="Iron Bank S.A.",
        receiver_tax_id="20.018.183/0001-80",
        receiver_bank_code="20018183",
        receiver_account_number="00000-0",
        receiver_branch_code="0001",
        receiver_account_type="checking",
        sender_tax_id="012.345.678-90",
        sender_bank_code="00000000",
        sender_final_name="",
        sender_final_tax_id="",
        attempt_type="default",
        tags=["automatic", "pix"],
        flow="out",
        status="success",
        created="2022-01-15T00:00:00+00:00",
        updated="2022-02-01T00:00:00+00:00"
    ),
    type="success",
    errors=[],
    reason="",
    description="The Pix Pull Request was settled.",
    created="2022-02-01T00:00:00+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "log": {
        "id": "5757575757575757",
        "type": "success",
        "created": "2022-02-01T00:00:00+00:00",
        "request": {
            "id": "4646464646464646",
            "amount": 1000,
            "description": "",
            "due": "2022-02-01T00:00:00+00:00",
            "endToEndId": "E20018183202201010000000000001",
            "reconciliationId": "txid1234567890",
            "subscriptionId": "5656565656565656",
            "subscriptionBacenId": "RR20220101200181830000000000001",
            "receiverName": "Iron Bank S.A.",
            "receiverTaxId": "20.018.183/0001-80",
            "receiverBankCode": "20018183",
            "receiverAccountNumber": "00000-0",
            "receiverBranchCode": "0001",
            "receiverAccountType": "checking",
            "senderTaxId": "012.345.678-90",
            "senderBankCode": "00000000",
            "senderFinalName": "",
            "senderFinalTaxId": "",
            "attemptType": "default",
            "tags": ["automatic", "pix"],
            "flow": "out",
            "status": "success",
            "created": "2022-01-15T00:00:00+00:00",
            "updated": "2022-02-01T00:00:00+00:00"
        },
        "description": "The Pix Pull Request was settled.",
        "errors": [],
        "reason": ""
    }
}
  

Pix Key

A Pix Key is an alias that can be used to identify a bank account in the Brazilian Pix system (DICT).

Here we will show you how to create and manage them.

The Pix Key Status

After creation, you can use asynchronous Webhooks to monitor status changes. A Pix Key follows the life cycle below:

pix-key-status

StatusDescription
CreatedThe Pix Key creation request was registered at Stark Infra.
RegisteredThe Pix Key was successfully registered in DICT and is ready to use.
CanceledThe Pix Key was removed from DICT.
FailedThe Pix Key registration failed.

The Pix Key Logs

Every time we change a Pix Key, we create a Log. Logs are useful for understanding the life cycle of each Pix Key. Whenever a new Log is created, we fire a Webhook to your registered URL. Check the diagram below to understand the possible Pix Key Logs:

pix-key-log

Log typeStatusDescription
CreatedCreatedThe Pix Key creation request was registered at Stark Infra.
RegisteredRegisteredThe Pix Key was successfully registered in DICT.
CanceledCanceledThe Pix Key was removed from DICT.
FailedFailedThe Pix Key registration failed.

The Pix Key Object

Attributes

id STRING

Unique id for the Pix key (the key value itself, e.g., CPF, email, phone, EVP).

type STRING

Type of the Pix key. Options: "cpf", "cnpj", "phone", "email", "evp".

accountCreated STRING

Creation date of the linked bank account.

accountType STRING

Type of the linked bank account. Options: "checking", "savings", "salary", "payment", "other".

bankCode STRING

Bank ISPB code of the linked account.

branchCode STRING

Branch code of the linked bank account.

accountNumber STRING

Account number of the linked bank account.

holderName STRING

Name of the account holder.

holderTaxId STRING

CPF or CNPJ of the account holder.

status STRING

Current status. Options: "created", "registered", "canceled", "failed".

owned STRING

Datetime when the key was registered in DICT.

created STRING

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

Create a Pix Key

Register a new Pix key in DICT for your workspace.

Parameters

accountCreated REQUIRED

Creation date of the linked bank account.

accountNumber REQUIRED

Account number of the linked bank account.

accountType REQUIRED

Type of the linked bank account. Options: "checking", "savings", "salary", "payment", "other".

branchCode REQUIRED

Branch code of the linked bank account.

name REQUIRED

Name of the account holder.

taxId REQUIRED

CPF or CNPJ of the account holder.

id OPTIONAL

Key value (CPF, CNPJ, email, phone). Leave empty to generate an EVP key.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/pix-key
REQUEST

Python

import starkinfra

key = starkinfra.pixkey.create(
    starkinfra.PixKey(
        account_created="2022-01-01",
        account_number="10000-0",
        account_type="checking",
        branch_code="0001",
        name="Jon Snow",
        tax_id="012.345.678-90",
        id="jon.snow@starkinfra.com",
        tags=["pix", "key"]
    )
)

print(key)
  

Javascript

const starkinfra = require('starkinfra')

const key = await starkinfra.pixKey.create({
    accountCreated: "2022-01-01",
    accountNumber: "10000-0",
    accountType: "checking",
    branchCode: "0001",
    holderName: "Jon Snow",
    holderTaxId: "012.345.678-90",
    tags: ["pix", "key"]
})

console.log(key)
  

PHP

 "2022-01-01",
        "accountNumber" => "10000-0",
        "accountType" => "checking",
        "branchCode" => "0001",
        "holderName" => "Jon Snow",
        "holderTaxId" => "012.345.678-90",
        "tags" => ["pix", "key"]
    ])
);

print_r($key);
  

Java

import com.starkinfra.*;
import java.util.Arrays;

PixKey key = PixKey.create(
    new PixKey.Builder()
        .accountCreated("2022-01-01")
        .accountNumber("10000-0")
        .accountType("checking")
        .branchCode("0001")
        .holderName("Jon Snow")
        .holderTaxId("012.345.678-90")
        .tags(Arrays.asList("pix", "key"))
        .build()
);

System.out.println(key);
  

Ruby

require('starkinfra')

key = StarkInfra::PixKey.create(
    StarkInfra::PixKey.new(
        account_created: "2022-01-01",
        account_number: "10000-0",
        account_type: "checking",
        branch_code: "0001",
        holder_name: "Jon Snow",
        holder_tax_id: "012.345.678-90",
        tags: ["pix", "key"]
    )
)

puts key
  

Elixir

key = StarkInfra.PixKey.create!(
    %StarkInfra.PixKey{
        account_created: "2022-01-01",
        account_number: "10000-0",
        account_type: "checking",
        branch_code: "0001",
        holder_name: "Jon Snow",
        holder_tax_id: "012.345.678-90",
        tags: ["pix", "key"]
    }
)

IO.inspect(key)
  

C#

using StarkInfra;
using System.Collections.Generic;

PixKey key = PixKey.Create(
    new PixKey(
        accountCreated: "2022-01-01",
        accountNumber: "10000-0",
        accountType: "checking",
        branchCode: "0001",
        holderName: "Jon Snow",
        holderTaxId: "012.345.678-90",
        tags: new List { "pix", "key" }
    )
);

Console.WriteLine(key);
  

Go

package main

import (
    "fmt"
    PixKey "github.com/starkinfra/sdk-go/starkinfra/pixkey"
)

key, err := PixKey.Create(
    PixKey.PixKey{
        AccountCreated: "2022-01-01",
        AccountNumber:  "10000-0",
        AccountType:    "checking",
        BranchCode:     "0001",
        HolderName:     "Jon Snow",
        HolderTaxId:    "012.345.678-90",
        Tags:           []string{"pix", "key"},
    }, nil)

fmt.Println(key)
  

Clojure

(def key
    (starkinfra.pix-key/create
        {:account-created "2022-01-01"
         :account-number "10000-0"
         :account-type "checking"
         :branch-code "0001"
         :holder-name "Jon Snow"
         :holder-tax-id "012.345.678-90"
         :tags ["pix" "key"]}))

(println key)
  

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-key' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "key": {
        "accountCreated": "2022-01-01",
        "accountNumber": "10000-0",
        "accountType": "checking",
        "branchCode": "0001",
        "holderName": "Jon Snow",
        "holderTaxId": "012.345.678-90",
        "tags": ["pix", "key"]
    }
}'
  
RESPONSE

Python

PixKey(
    id="jon.snow@starkinfra.com",
    type="email",
    account_created="2022-01-01",
    account_type="checking",
    bank_code="20018183",
    branch_code="0001",
    account_number="10000-0",
    name="Jon Snow",
    tax_id="012.345.678-90",
    status="created",
    owned="2022-01-01T00:00:00+00:00",
    tags=["pix", "key"],
    created="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "jon.snow@starkinfra.com",
    type: "email",
    accountCreated: "2022-01-01",
    accountNumber: "10000-0",
    accountType: "checking",
    branchCode: "0001",
    holderName: "Jon Snow",
    holderTaxId: "012.345.678-90",
    status: "created",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixKey Object (
    [id] => jon.snow@starkinfra.com
    [type] => email
    [accountCreated] => 2022-01-01
    [accountNumber] => 10000-0
    [accountType] => checking
    [branchCode] => 0001
    [holderName] => Jon Snow
    [holderTaxId] => 012.345.678-90
    [status] => created
    [tags] => Array ( [0] => pix [1] => key )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixKey(
    id=jon.snow@starkinfra.com,
    type=email,
    accountCreated=2022-01-01,
    accountNumber=10000-0,
    accountType=checking,
    branchCode=0001,
    holderName=Jon Snow,
    holderTaxId=012.345.678-90,
    status=created,
    tags=[pix, key],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "jon.snow@starkinfra.com",
    type: "email",
    account_created: "2022-01-01",
    account_number: "10000-0",
    account_type: "checking",
    branch_code: "0001",
    holder_name: "Jon Snow",
    holder_tax_id: "012.345.678-90",
    status: "created",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixKey{
    id: "jon.snow@starkinfra.com",
    type: "email",
    account_created: "2022-01-01",
    account_number: "10000-0",
    account_type: "checking",
    branch_code: "0001",
    holder_name: "Jon Snow",
    holder_tax_id: "012.345.678-90",
    status: "created",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixKey(
    id: "jon.snow@starkinfra.com",
    type: "email",
    accountCreated: "2022-01-01",
    accountNumber: "10000-0",
    accountType: "checking",
    branchCode: "0001",
    holderName: "Jon Snow",
    holderTaxId: "012.345.678-90",
    status: "created",
    tags: [ "pix", "key" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "jon.snow@starkinfra.com",
    Type: "email",
    AccountCreated: "2022-01-01",
    AccountNumber: "10000-0",
    AccountType: "checking",
    BranchCode: "0001",
    HolderName: "Jon Snow",
    HolderTaxId: "012.345.678-90",
    Status: "created",
    Tags: ["pix", "key"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "jon.snow@starkinfra.com"
 :type "email"
 :account-created "2022-01-01"
 :account-number "10000-0"
 :account-type "checking"
 :branch-code "0001"
 :holder-name "Jon Snow"
 :holder-tax-id "012.345.678-90"
 :status "created"
 :tags ["pix" "key"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "key": {
        "id": "jon.snow@starkinfra.com",
        "type": "email",
        "accountCreated": "2022-01-01",
        "accountNumber": "10000-0",
        "accountType": "checking",
        "branchCode": "0001",
        "holderName": "Jon Snow",
        "holderTaxId": "012.345.678-90",
        "status": "created",
        "tags": ["pix", "key"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

List Pix Keys

List and filter all Pix keys registered in your workspace.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ids OPTIONAL

List of key values to get specific entities.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter by status.

tags OPTIONAL

Filter entities that contain the specified tags.

taxId OPTIONAL

Filter Pix keys by the holder's CPF or CNPJ.

type OPTIONAL

Filter by key type.

ENDPOINT
GET /v2/pix-key
REQUEST

Python

import starkinfra

keys = starkinfra.pixkey.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    status="registered",
    tags=["pix", "key"],
    ids=["jon.snow@starkinfra.com"],
    type="email",
    tax_id="012.345.678-90"
)

for key in keys:
    print(key)
  

Javascript

const starkinfra = require('starkinfra')

const keys = await starkinfra.pixKey.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "registered",
    type: "email"
})

for await (const key of keys) {
    console.log(key)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "status" => "registered",
    "type" => "email"
]);

foreach ($keys as $key) {
    print_r($key);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("status", "registered");
params.put("type", "email");

Generator keys = PixKey.query(params);

for (PixKey key : keys) {
    System.out.println(key);
}
  

Ruby

require('starkinfra')

keys = StarkInfra::PixKey.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "registered",
    type: "email"
)

keys.each do |key|
    puts key
end
  

Elixir

keys = StarkInfra.PixKey.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "registered",
    type: "email"
)

for key <- keys do
    IO.inspect(key)
end
  

C#

using StarkInfra;

IEnumerable keys = PixKey.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    status: "registered",
    type: "email"
);

foreach (PixKey key in keys) {
    Console.WriteLine(key);
}
  

Go

package main

import (
    "fmt"
    PixKey "github.com/starkinfra/sdk-go/starkinfra/pixkey"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
    "status": "registered",
    "type":   "email",
}

keys := PixKey.Query(params, nil)

for key := range keys {
    fmt.Println(key)
}
  

Clojure

(def keys
    (starkinfra.pix-key/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :status "registered"
        :type "email"
    }))

(doseq [key keys]
    (println key))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-key?limit=10&after=2022-01-01&before=2022-12-31&status=registered&type=email' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python



PixKey(
    id="jon.snow@starkinfra.com",
    type="email",
    account_created="2022-01-01",
    account_type="checking",
    bank_code="20018183",
    branch_code="0001",
    account_number="10000-0",
    name="Jon Snow",
    tax_id="012.345.678-90",
    status="registered",
    owned="2022-01-01T00:00:00+00:00",
    tags=["pix", "key"],
    created="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "jon.snow@starkinfra.com",
    type: "email",
    status: "registered",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixKey Object (
    [id] => jon.snow@starkinfra.com
    [type] => email
    [status] => registered
    [tags] => Array ( [0] => pix [1] => key )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixKey(
    id=jon.snow@starkinfra.com,
    type=email,
    status=registered,
    tags=[pix, key],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "jon.snow@starkinfra.com",
    type: "email",
    status: "registered",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixKey{
    id: "jon.snow@starkinfra.com",
    type: "email",
    status: "registered",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixKey(
    id: "jon.snow@starkinfra.com",
    type: "email",
    status: "registered",
    tags: [ "pix", "key" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "jon.snow@starkinfra.com",
    Type: "email",
    Status: "registered",
    Tags: ["pix", "key"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "jon.snow@starkinfra.com"
 :type "email"
 :status "registered"
 :tags ["pix" "key"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "cursor": null,
    "keys": [
        {
            "id": "jon.snow@starkinfra.com",
            "type": "email",
            "status": "registered",
            "tags": ["pix", "key"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

Get a Pix Key

Get a single Pix key by its id.

Parameters

id REQUIRED

Id (key value) of the Pix key entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

payerTaxId OPTIONAL

Tax ID of the payer for DICT query purposes.

endToEndId OPTIONAL

Unique end-to-end ID of the Pix transaction associated with this DICT query.

expand OPTIONAL

Entity fields to expand in the response. Options: "statistics", "ownerStatistics".

ENDPOINT
GET /v2/pix-key/:id
REQUEST

Python

import starkinfra

key = starkinfra.pixkey.get(
    "jon.snow@starkinfra.com",
    payer_id="012.345.678-90",
    end_to_end_id="E00002649202201172211u34srod19le",
    expand=["statistics", "owner_statistics"]
)

print(key)
  

Javascript

const starkinfra = require('starkinfra')

const key = await starkinfra.pixKey.get("jon.snow@starkinfra.com")

console.log(key)
  

PHP

Java

import com.starkinfra.*;

PixKey key = PixKey.get("jon.snow@starkinfra.com");

System.out.println(key);
  

Ruby

require('starkinfra')

key = StarkInfra::PixKey.get("jon.snow@starkinfra.com")

puts key
  

Elixir

key = StarkInfra.PixKey.get!("jon.snow@starkinfra.com")

IO.inspect(key)
  

C#

using StarkInfra;

PixKey key = PixKey.Get("jon.snow@starkinfra.com");

Console.WriteLine(key);
  

Go

package main

import (
    "fmt"
    PixKey "github.com/starkinfra/sdk-go/starkinfra/pixkey"
)

key, err := PixKey.Get("jon.snow@starkinfra.com", nil)

fmt.Println(key)
  

Clojure

(def key
    (starkinfra.pix-key/get "jon.snow@starkinfra.com"))

(println key)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-key/jon.snow%40starkinfra.com' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixKey(
    id="jon.snow@starkinfra.com",
    type="email",
    account_created="2022-01-01",
    account_type="checking",
    bank_code="20018183",
    branch_code="0001",
    account_number="10000-0",
    name="Jon Snow",
    tax_id="012.345.678-90",
    status="registered",
    owned="2022-01-01T00:00:00+00:00",
    tags=["pix", "key"],
    statistics=[Statistic(after="2022-01-01", type="reconciliations", value=1)],
    owner_statistics=[Statistic(after="2022-01-01", type="settlements", value=3)],
    created="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "jon.snow@starkinfra.com",
    type: "email",
    accountCreated: "2022-01-01",
    accountNumber: "10000-0",
    accountType: "checking",
    branchCode: "0001",
    holderName: "Jon Snow",
    holderTaxId: "012.345.678-90",
    status: "registered",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixKey Object (
    [id] => jon.snow@starkinfra.com
    [type] => email
    [accountCreated] => 2022-01-01
    [accountNumber] => 10000-0
    [accountType] => checking
    [branchCode] => 0001
    [holderName] => Jon Snow
    [holderTaxId] => 012.345.678-90
    [status] => registered
    [tags] => Array ( [0] => pix [1] => key )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixKey(
    id=jon.snow@starkinfra.com,
    type=email,
    accountCreated=2022-01-01,
    accountNumber=10000-0,
    accountType=checking,
    branchCode=0001,
    holderName=Jon Snow,
    holderTaxId=012.345.678-90,
    status=registered,
    tags=[pix, key],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "jon.snow@starkinfra.com",
    type: "email",
    account_created: "2022-01-01",
    account_number: "10000-0",
    account_type: "checking",
    branch_code: "0001",
    holder_name: "Jon Snow",
    holder_tax_id: "012.345.678-90",
    status: "registered",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixKey{
    id: "jon.snow@starkinfra.com",
    type: "email",
    account_created: "2022-01-01",
    account_number: "10000-0",
    account_type: "checking",
    branch_code: "0001",
    holder_name: "Jon Snow",
    holder_tax_id: "012.345.678-90",
    status: "registered",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixKey(
    id: "jon.snow@starkinfra.com",
    type: "email",
    accountCreated: "2022-01-01",
    accountNumber: "10000-0",
    accountType: "checking",
    branchCode: "0001",
    holderName: "Jon Snow",
    holderTaxId: "012.345.678-90",
    status: "registered",
    tags: [ "pix", "key" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "jon.snow@starkinfra.com",
    Type: "email",
    AccountCreated: "2022-01-01",
    AccountNumber: "10000-0",
    AccountType: "checking",
    BranchCode: "0001",
    HolderName: "Jon Snow",
    HolderTaxId: "012.345.678-90",
    Status: "registered",
    Tags: ["pix", "key"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "jon.snow@starkinfra.com"
 :type "email"
 :account-created "2022-01-01"
 :account-number "10000-0"
 :account-type "checking"
 :branch-code "0001"
 :holder-name "Jon Snow"
 :holder-tax-id "012.345.678-90"
 :status "registered"
 :tags ["pix" "key"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "key": {
        "id": "jon.snow@starkinfra.com",
        "type": "email",
        "accountCreated": "2022-01-01",
        "accountNumber": "10000-0",
        "accountType": "checking",
        "branchCode": "0001",
        "holderName": "Jon Snow",
        "holderTaxId": "012.345.678-90",
        "status": "registered",
        "tags": ["pix", "key"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

Update a Pix Key

Update the account information linked to a Pix key.

Parameters

id REQUIRED

Id (key value) of the Pix key entity.

reason REQUIRED

Reason for the update. Options: "branchTransfer", "reconciliation", "userRequested".

accountCreated OPTIONAL

New creation date of the linked bank account.

accountNumber OPTIONAL

New account number.

accountType OPTIONAL

New account type.

branchCode OPTIONAL

New branch code.

name OPTIONAL

New holder name.

ENDPOINT
PATCH /v2/pix-key/:id
REQUEST

Python

import starkinfra

key = starkinfra.pixkey.update(
    "jon.snow@starkinfra.com",
    reason="branchTransfer",
    account_created="2022-01-01",
    account_number="20000-1",
    account_type="savings",
    branch_code="0002",
    name="Jon Snow"
)

print(key)
  

Javascript

const starkinfra = require('starkinfra')

const key = await starkinfra.pixKey.update(
    "jon.snow@starkinfra.com",
    {
        reason: "userRequested",
        accountNumber: "20000-1",
        accountType: "savings"
    }
)

console.log(key)
  

PHP

 "userRequested",
    "accountNumber" => "20000-1",
    "accountType" => "savings"
]);

print_r($key);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap data = new HashMap<>();
data.put("reason", "userRequested");
data.put("accountNumber", "20000-1");
data.put("accountType", "savings");

PixKey key = PixKey.update("jon.snow@starkinfra.com", data);

System.out.println(key);
  

Ruby

require('starkinfra')

key = StarkInfra::PixKey.update(
    "jon.snow@starkinfra.com",
    reason: "userRequested",
    account_number: "20000-1",
    account_type: "savings"
)

puts key
  

Elixir

key = StarkInfra.PixKey.update!(
    "jon.snow@starkinfra.com",
    reason: "userRequested",
    account_number: "20000-1",
    account_type: "savings"
)

IO.inspect(key)
  

C#

using StarkInfra;
using System.Collections.Generic;

Dictionary data = new Dictionary {
    { "reason", "userRequested" },
    { "accountNumber", "20000-1" },
    { "accountType", "savings" }
};

PixKey key = PixKey.Update("jon.snow@starkinfra.com", data);

Console.WriteLine(key);
  

Go

package main

import (
    "fmt"
    PixKey "github.com/starkinfra/sdk-go/starkinfra/pixkey"
)

var data = map[string]interface{}{
    "reason":        "userRequested",
    "accountNumber": "20000-1",
    "accountType":   "savings",
}

key, err := PixKey.Update("jon.snow@starkinfra.com", data, nil)

fmt.Println(key)
  

Clojure

(def key
    (starkinfra.pix-key/update
        "jon.snow@starkinfra.com"
        {:reason "userRequested"
         :account-number "20000-1"
         :account-type "savings"}))

(println key)
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/pix-key/jon.snow%40starkinfra.com' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reason": "userRequested",
    "accountNumber": "20000-1",
    "accountType": "savings"
}'
  
RESPONSE

Python

PixKey(
    id="jon.snow@starkinfra.com",
    type="email",
    account_created="2022-01-01",
    account_type="savings",
    bank_code="20018183",
    branch_code="0002",
    account_number="20000-1",
    name="Jon Snow",
    tax_id="012.345.678-90",
    status="registered",
    owned="2022-01-01T00:00:00+00:00",
    tags=["pix", "key"],
    created="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "jon.snow@starkinfra.com",
    type: "email",
    accountNumber: "20000-1",
    accountType: "savings",
    status: "registered",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

PHP

PixKey Object (
    [id] => jon.snow@starkinfra.com
    [type] => email
    [accountNumber] => 20000-1
    [accountType] => savings
    [status] => registered
    [tags] => Array ( [0] => pix [1] => key )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-06-01T00:00:00+00:00
)
  

Java

PixKey(
    id=jon.snow@starkinfra.com,
    type=email,
    accountNumber=20000-1,
    accountType=savings,
    status=registered,
    tags=[pix, key],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-06-01T00:00:00+00:00
)
  

Ruby

{
    id: "jon.snow@starkinfra.com",
    type: "email",
    account_number: "20000-1",
    account_type: "savings",
    status: "registered",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixKey{
    id: "jon.snow@starkinfra.com",
    type: "email",
    account_number: "20000-1",
    account_type: "savings",
    status: "registered",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

C#

PixKey(
    id: "jon.snow@starkinfra.com",
    type: "email",
    accountNumber: "20000-1",
    accountType: "savings",
    status: "registered",
    tags: [ "pix", "key" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
)
  

Go

{
    Id: "jon.snow@starkinfra.com",
    Type: "email",
    AccountNumber: "20000-1",
    AccountType: "savings",
    Status: "registered",
    Tags: ["pix", "key"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-06-01T00:00:00+00:00"
}
  

Clojure

{:id "jon.snow@starkinfra.com"
 :type "email"
 :account-number "20000-1"
 :account-type "savings"
 :status "registered"
 :tags ["pix" "key"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-06-01T00:00:00+00:00"}
  

Curl

{
    "key": {
        "id": "jon.snow@starkinfra.com",
        "type": "email",
        "accountNumber": "20000-1",
        "accountType": "savings",
        "status": "registered",
        "tags": ["pix", "key"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-06-01T00:00:00+00:00"
    }
}
  

Cancel a Pix Key

Cancel a Pix key and remove it from DICT.

Parameters

id REQUIRED

Id (key value) of the Pix key entity.

ENDPOINT
DELETE /v2/pix-key/:id
REQUEST

Python

import starkinfra

key = starkinfra.pixkey.cancel("jon.snow@starkinfra.com")

print(key)
  

Javascript

const starkinfra = require('starkinfra')

const key = await starkinfra.pixKey.cancel("jon.snow@starkinfra.com")

console.log(key)
  

PHP

Java

import com.starkinfra.*;

PixKey key = PixKey.cancel("jon.snow@starkinfra.com");

System.out.println(key);
  

Ruby

require('starkinfra')

key = StarkInfra::PixKey.cancel("jon.snow@starkinfra.com")

puts key
  

Elixir

key = StarkInfra.PixKey.cancel!("jon.snow@starkinfra.com")

IO.inspect(key)
  

C#

using StarkInfra;

PixKey key = PixKey.Cancel("jon.snow@starkinfra.com");

Console.WriteLine(key);
  

Go

package main

import (
    "fmt"
    PixKey "github.com/starkinfra/sdk-go/starkinfra/pixkey"
)

key, err := PixKey.Cancel("jon.snow@starkinfra.com", nil)

fmt.Println(key)
  

Clojure

(def key
    (starkinfra.pix-key/cancel "jon.snow@starkinfra.com"))

(println key)
  

Curl

curl --location --request DELETE '{{baseUrl}}/v2/pix-key/jon.snow%40starkinfra.com' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixKey(
    id="jon.snow@starkinfra.com",
    type="email",
    account_created="2022-01-01",
    account_type="checking",
    bank_code="20018183",
    branch_code="0001",
    account_number="10000-0",
    name="Jon Snow",
    tax_id="012.345.678-90",
    status="canceled",
    owned="2022-01-01T00:00:00+00:00",
    tags=["pix", "key"],
    created="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "jon.snow@starkinfra.com",
    type: "email",
    status: "canceled",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-12-01T00:00:00+00:00"
}
  

PHP

PixKey Object (
    [id] => jon.snow@starkinfra.com
    [type] => email
    [status] => canceled
    [tags] => Array ( [0] => pix [1] => key )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-12-01T00:00:00+00:00
)
  

Java

PixKey(
    id=jon.snow@starkinfra.com,
    type=email,
    status=canceled,
    tags=[pix, key],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-12-01T00:00:00+00:00
)
  

Ruby

{
    id: "jon.snow@starkinfra.com",
    type: "email",
    status: "canceled",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-12-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixKey{
    id: "jon.snow@starkinfra.com",
    type: "email",
    status: "canceled",
    tags: ["pix", "key"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-12-01T00:00:00+00:00"
}
  

C#

PixKey(
    id: "jon.snow@starkinfra.com",
    type: "email",
    status: "canceled",
    tags: [ "pix", "key" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-12-01T00:00:00+00:00"
)
  

Go

{
    Id: "jon.snow@starkinfra.com",
    Type: "email",
    Status: "canceled",
    Tags: ["pix", "key"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-12-01T00:00:00+00:00"
}
  

Clojure

{:id "jon.snow@starkinfra.com"
 :type "email"
 :status "canceled"
 :tags ["pix" "key"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-12-01T00:00:00+00:00"}
  

Curl

{
    "key": {
        "id": "jon.snow@starkinfra.com",
        "type": "email",
        "status": "canceled",
        "tags": ["pix", "key"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-12-01T00:00:00+00:00"
    }
}
  

List Pix Key Logs

Get a paged list of all Pix key logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

ids OPTIONAL

Filter by Pix key ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

types OPTIONAL

Filter logs by log types.

ENDPOINT
GET /v2/pix-key/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixkey.log.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    ids=["6767676767676767"],
    types=["registered"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.pixKey.log.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["registered"]
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "types" => ["registered"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");

Generator logs = PixKey.Log.query(params);

for (PixKey.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::PixKey::Log.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["registered"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.PixKey.Log.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["registered"]
)

for log <- logs do
    IO.inspect(log)
end
  

C#

using StarkInfra;

IEnumerable logs = PixKey.Log.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    types: new List { "registered" }
);

foreach (PixKey.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    PixKeyLog "github.com/starkinfra/sdk-go/starkinfra/pixkey/log"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
}

logs := PixKeyLog.Query(params, nil)

for log := range logs {
    fmt.Println(log)
}
  

Clojure

(def logs
    (starkinfra.pix-key.log/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :types ["registered"]
    }))

(doseq [log logs]
    (println log))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-key/log?limit=10&after=2022-01-01&before=2022-12-31&types=registered' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    key=PixKey(
        id="jon.snow@starkinfra.com",
        type="email",
        account_created="2022-01-01",
        account_type="checking",
        bank_code="20018183",
        branch_code="0001",
        account_number="10000-0",
        name="Jon Snow",
        tax_id="012.345.678-90",
        status="registered",
        owned="2022-01-01T00:00:00+00:00",
        tags=["pix", "key"],
        statistics=[Statistic(after="2022-01-01", type="reconciliations", value=1)],
        owner_statistics=[Statistic(after="2022-01-01", type="settlements", value=3)],
        created="2022-01-01T00:00:00+00:00"
    ),
    type="registered",
    errors=[],
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "registered",
    key: {
        id: "jon.snow@starkinfra.com",
        type: "email",
        accountCreated: "2022-01-01",
        accountNumber: "10000-0",
        accountType: "checking",
        branchCode: "0001",
        holderName: "Jon Snow",
        holderTaxId: "012.345.678-90",
        status: "registered",
        tags: ["pix", "key"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => registered
    [key] => PixKey Object (
        [id] => jon.snow@starkinfra.com
        [type] => email
        [accountCreated] => 2022-01-01
        [accountNumber] => 10000-0
        [accountType] => checking
        [branchCode] => 0001
        [holderName] => Jon Snow
        [holderTaxId] => 012.345.678-90
        [status] => registered
        [tags] => Array ( [0] => pix [1] => key )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=registered,
    key=PixKey(
        id=jon.snow@starkinfra.com,
        type=email,
        accountCreated=2022-01-01,
        accountNumber=10000-0,
        accountType=checking,
        branchCode=0001,
        holderName=Jon Snow,
        holderTaxId=012.345.678-90,
        status=registered,
        tags=[pix, key],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "registered",
    key: {
        id: "jon.snow@starkinfra.com",
        type: "email",
        account_created: "2022-01-01",
        account_number: "10000-0",
        account_type: "checking",
        branch_code: "0001",
        holder_name: "Jon Snow",
        holder_tax_id: "012.345.678-90",
        status: "registered",
        tags: ["pix", "key"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixKey.Log{
    id: "6767676767676767",
    type: "registered",
    key: %StarkInfra.PixKey{
        id: "jon.snow@starkinfra.com",
        type: "email",
        account_created: "2022-01-01",
        account_number: "10000-0",
        account_type: "checking",
        branch_code: "0001",
        holder_name: "Jon Snow",
        holder_tax_id: "012.345.678-90",
        status: "registered",
        tags: ["pix", "key"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixKey.Log(
    id: "6767676767676767",
    type: "registered",
    key: PixKey(
        id: "jon.snow@starkinfra.com",
        type: "email",
        accountCreated: "2022-01-01",
        accountNumber: "10000-0",
        accountType: "checking",
        branchCode: "0001",
        holderName: "Jon Snow",
        holderTaxId: "012.345.678-90",
        status: "registered",
        tags: [ "pix", "key" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "registered",
    Key: {
        Id: "jon.snow@starkinfra.com",
        Type: "email",
        AccountCreated: "2022-01-01",
        AccountNumber: "10000-0",
        AccountType: "checking",
        BranchCode: "0001",
        HolderName: "Jon Snow",
        HolderTaxId: "012.345.678-90",
        Status: "registered",
        Tags: ["pix", "key"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "registered"
 :key {:id "jon.snow@starkinfra.com"
       :type "email"
       :account-created "2022-01-01"
       :account-number "10000-0"
       :account-type "checking"
       :branch-code "0001"
       :holder-name "Jon Snow"
       :holder-tax-id "012.345.678-90"
       :status "registered"
       :tags ["pix" "key"]
       :created "2022-01-01T00:00:00+00:00"
       :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "registered",
            "key": {
                "id": "jon.snow@starkinfra.com",
                "type": "email",
                "accountCreated": "2022-01-01",
                "accountNumber": "10000-0",
                "accountType": "checking",
                "branchCode": "0001",
                "holderName": "Jon Snow",
                "holderTaxId": "012.345.678-90",
                "status": "registered",
                "tags": ["pix", "key"],
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:00:00+00:00"
            },
            "created": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Key Log

Get a single Pix key log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/pix-key/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixkey.log.get("6767676767676767")

print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.pixKey.log.get("6767676767676767")

console.log(log)
  

PHP

Java

import com.starkinfra.*;

PixKey.Log log = PixKey.Log.get("6767676767676767");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::PixKey::Log.get("6767676767676767")

puts log
  

Elixir

log = StarkInfra.PixKey.Log.get!("6767676767676767")

IO.inspect(log)
  

C#

using StarkInfra;

PixKey.Log log = PixKey.Log.Get("6767676767676767");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    PixKeyLog "github.com/starkinfra/sdk-go/starkinfra/pixkey/log"
)

log, err := PixKeyLog.Get("6767676767676767", nil)

fmt.Println(log)
  

Clojure

(def log
    (starkinfra.pix-key.log/get "6767676767676767"))

(println log)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-key/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    key=PixKey(
        id="jon.snow@starkinfra.com",
        type="email",
        account_created="2022-01-01",
        account_type="checking",
        bank_code="20018183",
        branch_code="0001",
        account_number="10000-0",
        name="Jon Snow",
        tax_id="012.345.678-90",
        status="registered",
        owned="2022-01-01T00:00:00+00:00",
        tags=["pix", "key"],
        statistics=[Statistic(after="2022-01-01", type="reconciliations", value=1)],
        owner_statistics=[Statistic(after="2022-01-01", type="settlements", value=3)],
        created="2022-01-01T00:00:00+00:00"
    ),
    type="registered",
    errors=[],
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "registered",
    key: {
        id: "jon.snow@starkinfra.com",
        type: "email",
        accountCreated: "2022-01-01",
        accountNumber: "10000-0",
        accountType: "checking",
        branchCode: "0001",
        holderName: "Jon Snow",
        holderTaxId: "012.345.678-90",
        status: "registered",
        tags: ["pix", "key"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => registered
    [key] => PixKey Object (
        [id] => jon.snow@starkinfra.com
        [type] => email
        [accountCreated] => 2022-01-01
        [accountNumber] => 10000-0
        [accountType] => checking
        [branchCode] => 0001
        [holderName] => Jon Snow
        [holderTaxId] => 012.345.678-90
        [status] => registered
        [tags] => Array ( [0] => pix [1] => key )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=registered,
    key=PixKey(
        id=jon.snow@starkinfra.com,
        type=email,
        accountCreated=2022-01-01,
        accountNumber=10000-0,
        accountType=checking,
        branchCode=0001,
        holderName=Jon Snow,
        holderTaxId=012.345.678-90,
        status=registered,
        tags=[pix, key],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "registered",
    key: {
        id: "jon.snow@starkinfra.com",
        type: "email",
        account_created: "2022-01-01",
        account_number: "10000-0",
        account_type: "checking",
        branch_code: "0001",
        holder_name: "Jon Snow",
        holder_tax_id: "012.345.678-90",
        status: "registered",
        tags: ["pix", "key"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixKey.Log{
    id: "6767676767676767",
    type: "registered",
    key: %StarkInfra.PixKey{
        id: "jon.snow@starkinfra.com",
        type: "email",
        account_created: "2022-01-01",
        account_number: "10000-0",
        account_type: "checking",
        branch_code: "0001",
        holder_name: "Jon Snow",
        holder_tax_id: "012.345.678-90",
        status: "registered",
        tags: ["pix", "key"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixKey.Log(
    id: "6767676767676767",
    type: "registered",
    key: PixKey(
        id: "jon.snow@starkinfra.com",
        type: "email",
        accountCreated: "2022-01-01",
        accountNumber: "10000-0",
        accountType: "checking",
        branchCode: "0001",
        holderName: "Jon Snow",
        holderTaxId: "012.345.678-90",
        status: "registered",
        tags: [ "pix", "key" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "registered",
    Key: {
        Id: "jon.snow@starkinfra.com",
        Type: "email",
        AccountCreated: "2022-01-01",
        AccountNumber: "10000-0",
        AccountType: "checking",
        BranchCode: "0001",
        HolderName: "Jon Snow",
        HolderTaxId: "012.345.678-90",
        Status: "registered",
        Tags: ["pix", "key"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "registered"
 :key {:id "jon.snow@starkinfra.com"
       :type "email"
       :account-created "2022-01-01"
       :account-number "10000-0"
       :account-type "checking"
       :branch-code "0001"
       :holder-name "Jon Snow"
       :holder-tax-id "012.345.678-90"
       :status "registered"
       :tags ["pix" "key"]
       :created "2022-01-01T00:00:00+00:00"
       :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "registered",
        "key": {
            "id": "jon.snow@starkinfra.com",
            "type": "email",
            "accountCreated": "2022-01-01",
            "accountNumber": "10000-0",
            "accountType": "checking",
            "branchCode": "0001",
            "holderName": "Jon Snow",
            "holderTaxId": "012.345.678-90",
            "status": "registered",
            "tags": ["pix", "key"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        },
        "created": "2022-01-01T00:01:00+00:00"
    }
}
  

Pix Key Holmes

PixKeyHolmes are used by a Pix participant to verify whether a Pix key is registered in DICT, the Brazilian Central Bank's key directory.

Here we will show you how to create and manage them.

The Pix Key Holmes Object

Attributes

id STRING

Unique id for the Pix key holmes.

status STRING

Current status. Options: "solving", "solved".

keyId STRING

Pix key under verification.

result STRING

Verification result. Options: "registered", "unregistered". Empty until the status is "solved".

tags LIST OF STRINGS

Tags associated with the Pix key holmes.

created STRING

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

updated STRING

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

Create Pix Key Holmes

Request the verification of one or more Pix keys in DICT.

You can create up to 100 Pix key holmes in a single request.

Parameters

keyId REQUIRED

Pix key to be verified. Can be a CPF, CNPJ, phone, e-mail or EVP (random) key.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/pix-key-holmes
REQUEST

Python

import starkinfra

holmes = starkinfra.pixkeyholmes.create([
    starkinfra.PixKeyHolmes(
        key_id="jon.snow@starkinfra.com",
        tags=["key-check"]
    )
])

for sherlock in holmes:
    print(sherlock)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-key-holmes' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "holmes": [
        {
            "keyId": "jon.snow@starkinfra.com",
            "tags": ["key-check"]
        }
    ]
}'
  
RESPONSE

Python

[
    PixKeyHolmes(
        id="5656565656565656",
        status="solving",
        key_id="jon.snow@starkinfra.com",
        result="",
        tags=["key-check"],
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    )
]
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Holmes successfully created",
    "holmes": [
        {
            "id": "5656565656565656",
            "status": "solving",
            "keyId": "jon.snow@starkinfra.com",
            "result": "",
            "tags": ["key-check"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

List Pix Key Holmes

List and filter all Pix key holmes. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ids OPTIONAL

List of strings to get specific entities by ids.

keyId OPTIONAL

Filter by the verified Pix key.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter by status. Options: "solving", "solved".

tags OPTIONAL

Filter entities that contain the specified tags.

ENDPOINT
GET /v2/pix-key-holmes
REQUEST

Python

import starkinfra

holmes = starkinfra.pixkeyholmes.query(
    limit=10,
    status="solved"
)

for sherlock in holmes:
    print(sherlock)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-key-holmes?limit=10&status=solved' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python



PixKeyHolmes(
    id="5656565656565656",
    status="solved",
    key_id="jon.snow@starkinfra.com",
    result="registered",
    tags=["key-check"],
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:05+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": null,
    "holmes": [
        {
            "id": "5656565656565656",
            "status": "solved",
            "keyId": "jon.snow@starkinfra.com",
            "result": "registered",
            "tags": ["key-check"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:05+00:00"
        }
    ]
}
  

Get a Pix Key Holmes

Get a single Pix key holmes by its id.

Parameters

id REQUIRED

Id of the Pix key holmes entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-key-holmes/:id
REQUEST

Python

import starkinfra

sherlock = starkinfra.pixkeyholmes.get("5656565656565656")

print(sherlock)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-key-holmes/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixKeyHolmes(
    id="5656565656565656",
    status="solved",
    key_id="jon.snow@starkinfra.com",
    result="registered",
    tags=["key-check"],
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:05+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "holmes": {
        "id": "5656565656565656",
        "status": "solved",
        "keyId": "jon.snow@starkinfra.com",
        "result": "registered",
        "tags": ["key-check"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:05+00:00"
    }
}
  

List Pix Key Holmes Logs

Get a paged list of all Pix key holmes logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ids OPTIONAL

Filter by Pix key holmes log ids.

holmesIds OPTIONAL

Filter logs by the Pix key holmes ids they belong to.

limit OPTIONAL

Number of results per cursor. Max = 100.

types OPTIONAL

Filter by log types. Options: "solving", "solved".

ENDPOINT
GET /v2/pix-key-holmes/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixkeyholmes.log.query(
    limit=10,
    types="solved"
)

for log in logs:
    print(log)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-key-holmes/log?limit=10&types=solved' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python



PixKeyHolmes.Log(
    id="6767676767676767",
    type="solved",
    holmes=PixKeyHolmes(
        id="5656565656565656",
        status="solved",
        key_id="jon.snow@starkinfra.com",
        result="registered",
        tags=["key-check"],
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:05+00:00"
    ),
    errors=[],
    created="2022-01-01T00:00:05+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "solved",
            "holmes": {
                "id": "5656565656565656",
                "status": "solved",
                "keyId": "jon.snow@starkinfra.com",
                "result": "registered",
                "tags": ["key-check"],
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:00:05+00:00"
            },
            "errors": [],
            "created": "2022-01-01T00:00:05+00:00"
        }
    ]
}
  

Get a Pix Key Holmes Log

Get a single Pix key holmes log by its id.

Parameters

id REQUIRED

Id of the log entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-key-holmes/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixkeyholmes.log.get("6767676767676767")

print(log)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-key-holmes/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixKeyHolmes.Log(
    id="6767676767676767",
    type="solved",
    holmes=PixKeyHolmes(
        id="5656565656565656",
        status="solved",
        key_id="jon.snow@starkinfra.com",
        result="registered",
        tags=["key-check"],
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:05+00:00"
    ),
    errors=[],
    created="2022-01-01T00:00:05+00:00"
)
  

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "solved",
        "holmes": {
            "id": "5656565656565656",
            "status": "solved",
            "keyId": "jon.snow@starkinfra.com",
            "result": "registered",
            "tags": ["key-check"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:05+00:00"
        },
        "errors": [],
        "created": "2022-01-01T00:00:05+00:00"
    }
}
  

Pix Claim

A Pix Claim is used to port or own a Pix key from another institution to your workspace.

Here we will show you how to create and manage them.

The Pix Claim Status

After creation, you can use asynchronous Webhooks to monitor status changes of a Pix Claim. A confirmed status indicates the donor participant confirmed the claim and the Pix Key was deleted; when the status changes to success, the exchange is complete and a new Pix Key is linked to your user's account.

Pix Claims you open (outbound) follow this life cycle:

pix-claim-outbound-status

To monitor received Pix Claims, register a webhook with a pix-claim subscription and filter by the flow attribute. Inbound Pix Claims follow this life cycle:

pix-claim-inbound-status

StatusDescription
CreatedThe Pix Claim was successfully created at Stark Infra.
FailedThe Pix Claim could not be completed.
DeliveredThe Pix Claim was delivered to the donor participant and is awaiting an answer.
ConfirmedThe donor participant confirmed the claim and the Pix Key was deleted.
SuccessThe exchange is complete and the Pix Key is now linked to your user's account.
CanceledThe Pix Claim was canceled or rejected.

The Pix Claim Logs

Every time we change a Pix Claim, we create a Log. Logs are useful for understanding the life cycle of each Pix Claim, and we fire a Webhook whenever a new Log is created. The possible Pix Claim Logs:

pix-claim-outbound-log

For inbound Pix Claims:

pix-claim-inbound-log

Log typeStatusDescription
CreatedCreatedThe Pix Claim was successfully created at Stark Infra.
DeliveredDeliveredThe Pix Claim was delivered to the donor participant and is awaiting an answer.
ConfirmedConfirmedThe donor participant confirmed the claim and the Pix Key was deleted.
SuccessSuccessThe exchange is complete and the Pix Key is now linked to your user's account.
CanceledCanceledThe Pix Claim was canceled or rejected.
FailedFailedThe Pix Claim could not be completed.

The Pix Claim Object

Attributes

id STRING

Unique id for the Pix claim.

type STRING

Type of the claim. Options: "ownership", "portability".

keyType STRING

Type of the Pix key being claimed. Options: "cpf", "cnpj", "phone", "email", "evp".

keyId STRING

Value of the Pix key being claimed.

status STRING

Current status. Options: "created", "failed", "delivered", "confirmed", "success", "canceled".

flow STRING

Direction of the Pix claim. Options: "out" (you are claiming a key from another institution), "in" (another institution is claiming a key from you).

name STRING

Name of the account holder.

taxId STRING

CPF or CNPJ of the account holder.

bacenId STRING

Central Bank ID for this Pix claim.

tags LIST OF STRINGS

Tags associated with the Pix claim.

claimerBankCode STRING

Bank ISPB code of the institution claiming the Pix key.

claimedBankCode STRING

Bank ISPB code of the institution that currently owns the Pix key.

branchCode STRING

Branch code of the linked bank account.

accountNumber STRING

Account number of the linked bank account.

accountType STRING

Type of the linked bank account. Options: "checking", "savings", "salary", "payment", "other".

accountCreated STRING

Creation date of the linked bank account.

created STRING

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

updated STRING

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

Create a Pix Claim

Initiate a Pix key portability or ownership claim.

An ownership claim changes the holder of a Pix Key (only phone keyType). A portability claim changes the linked account without changing the holder (phone, email or taxId keyTypes).

Parameters

accountCreated REQUIRED

Creation date of your linked bank account.

accountNumber REQUIRED

Your bank account number.

accountType REQUIRED

Your bank account type. Options: "checking", "savings", "salary", "payment".

branchCode REQUIRED

Your bank account branch code.

name REQUIRED

Name of the account holder.

taxId REQUIRED

CPF or CNPJ of the account holder.

keyId REQUIRED

Value of the Pix key being claimed.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/pix-claim
REQUEST

Python

import starkinfra

claim = starkinfra.pixclaim.create(
    starkinfra.PixClaim(
        account_created="2022-01-01",
        account_number="10000-0",
        account_type="checking",
        branch_code="0001",
        name="Jon Snow",
        tax_id="012.345.678-90",
        key_id="jon.snow@starkinfra.com",
        tags=["claim", "portability"]
    )
)

print(claim)
  

Javascript

const starkinfra = require('starkinfra')

const claim = await starkinfra.pixClaim.create({
    accountCreated: "2022-01-01",
    accountNumber: "10000-0",
    accountType: "checking",
    branchCode: "0001",
    holderName: "Jon Snow",
    holderTaxId: "012.345.678-90",
    keyId: "jon.snow@starkinfra.com",
    tags: ["claim", "portability"]
})

console.log(claim)
  

PHP

 "2022-01-01",
        "accountNumber" => "10000-0",
        "accountType" => "checking",
        "branchCode" => "0001",
        "holderName" => "Jon Snow",
        "holderTaxId" => "012.345.678-90",
        "keyId" => "jon.snow@starkinfra.com",
        "tags" => ["claim", "portability"]
    ])
);

print_r($claim);
  

Java

import com.starkinfra.*;
import java.util.Arrays;

PixClaim claim = PixClaim.create(
    new PixClaim.Builder()
        .accountCreated("2022-01-01")
        .accountNumber("10000-0")
        .accountType("checking")
        .branchCode("0001")
        .holderName("Jon Snow")
        .holderTaxId("012.345.678-90")
        .keyId("jon.snow@starkinfra.com")
        .tags(Arrays.asList("claim", "portability"))
        .build()
);

System.out.println(claim);
  

Ruby

require('starkinfra')

claim = StarkInfra::PixClaim.create(
    StarkInfra::PixClaim.new(
        account_created: "2022-01-01",
        account_number: "10000-0",
        account_type: "checking",
        branch_code: "0001",
        holder_name: "Jon Snow",
        holder_tax_id: "012.345.678-90",
        key_id: "jon.snow@starkinfra.com",
        tags: ["claim", "portability"]
    )
)

puts claim
  

Elixir

claim = StarkInfra.PixClaim.create!(
    %StarkInfra.PixClaim{
        account_created: "2022-01-01",
        account_number: "10000-0",
        account_type: "checking",
        branch_code: "0001",
        holder_name: "Jon Snow",
        holder_tax_id: "012.345.678-90",
        key_id: "jon.snow@starkinfra.com",
        tags: ["claim", "portability"]
    }
)

IO.inspect(claim)
  

C#

using StarkInfra;
using System.Collections.Generic;

PixClaim claim = PixClaim.Create(
    new PixClaim(
        accountCreated: "2022-01-01",
        accountNumber: "10000-0",
        accountType: "checking",
        branchCode: "0001",
        holderName: "Jon Snow",
        holderTaxId: "012.345.678-90",
        keyId: "jon.snow@starkinfra.com",
        tags: new List { "claim", "portability" }
    )
);

Console.WriteLine(claim);
  

Go

package main

import (
    "fmt"
    PixClaim "github.com/starkinfra/sdk-go/starkinfra/pixclaim"
)

claim, err := PixClaim.Create(
    PixClaim.PixClaim{
        AccountCreated: "2022-01-01",
        AccountNumber:  "10000-0",
        AccountType:    "checking",
        BranchCode:     "0001",
        HolderName:     "Jon Snow",
        HolderTaxId:    "012.345.678-90",
        KeyId:          "jon.snow@starkinfra.com",
        Tags:           []string{"claim", "portability"},
    }, nil)

fmt.Println(claim)
  

Clojure

(def claim
    (starkinfra.pix-claim/create
        {:account-created "2022-01-01"
         :account-number "10000-0"
         :account-type "checking"
         :branch-code "0001"
         :holder-name "Jon Snow"
         :holder-tax-id "012.345.678-90"
         :key-id "jon.snow@starkinfra.com"
         :tags ["claim" "portability"]}))

(println claim)
  

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-claim' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "claim": {
        "accountCreated": "2022-01-01",
        "accountNumber": "10000-0",
        "accountType": "checking",
        "branchCode": "0001",
        "holderName": "Jon Snow",
        "holderTaxId": "012.345.678-90",
        "keyId": "jon.snow@starkinfra.com",
        "tags": ["claim", "portability"]
    }
}'
  
RESPONSE

Python

PixClaim(
    id="5656565656565656",
    type="portability",
    key_type="email",
    key_id="jon.snow@starkinfra.com",
    status="created",
    flow="out",
    name="Jon Snow",
    tax_id="012.345.678-90",
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    tags=["claim", "portability"],
    claimer_bank_code="20018183",
    claimed_bank_code="60701190",
    branch_code="0001",
    account_number="10000-0",
    account_type="checking",
    account_created="2022-01-01T00:00:00+00:00",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    type: "portability",
    keyId: "jon.snow@starkinfra.com",
    keyType: "email",
    status: "created",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixClaim Object (
    [id] => 5656565656565656
    [type] => portability
    [keyId] => jon.snow@starkinfra.com
    [keyType] => email
    [status] => created
    [tags] => Array ( [0] => claim [1] => portability )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixClaim(
    id=5656565656565656,
    type=portability,
    keyId=jon.snow@starkinfra.com,
    keyType=email,
    status=created,
    tags=[claim, portability],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    type: "portability",
    key_id: "jon.snow@starkinfra.com",
    key_type: "email",
    status: "created",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixClaim{
    id: "5656565656565656",
    type: "portability",
    key_id: "jon.snow@starkinfra.com",
    key_type: "email",
    status: "created",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixClaim(
    id: "5656565656565656",
    type: "portability",
    keyId: "jon.snow@starkinfra.com",
    keyType: "email",
    status: "created",
    tags: [ "claim", "portability" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Type: "portability",
    KeyId: "jon.snow@starkinfra.com",
    KeyType: "email",
    Status: "created",
    Tags: ["claim", "portability"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :type "portability"
 :key-id "jon.snow@starkinfra.com"
 :key-type "email"
 :status "created"
 :tags ["claim" "portability"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "claim": {
        "id": "5656565656565656",
        "type": "portability",
        "keyId": "jon.snow@starkinfra.com",
        "keyType": "email",
        "status": "created",
        "tags": ["claim", "portability"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

List Pix Claims

List and filter all Pix claims. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

bacenId OPTIONAL

Filter by the Central Bank ID of the Pix claim.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

flow OPTIONAL

Filter by claim flow. Options: "in" (incoming claims), "out" (outgoing claims).

ids OPTIONAL

List of strings to get specific entities by ids.

keyId OPTIONAL

Filter by the Pix key value.

keyType OPTIONAL

Filter by the type of the Pix key being claimed. Options: "cpf", "cnpj", "phone", "email", "evp".

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter by status.

tags OPTIONAL

Filter entities that contain the specified tags.

type OPTIONAL

Filter by claim type.

ENDPOINT
GET /v2/pix-claim
REQUEST

Python

import starkinfra

claims = starkinfra.pixclaim.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    status=["delivered"],
    type="portability",
    flow="out"
)

for claim in claims:
    print(claim)
  

Javascript

const starkinfra = require('starkinfra')

const claims = await starkinfra.pixClaim.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    type: "portability"
})

for await (const claim of claims) {
    console.log(claim)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "status" => "delivered",
    "type" => "portability"
]);

foreach ($claims as $claim) {
    print_r($claim);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("status", "delivered");
params.put("type", "portability");

Generator claims = PixClaim.query(params);

for (PixClaim claim : claims) {
    System.out.println(claim);
}
  

Ruby

require('starkinfra')

claims = StarkInfra::PixClaim.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    type: "portability"
)

claims.each do |claim|
    puts claim
end
  

Elixir

claims = StarkInfra.PixClaim.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    type: "portability"
)

for claim <- claims do
    IO.inspect(claim)
end
  

C#

using StarkInfra;

IEnumerable claims = PixClaim.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    status: "delivered",
    type: "portability"
);

foreach (PixClaim claim in claims) {
    Console.WriteLine(claim);
}
  

Go

package main

import (
    "fmt"
    PixClaim "github.com/starkinfra/sdk-go/starkinfra/pixclaim"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
    "status": "delivered",
    "type":   "portability",
}

claims := PixClaim.Query(params, nil)

for claim := range claims {
    fmt.Println(claim)
}
  

Clojure

(def claims
    (starkinfra.pix-claim/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :status "delivered"
        :type "portability"
    }))

(doseq [claim claims]
    (println claim))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-claim?limit=10&after=2022-01-01&before=2022-12-31&status=delivered&type=portability' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python



PixClaim(
    id="5656565656565656",
    type="portability",
    key_type="email",
    key_id="jon.snow@starkinfra.com",
    status="delivered",
    flow="out",
    name="Jon Snow",
    tax_id="012.345.678-90",
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    tags=["claim", "portability"],
    claimer_bank_code="20018183",
    claimed_bank_code="60701190",
    branch_code="0001",
    account_number="10000-0",
    account_type="checking",
    account_created="2022-01-01T00:00:00+00:00",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    type: "portability",
    keyId: "jon.snow@starkinfra.com",
    status: "delivered",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

PHP

PixClaim Object (
    [id] => 5656565656565656
    [type] => portability
    [keyId] => jon.snow@starkinfra.com
    [status] => delivered
    [tags] => Array ( [0] => claim [1] => portability )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:01:00+00:00
)
  

Java

PixClaim(
    id=5656565656565656,
    type=portability,
    keyId=jon.snow@starkinfra.com,
    status=delivered,
    tags=[claim, portability],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    type: "portability",
    key_id: "jon.snow@starkinfra.com",
    status: "delivered",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixClaim{
    id: "5656565656565656",
    type: "portability",
    key_id: "jon.snow@starkinfra.com",
    status: "delivered",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

C#

PixClaim(
    id: "5656565656565656",
    type: "portability",
    keyId: "jon.snow@starkinfra.com",
    status: "delivered",
    tags: [ "claim", "portability" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Type: "portability",
    KeyId: "jon.snow@starkinfra.com",
    Status: "delivered",
    Tags: ["claim", "portability"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :type "portability"
 :key-id "jon.snow@starkinfra.com"
 :status "delivered"
 :tags ["claim" "portability"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "cursor": null,
    "claims": [
        {
            "id": "5656565656565656",
            "type": "portability",
            "keyId": "jon.snow@starkinfra.com",
            "status": "delivered",
            "tags": ["claim", "portability"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Claim

Get a single Pix claim by its id.

Parameters

id REQUIRED

Id of the Pix claim entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-claim/:id
REQUEST

Python

import starkinfra

claim = starkinfra.pixclaim.get("5656565656565656")

print(claim)
  

Javascript

const starkinfra = require('starkinfra')

const claim = await starkinfra.pixClaim.get("5656565656565656")

console.log(claim)
  

PHP

Java

import com.starkinfra.*;

PixClaim claim = PixClaim.get("5656565656565656");

System.out.println(claim);
  

Ruby

require('starkinfra')

claim = StarkInfra::PixClaim.get("5656565656565656")

puts claim
  

Elixir

claim = StarkInfra.PixClaim.get!("5656565656565656")

IO.inspect(claim)
  

C#

using StarkInfra;

PixClaim claim = PixClaim.Get("5656565656565656");

Console.WriteLine(claim);
  

Go

package main

import (
    "fmt"
    PixClaim "github.com/starkinfra/sdk-go/starkinfra/pixclaim"
)

claim, err := PixClaim.Get("5656565656565656", nil)

fmt.Println(claim)
  

Clojure

(def claim
    (starkinfra.pix-claim/get "5656565656565656"))

(println claim)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-claim/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixClaim(
    id="5656565656565656",
    type="portability",
    key_type="email",
    key_id="jon.snow@starkinfra.com",
    status="delivered",
    flow="out",
    name="Jon Snow",
    tax_id="012.345.678-90",
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    tags=["claim", "portability"],
    claimer_bank_code="20018183",
    claimed_bank_code="60701190",
    branch_code="0001",
    account_number="10000-0",
    account_type="checking",
    account_created="2022-01-01T00:00:00+00:00",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    type: "portability",
    keyId: "jon.snow@starkinfra.com",
    keyType: "email",
    status: "delivered",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

PHP

PixClaim Object (
    [id] => 5656565656565656
    [type] => portability
    [keyId] => jon.snow@starkinfra.com
    [keyType] => email
    [status] => delivered
    [tags] => Array ( [0] => claim [1] => portability )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:01:00+00:00
)
  

Java

PixClaim(
    id=5656565656565656,
    type=portability,
    keyId=jon.snow@starkinfra.com,
    keyType=email,
    status=delivered,
    tags=[claim, portability],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    type: "portability",
    key_id: "jon.snow@starkinfra.com",
    key_type: "email",
    status: "delivered",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixClaim{
    id: "5656565656565656",
    type: "portability",
    key_id: "jon.snow@starkinfra.com",
    key_type: "email",
    status: "delivered",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

C#

PixClaim(
    id: "5656565656565656",
    type: "portability",
    keyId: "jon.snow@starkinfra.com",
    keyType: "email",
    status: "delivered",
    tags: [ "claim", "portability" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Type: "portability",
    KeyId: "jon.snow@starkinfra.com",
    KeyType: "email",
    Status: "delivered",
    Tags: ["claim", "portability"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :type "portability"
 :key-id "jon.snow@starkinfra.com"
 :key-type "email"
 :status "delivered"
 :tags ["claim" "portability"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "claim": {
        "id": "5656565656565656",
        "type": "portability",
        "keyId": "jon.snow@starkinfra.com",
        "keyType": "email",
        "status": "delivered",
        "tags": ["claim", "portability"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:01:00+00:00"
    }
}
  

Update a Pix Claim

Confirm or cancel an incoming Pix claim.

You must answer an inbound Pix Claim within 7 days of its status changing to delivered. If unanswered, a portability claim is rejected by default and an ownership claim is accepted by default, both with reason defaultBehavior.

You can only confirm Pix Claims with delivered status; confirming deletes the referenced Pix Key from Stark Infra and the Central Bank.

You can only cancel Pix Claims with delivered or confirmed status.

Parameters

id REQUIRED

Id of the Pix claim entity.

status REQUIRED

New status for the claim. Options: "confirmed", "canceled".

reason OPTIONAL

Reason for the status change. Options: "userRequested", "accountClosure", "fraud". Defaults to "userRequested".

ENDPOINT
PATCH /v2/pix-claim/:id
REQUEST

Python

import starkinfra

claim = starkinfra.pixclaim.update(
    "5656565656565656",
    status="confirmed",
    reason="userRequested"
)

print(claim)
  

Javascript

const starkinfra = require('starkinfra')

const claim = await starkinfra.pixClaim.update(
    "5656565656565656",
    { status: "confirmed" }
)

console.log(claim)
  

PHP

 "confirmed"]);

print_r($claim);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap data = new HashMap<>();
data.put("status", "confirmed");

PixClaim claim = PixClaim.update("5656565656565656", data);

System.out.println(claim);
  

Ruby

require('starkinfra')

claim = StarkInfra::PixClaim.update(
    "5656565656565656",
    status: "confirmed"
)

puts claim
  

Elixir

claim = StarkInfra.PixClaim.update!(
    "5656565656565656",
    status: "confirmed"
)

IO.inspect(claim)
  

C#

using StarkInfra;
using System.Collections.Generic;

Dictionary data = new Dictionary {
    { "status", "confirmed" }
};

PixClaim claim = PixClaim.Update("5656565656565656", data);

Console.WriteLine(claim);
  

Go

package main

import (
    "fmt"
    PixClaim "github.com/starkinfra/sdk-go/starkinfra/pixclaim"
)

var data = map[string]interface{}{
    "status": "confirmed",
}

claim, err := PixClaim.Update("5656565656565656", data, nil)

fmt.Println(claim)
  

Clojure

(def claim
    (starkinfra.pix-claim/update
        "5656565656565656"
        {:status "confirmed"}))

(println claim)
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/pix-claim/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "status": "confirmed"
}'
  
RESPONSE

Python

PixClaim(
    id="5656565656565656",
    type="portability",
    key_type="email",
    key_id="jon.snow@starkinfra.com",
    status="confirmed",
    flow="out",
    name="Jon Snow",
    tax_id="012.345.678-90",
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    tags=["claim", "portability"],
    claimer_bank_code="20018183",
    claimed_bank_code="60701190",
    branch_code="0001",
    account_number="10000-0",
    account_type="checking",
    account_created="2022-01-01T00:00:00+00:00",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:02:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    type: "portability",
    keyId: "jon.snow@starkinfra.com",
    status: "confirmed",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
}
  

PHP

PixClaim Object (
    [id] => 5656565656565656
    [type] => portability
    [keyId] => jon.snow@starkinfra.com
    [status] => confirmed
    [tags] => Array ( [0] => claim [1] => portability )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:02:00+00:00
)
  

Java

PixClaim(
    id=5656565656565656,
    type=portability,
    keyId=jon.snow@starkinfra.com,
    status=confirmed,
    tags=[claim, portability],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:02:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    type: "portability",
    key_id: "jon.snow@starkinfra.com",
    status: "confirmed",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
}
  

Elixir

%StarkInfra.PixClaim{
    id: "5656565656565656",
    type: "portability",
    key_id: "jon.snow@starkinfra.com",
    status: "confirmed",
    tags: ["claim", "portability"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
}
  

C#

PixClaim(
    id: "5656565656565656",
    type: "portability",
    keyId: "jon.snow@starkinfra.com",
    status: "confirmed",
    tags: [ "claim", "portability" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Type: "portability",
    KeyId: "jon.snow@starkinfra.com",
    Status: "confirmed",
    Tags: ["claim", "portability"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:02:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :type "portability"
 :key-id "jon.snow@starkinfra.com"
 :status "confirmed"
 :tags ["claim" "portability"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:02:00+00:00"}
  

Curl

{
    "claim": {
        "id": "5656565656565656",
        "type": "portability",
        "keyId": "jon.snow@starkinfra.com",
        "status": "confirmed",
        "tags": ["claim", "portability"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:02:00+00:00"
    }
}
  

List Pix Claim Logs

Get a paged list of all Pix claim logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

claimIds OPTIONAL

List of strings to filter logs by their Pix claim ids.

cursor OPTIONAL

String used to get the next batch of results.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ids OPTIONAL

Filter by Pix claim ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

types OPTIONAL

Filter logs by log types.

ENDPOINT
GET /v2/pix-claim/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixclaim.log.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    types=["confirmed"],
    claim_ids=["5656565656565656"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.pixClaim.log.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["confirmed"]
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "types" => ["confirmed"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");

Generator logs = PixClaim.Log.query(params);

for (PixClaim.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::PixClaim::Log.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["confirmed"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.PixClaim.Log.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["confirmed"]
)

for log <- logs do
    IO.inspect(log)
end
  

C#

using StarkInfra;

IEnumerable logs = PixClaim.Log.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    types: new List { "confirmed" }
);

foreach (PixClaim.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    PixClaimLog "github.com/starkinfra/sdk-go/starkinfra/pixclaim/log"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
}

logs := PixClaimLog.Query(params, nil)

for log := range logs {
    fmt.Println(log)
}
  

Clojure

(def logs
    (starkinfra.pix-claim.log/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :types ["confirmed"]
    }))

(doseq [log logs]
    (println log))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-claim/log?limit=10&after=2022-01-01&before=2022-12-31&types=confirmed' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    claim=PixClaim(
        id="5656565656565656",
        type="portability",
        key_type="email",
        key_id="jon.snow@starkinfra.com",
        status="delivered",
        flow="out",
        name="Jon Snow",
        tax_id="012.345.678-90",
        bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
        tags=["claim", "portability"],
        claimer_bank_code="20018183",
        claimed_bank_code="60701190",
        branch_code="0001",
        account_number="10000-0",
        account_type="checking",
        account_created="2022-01-01T00:00:00+00:00",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:01:00+00:00"
    ),
    type="confirmed",
    errors=[],
    reason="userRequested",
    created="2022-01-01T00:02:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "confirmed",
    claim: {
        id: "5656565656565656",
        type: "portability",
        keyId: "jon.snow@starkinfra.com",
        keyType: "email",
        status: "delivered",
        tags: ["claim", "portability"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:02:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => confirmed
    [claim] => PixClaim Object (
        [id] => 5656565656565656
        [type] => portability
        [keyId] => jon.snow@starkinfra.com
        [keyType] => email
        [status] => delivered
        [tags] => Array ( [0] => claim [1] => portability )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:01:00+00:00
    )
    [created] => 2022-01-01T00:02:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=confirmed,
    claim=PixClaim(
        id=5656565656565656,
        type=portability,
        keyId=jon.snow@starkinfra.com,
        keyType=email,
        status=delivered,
        tags=[claim, portability],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:01:00+00:00
    ),
    created=2022-01-01T00:02:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "confirmed",
    claim: {
        id: "5656565656565656",
        type: "portability",
        key_id: "jon.snow@starkinfra.com",
        key_type: "email",
        status: "delivered",
        tags: ["claim", "portability"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:02:00+00:00"
}
  

Elixir

%StarkInfra.PixClaim.Log{
    id: "6767676767676767",
    type: "confirmed",
    claim: %StarkInfra.PixClaim{
        id: "5656565656565656",
        type: "portability",
        key_id: "jon.snow@starkinfra.com",
        key_type: "email",
        status: "delivered",
        tags: ["claim", "portability"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:02:00+00:00"
}
  

C#

PixClaim.Log(
    id: "6767676767676767",
    type: "confirmed",
    claim: PixClaim(
        id: "5656565656565656",
        type: "portability",
        keyId: "jon.snow@starkinfra.com",
        keyType: "email",
        status: "delivered",
        tags: [ "claim", "portability" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    ),
    created: "2022-01-01T00:02:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "confirmed",
    Claim: {
        Id: "5656565656565656",
        Type: "portability",
        KeyId: "jon.snow@starkinfra.com",
        KeyType: "email",
        Status: "delivered",
        Tags: ["claim", "portability"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:01:00+00:00"
    },
    Created: "2022-01-01T00:02:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "confirmed"
 :claim {:id "5656565656565656"
         :type "portability"
         :key-id "jon.snow@starkinfra.com"
         :key-type "email"
         :status "delivered"
         :tags ["claim" "portability"]
         :created "2022-01-01T00:00:00+00:00"
         :updated "2022-01-01T00:01:00+00:00"}
 :created "2022-01-01T00:02:00+00:00"}
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "confirmed",
            "claim": {
                "id": "5656565656565656",
                "type": "portability",
                "keyId": "jon.snow@starkinfra.com",
                "keyType": "email",
                "status": "delivered",
                "tags": ["claim", "portability"],
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:01:00+00:00"
            },
            "created": "2022-01-01T00:02:00+00:00"
        }
    ]
}
  

Get a Pix Claim Log

Get a single Pix claim log by its id.

Parameters

id REQUIRED

Id of the log entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-claim/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixclaim.log.get("6767676767676767")

print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.pixClaim.log.get("6767676767676767")

console.log(log)
  

PHP

Java

import com.starkinfra.*;

PixClaim.Log log = PixClaim.Log.get("6767676767676767");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::PixClaim::Log.get("6767676767676767")

puts log
  

Elixir

log = StarkInfra.PixClaim.Log.get!("6767676767676767")

IO.inspect(log)
  

C#

using StarkInfra;

PixClaim.Log log = PixClaim.Log.Get("6767676767676767");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    PixClaimLog "github.com/starkinfra/sdk-go/starkinfra/pixclaim/log"
)

log, err := PixClaimLog.Get("6767676767676767", nil)

fmt.Println(log)
  

Clojure

(def log
    (starkinfra.pix-claim.log/get "6767676767676767"))

(println log)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-claim/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    claim=PixClaim(
        id="5656565656565656",
        type="portability",
        key_type="email",
        key_id="jon.snow@starkinfra.com",
        status="delivered",
        flow="out",
        name="Jon Snow",
        tax_id="012.345.678-90",
        bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
        tags=["claim", "portability"],
        claimer_bank_code="20018183",
        claimed_bank_code="60701190",
        branch_code="0001",
        account_number="10000-0",
        account_type="checking",
        account_created="2022-01-01T00:00:00+00:00",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:01:00+00:00"
    ),
    type="confirmed",
    errors=[],
    reason="userRequested",
    created="2022-01-01T00:02:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "confirmed",
    claim: {
        id: "5656565656565656",
        type: "portability",
        keyId: "jon.snow@starkinfra.com",
        keyType: "email",
        status: "delivered",
        tags: ["claim", "portability"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:02:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => confirmed
    [claim] => PixClaim Object (
        [id] => 5656565656565656
        [type] => portability
        [keyId] => jon.snow@starkinfra.com
        [keyType] => email
        [status] => delivered
        [tags] => Array ( [0] => claim [1] => portability )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:01:00+00:00
    )
    [created] => 2022-01-01T00:02:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=confirmed,
    claim=PixClaim(
        id=5656565656565656,
        type=portability,
        keyId=jon.snow@starkinfra.com,
        keyType=email,
        status=delivered,
        tags=[claim, portability],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:01:00+00:00
    ),
    created=2022-01-01T00:02:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "confirmed",
    claim: {
        id: "5656565656565656",
        type: "portability",
        key_id: "jon.snow@starkinfra.com",
        key_type: "email",
        status: "delivered",
        tags: ["claim", "portability"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:02:00+00:00"
}
  

Elixir

%StarkInfra.PixClaim.Log{
    id: "6767676767676767",
    type: "confirmed",
    claim: %StarkInfra.PixClaim{
        id: "5656565656565656",
        type: "portability",
        key_id: "jon.snow@starkinfra.com",
        key_type: "email",
        status: "delivered",
        tags: ["claim", "portability"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:02:00+00:00"
}
  

C#

PixClaim.Log(
    id: "6767676767676767",
    type: "confirmed",
    claim: PixClaim(
        id: "5656565656565656",
        type: "portability",
        keyId: "jon.snow@starkinfra.com",
        keyType: "email",
        status: "delivered",
        tags: [ "claim", "portability" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    ),
    created: "2022-01-01T00:02:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "confirmed",
    Claim: {
        Id: "5656565656565656",
        Type: "portability",
        KeyId: "jon.snow@starkinfra.com",
        KeyType: "email",
        Status: "delivered",
        Tags: ["claim", "portability"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:01:00+00:00"
    },
    Created: "2022-01-01T00:02:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "confirmed"
 :claim {:id "5656565656565656"
         :type "portability"
         :key-id "jon.snow@starkinfra.com"
         :key-type "email"
         :status "delivered"
         :tags ["claim" "portability"]
         :created "2022-01-01T00:00:00+00:00"
         :updated "2022-01-01T00:01:00+00:00"}
 :created "2022-01-01T00:02:00+00:00"}
  

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "confirmed",
        "claim": {
            "id": "5656565656565656",
            "type": "portability",
            "keyId": "jon.snow@starkinfra.com",
            "keyType": "email",
            "status": "delivered",
            "tags": ["claim", "portability"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:01:00+00:00"
        },
        "created": "2022-01-01T00:02:00+00:00"
    }
}
  

Pix Infraction

A Pix Infraction is used to respond to Pix fraud and operational issues to the Brazilian Central Bank.

Here we will show you how to manage them.

The Pix Infraction Status

After creation, you can use asynchronous Webhooks to monitor status changes of a Pix Infraction. A closed status indicates whether the other party accepted or rejected the infraction.

Pix Infractions you report (outbound) follow this life cycle:

pix-infraction-outbound-status

To monitor received Pix Infractions, listen for webhooks and filter by the flow attribute; you must analyze and answer an inbound infraction within 7 days of delivery. Inbound Pix Infractions follow this life cycle:

pix-infraction-inbound-status

StatusDescription
CreatedThe Pix Infraction was successfully created at Stark Infra.
FailedThe Pix Infraction could not be processed.
DeliveredThe Pix Infraction was delivered to the other party.
ClosedThe Pix Infraction was answered and the other party accepted or rejected it.
CanceledThe Pix Infraction was canceled.

The Pix Infraction Logs

Every time we change a Pix Infraction, we create a Log. Logs are useful for understanding the life cycle of each Pix Infraction, and we fire a Webhook whenever a new Log is created. The possible Pix Infraction Logs:

pix-infraction-outbound-log

For inbound Pix Infractions:

pix-infraction-inbound-log

Log typeStatusDescription
CreatedCreatedThe Pix Infraction was successfully created at Stark Infra.
FailedFailedThe Pix Infraction could not be processed.
DeliveredDeliveredThe Pix Infraction was delivered to the other party.
ClosedClosedThe Pix Infraction was answered and the other party accepted or rejected it.
CanceledCanceledThe Pix Infraction was canceled.

The Pix Infraction Object

Attributes

id STRING

Unique id for the Pix infraction.

referenceId STRING

End-to-end id of the transaction the infraction refers to.

type STRING

Type of infraction. Options: "fraud", "reversal", "reversalChargeback".

method STRING

Fraud method. Options: "scam", "invasion", "other", "unauthorized", "coercion", "unknown".

operatorEmail STRING

Contact email of the operator responsible for the Pix infraction.

operatorPhone STRING

Contact phone number of the operator responsible for the Pix infraction.

fraudId STRING

Id of the Pix fraud marking associated with the infraction.

fraudType STRING

Type of fraud associated with the infraction. Options: "identity", "mule", "scam", "other", "unknown".

description STRING

Description of the infraction.

analysis STRING

Analysis text that justifies the result of the infraction report.

tags LIST OF STRINGS

Tags associated with the Pix infraction.

bacenId STRING

Id of the infraction at the Brazilian Central Bank.

disputeId STRING

Id of the Pix dispute associated with the infraction.

amount INTEGER

Amount in cents related to the infraction. Example: 1234 (= R$ 12.34).

flow STRING

Direction of the infraction report. Options: "out" (reported by you), "in" (reported against you).

status STRING

Current status. Options: "created", "failed", "delivered", "closed", "canceled".

creditedBankCode STRING

Bank ISPB code of the credited party.

debitedBankCode STRING

Bank ISPB code of the debited party.

reportedBy STRING

Institution that reported the infraction. Options: "debited", "credited".

result STRING

Result of the infraction analysis. Options: "agreed", "disagreed".

created STRING

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

updated STRING

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

List Pix Infractions

List and filter all Pix infractions. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

ids OPTIONAL

List of strings to get specific entities by ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter by status.

tags OPTIONAL

Filter entities that contain the specified tags.

type OPTIONAL

Filter by infraction type.

ENDPOINT
GET /v2/pix-infraction
REQUEST

Python

import starkinfra

infractions = starkinfra.pixinfraction.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    status=["delivered"],
    type=["fraud"],
    flow="out",
    tags=["infraction", "fraud"]
)

for infraction in infractions:
    print(infraction)
  

Javascript

const starkinfra = require('starkinfra')

const infractions = await starkinfra.pixInfraction.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    type: "fraud"
})

for await (const infraction of infractions) {
    console.log(infraction)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "status" => "delivered",
    "type" => "fraud"
]);

foreach ($infractions as $infraction) {
    print_r($infraction);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("status", "delivered");
params.put("type", "fraud");

Generator infractions = PixInfraction.query(params);

for (PixInfraction infraction : infractions) {
    System.out.println(infraction);
}
  

Ruby

require('starkinfra')

infractions = StarkInfra::PixInfraction.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    type: "fraud"
)

infractions.each do |infraction|
    puts infraction
end
  

Elixir

infractions = StarkInfra.PixInfraction.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    type: "fraud"
)

for infraction <- infractions do
    IO.inspect(infraction)
end
  

C#

using StarkInfra;

IEnumerable infractions = PixInfraction.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    status: "delivered",
    type: "fraud"
);

foreach (PixInfraction infraction in infractions) {
    Console.WriteLine(infraction);
}
  

Go

package main

import (
    "fmt"
    PixInfraction "github.com/starkinfra/sdk-go/starkinfra/pixinfraction"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
    "status": "delivered",
    "type":   "fraud",
}

infractions := PixInfraction.Query(params, nil)

for infraction := range infractions {
    fmt.Println(infraction)
}
  

Clojure

(def infractions
    (starkinfra.pix-infraction/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :status "delivered"
        :type "fraud"
    }))

(doseq [infraction infractions]
    (println infraction))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-infraction?limit=10&after=2022-01-01&before=2022-12-31&status=delivered&type=fraud' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python



PixInfraction(
    id="5656565656565656",
    reference_id="E20018183202201060100rq1feOMJqtZ",
    type="fraud",
    method="scam",
    operator_email="ned.stark@starkbank.com",
    operator_phone="+5511999999999",
    fraud_id="5741774970552320",
    fraud_type="scam",
    description="Client reported unauthorized transaction.",
    analysis="Fraud confirmed after investigation.",
    tags=["infraction", "fraud"],
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    dispute_id="4545454545454545",
    amount=1234,
    flow="out",
    status="delivered",
    credited_bank_code="20018183",
    debited_bank_code="20018183",
    reported_by="credited",
    result="agreed",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    type: "fraud",
    method: "scam",
    status: "delivered",
    flow: "out",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

PHP

PixInfraction Object (
    [id] => 5656565656565656
    [type] => fraud
    [method] => scam
    [status] => delivered
    [flow] => out
    [tags] => Array ( [0] => infraction [1] => fraud )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:01:00+00:00
)
  

Java

PixInfraction(
    id=5656565656565656,
    type=fraud,
    method=scam,
    status=delivered,
    flow=out,
    tags=[infraction, fraud],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    type: "fraud",
    method: "scam",
    status: "delivered",
    flow: "out",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixInfraction{
    id: "5656565656565656",
    type: "fraud",
    method: "scam",
    status: "delivered",
    flow: "out",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

C#

PixInfraction(
    id: "5656565656565656",
    type: "fraud",
    method: "scam",
    status: "delivered",
    flow: "out",
    tags: [ "infraction", "fraud" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Type: "fraud",
    Method: "scam",
    Status: "delivered",
    Flow: "out",
    Tags: ["infraction", "fraud"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :type "fraud"
 :method "scam"
 :status "delivered"
 :flow "out"
 :tags ["infraction" "fraud"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "cursor": null,
    "infractions": [
        {
            "id": "5656565656565656",
            "type": "fraud",
            "method": "scam",
            "status": "delivered",
            "flow": "out",
            "tags": ["infraction", "fraud"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Infraction

Get a single Pix infraction by its id.

Parameters

id REQUIRED

Id of the Pix infraction entity.

ENDPOINT
GET /v2/pix-infraction/:id
REQUEST

Python

import starkinfra

infraction = starkinfra.pixinfraction.get("5656565656565656")

print(infraction)
  

Javascript

const starkinfra = require('starkinfra')

const infraction = await starkinfra.pixInfraction.get("5656565656565656")

console.log(infraction)
  

PHP

Java

import com.starkinfra.*;

PixInfraction infraction = PixInfraction.get("5656565656565656");

System.out.println(infraction);
  

Ruby

require('starkinfra')

infraction = StarkInfra::PixInfraction.get("5656565656565656")

puts infraction
  

Elixir

infraction = StarkInfra.PixInfraction.get!("5656565656565656")

IO.inspect(infraction)
  

C#

using StarkInfra;

PixInfraction infraction = PixInfraction.Get("5656565656565656");

Console.WriteLine(infraction);
  

Go

package main

import (
    "fmt"
    PixInfraction "github.com/starkinfra/sdk-go/starkinfra/pixinfraction"
)

infraction, err := PixInfraction.Get("5656565656565656", nil)

fmt.Println(infraction)
  

Clojure

(def infraction
    (starkinfra.pix-infraction/get "5656565656565656"))

(println infraction)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-infraction/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixInfraction(
    id="5656565656565656",
    reference_id="E20018183202201060100rq1feOMJqtZ",
    type="fraud",
    method="scam",
    operator_email="ned.stark@starkbank.com",
    operator_phone="+5511999999999",
    fraud_id="5741774970552320",
    fraud_type="scam",
    description="Client reported unauthorized transaction.",
    analysis="Fraud confirmed after investigation.",
    tags=["infraction", "fraud"],
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    dispute_id="4545454545454545",
    amount=1234,
    flow="out",
    status="delivered",
    credited_bank_code="20018183",
    debited_bank_code="20018183",
    reported_by="credited",
    result="agreed",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    referenceId: "E20018183202201060100rq1feOMJqtZ",
    type: "fraud",
    method: "scam",
    status: "delivered",
    flow: "out",
    agent: "reporter",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

PHP

PixInfraction Object (
    [id] => 5656565656565656
    [referenceId] => E20018183202201060100rq1feOMJqtZ
    [type] => fraud
    [method] => scam
    [status] => delivered
    [flow] => out
    [agent] => reporter
    [tags] => Array ( [0] => infraction [1] => fraud )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:01:00+00:00
)
  

Java

PixInfraction(
    id=5656565656565656,
    referenceId=E20018183202201060100rq1feOMJqtZ,
    type=fraud,
    method=scam,
    status=delivered,
    flow=out,
    agent=reporter,
    tags=[infraction, fraud],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    reference_id: "E20018183202201060100rq1feOMJqtZ",
    type: "fraud",
    method: "scam",
    status: "delivered",
    flow: "out",
    agent: "reporter",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixInfraction{
    id: "5656565656565656",
    reference_id: "E20018183202201060100rq1feOMJqtZ",
    type: "fraud",
    method: "scam",
    status: "delivered",
    flow: "out",
    agent: "reporter",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

C#

PixInfraction(
    id: "5656565656565656",
    referenceId: "E20018183202201060100rq1feOMJqtZ",
    type: "fraud",
    method: "scam",
    status: "delivered",
    flow: "out",
    agent: "reporter",
    tags: [ "infraction", "fraud" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    ReferenceId: "E20018183202201060100rq1feOMJqtZ",
    Type: "fraud",
    Method: "scam",
    Status: "delivered",
    Flow: "out",
    Agent: "reporter",
    Tags: ["infraction", "fraud"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :reference-id "E20018183202201060100rq1feOMJqtZ"
 :type "fraud"
 :method "scam"
 :status "delivered"
 :flow "out"
 :agent "reporter"
 :tags ["infraction" "fraud"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "infraction": {
        "id": "5656565656565656",
        "referenceId": "E20018183202201060100rq1feOMJqtZ",
        "type": "fraud",
        "method": "scam",
        "status": "delivered",
        "flow": "out",
        "agent": "reporter",
        "tags": ["infraction", "fraud"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:01:00+00:00"
    }
}
  

Update a Pix Infraction

Respond to an incoming Pix infraction report.

Agree with an inbound infraction by patching its analysis to agreed, or disagree by patching it to disagreed.

Parameters

id REQUIRED

Id of the Pix infraction entity.

result REQUIRED

Result of the analysis. Options: "agreed", "disagreed".

fraudType CONDITIONALLY REQUIRED

Type of fraud associated with the infraction. Required when result is "agreed", optional when result is "disagreed". Options: "identity", "mule", "scam", "other".

analysis OPTIONAL

Analysis text explaining the result.

ENDPOINT
PATCH /v2/pix-infraction/:id
REQUEST

Python

import starkinfra

infraction = starkinfra.pixinfraction.update(
    "5656565656565656",
    result="agreed",
    fraud_type="scam",
    analysis="Fraud confirmed after investigation."
)

print(infraction)
  

Javascript

const starkinfra = require('starkinfra')

const infraction = await starkinfra.pixInfraction.update(
    "5656565656565656",
    {
        result: "agreed",
        analysis: "Fraud confirmed after investigation."
    }
)

console.log(infraction)
  

PHP

 "agreed",
    "analysis" => "Fraud confirmed after investigation."
]);

print_r($infraction);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap data = new HashMap<>();
data.put("result", "agreed");
data.put("analysis", "Fraud confirmed after investigation.");

PixInfraction infraction = PixInfraction.update("5656565656565656", data);

System.out.println(infraction);
  

Ruby

require('starkinfra')

infraction = StarkInfra::PixInfraction.update(
    "5656565656565656",
    result: "agreed",
    analysis: "Fraud confirmed after investigation."
)

puts infraction
  

Elixir

infraction = StarkInfra.PixInfraction.update!(
    "5656565656565656",
    result: "agreed",
    analysis: "Fraud confirmed after investigation."
)

IO.inspect(infraction)
  

C#

using StarkInfra;
using System.Collections.Generic;

Dictionary data = new Dictionary {
    { "result", "agreed" },
    { "analysis", "Fraud confirmed after investigation." }
};

PixInfraction infraction = PixInfraction.Update("5656565656565656", data);

Console.WriteLine(infraction);
  

Go

package main

import (
    "fmt"
    PixInfraction "github.com/starkinfra/sdk-go/starkinfra/pixinfraction"
)

var data = map[string]interface{}{
    "result":   "agreed",
    "analysis": "Fraud confirmed after investigation.",
}

infraction, err := PixInfraction.Update("5656565656565656", data, nil)

fmt.Println(infraction)
  

Clojure

(def infraction
    (starkinfra.pix-infraction/update
        "5656565656565656"
        {:result "agreed"
         :analysis "Fraud confirmed after investigation."}))

(println infraction)
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/pix-infraction/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "result": "agreed",
    "analysis": "Fraud confirmed after investigation."
}'
  
RESPONSE

Python

PixInfraction(
    id="5656565656565656",
    reference_id="E20018183202201060100rq1feOMJqtZ",
    type="fraud",
    method="scam",
    operator_email="ned.stark@starkbank.com",
    operator_phone="+5511999999999",
    fraud_id="5741774970552320",
    fraud_type="scam",
    description="Client reported unauthorized transaction.",
    analysis="Fraud confirmed after investigation.",
    tags=["infraction", "fraud"],
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    dispute_id="4545454545454545",
    amount=1234,
    flow="in",
    status="closed",
    credited_bank_code="20018183",
    debited_bank_code="20018183",
    reported_by="debited",
    result="agreed",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:02:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    type: "fraud",
    status: "closed",
    result: "agreed",
    flow: "in",
    agent: "reported",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
}
  

PHP

PixInfraction Object (
    [id] => 5656565656565656
    [type] => fraud
    [status] => closed
    [result] => agreed
    [flow] => in
    [agent] => reported
    [tags] => Array ( [0] => infraction [1] => fraud )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:02:00+00:00
)
  

Java

PixInfraction(
    id=5656565656565656,
    type=fraud,
    status=closed,
    result=agreed,
    flow=in,
    agent=reported,
    tags=[infraction, fraud],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:02:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    type: "fraud",
    status: "closed",
    result: "agreed",
    flow: "in",
    agent: "reported",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
}
  

Elixir

%StarkInfra.PixInfraction{
    id: "5656565656565656",
    type: "fraud",
    status: "closed",
    result: "agreed",
    flow: "in",
    agent: "reported",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
}
  

C#

PixInfraction(
    id: "5656565656565656",
    type: "fraud",
    status: "closed",
    result: "agreed",
    flow: "in",
    agent: "reported",
    tags: [ "infraction", "fraud" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Type: "fraud",
    Status: "closed",
    Result: "agreed",
    Flow: "in",
    Agent: "reported",
    Tags: ["infraction", "fraud"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:02:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :type "fraud"
 :status "closed"
 :result "agreed"
 :flow "in"
 :agent "reported"
 :tags ["infraction" "fraud"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:02:00+00:00"}
  

Curl

{
    "infraction": {
        "id": "5656565656565656",
        "type": "fraud",
        "status": "closed",
        "result": "agreed",
        "flow": "in",
        "agent": "reported",
        "tags": ["infraction", "fraud"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:02:00+00:00"
    }
}
  

Cancel a Pix Infraction

Cancel a Pix infraction you reported.

Parameters

id REQUIRED

Id of the Pix infraction entity.

ENDPOINT
DELETE /v2/pix-infraction/:id
REQUEST

Python

import starkinfra

infraction = starkinfra.pixinfraction.cancel("5656565656565656")

print(infraction)
  

Javascript

const starkinfra = require('starkinfra')

const infraction = await starkinfra.pixInfraction.cancel("5656565656565656")

console.log(infraction)
  

PHP

Java

import com.starkinfra.*;

PixInfraction infraction = PixInfraction.cancel("5656565656565656");

System.out.println(infraction);
  

Ruby

require('starkinfra')

infraction = StarkInfra::PixInfraction.cancel("5656565656565656")

puts infraction
  

Elixir

infraction = StarkInfra.PixInfraction.cancel!("5656565656565656")

IO.inspect(infraction)
  

C#

using StarkInfra;

PixInfraction infraction = PixInfraction.Cancel("5656565656565656");

Console.WriteLine(infraction);
  

Go

package main

import (
    "fmt"
    PixInfraction "github.com/starkinfra/sdk-go/starkinfra/pixinfraction"
)

infraction, err := PixInfraction.Cancel("5656565656565656", nil)

fmt.Println(infraction)
  

Clojure

(def infraction
    (starkinfra.pix-infraction/cancel "5656565656565656"))

(println infraction)
  

Curl

curl --location --request DELETE '{{baseUrl}}/v2/pix-infraction/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixInfraction(
    id="5656565656565656",
    reference_id="E20018183202201060100rq1feOMJqtZ",
    type="fraud",
    method="scam",
    operator_email="ned.stark@starkbank.com",
    operator_phone="+5511999999999",
    fraud_id="5741774970552320",
    fraud_type="scam",
    description="Client reported unauthorized transaction.",
    analysis="Fraud confirmed after investigation.",
    tags=["infraction", "fraud"],
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    dispute_id="4545454545454545",
    amount=1234,
    flow="out",
    status="canceled",
    credited_bank_code="20018183",
    debited_bank_code="20018183",
    reported_by="credited",
    result="agreed",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:03:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    type: "fraud",
    status: "canceled",
    flow: "out",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:03:00+00:00"
}
  

PHP

PixInfraction Object (
    [id] => 5656565656565656
    [type] => fraud
    [status] => canceled
    [flow] => out
    [tags] => Array ( [0] => infraction [1] => fraud )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:03:00+00:00
)
  

Java

PixInfraction(
    id=5656565656565656,
    type=fraud,
    status=canceled,
    flow=out,
    tags=[infraction, fraud],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:03:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    type: "fraud",
    status: "canceled",
    flow: "out",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:03:00+00:00"
}
  

Elixir

%StarkInfra.PixInfraction{
    id: "5656565656565656",
    type: "fraud",
    status: "canceled",
    flow: "out",
    tags: ["infraction", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:03:00+00:00"
}
  

C#

PixInfraction(
    id: "5656565656565656",
    type: "fraud",
    status: "canceled",
    flow: "out",
    tags: [ "infraction", "fraud" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:03:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Type: "fraud",
    Status: "canceled",
    Flow: "out",
    Tags: ["infraction", "fraud"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:03:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :type "fraud"
 :status "canceled"
 :flow "out"
 :tags ["infraction" "fraud"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:03:00+00:00"}
  

Curl

{
    "infraction": {
        "id": "5656565656565656",
        "type": "fraud",
        "status": "canceled",
        "flow": "out",
        "tags": ["infraction", "fraud"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:03:00+00:00"
    }
}
  

List Pix Infraction Logs

Get a paged list of all Pix infraction logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

ids OPTIONAL

Filter by Pix infraction ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

types OPTIONAL

Filter logs by log types.

ENDPOINT
GET /v2/pix-infraction/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixinfraction.log.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    types=["delivered"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.pixInfraction.log.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["delivered"]
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "types" => ["delivered"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");

Generator logs = PixInfraction.Log.query(params);

for (PixInfraction.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::PixInfraction::Log.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["delivered"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.PixInfraction.Log.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["delivered"]
)

for log <- logs do
    IO.inspect(log)
end
  

C#

using StarkInfra;

IEnumerable logs = PixInfraction.Log.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    types: new List { "delivered" }
);

foreach (PixInfraction.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    PixInfractionLog "github.com/starkinfra/sdk-go/starkinfra/pixinfraction/log"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
}

logs := PixInfractionLog.Query(params, nil)

for log := range logs {
    fmt.Println(log)
}
  

Clojure

(def logs
    (starkinfra.pix-infraction.log/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :types ["delivered"]
    }))

(doseq [log logs]
    (println log))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-infraction/log?limit=10&after=2022-01-01&before=2022-12-31&types=delivered' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    infraction=PixInfraction(
        id="5656565656565656",
        reference_id="E20018183202201060100rq1feOMJqtZ",
        type="fraud",
        method="scam",
        operator_email="ned.stark@starkbank.com",
        operator_phone="+5511999999999",
        fraud_id="5741774970552320",
        fraud_type="scam",
        description="Client reported unauthorized transaction.",
        analysis="Fraud confirmed after investigation.",
        tags=["infraction", "fraud"],
        bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
        dispute_id="4545454545454545",
        amount=1234,
        flow="out",
        status="delivered",
        credited_bank_code="20018183",
        debited_bank_code="20018183",
        reported_by="credited",
        result="agreed",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:01:00+00:00"
    ),
    type="delivered",
    errors=[],
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "delivered",
    infraction: {
        id: "5656565656565656",
        referenceId: "E20018183202201060100rq1feOMJqtZ",
        type: "fraud",
        method: "scam",
        status: "delivered",
        flow: "out",
        agent: "reporter",
        tags: ["infraction", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => delivered
    [infraction] => PixInfraction Object (
        [id] => 5656565656565656
        [referenceId] => E20018183202201060100rq1feOMJqtZ
        [type] => fraud
        [method] => scam
        [status] => delivered
        [flow] => out
        [agent] => reporter
        [tags] => Array ( [0] => infraction [1] => fraud )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:01:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=delivered,
    infraction=PixInfraction(
        id=5656565656565656,
        referenceId=E20018183202201060100rq1feOMJqtZ,
        type=fraud,
        method=scam,
        status=delivered,
        flow=out,
        agent=reporter,
        tags=[infraction, fraud],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:01:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "delivered",
    infraction: {
        id: "5656565656565656",
        reference_id: "E20018183202201060100rq1feOMJqtZ",
        type: "fraud",
        method: "scam",
        status: "delivered",
        flow: "out",
        agent: "reporter",
        tags: ["infraction", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixInfraction.Log{
    id: "6767676767676767",
    type: "delivered",
    infraction: %StarkInfra.PixInfraction{
        id: "5656565656565656",
        reference_id: "E20018183202201060100rq1feOMJqtZ",
        type: "fraud",
        method: "scam",
        status: "delivered",
        flow: "out",
        agent: "reporter",
        tags: ["infraction", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixInfraction.Log(
    id: "6767676767676767",
    type: "delivered",
    infraction: PixInfraction(
        id: "5656565656565656",
        referenceId: "E20018183202201060100rq1feOMJqtZ",
        type: "fraud",
        method: "scam",
        status: "delivered",
        flow: "out",
        agent: "reporter",
        tags: [ "infraction", "fraud" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "delivered",
    Infraction: {
        Id: "5656565656565656",
        ReferenceId: "E20018183202201060100rq1feOMJqtZ",
        Type: "fraud",
        Method: "scam",
        Status: "delivered",
        Flow: "out",
        Agent: "reporter",
        Tags: ["infraction", "fraud"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:01:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "delivered"
 :infraction {:id "5656565656565656"
              :reference-id "E20018183202201060100rq1feOMJqtZ"
              :type "fraud"
              :method "scam"
              :status "delivered"
              :flow "out"
              :agent "reporter"
              :tags ["infraction" "fraud"]
              :created "2022-01-01T00:00:00+00:00"
              :updated "2022-01-01T00:01:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "delivered",
            "infraction": {
                "id": "5656565656565656",
                "referenceId": "E20018183202201060100rq1feOMJqtZ",
                "type": "fraud",
                "method": "scam",
                "status": "delivered",
                "flow": "out",
                "agent": "reporter",
                "tags": ["infraction", "fraud"],
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:01:00+00:00"
            },
            "created": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Infraction Log

Get a single Pix infraction log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/pix-infraction/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixinfraction.log.get("6767676767676767")

print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.pixInfraction.log.get("6767676767676767")

console.log(log)
  

PHP

Java

import com.starkinfra.*;

PixInfraction.Log log = PixInfraction.Log.get("6767676767676767");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::PixInfraction::Log.get("6767676767676767")

puts log
  

Elixir

log = StarkInfra.PixInfraction.Log.get!("6767676767676767")

IO.inspect(log)
  

C#

using StarkInfra;

PixInfraction.Log log = PixInfraction.Log.Get("6767676767676767");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    PixInfractionLog "github.com/starkinfra/sdk-go/starkinfra/pixinfraction/log"
)

log, err := PixInfractionLog.Get("6767676767676767", nil)

fmt.Println(log)
  

Clojure

(def log
    (starkinfra.pix-infraction.log/get "6767676767676767"))

(println log)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-infraction/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    infraction=PixInfraction(
        id="5656565656565656",
        reference_id="E20018183202201060100rq1feOMJqtZ",
        type="fraud",
        method="scam",
        operator_email="ned.stark@starkbank.com",
        operator_phone="+5511999999999",
        fraud_id="5741774970552320",
        fraud_type="scam",
        description="Client reported unauthorized transaction.",
        analysis="Fraud confirmed after investigation.",
        tags=["infraction", "fraud"],
        bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
        dispute_id="4545454545454545",
        amount=1234,
        flow="out",
        status="delivered",
        credited_bank_code="20018183",
        debited_bank_code="20018183",
        reported_by="credited",
        result="agreed",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:01:00+00:00"
    ),
    type="delivered",
    errors=[],
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "delivered",
    infraction: {
        id: "5656565656565656",
        referenceId: "E20018183202201060100rq1feOMJqtZ",
        type: "fraud",
        method: "scam",
        status: "delivered",
        flow: "out",
        agent: "reporter",
        tags: ["infraction", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => delivered
    [infraction] => PixInfraction Object (
        [id] => 5656565656565656
        [referenceId] => E20018183202201060100rq1feOMJqtZ
        [type] => fraud
        [method] => scam
        [status] => delivered
        [flow] => out
        [agent] => reporter
        [tags] => Array ( [0] => infraction [1] => fraud )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:01:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=delivered,
    infraction=PixInfraction(
        id=5656565656565656,
        referenceId=E20018183202201060100rq1feOMJqtZ,
        type=fraud,
        method=scam,
        status=delivered,
        flow=out,
        agent=reporter,
        tags=[infraction, fraud],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:01:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "delivered",
    infraction: {
        id: "5656565656565656",
        reference_id: "E20018183202201060100rq1feOMJqtZ",
        type: "fraud",
        method: "scam",
        status: "delivered",
        flow: "out",
        agent: "reporter",
        tags: ["infraction", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixInfraction.Log{
    id: "6767676767676767",
    type: "delivered",
    infraction: %StarkInfra.PixInfraction{
        id: "5656565656565656",
        reference_id: "E20018183202201060100rq1feOMJqtZ",
        type: "fraud",
        method: "scam",
        status: "delivered",
        flow: "out",
        agent: "reporter",
        tags: ["infraction", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixInfraction.Log(
    id: "6767676767676767",
    type: "delivered",
    infraction: PixInfraction(
        id: "5656565656565656",
        referenceId: "E20018183202201060100rq1feOMJqtZ",
        type: "fraud",
        method: "scam",
        status: "delivered",
        flow: "out",
        agent: "reporter",
        tags: [ "infraction", "fraud" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "delivered",
    Infraction: {
        Id: "5656565656565656",
        ReferenceId: "E20018183202201060100rq1feOMJqtZ",
        Type: "fraud",
        Method: "scam",
        Status: "delivered",
        Flow: "out",
        Agent: "reporter",
        Tags: ["infraction", "fraud"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:01:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "delivered"
 :infraction {:id "5656565656565656"
              :reference-id "E20018183202201060100rq1feOMJqtZ"
              :type "fraud"
              :method "scam"
              :status "delivered"
              :flow "out"
              :agent "reporter"
              :tags ["infraction" "fraud"]
              :created "2022-01-01T00:00:00+00:00"
              :updated "2022-01-01T00:01:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "delivered",
        "infraction": {
            "id": "5656565656565656",
            "referenceId": "E20018183202201060100rq1feOMJqtZ",
            "type": "fraud",
            "method": "scam",
            "status": "delivered",
            "flow": "out",
            "agent": "reporter",
            "tags": ["infraction", "fraud"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:01:00+00:00"
        },
        "created": "2022-01-01T00:01:00+00:00"
    }
}
  

Pix Chargeback

A Pix Chargeback allows you to request the return of funds from a Pix transaction made in error or due to fraud, and to respond to chargebacks opened against your transactions, through MED.

Here we will show you how to create and manage them.

The Pix Chargeback Status

After creation, you can use asynchronous Webhooks to monitor status changes of a Pix Chargeback.

Pix Chargebacks you open (outbound) follow this life cycle:

pix-chargeback-outbound-status

Pix Chargebacks you receive (inbound) follow this life cycle:

pix-chargeback-inbound-status

StatusDescription
CreatedThe Pix Chargeback was successfully created at Stark Infra.
FailedThe Pix Chargeback could not be processed.
DeliveredThe Pix Chargeback was delivered to the other participant for analysis.
ClosedThe Pix Chargeback was answered and resolved by the other participant.
CanceledThe Pix Chargeback was canceled before being closed.

The Pix Chargeback Logs

Every time we change a Pix Chargeback, we create a Log. Logs are useful for understanding the life cycle of each Pix Chargeback, and we fire a Webhook whenever a new Log is created. The possible Pix Chargeback Logs:

pix-chargeback-outbound-log

For inbound Pix Chargebacks:

pix-chargeback-inbound-log

Log typeStatusDescription
CreatedCreatedThe Pix Chargeback was successfully created at Stark Infra.
FailedFailedThe Pix Chargeback could not be processed.
DeliveredDeliveredThe Pix Chargeback was delivered to the other participant for analysis.
ClosedClosedThe Pix Chargeback was answered and resolved by the other participant.
CanceledCanceledThe Pix Chargeback was canceled before being closed.

The Pix Chargeback Object

Attributes

id STRING

Unique id for the Pix chargeback.

amount INTEGER

Amount in cents to be charged back.

referenceId STRING

End-to-end ID of the original Pix transaction.

reason STRING

Reason for the chargeback. Options: "fraud", "flaw", "reversalChargeback".

result STRING

Result of the chargeback. Options: "rejected", "accepted", "partiallyAccepted".

analysis STRING

Analysis text from the responding party.

description STRING

Description of the chargeback request.

senderBankCode STRING

Bank ISPB code of the sender in the original transaction.

receiverBankCode STRING

Bank ISPB code of the receiver in the original transaction.

rejectionReason STRING

Reason for rejection if the chargeback was not agreed. Options: "other", "noBalance", "accountClosed", "invalidRequest".

bacenId STRING

Central Bank ID for this Pix chargeback.

disputeId STRING

Unique id of the Pix dispute associated with the chargeback.

isMonitoringRequired BOOLEAN

Indicates whether monitoring is required for this chargeback.

reversalBankCode STRING

Bank ISPB code of the account that received the reversal.

reversalBranchCode STRING

Branch code of the account that received the reversal.

reversalAccountNumber STRING

Number of the account that received the reversal.

reversalAccountType STRING

Type of the account that received the reversal. Options: "checking", "savings", "salary", "payment", "other".

reversalTaxId STRING

Tax ID (CPF/CNPJ) of the account that received the reversal.

status STRING

Current status. Options: "created", "failed", "delivered", "closed", "canceled".

tags LIST OF STRINGS

Tags associated with the Pix chargeback.

flow STRING

Direction of the chargeback. Options: "out" (you requested), "in" (requested against you).

created STRING

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

updated STRING

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

Create Pix Chargebacks

Request a chargeback for a Pix transaction.

A Pix Chargeback requests the reversal of a Pix transaction and should only be created after a corresponding Pix Infraction is completed (or a system malfunction). The other participant must answer within 24 hours. The only supported reason is flaw — reversing an erroneous transaction caused by a system malfunction.

Parameters

amount REQUIRED

Amount in cents to be charged back.

reason REQUIRED

Reason for the chargeback. Options: "flaw".

referenceId REQUIRED

End-to-end ID of the original Pix transaction.

description CONDITIONALLY REQUIRED

Description of the chargeback request. Required when reason is "flaw".

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/pix-chargeback
REQUEST

Python

import starkinfra

chargebacks = starkinfra.pixchargeback.create([
    starkinfra.PixChargeback(
        amount=1000,
        reason="flaw",
        reference_id="E20018183202201201450u34sDjD7334",
        description="Chargeback request due to confirmed fraud",
        tags=["chargeback", "fraud"]
    )
])

for chargeback in chargebacks:
    print(chargeback)
  

Javascript

const starkinfra = require('starkinfra')

const chargebacks = await starkinfra.pixChargeback.create([
    {
        amount: 1000,
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        tags: ["chargeback", "fraud"]
    }
])

for (const chargeback of chargebacks) {
    console.log(chargeback)
}
  

PHP

 1000,
        "referenceId" => "E20018183202201201450u34sDjD7334",
        "reason" => "flaw",
        "tags" => ["chargeback", "fraud"]
    ])
]);

foreach ($chargebacks as $chargeback) {
    print_r($chargeback);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;

List chargebacks = PixChargeback.create(
    Arrays.asList(
        new PixChargeback.Builder()
            .amount(1000L)
            .referenceId("E20018183202201201450u34sDjD7334")
            .reason("flaw")
            .tags(Arrays.asList("chargeback", "fraud"))
            .build()
    )
);

for (PixChargeback chargeback : chargebacks) {
    System.out.println(chargeback);
}
  

Ruby

require('starkinfra')

chargebacks = StarkInfra::PixChargeback.create([
    StarkInfra::PixChargeback.new(
        amount: 1000,
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        tags: ["chargeback", "fraud"]
    )
])

chargebacks.each do |chargeback|
    puts chargeback
end
  

Elixir

chargebacks = StarkInfra.PixChargeback.create!([
    %StarkInfra.PixChargeback{
        amount: 1000,
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        tags: ["chargeback", "fraud"]
    }
])

for chargeback <- chargebacks do
    IO.inspect(chargeback)
end
  

C#

using StarkInfra;
using System.Collections.Generic;

List chargebacks = PixChargeback.Create(
    new List {
        new PixChargeback(
            amount: 1000,
            referenceId: "E20018183202201201450u34sDjD7334",
            reason: "flaw",
            tags: new List { "chargeback", "fraud" }
        )
    }
);

foreach (PixChargeback chargeback in chargebacks) {
    Console.WriteLine(chargeback);
}
  

Go

package main

import (
    "fmt"
    PixChargeback "github.com/starkinfra/sdk-go/starkinfra/pixchargeback"
)

chargebacks, err := PixChargeback.Create(
    []PixChargeback.PixChargeback{
        {
            Amount:      1000,
            ReferenceId: "E20018183202201201450u34sDjD7334",
            Reason:      "flaw",
            Tags:        []string{"chargeback", "fraud"},
        },
    }, nil)

for _, chargeback := range chargebacks {
    fmt.Println(chargeback)
}
  

Clojure

(def chargebacks
    (starkinfra.pix-chargeback/create
        [{:amount 1000
          :reference-id "E20018183202201201450u34sDjD7334"
          :reason "flaw"
          :tags ["chargeback" "fraud"]}]))

(doseq [chargeback chargebacks]
    (println chargeback))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-chargeback' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chargebacks": [
        {
            "amount": 1000,
            "referenceId": "E20018183202201201450u34sDjD7334",
            "reason": "flaw",
            "tags": ["chargeback", "fraud"]
        }
    ]
}'
  
RESPONSE

Python

[
    PixChargeback(
        id="5656565656565656",
        amount=1000,
        reference_id="E20018183202201201450u34sDjD7334",
        reason="flaw",
        result=None,
        analysis=None,
        description="Chargeback request due to confirmed fraud",
        sender_bank_code="20018183",
        receiver_bank_code="34052649",
        rejection_reason=None,
        bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
        dispute_id="d20018183202201201450u34sDjD7334",
        is_monitoring_required=False,
        reversal_bank_code=None,
        reversal_branch_code=None,
        reversal_account_number=None,
        reversal_account_type=None,
        reversal_tax_id=None,
        status="created",
        tags=["chargeback", "fraud"],
        flow="out",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5656565656565656",
        amount: 1000,
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "created",
        flow: "out",
        tags: ["chargeback", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

PHP

[
    PixChargeback Object (
        [id] => 5656565656565656
        [amount] => 1000
        [referenceId] => E20018183202201201450u34sDjD7334
        [reason] => flaw
        [status] => created
        [flow] => out
        [tags] => Array ( [0] => chargeback [1] => fraud )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
]
  

Java

[
    PixChargeback(
        id=5656565656565656,
        amount=1000,
        referenceId=E20018183202201201450u34sDjD7334,
        reason=flaw,
        status=created,
        flow=out,
        tags=[chargeback, fraud],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    )
]
  

Ruby

[
    {
        id: "5656565656565656",
        amount: 1000,
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "created",
        flow: "out",
        tags: ["chargeback", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Elixir

[
    %StarkInfra.PixChargeback{
        id: "5656565656565656",
        amount: 1000,
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "created",
        flow: "out",
        tags: ["chargeback", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

C#

[
    PixChargeback(
        id: "5656565656565656",
        amount: 1000,
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "created",
        flow: "out",
        tags: [ "chargeback", "fraud" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    )
]
  

Go

[
    {
        Id: "5656565656565656",
        Amount: 1000,
        ReferenceId: "E20018183202201201450u34sDjD7334",
        Reason: "flaw",
        Status: "created",
        Flow: "out",
        Tags: ["chargeback", "fraud"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Clojure

[
    {:id "5656565656565656"
     :amount 1000
     :reference-id "E20018183202201201450u34sDjD7334"
     :reason "flaw"
     :status "created"
     :flow "out"
     :tags ["chargeback" "fraud"]
     :created "2022-01-01T00:00:00+00:00"
     :updated "2022-01-01T00:00:00+00:00"}
]
  

Curl

{
    "chargebacks": [
        {
            "id": "5656565656565656",
            "amount": 1000,
            "referenceId": "E20018183202201201450u34sDjD7334",
            "reason": "flaw",
            "status": "created",
            "flow": "out",
            "tags": ["chargeback", "fraud"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

List Pix Chargebacks

List and filter all Pix chargebacks. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

bacenId OPTIONAL

Filter by the Central Bank ID of the Pix chargeback.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

flow OPTIONAL

Filter by flow direction. Options: "in", "out".

ids OPTIONAL

List of strings to get specific entities by ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

referenceIds OPTIONAL

List of end-to-end IDs of the original Pix transactions to filter by. Max = 30.

status OPTIONAL

Filter by status.

tags OPTIONAL

Filter entities that contain the specified tags.

ENDPOINT
GET /v2/pix-chargeback
REQUEST

Python

import starkinfra

chargebacks = starkinfra.pixchargeback.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    status=["delivered"],
    ids=["5656565656565656"],
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    reference_ids=["E20018183202201201450u34sDjD7334"],
    flow="out",
    tags=["fraud"]
)

for chargeback in chargebacks:
    print(chargeback)
  

Javascript

const starkinfra = require('starkinfra')

const chargebacks = await starkinfra.pixChargeback.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    flow: "out",
    tags: ["fraud"]
})

for await (const chargeback of chargebacks) {
    console.log(chargeback)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "status" => "delivered",
    "flow" => "out",
    "tags" => ["fraud"]
]);

foreach ($chargebacks as $chargeback) {
    print_r($chargeback);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("status", "delivered");
params.put("flow", "out");

Generator chargebacks = PixChargeback.query(params);

for (PixChargeback chargeback : chargebacks) {
    System.out.println(chargeback);
}
  

Ruby

require('starkinfra')

chargebacks = StarkInfra::PixChargeback.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    flow: "out",
    tags: ["fraud"]
)

chargebacks.each do |chargeback|
    puts chargeback
end
  

Elixir

chargebacks = StarkInfra.PixChargeback.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    flow: "out",
    tags: ["fraud"]
)

for chargeback <- chargebacks do
    IO.inspect(chargeback)
end
  

C#

using StarkInfra;

IEnumerable chargebacks = PixChargeback.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    status: "delivered",
    flow: "out",
    tags: new List { "fraud" }
);

foreach (PixChargeback chargeback in chargebacks) {
    Console.WriteLine(chargeback);
}
  

Go

package main

import (
    "fmt"
    PixChargeback "github.com/starkinfra/sdk-go/starkinfra/pixchargeback"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
    "status": "delivered",
    "flow":   "out",
}

chargebacks := PixChargeback.Query(params, nil)

for chargeback := range chargebacks {
    fmt.Println(chargeback)
}
  

Clojure

(def chargebacks
    (starkinfra.pix-chargeback/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :status "delivered"
        :flow "out"
        :tags ["fraud"]
    }))

(doseq [chargeback chargebacks]
    (println chargeback))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-chargeback?limit=10&after=2022-01-01&before=2022-12-31&status=delivered&flow=out' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixChargeback(
    id="5656565656565656",
    amount=1000,
    reference_id="E20018183202201201450u34sDjD7334",
    reason="fraud",
    result=None,
    analysis=None,
    description="Chargeback request due to confirmed fraud",
    sender_bank_code="20018183",
    receiver_bank_code="34052649",
    rejection_reason=None,
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    dispute_id="d20018183202201201450u34sDjD7334",
    is_monitoring_required=False,
    reversal_bank_code=None,
    reversal_branch_code=None,
    reversal_account_number=None,
    reversal_account_type=None,
    reversal_tax_id=None,
    status="delivered",
    tags=["fraud"],
    flow="out",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    amount: 1000,
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixChargeback Object (
    [id] => 5656565656565656
    [amount] => 1000
    [referenceId] => E20018183202201201450u34sDjD7334
    [reason] => fraud
    [status] => delivered
    [flow] => out
    [tags] => Array ( [0] => fraud )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixChargeback(
    id=5656565656565656,
    amount=1000,
    referenceId=E20018183202201201450u34sDjD7334,
    reason=fraud,
    status=delivered,
    flow=out,
    tags=[fraud],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    amount: 1000,
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixChargeback{
    id: "5656565656565656",
    amount: 1000,
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixChargeback(
    id: "5656565656565656",
    amount: 1000,
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: [ "fraud" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Amount: 1000,
    ReferenceId: "E20018183202201201450u34sDjD7334",
    Reason: "fraud",
    Status: "delivered",
    Flow: "out",
    Tags: ["fraud"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :amount 1000
 :reference-id "E20018183202201201450u34sDjD7334"
 :reason "fraud"
 :status "delivered"
 :flow "out"
 :tags ["fraud"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "cursor": null,
    "chargebacks": [
        {
            "id": "5656565656565656",
            "amount": 1000,
            "referenceId": "E20018183202201201450u34sDjD7334",
            "reason": "fraud",
            "status": "delivered",
            "flow": "out",
            "tags": ["fraud"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

Get a Pix Chargeback

Get a single Pix chargeback by its id.

Parameters

id REQUIRED

Id of the Pix chargeback entity.

ENDPOINT
GET /v2/pix-chargeback/:id
REQUEST

Python

import starkinfra

chargeback = starkinfra.pixchargeback.get("5656565656565656")

print(chargeback)
  

Javascript

const starkinfra = require('starkinfra')

const chargeback = await starkinfra.pixChargeback.get("5656565656565656")

console.log(chargeback)
  

PHP

Java

import com.starkinfra.*;

PixChargeback chargeback = PixChargeback.get("5656565656565656");

System.out.println(chargeback);
  

Ruby

require('starkinfra')

chargeback = StarkInfra::PixChargeback.get("5656565656565656")

puts chargeback
  

Elixir

chargeback = StarkInfra.PixChargeback.get!("5656565656565656")

IO.inspect(chargeback)
  

C#

using StarkInfra;

PixChargeback chargeback = PixChargeback.Get("5656565656565656");

Console.WriteLine(chargeback);
  

Go

package main

import (
    "fmt"
    PixChargeback "github.com/starkinfra/sdk-go/starkinfra/pixchargeback"
)

chargeback, err := PixChargeback.Get("5656565656565656", nil)

fmt.Println(chargeback)
  

Clojure

(def chargeback
    (starkinfra.pix-chargeback/get "5656565656565656"))

(println chargeback)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-chargeback/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixChargeback(
    id="5656565656565656",
    amount=1000,
    reference_id="E20018183202201201450u34sDjD7334",
    reason="fraud",
    result=None,
    analysis=None,
    description="Chargeback request due to confirmed fraud",
    sender_bank_code="20018183",
    receiver_bank_code="34052649",
    rejection_reason=None,
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    dispute_id="d20018183202201201450u34sDjD7334",
    is_monitoring_required=False,
    reversal_bank_code=None,
    reversal_branch_code=None,
    reversal_account_number=None,
    reversal_account_type=None,
    reversal_tax_id=None,
    status="delivered",
    tags=["fraud"],
    flow="out",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    amount: 1000,
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixChargeback Object (
    [id] => 5656565656565656
    [amount] => 1000
    [referenceId] => E20018183202201201450u34sDjD7334
    [reason] => fraud
    [status] => delivered
    [flow] => out
    [tags] => Array ( [0] => fraud )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixChargeback(
    id=5656565656565656,
    amount=1000,
    referenceId=E20018183202201201450u34sDjD7334,
    reason=fraud,
    status=delivered,
    flow=out,
    tags=[fraud],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    amount: 1000,
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixChargeback{
    id: "5656565656565656",
    amount: 1000,
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixChargeback(
    id: "5656565656565656",
    amount: 1000,
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: [ "fraud" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Amount: 1000,
    ReferenceId: "E20018183202201201450u34sDjD7334",
    Reason: "fraud",
    Status: "delivered",
    Flow: "out",
    Tags: ["fraud"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :amount 1000
 :reference-id "E20018183202201201450u34sDjD7334"
 :reason "fraud"
 :status "delivered"
 :flow "out"
 :tags ["fraud"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "chargeback": {
        "id": "5656565656565656",
        "amount": 1000,
        "referenceId": "E20018183202201201450u34sDjD7334",
        "reason": "fraud",
        "status": "delivered",
        "flow": "out",
        "tags": ["fraud"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

Update a Pix Chargeback

Respond to an incoming Pix chargeback request.

Parameters

id REQUIRED

Id of the Pix chargeback entity.

result REQUIRED

Result of the chargeback analysis. Options: "agreed", "disagreed", "partiallyAgreed".

analysis OPTIONAL

Analysis text explaining the result.

rejectionReason OPTIONAL

Reason for disagreement. Required when result is "disagreed". Options: "other", "noBalance", "accountClosed", "invalidRequest".

reversalReferenceId OPTIONAL

Return ID of the reversal used to partially or fully agree to the chargeback.

ENDPOINT
PATCH /v2/pix-chargeback/:id
REQUEST

Python

import starkinfra

chargeback = starkinfra.pixchargeback.update(
    "5656565656565656",
    result="agreed",
    analysis="Fraud confirmed, agreeing to chargeback.",
    reversal_reference_id="D20018183202201201450u34sDjD7334"
)

print(chargeback)
  

Javascript

const starkinfra = require('starkinfra')

const chargeback = await starkinfra.pixChargeback.update(
    "5656565656565656",
    {
        result: "agreed",
        analysis: "Fraud confirmed, agreeing to chargeback."
    }
)

console.log(chargeback)
  

PHP

 "agreed",
    "analysis" => "Fraud confirmed, agreeing to chargeback."
]);

print_r($chargeback);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap data = new HashMap<>();
data.put("result", "agreed");
data.put("analysis", "Fraud confirmed, agreeing to chargeback.");

PixChargeback chargeback = PixChargeback.update("5656565656565656", data);

System.out.println(chargeback);
  

Ruby

require('starkinfra')

chargeback = StarkInfra::PixChargeback.update(
    "5656565656565656",
    result: "agreed",
    analysis: "Fraud confirmed, agreeing to chargeback."
)

puts chargeback
  

Elixir

chargeback = StarkInfra.PixChargeback.update!(
    "5656565656565656",
    result: "agreed",
    analysis: "Fraud confirmed, agreeing to chargeback."
)

IO.inspect(chargeback)
  

C#

using StarkInfra;

PixChargeback chargeback = PixChargeback.Update(
    "5656565656565656",
    result: "agreed",
    analysis: "Fraud confirmed, agreeing to chargeback."
);

Console.WriteLine(chargeback);
  

Go

package main

import (
    "fmt"
    PixChargeback "github.com/starkinfra/sdk-go/starkinfra/pixchargeback"
)

chargeback, err := PixChargeback.Update(
    "5656565656565656",
    PixChargeback.PixChargeback{
        Result:   "agreed",
        Analysis: "Fraud confirmed, agreeing to chargeback.",
    },
    nil,
)

fmt.Println(chargeback)
  

Clojure

(def chargeback
    (starkinfra.pix-chargeback/update
        "5656565656565656"
        {:result "agreed"
         :analysis "Fraud confirmed, agreeing to chargeback."}))

(println chargeback)
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/pix-chargeback/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "result": "agreed",
    "analysis": "Fraud confirmed, agreeing to chargeback."
}'
  
RESPONSE

Python

PixChargeback(
    id="5656565656565656",
    amount=1000,
    reference_id="E20018183202201201450u34sDjD7334",
    reason="fraud",
    result="agreed",
    analysis="Fraud confirmed, agreeing to chargeback.",
    description="Chargeback request due to confirmed fraud",
    sender_bank_code="20018183",
    receiver_bank_code="34052649",
    rejection_reason=None,
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    dispute_id="d20018183202201201450u34sDjD7334",
    is_monitoring_required=False,
    reversal_bank_code="20018183",
    reversal_branch_code="0001",
    reversal_account_number="5341615776841728",
    reversal_account_type="checking",
    reversal_tax_id="012.345.678-90",
    status="closed",
    tags=["chargeback", "fraud"],
    flow="out",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-06-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    amount: 1000,
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    result: "agreed",
    analysis: "Fraud confirmed, agreeing to chargeback.",
    status: "closed",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

PHP

PixChargeback Object (
    [id] => 5656565656565656
    [amount] => 1000
    [referenceId] => E20018183202201201450u34sDjD7334
    [reason] => fraud
    [result] => agreed
    [analysis] => Fraud confirmed, agreeing to chargeback.
    [status] => closed
    [flow] => out
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-06-01T00:00:00+00:00
)
  

Java

PixChargeback(
    id=5656565656565656,
    amount=1000,
    referenceId=E20018183202201201450u34sDjD7334,
    reason=fraud,
    result=agreed,
    analysis=Fraud confirmed, agreeing to chargeback.,
    status=closed,
    flow=out,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-06-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    amount: 1000,
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    result: "agreed",
    analysis: "Fraud confirmed, agreeing to chargeback.",
    status: "closed",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixChargeback{
    id: "5656565656565656",
    amount: 1000,
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    result: "agreed",
    analysis: "Fraud confirmed, agreeing to chargeback.",
    status: "closed",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

C#

PixChargeback(
    id: "5656565656565656",
    amount: 1000,
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    result: "agreed",
    analysis: "Fraud confirmed, agreeing to chargeback.",
    status: "closed",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Amount: 1000,
    ReferenceId: "E20018183202201201450u34sDjD7334",
    Reason: "fraud",
    Result: "agreed",
    Analysis: "Fraud confirmed, agreeing to chargeback.",
    Status: "closed",
    Flow: "out",
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-06-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :amount 1000
 :reference-id "E20018183202201201450u34sDjD7334"
 :reason "fraud"
 :result "agreed"
 :analysis "Fraud confirmed, agreeing to chargeback."
 :status "closed"
 :flow "out"
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-06-01T00:00:00+00:00"}
  

Curl

{
    "chargeback": {
        "id": "5656565656565656",
        "amount": 1000,
        "referenceId": "E20018183202201201450u34sDjD7334",
        "reason": "fraud",
        "result": "agreed",
        "analysis": "Fraud confirmed, agreeing to chargeback.",
        "status": "closed",
        "flow": "out",
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-06-01T00:00:00+00:00"
    }
}
  

Cancel a Pix Chargeback

Cancel a Pix chargeback you requested.

Parameters

id REQUIRED

Id of the Pix chargeback entity.

ENDPOINT
DELETE /v2/pix-chargeback/:id
REQUEST

Python

import starkinfra

chargeback = starkinfra.pixchargeback.cancel("5656565656565656")

print(chargeback)
  

Javascript

const starkinfra = require('starkinfra')

const chargeback = await starkinfra.pixChargeback.cancel("5656565656565656")

console.log(chargeback)
  

PHP

Java

import com.starkinfra.*;

PixChargeback chargeback = PixChargeback.cancel("5656565656565656");

System.out.println(chargeback);
  

Ruby

require('starkinfra')

chargeback = StarkInfra::PixChargeback.cancel("5656565656565656")

puts chargeback
  

Elixir

chargeback = StarkInfra.PixChargeback.cancel!("5656565656565656")

IO.inspect(chargeback)
  

C#

using StarkInfra;

PixChargeback chargeback = PixChargeback.Cancel("5656565656565656");

Console.WriteLine(chargeback);
  

Go

package main

import (
    "fmt"
    PixChargeback "github.com/starkinfra/sdk-go/starkinfra/pixchargeback"
)

chargeback, err := PixChargeback.Cancel("5656565656565656", nil)

fmt.Println(chargeback)
  

Clojure

(def chargeback
    (starkinfra.pix-chargeback/cancel "5656565656565656"))

(println chargeback)
  

Curl

curl --location --request DELETE '{{baseUrl}}/v2/pix-chargeback/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixChargeback(
    id="5656565656565656",
    amount=1000,
    reference_id="E20018183202201201450u34sDjD7334",
    reason="fraud",
    result=None,
    analysis=None,
    description="Chargeback request due to confirmed fraud",
    sender_bank_code="20018183",
    receiver_bank_code="34052649",
    rejection_reason=None,
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    dispute_id="d20018183202201201450u34sDjD7334",
    is_monitoring_required=False,
    reversal_bank_code=None,
    reversal_branch_code=None,
    reversal_account_number=None,
    reversal_account_type=None,
    reversal_tax_id=None,
    status="canceled",
    tags=["chargeback", "fraud"],
    flow="out",
    created="2022-01-01T00:00:00+00:00",
    updated="2022-06-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    amount: 1000,
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "canceled",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

PHP

PixChargeback Object (
    [id] => 5656565656565656
    [amount] => 1000
    [referenceId] => E20018183202201201450u34sDjD7334
    [reason] => fraud
    [status] => canceled
    [flow] => out
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-06-01T00:00:00+00:00
)
  

Java

PixChargeback(
    id=5656565656565656,
    amount=1000,
    referenceId=E20018183202201201450u34sDjD7334,
    reason=fraud,
    status=canceled,
    flow=out,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-06-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    amount: 1000,
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "canceled",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixChargeback{
    id: "5656565656565656",
    amount: 1000,
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "canceled",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

C#

PixChargeback(
    id: "5656565656565656",
    amount: 1000,
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "canceled",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Amount: 1000,
    ReferenceId: "E20018183202201201450u34sDjD7334",
    Reason: "fraud",
    Status: "canceled",
    Flow: "out",
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-06-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :amount 1000
 :reference-id "E20018183202201201450u34sDjD7334"
 :reason "fraud"
 :status "canceled"
 :flow "out"
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-06-01T00:00:00+00:00"}
  

Curl

{
    "chargeback": {
        "id": "5656565656565656",
        "amount": 1000,
        "referenceId": "E20018183202201201450u34sDjD7334",
        "reason": "fraud",
        "status": "canceled",
        "flow": "out",
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-06-01T00:00:00+00:00"
    }
}
  

List Pix Chargeback Logs

Get a paged list of all Pix chargeback logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

chargebackIds OPTIONAL

Filter by Pix chargeback ids. Max = 30.

limit OPTIONAL

Number of results per cursor. Max = 100.

types OPTIONAL

Filter logs by log types.

ENDPOINT
GET /v2/pix-chargeback/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixchargeback.log.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    types=["delivered"],
    chargeback_ids=["5656565656565656"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.pixChargeback.log.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["delivered"]
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "types" => ["delivered"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");

Generator logs = PixChargeback.Log.query(params);

for (PixChargeback.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::PixChargeback::Log.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["delivered"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.PixChargeback.Log.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["delivered"]
)

for log <- logs do
    IO.inspect(log)
end
  

C#

using StarkInfra;

IEnumerable logs = PixChargeback.Log.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    types: new List { "delivered" }
);

foreach (PixChargeback.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    PixChargebackLog "github.com/starkinfra/sdk-go/starkinfra/pixchargeback/log"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
}

logs := PixChargebackLog.Query(params, nil)

for log := range logs {
    fmt.Println(log)
}
  

Clojure

(def logs
    (starkinfra.pix-chargeback.log/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :types ["delivered"]
    }))

(doseq [log logs]
    (println log))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-chargeback/log?limit=10&after=2022-01-01&before=2022-12-31&types=delivered' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    chargeback=PixChargeback(
        id="5656565656565656",
        amount=1000,
        reference_id="E20018183202201201450u34sDjD7334",
        reason="flaw",
        result=None,
        analysis=None,
        description="Chargeback request due to confirmed fraud",
        sender_bank_code="20018183",
        receiver_bank_code="34052649",
        rejection_reason=None,
        bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
        dispute_id="d20018183202201201450u34sDjD7334",
        is_monitoring_required=False,
        reversal_bank_code=None,
        reversal_branch_code=None,
        reversal_account_number=None,
        reversal_account_type=None,
        reversal_tax_id=None,
        status="delivered",
        tags=["fraud"],
        flow="out",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    ),
    type="delivered",
    errors=[],
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "delivered",
    chargeback: {
        id: "5656565656565656",
        amount: 1000,
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "delivered",
        flow: "out",
        tags: ["fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => delivered
    [chargeback] => PixChargeback Object (
        [id] => 5656565656565656
        [amount] => 1000
        [referenceId] => E20018183202201201450u34sDjD7334
        [reason] => flaw
        [status] => delivered
        [flow] => out
        [tags] => Array ( [0] => fraud )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=delivered,
    chargeback=PixChargeback(
        id=5656565656565656,
        amount=1000,
        referenceId=E20018183202201201450u34sDjD7334,
        reason=flaw,
        status=delivered,
        flow=out,
        tags=[fraud],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "delivered",
    chargeback: {
        id: "5656565656565656",
        amount: 1000,
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "delivered",
        flow: "out",
        tags: ["fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixChargeback.Log{
    id: "6767676767676767",
    type: "delivered",
    chargeback: %StarkInfra.PixChargeback{
        id: "5656565656565656",
        amount: 1000,
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "delivered",
        flow: "out",
        tags: ["fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixChargeback.Log(
    id: "6767676767676767",
    type: "delivered",
    chargeback: PixChargeback(
        id: "5656565656565656",
        amount: 1000,
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "delivered",
        flow: "out",
        tags: [ "fraud" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "delivered",
    Chargeback: {
        Id: "5656565656565656",
        Amount: 1000,
        ReferenceId: "E20018183202201201450u34sDjD7334",
        Reason: "flaw",
        Status: "delivered",
        Flow: "out",
        Tags: ["fraud"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "delivered"
 :chargeback {:id "5656565656565656"
              :amount 1000
              :reference-id "E20018183202201201450u34sDjD7334"
              :reason "flaw"
              :status "delivered"
              :flow "out"
              :tags ["fraud"]
              :created "2022-01-01T00:00:00+00:00"
              :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "delivered",
            "chargeback": {
                "id": "5656565656565656",
                "amount": 1000,
                "referenceId": "E20018183202201201450u34sDjD7334",
                "reason": "flaw",
                "status": "delivered",
                "flow": "out",
                "tags": ["fraud"],
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:00:00+00:00"
            },
            "created": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Chargeback Log

Get a single Pix chargeback log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/pix-chargeback/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixchargeback.log.get("6767676767676767")

print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.pixChargeback.log.get("6767676767676767")

console.log(log)
  

PHP

Java

import com.starkinfra.*;

PixChargeback.Log log = PixChargeback.Log.get("6767676767676767");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::PixChargeback::Log.get("6767676767676767")

puts log
  

Elixir

log = StarkInfra.PixChargeback.Log.get!("6767676767676767")

IO.inspect(log)
  

C#

using StarkInfra;

PixChargeback.Log log = PixChargeback.Log.Get("6767676767676767");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    PixChargebackLog "github.com/starkinfra/sdk-go/starkinfra/pixchargeback/log"
)

log, err := PixChargebackLog.Get("6767676767676767", nil)

fmt.Println(log)
  

Clojure

(def log
    (starkinfra.pix-chargeback.log/get "6767676767676767"))

(println log)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-chargeback/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    chargeback=PixChargeback(
        id="5656565656565656",
        amount=1000,
        reference_id="E20018183202201201450u34sDjD7334",
        reason="flaw",
        result=None,
        analysis=None,
        description="Chargeback request due to confirmed fraud",
        sender_bank_code="20018183",
        receiver_bank_code="34052649",
        rejection_reason=None,
        bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
        dispute_id="d20018183202201201450u34sDjD7334",
        is_monitoring_required=False,
        reversal_bank_code=None,
        reversal_branch_code=None,
        reversal_account_number=None,
        reversal_account_type=None,
        reversal_tax_id=None,
        status="delivered",
        tags=["fraud"],
        flow="out",
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    ),
    type="delivered",
    errors=[],
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "delivered",
    chargeback: {
        id: "5656565656565656",
        amount: 1000,
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "delivered",
        flow: "out",
        tags: ["fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => delivered
    [chargeback] => PixChargeback Object (
        [id] => 5656565656565656
        [amount] => 1000
        [referenceId] => E20018183202201201450u34sDjD7334
        [reason] => flaw
        [status] => delivered
        [flow] => out
        [tags] => Array ( [0] => fraud )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=delivered,
    chargeback=PixChargeback(
        id=5656565656565656,
        amount=1000,
        referenceId=E20018183202201201450u34sDjD7334,
        reason=flaw,
        status=delivered,
        flow=out,
        tags=[fraud],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "delivered",
    chargeback: {
        id: "5656565656565656",
        amount: 1000,
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "delivered",
        flow: "out",
        tags: ["fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixChargeback.Log{
    id: "6767676767676767",
    type: "delivered",
    chargeback: %StarkInfra.PixChargeback{
        id: "5656565656565656",
        amount: 1000,
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "delivered",
        flow: "out",
        tags: ["fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixChargeback.Log(
    id: "6767676767676767",
    type: "delivered",
    chargeback: PixChargeback(
        id: "5656565656565656",
        amount: 1000,
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "flaw",
        status: "delivered",
        flow: "out",
        tags: [ "fraud" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "delivered",
    Chargeback: {
        Id: "5656565656565656",
        Amount: 1000,
        ReferenceId: "E20018183202201201450u34sDjD7334",
        Reason: "flaw",
        Status: "delivered",
        Flow: "out",
        Tags: ["fraud"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "delivered"
 :chargeback {:id "5656565656565656"
              :amount 1000
              :reference-id "E20018183202201201450u34sDjD7334"
              :reason "flaw"
              :status "delivered"
              :flow "out"
              :tags ["fraud"]
              :created "2022-01-01T00:00:00+00:00"
              :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "delivered",
        "chargeback": {
            "id": "5656565656565656",
            "amount": 1000,
            "referenceId": "E20018183202201201450u34sDjD7334",
            "reason": "flaw",
            "status": "delivered",
            "flow": "out",
            "tags": ["fraud"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        },
        "created": "2022-01-01T00:01:00+00:00"
    }
}
  

Pix Fraud

A Pix Fraud report allows you to flag suspicious users or keys in the Brazilian Pix system (DICT).

Here we will show you how to create and manage them.

The Pix Fraud Object

Attributes

id STRING

Unique id for the Pix fraud report.

externalId STRING

Unique external ID to prevent duplicates.

type STRING

Type of fraud. Options: "identity", "mule", "scam", "other", "unknown".

taxId STRING

CPF or CNPJ of the fraudster.

keyId STRING

Pix key associated with the fraud.

bacenId STRING

Central Bank ID for this fraud report.

status STRING

Current status. Options: "created", "failed", "registered", "canceled".

tags LIST OF STRINGS

Tags associated with the Pix fraud report.

created STRING

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

updated STRING

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

Create Pix Fraud Reports

Report a fraudulent user or Pix key to DICT.

You can create up to 100 fraud reports in a single request.

Parameters

externalId REQUIRED

Unique string to prevent duplicates.

type REQUIRED

Type of fraud. Options: "identity", "mule", "scam", "other".

taxId REQUIRED

CPF or CNPJ of the fraudster.

keyId OPTIONAL

Pix key associated with the fraud.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/pix-fraud
REQUEST

Python

import starkinfra

frauds = starkinfra.pixfraud.create([
    starkinfra.PixFraud(
        external_id="my-fraud-id-1",
        type="mule",
        tax_id="012.345.678-90",
        key_id="jon.snow@starkinfra.com",
        tags=["fraud", "mule"]
    )
])

for fraud in frauds:
    print(fraud)
  

Javascript

const starkinfra = require('starkinfra')

const frauds = await starkinfra.pixFraud.create([
    {
        externalId: "my-fraud-id-1",
        type: "mule",
        taxId: "012.345.678-90",
        keyId: "jon.snow@starkinfra.com",
        tags: ["fraud", "mule"]
    }
])

for (const fraud of frauds) {
    console.log(fraud)
}
  

PHP

 "my-fraud-id-1",
        "type" => "mule",
        "taxId" => "012.345.678-90",
        "keyId" => "jon.snow@starkinfra.com",
        "tags" => ["fraud", "mule"]
    ])
]);

foreach ($frauds as $fraud) {
    print_r($fraud);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;

List frauds = PixFraud.create(
    Arrays.asList(
        new PixFraud.Builder()
            .externalId("my-fraud-id-1")
            .type("mule")
            .taxId("012.345.678-90")
            .keyId("jon.snow@starkinfra.com")
            .tags(Arrays.asList("fraud", "mule"))
            .build()
    )
);

for (PixFraud fraud : frauds) {
    System.out.println(fraud);
}
  

Ruby

require('starkinfra')

frauds = StarkInfra::PixFraud.create([
    StarkInfra::PixFraud.new(
        external_id: "my-fraud-id-1",
        type: "mule",
        tax_id: "012.345.678-90",
        key_id: "jon.snow@starkinfra.com",
        tags: ["fraud", "mule"]
    )
])

frauds.each do |fraud|
    puts fraud
end
  

Elixir

frauds = StarkInfra.PixFraud.create!([
    %StarkInfra.PixFraud{
        external_id: "my-fraud-id-1",
        type: "mule",
        tax_id: "012.345.678-90",
        key_id: "jon.snow@starkinfra.com",
        tags: ["fraud", "mule"]
    }
])

for fraud <- frauds do
    IO.inspect(fraud)
end
  

C#

using StarkInfra;
using System.Collections.Generic;

List frauds = PixFraud.Create(
    new List {
        new PixFraud(
            externalId: "my-fraud-id-1",
            type: "mule",
            taxId: "012.345.678-90",
            keyId: "jon.snow@starkinfra.com",
            tags: new List { "fraud", "mule" }
        )
    }
);

foreach (PixFraud fraud in frauds) {
    Console.WriteLine(fraud);
}
  

Go

package main

import (
    "fmt"
    PixFraud "github.com/starkinfra/sdk-go/starkinfra/pixfraud"
)

frauds, err := PixFraud.Create(
    []PixFraud.PixFraud{
        {
            ExternalId: "my-fraud-id-1",
            Type:       "mule",
            TaxId:      "012.345.678-90",
            KeyId:      "jon.snow@starkinfra.com",
            Tags:       []string{"fraud", "mule"},
        },
    }, nil)

for _, fraud := range frauds {
    fmt.Println(fraud)
}
  

Clojure

(def frauds
    (starkinfra.pix-fraud/create
        [{:external-id "my-fraud-id-1"
          :type "mule"
          :tax-id "012.345.678-90"
          :key-id "jon.snow@starkinfra.com"
          :tags ["fraud" "mule"]}]))

(doseq [fraud frauds]
    (println fraud))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-fraud' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "frauds": [
        {
            "externalId": "my-fraud-id-1",
            "type": "mule",
            "taxId": "012.345.678-90",
            "keyId": "jon.snow@starkinfra.com",
            "tags": ["fraud", "mule"]
        }
    ]
}'
  
RESPONSE

Python

[
    PixFraud(
        id="5656565656565656",
        external_id="my-fraud-id-1",
        type="mule",
        tax_id="012.345.678-90",
        key_id="jon.snow@starkinfra.com",
        bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
        status="created",
        tags=["fraud", "mule"],
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5656565656565656",
        externalId: "my-fraud-id-1",
        type: "mule",
        taxId: "012.345.678-90",
        keyId: "jon.snow@starkinfra.com",
        status: "created",
        tags: ["fraud", "mule"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

PHP

[
    PixFraud Object (
        [id] => 5656565656565656
        [externalId] => my-fraud-id-1
        [type] => mule
        [taxId] => 012.345.678-90
        [keyId] => jon.snow@starkinfra.com
        [status] => created
        [tags] => Array ( [0] => fraud [1] => mule )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
]
  

Java

[
    PixFraud(
        id=5656565656565656,
        externalId=my-fraud-id-1,
        type=mule,
        taxId=012.345.678-90,
        keyId=jon.snow@starkinfra.com,
        status=created,
        tags=[fraud, mule],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    )
]
  

Ruby

[
    {
        id: "5656565656565656",
        external_id: "my-fraud-id-1",
        type: "mule",
        tax_id: "012.345.678-90",
        key_id: "jon.snow@starkinfra.com",
        status: "created",
        tags: ["fraud", "mule"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Elixir

[
    %StarkInfra.PixFraud{
        id: "5656565656565656",
        external_id: "my-fraud-id-1",
        type: "mule",
        tax_id: "012.345.678-90",
        key_id: "jon.snow@starkinfra.com",
        status: "created",
        tags: ["fraud", "mule"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

C#

[
    PixFraud(
        id: "5656565656565656",
        externalId: "my-fraud-id-1",
        type: "mule",
        taxId: "012.345.678-90",
        keyId: "jon.snow@starkinfra.com",
        status: "created",
        tags: [ "fraud", "mule" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    )
]
  

Go

[
    {
        Id: "5656565656565656",
        ExternalId: "my-fraud-id-1",
        Type: "mule",
        TaxId: "012.345.678-90",
        KeyId: "jon.snow@starkinfra.com",
        Status: "created",
        Tags: ["fraud", "mule"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Clojure

[
    {:id "5656565656565656"
     :external-id "my-fraud-id-1"
     :type "mule"
     :tax-id "012.345.678-90"
     :key-id "jon.snow@starkinfra.com"
     :status "created"
     :tags ["fraud" "mule"]
     :created "2022-01-01T00:00:00+00:00"
     :updated "2022-01-01T00:00:00+00:00"}
]
  

Curl

{
    "frauds": [
        {
            "id": "5656565656565656",
            "externalId": "my-fraud-id-1",
            "type": "mule",
            "taxId": "012.345.678-90",
            "keyId": "jon.snow@starkinfra.com",
            "status": "created",
            "tags": ["fraud", "mule"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

List Pix Fraud Reports

List and filter all Pix fraud reports. Results are paged.

Parameters

after OPTIONAL

Filter entities created after this date.

bacenId OPTIONAL

Filter by the Central Bank ID of the fraud report.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ids OPTIONAL

List of strings to get specific entities by ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter by status.

tags OPTIONAL

Filter entities that contain the specified tags.

type OPTIONAL

Filter by fraud type.

ENDPOINT
GET /v2/pix-fraud
REQUEST

Python

import starkinfra

frauds = starkinfra.pixfraud.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    status=["registered"],
    type=["mule"],
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    tags=["fraud", "mule"]
)

for fraud in frauds:
    print(fraud)
  

Javascript

const starkinfra = require('starkinfra')

const frauds = await starkinfra.pixFraud.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "registered",
    type: "mule"
})

for await (const fraud of frauds) {
    console.log(fraud)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "status" => "registered",
    "type" => "mule"
]);

foreach ($frauds as $fraud) {
    print_r($fraud);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("status", "registered");
params.put("type", "mule");

Generator frauds = PixFraud.query(params);

for (PixFraud fraud : frauds) {
    System.out.println(fraud);
}
  

Ruby

require('starkinfra')

frauds = StarkInfra::PixFraud.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "registered",
    type: "mule"
)

frauds.each do |fraud|
    puts fraud
end
  

Elixir

frauds = StarkInfra.PixFraud.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "registered",
    type: "mule"
)

for fraud <- frauds do
    IO.inspect(fraud)
end
  

C#

using StarkInfra;

IEnumerable frauds = PixFraud.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    status: "registered",
    type: "mule"
);

foreach (PixFraud fraud in frauds) {
    Console.WriteLine(fraud);
}
  

Go

package main

import (
    "fmt"
    PixFraud "github.com/starkinfra/sdk-go/starkinfra/pixfraud"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
    "status": "registered",
    "type":   "mule",
}

frauds := PixFraud.Query(params, nil)

for fraud := range frauds {
    fmt.Println(fraud)
}
  

Clojure

(def frauds
    (starkinfra.pix-fraud/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :status "registered"
        :type "mule"
    }))

(doseq [fraud frauds]
    (println fraud))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-fraud?limit=10&after=2022-01-01&before=2022-12-31&status=registered&type=mule' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python



PixFraud(
    id="5656565656565656",
    external_id="my-fraud-id-1",
    type="mule",
    tax_id="012.345.678-90",
    key_id="jon.snow@starkinfra.com",
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    status="registered",
    tags=["fraud", "mule"],
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    type: "mule",
    status: "registered",
    tags: ["fraud", "mule"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

PHP

PixFraud Object (
    [id] => 5656565656565656
    [type] => mule
    [status] => registered
    [tags] => Array ( [0] => fraud [1] => mule )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:01:00+00:00
)
  

Java

PixFraud(
    id=5656565656565656,
    type=mule,
    status=registered,
    tags=[fraud, mule],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    type: "mule",
    status: "registered",
    tags: ["fraud", "mule"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixFraud{
    id: "5656565656565656",
    type: "mule",
    status: "registered",
    tags: ["fraud", "mule"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

C#

PixFraud(
    id: "5656565656565656",
    type: "mule",
    status: "registered",
    tags: [ "fraud", "mule" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Type: "mule",
    Status: "registered",
    Tags: ["fraud", "mule"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :type "mule"
 :status "registered"
 :tags ["fraud" "mule"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "cursor": null,
    "frauds": [
        {
            "id": "5656565656565656",
            "type": "mule",
            "status": "registered",
            "tags": ["fraud", "mule"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Fraud Report

Get a single Pix fraud report by its id.

Parameters

id REQUIRED

Id of the Pix fraud entity.

ENDPOINT
GET /v2/pix-fraud/:id
REQUEST

Python

import starkinfra

fraud = starkinfra.pixfraud.get("5656565656565656")

print(fraud)
  

Javascript

const starkinfra = require('starkinfra')

const fraud = await starkinfra.pixFraud.get("5656565656565656")

console.log(fraud)
  

PHP

Java

import com.starkinfra.*;

PixFraud fraud = PixFraud.get("5656565656565656");

System.out.println(fraud);
  

Ruby

require('starkinfra')

fraud = StarkInfra::PixFraud.get("5656565656565656")

puts fraud
  

Elixir

fraud = StarkInfra.PixFraud.get!("5656565656565656")

IO.inspect(fraud)
  

C#

using StarkInfra;

PixFraud fraud = PixFraud.Get("5656565656565656");

Console.WriteLine(fraud);
  

Go

package main

import (
    "fmt"
    PixFraud "github.com/starkinfra/sdk-go/starkinfra/pixfraud"
)

fraud, err := PixFraud.Get("5656565656565656", nil)

fmt.Println(fraud)
  

Clojure

(def fraud
    (starkinfra.pix-fraud/get "5656565656565656"))

(println fraud)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-fraud/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixFraud(
    id="5656565656565656",
    external_id="my-fraud-id-1",
    type="mule",
    tax_id="012.345.678-90",
    key_id="jon.snow@starkinfra.com",
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    status="registered",
    tags=["fraud", "mule"],
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    externalId: "my-fraud-id-1",
    type: "mule",
    taxId: "012.345.678-90",
    keyId: "jon.snow@starkinfra.com",
    status: "registered",
    tags: ["fraud", "mule"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

PHP

PixFraud Object (
    [id] => 5656565656565656
    [externalId] => my-fraud-id-1
    [type] => mule
    [taxId] => 012.345.678-90
    [keyId] => jon.snow@starkinfra.com
    [status] => registered
    [tags] => Array ( [0] => fraud [1] => mule )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:01:00+00:00
)
  

Java

PixFraud(
    id=5656565656565656,
    externalId=my-fraud-id-1,
    type=mule,
    taxId=012.345.678-90,
    keyId=jon.snow@starkinfra.com,
    status=registered,
    tags=[fraud, mule],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    external_id: "my-fraud-id-1",
    type: "mule",
    tax_id: "012.345.678-90",
    key_id: "jon.snow@starkinfra.com",
    status: "registered",
    tags: ["fraud", "mule"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixFraud{
    id: "5656565656565656",
    external_id: "my-fraud-id-1",
    type: "mule",
    tax_id: "012.345.678-90",
    key_id: "jon.snow@starkinfra.com",
    status: "registered",
    tags: ["fraud", "mule"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
}
  

C#

PixFraud(
    id: "5656565656565656",
    externalId: "my-fraud-id-1",
    type: "mule",
    taxId: "012.345.678-90",
    keyId: "jon.snow@starkinfra.com",
    status: "registered",
    tags: [ "fraud", "mule" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    ExternalId: "my-fraud-id-1",
    Type: "mule",
    TaxId: "012.345.678-90",
    KeyId: "jon.snow@starkinfra.com",
    Status: "registered",
    Tags: ["fraud", "mule"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :external-id "my-fraud-id-1"
 :type "mule"
 :tax-id "012.345.678-90"
 :key-id "jon.snow@starkinfra.com"
 :status "registered"
 :tags ["fraud" "mule"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "fraud": {
        "id": "5656565656565656",
        "externalId": "my-fraud-id-1",
        "type": "mule",
        "taxId": "012.345.678-90",
        "keyId": "jon.snow@starkinfra.com",
        "status": "registered",
        "tags": ["fraud", "mule"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:01:00+00:00"
    }
}
  

Cancel a Pix Fraud Report

Cancel a Pix fraud report you submitted.

Parameters

id REQUIRED

Id of the Pix fraud entity.

ENDPOINT
DELETE /v2/pix-fraud/:id
REQUEST

Python

import starkinfra

fraud = starkinfra.pixfraud.cancel("5656565656565656")

print(fraud)
  

Javascript

const starkinfra = require('starkinfra')

const fraud = await starkinfra.pixFraud.cancel("5656565656565656")

console.log(fraud)
  

PHP

Java

import com.starkinfra.*;

PixFraud fraud = PixFraud.cancel("5656565656565656");

System.out.println(fraud);
  

Ruby

require('starkinfra')

fraud = StarkInfra::PixFraud.cancel("5656565656565656")

puts fraud
  

Elixir

fraud = StarkInfra.PixFraud.cancel!("5656565656565656")

IO.inspect(fraud)
  

C#

using StarkInfra;

PixFraud fraud = PixFraud.Cancel("5656565656565656");

Console.WriteLine(fraud);
  

Go

package main

import (
    "fmt"
    PixFraud "github.com/starkinfra/sdk-go/starkinfra/pixfraud"
)

fraud, err := PixFraud.Cancel("5656565656565656", nil)

fmt.Println(fraud)
  

Clojure

(def fraud
    (starkinfra.pix-fraud/cancel "5656565656565656"))

(println fraud)
  

Curl

curl --location --request DELETE '{{baseUrl}}/v2/pix-fraud/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixFraud(
    id="5656565656565656",
    external_id="my-fraud-id-1",
    type="mule",
    tax_id="012.345.678-90",
    key_id="jon.snow@starkinfra.com",
    bacen_id="ccf9bd9c-e99d-999e-bab9-b999ca999f99",
    status="canceled",
    tags=["fraud", "mule"],
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:02:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    type: "mule",
    status: "canceled",
    tags: ["fraud", "mule"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
}
  

PHP

PixFraud Object (
    [id] => 5656565656565656
    [type] => mule
    [status] => canceled
    [tags] => Array ( [0] => fraud [1] => mule )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:02:00+00:00
)
  

Java

PixFraud(
    id=5656565656565656,
    type=mule,
    status=canceled,
    tags=[fraud, mule],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:02:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    type: "mule",
    status: "canceled",
    tags: ["fraud", "mule"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
}
  

Elixir

%StarkInfra.PixFraud{
    id: "5656565656565656",
    type: "mule",
    status: "canceled",
    tags: ["fraud", "mule"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
}
  

C#

PixFraud(
    id: "5656565656565656",
    type: "mule",
    status: "canceled",
    tags: [ "fraud", "mule" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:02:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Type: "mule",
    Status: "canceled",
    Tags: ["fraud", "mule"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:02:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :type "mule"
 :status "canceled"
 :tags ["fraud" "mule"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:02:00+00:00"}
  

Curl

{
    "fraud": {
        "id": "5656565656565656",
        "type": "mule",
        "status": "canceled",
        "tags": ["fraud", "mule"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:02:00+00:00"
    }
}
  

List Pix Fraud Logs

Get a paged list of all Pix fraud logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ids OPTIONAL

Filter by Pix fraud log ids.

fraudIds OPTIONAL

Filter logs by the Pix fraud report ids they belong to.

limit OPTIONAL

Number of results per cursor. Max = 100.

types OPTIONAL

Filter by log types. Options: "created", "failed", "registered", "canceling", "canceled".

ENDPOINT
GET /v2/pix-fraud/log
REQUEST

Python

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-fraud/log?limit=10&after=2022-01-01&before=2022-12-31&types=registered' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "registered",
            "fraud": {
                "id": "5656565656565656",
                "externalId": "my-fraud-id-1",
                "type": "mule",
                "taxId": "012.345.678-90",
                "keyId": "jon.snow@starkinfra.com",
                "status": "registered",
                "tags": ["fraud", "mule"],
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:01:00+00:00"
            },
            "errors": [],
            "created": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Fraud Log

Get a single Pix fraud log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/pix-fraud/log/:id
REQUEST

Python

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-fraud/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "registered",
        "fraud": {
            "id": "5656565656565656",
            "externalId": "my-fraud-id-1",
            "type": "mule",
            "taxId": "012.345.678-90",
            "keyId": "jon.snow@starkinfra.com",
            "status": "registered",
            "tags": ["fraud", "mule"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:01:00+00:00"
        },
        "errors": [],
        "created": "2022-01-01T00:01:00+00:00"
    }
}
  

Pix Dispute

A Pix Dispute allows you to request, cancel and consult disputes related to Pix transactions through MED 2.0.

Here we will show you how to create and manage them.

The Pix Dispute Object

Attributes

id STRING

Unique id for the Pix dispute.

referenceId STRING

End-to-end ID of the original Pix transaction.

bacenId STRING

Central Bank's unique ID for the Pix dispute.

method STRING

Method of the dispute. Options: "scam", "unauthorized", "coercion", "invasion", "other", "unknown".

description STRING

Description of the Pix dispute.

operatorEmail STRING

Contact email of the operator responsible for the Pix dispute.

operatorPhone STRING

Contact phone number of the operator responsible for the Pix dispute.

status STRING

Current status. Options: "created", "failed", "delivered", "analysed", "processing", "closed", "canceled".

tags LIST OF STRINGS

Tags associated with the Pix dispute.

flow STRING

Direction of the dispute. Options: "out" (you initiated), "in" (raised against you).

minTransactionAmount INTEGER

Minimum amount in cents of the transactions to be tracked in the dispute.

maxTransactionCount INTEGER

Maximum number of transactions to be tracked in the dispute.

maxHopCount INTEGER

Maximum number of hops to be tracked in the dispute.

maxHopInterval INTEGER

Maximum interval in seconds between hops to be tracked in the dispute.

transactions LIST OF OBJECTS

List of transaction objects tracked in the dispute.

transactions.endToEndId STRING

End-to-end ID of the tracked Pix transaction.

transactions.amount INTEGER

Transaction amount in cents.

transactions.nominalAmount INTEGER

Refundable amount in cents of the transaction.

transactions.senderId STRING

Bacen-generated pseudo ID for the sender, used only for transaction-tracking context (not a real account identifier).

transactions.senderType STRING

Type of the sender entity. Options: "individual", "business".

transactions.senderTaxIdCreated STRING

Returned only for CNPJ tax IDs: the date the sender company was opened. Example: "2020-04-23T23:00:00.000000+00:00".

transactions.senderAccountCreated STRING

Datetime when the sender's account was opened. Example: "2020-04-23T23:00:00.000000+00:00".

transactions.senderBankCode STRING

Bank code of the sender's institution.

transactions.receiverId STRING

Bacen-generated pseudo ID for the receiver, used only for transaction-tracking context (not a real account identifier).

transactions.receiverType STRING

Type of the receiver entity. Options: "individual", "business".

transactions.receiverTaxIdCreated STRING

Returned only for CNPJ tax IDs: the date the receiver company was opened. Example: "2020-04-23T23:00:00.000000+00:00".

transactions.receiverAccountCreated STRING

Datetime when the receiver's account was opened. Example: "2020-04-23T23:00:00.000000+00:00".

transactions.receiverBankCode STRING

Bank code of the receiver's institution.

transactions.settled STRING

Datetime when the transaction was settled. Example: "2020-04-23T23:00:00.000000+00:00".

created STRING

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

updated STRING

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

Create Pix Disputes

Initiate a Pix dispute for a transaction.

Parameters

referenceId REQUIRED

End-to-end ID of the original Pix transaction.

method REQUIRED

Method of the dispute. Options: "scam", "unauthorized", "coercion", "invasion", "other", "unknown".

operatorEmail REQUIRED

Contact email of the operator responsible for the Pix dispute.

operatorPhone REQUIRED

Contact phone number of the operator responsible for the Pix dispute.

description OPTIONAL

Description of the Pix dispute. Required when method is "other".

minTransactionAmount OPTIONAL

Minimum amount in cents of the transactions to be tracked in the dispute.

maxHopCount OPTIONAL

Maximum number of hops to be tracked in the dispute.

maxHopInterval OPTIONAL

Maximum interval in seconds between hops to be tracked in the dispute.

maxTransactionCount OPTIONAL

Maximum number of transactions to be tracked in the dispute.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/pix-dispute
REQUEST

Python

import starkinfra

disputes = starkinfra.pixdispute.create([
    starkinfra.PixDispute(
        reference_id="E20018183202201201450u34sDjD7334",
        method="scam",
        operator_email="ned.stark@starkbank.com",
        operator_phone="+5511999999999",
        description="Transaction reported by the account holder as fraudulent.",
        min_transaction_amount=100,
        max_transaction_count=10,
        max_hop_count=5,
        max_hop_interval=3600,
        tags=["dispute", "scam"]
    )
])

for dispute in disputes:
    print(dispute)
  

Javascript

const starkinfra = require('starkinfra')

const disputes = await starkinfra.pixDispute.create([
    {
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        tags: ["dispute", "fraud"]
    }
])

for (const dispute of disputes) {
    console.log(dispute)
}
  

PHP

 "E20018183202201201450u34sDjD7334",
        "reason" => "fraud",
        "tags" => ["dispute", "fraud"]
    ])
]);

foreach ($disputes as $dispute) {
    print_r($dispute);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;

List disputes = PixDispute.create(
    Arrays.asList(
        new PixDispute.Builder()
            .referenceId("E20018183202201201450u34sDjD7334")
            .reason("fraud")
            .tags(Arrays.asList("dispute", "fraud"))
            .build()
    )
);

for (PixDispute dispute : disputes) {
    System.out.println(dispute);
}
  

Ruby

require('starkinfra')

disputes = StarkInfra::PixDispute.create([
    StarkInfra::PixDispute.new(
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        tags: ["dispute", "fraud"]
    )
])

disputes.each do |dispute|
    puts dispute
end
  

Elixir

disputes = StarkInfra.PixDispute.create!([
    %StarkInfra.PixDispute{
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        tags: ["dispute", "fraud"]
    }
])

for dispute <- disputes do
    IO.inspect(dispute)
end
  

C#

using StarkInfra;
using System.Collections.Generic;

List disputes = PixDispute.Create(
    new List {
        new PixDispute(
            referenceId: "E20018183202201201450u34sDjD7334",
            reason: "fraud",
            tags: new List { "dispute", "fraud" }
        )
    }
);

foreach (PixDispute dispute in disputes) {
    Console.WriteLine(dispute);
}
  

Go

package main

import (
    "fmt"
    PixDispute "github.com/starkinfra/sdk-go/starkinfra/pixdispute"
)

disputes, err := PixDispute.Create(
    []PixDispute.PixDispute{
        {
            ReferenceId: "E20018183202201201450u34sDjD7334",
            Reason:      "fraud",
            Tags:        []string{"dispute", "fraud"},
        },
    }, nil)

for _, dispute := range disputes {
    fmt.Println(dispute)
}
  

Clojure

(def disputes
    (starkinfra.pix-dispute/create
        [{:reference-id "E20018183202201201450u34sDjD7334"
          :reason "fraud"
          :tags ["dispute" "fraud"]}]))

(doseq [dispute disputes]
    (println dispute))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-dispute' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "disputes": [
        {
            "referenceId": "E20018183202201201450u34sDjD7334",
            "reason": "fraud",
            "tags": ["dispute", "fraud"]
        }
    ]
}'
  
RESPONSE

Python

[
    PixDispute(
        id="5656565656565656",
        reference_id="E20018183202201201450u34sDjD7334",
        bacen_id="817fc523-9e9d-40ab-9e53-dacb71454a05",
        method="scam",
        description="Transaction reported by the account holder as fraudulent.",
        operator_email="ned.stark@starkbank.com",
        operator_phone="+5511999999999",
        status="created",
        tags=["dispute", "scam"],
        flow="out",
        min_transaction_amount=100,
        max_transaction_count=10,
        max_hop_count=5,
        max_hop_interval=3600,
        transactions=[],
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5656565656565656",
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "created",
        flow: "out",
        tags: ["dispute", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

PHP

[
    PixDispute Object (
        [id] => 5656565656565656
        [referenceId] => E20018183202201201450u34sDjD7334
        [reason] => fraud
        [status] => created
        [flow] => out
        [tags] => Array ( [0] => dispute [1] => fraud )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
]
  

Java

[
    PixDispute(
        id=5656565656565656,
        referenceId=E20018183202201201450u34sDjD7334,
        reason=fraud,
        status=created,
        flow=out,
        tags=[dispute, fraud],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    )
]
  

Ruby

[
    {
        id: "5656565656565656",
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "created",
        flow: "out",
        tags: ["dispute", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Elixir

[
    %StarkInfra.PixDispute{
        id: "5656565656565656",
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "created",
        flow: "out",
        tags: ["dispute", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    }
]
  

C#

[
    PixDispute(
        id: "5656565656565656",
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "created",
        flow: "out",
        tags: [ "dispute", "fraud" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    )
]
  

Go

[
    {
        Id: "5656565656565656",
        ReferenceId: "E20018183202201201450u34sDjD7334",
        Reason: "fraud",
        Status: "created",
        Flow: "out",
        Tags: ["dispute", "fraud"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    }
]
  

Clojure

[
    {:id "5656565656565656"
     :reference-id "E20018183202201201450u34sDjD7334"
     :reason "fraud"
     :status "created"
     :flow "out"
     :tags ["dispute" "fraud"]
     :created "2022-01-01T00:00:00+00:00"
     :updated "2022-01-01T00:00:00+00:00"}
]
  

Curl

{
    "disputes": [
        {
            "id": "5656565656565656",
            "referenceId": "E20018183202201201450u34sDjD7334",
            "reason": "fraud",
            "status": "created",
            "flow": "out",
            "tags": ["dispute", "fraud"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

List Pix Disputes

List and filter all Pix disputes. Results are paged.

Parameters

bacenId OPTIONAL

Filter for the Central Bank's unique ID of the Pix dispute.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

flow OPTIONAL

Filter by flow direction. Options: "in", "out".

ids OPTIONAL

List of strings to get specific entities by ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

referenceIds OPTIONAL

List of end-to-end IDs to get disputes by their original Pix transactions.

status OPTIONAL

Filter by status.

tags OPTIONAL

Filter entities that contain the specified tags.

ENDPOINT
GET /v2/pix-dispute
REQUEST

Python

import starkinfra

disputes = starkinfra.pixdispute.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    status="delivered",
    flow="out",
    bacen_id="817fc523-9e9d-40ab-9e53-dacb71454a05",
    reference_ids=["E20018183202201201450u34sDjD7334"],
    ids=["5656565656565656", "4545454545454545"],
    tags=["scam"]
)

for dispute in disputes:
    print(dispute)
  

Javascript

const starkinfra = require('starkinfra')

const disputes = await starkinfra.pixDispute.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    flow: "out",
    tags: ["fraud"]
})

for await (const dispute of disputes) {
    console.log(dispute)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "status" => "delivered",
    "flow" => "out",
    "tags" => ["fraud"]
]);

foreach ($disputes as $dispute) {
    print_r($dispute);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("status", "delivered");
params.put("flow", "out");

Generator disputes = PixDispute.query(params);

for (PixDispute dispute : disputes) {
    System.out.println(dispute);
}
  

Ruby

require('starkinfra')

disputes = StarkInfra::PixDispute.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    flow: "out",
    tags: ["fraud"]
)

disputes.each do |dispute|
    puts dispute
end
  

Elixir

disputes = StarkInfra.PixDispute.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    status: "delivered",
    flow: "out",
    tags: ["fraud"]
)

for dispute <- disputes do
    IO.inspect(dispute)
end
  

C#

using StarkInfra;

IEnumerable disputes = PixDispute.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    status: "delivered",
    flow: "out",
    tags: new List { "fraud" }
);

foreach (PixDispute dispute in disputes) {
    Console.WriteLine(dispute);
}
  

Go

package main

import (
    "fmt"
    PixDispute "github.com/starkinfra/sdk-go/starkinfra/pixdispute"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
    "status": "delivered",
    "flow":   "out",
}

disputes := PixDispute.Query(params, nil)

for dispute := range disputes {
    fmt.Println(dispute)
}
  

Clojure

(def disputes
    (starkinfra.pix-dispute/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :status "delivered"
        :flow "out"
        :tags ["fraud"]
    }))

(doseq [dispute disputes]
    (println dispute))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-dispute?limit=10&after=2022-01-01&before=2022-12-31&status=delivered&flow=out' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixDispute(
    id="5656565656565656",
    reference_id="E20018183202201201450u34sDjD7334",
    bacen_id="817fc523-9e9d-40ab-9e53-dacb71454a05",
    method="scam",
    description="Transaction reported by the account holder as fraudulent.",
    operator_email="ned.stark@starkbank.com",
    operator_phone="+5511999999999",
    status="delivered",
    tags=["scam"],
    flow="out",
    min_transaction_amount=100,
    max_transaction_count=10,
    max_hop_count=5,
    max_hop_interval=3600,
    transactions=[],
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixDispute Object (
    [id] => 5656565656565656
    [referenceId] => E20018183202201201450u34sDjD7334
    [reason] => fraud
    [status] => delivered
    [flow] => out
    [tags] => Array ( [0] => fraud )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixDispute(
    id=5656565656565656,
    referenceId=E20018183202201201450u34sDjD7334,
    reason=fraud,
    status=delivered,
    flow=out,
    tags=[fraud],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixDispute{
    id: "5656565656565656",
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixDispute(
    id: "5656565656565656",
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: [ "fraud" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    ReferenceId: "E20018183202201201450u34sDjD7334",
    Reason: "fraud",
    Status: "delivered",
    Flow: "out",
    Tags: ["fraud"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :reference-id "E20018183202201201450u34sDjD7334"
 :reason "fraud"
 :status "delivered"
 :flow "out"
 :tags ["fraud"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "cursor": null,
    "disputes": [
        {
            "id": "5656565656565656",
            "referenceId": "E20018183202201201450u34sDjD7334",
            "reason": "fraud",
            "status": "delivered",
            "flow": "out",
            "tags": ["fraud"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:00:00+00:00"
        }
    ]
}
  

Get a Pix Dispute

Get a single Pix dispute by its id.

Parameters

id REQUIRED

Id of the Pix dispute entity.

ENDPOINT
GET /v2/pix-dispute/:id
REQUEST

Python

import starkinfra

dispute = starkinfra.pixdispute.get("5656565656565656")

print(dispute)
  

Javascript

const starkinfra = require('starkinfra')

const dispute = await starkinfra.pixDispute.get("5656565656565656")

console.log(dispute)
  

PHP

Java

import com.starkinfra.*;

PixDispute dispute = PixDispute.get("5656565656565656");

System.out.println(dispute);
  

Ruby

require('starkinfra')

dispute = StarkInfra::PixDispute.get("5656565656565656")

puts dispute
  

Elixir

dispute = StarkInfra.PixDispute.get!("5656565656565656")

IO.inspect(dispute)
  

C#

using StarkInfra;

PixDispute dispute = PixDispute.Get("5656565656565656");

Console.WriteLine(dispute);
  

Go

package main

import (
    "fmt"
    PixDispute "github.com/starkinfra/sdk-go/starkinfra/pixdispute"
)

dispute, err := PixDispute.Get("5656565656565656", nil)

fmt.Println(dispute)
  

Clojure

(def dispute
    (starkinfra.pix-dispute/get "5656565656565656"))

(println dispute)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-dispute/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixDispute(
    id="5656565656565656",
    reference_id="E20018183202201201450u34sDjD7334",
    bacen_id="817fc523-9e9d-40ab-9e53-dacb71454a05",
    method="scam",
    description="Transaction reported by the account holder as fraudulent.",
    operator_email="ned.stark@starkbank.com",
    operator_phone="+5511999999999",
    status="delivered",
    tags=["dispute", "scam"],
    flow="out",
    min_transaction_amount=100,
    max_transaction_count=10,
    max_hop_count=5,
    max_hop_interval=3600,
    transactions=[],
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["dispute", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixDispute Object (
    [id] => 5656565656565656
    [referenceId] => E20018183202201201450u34sDjD7334
    [reason] => fraud
    [status] => delivered
    [flow] => out
    [tags] => Array ( [0] => dispute [1] => fraud )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixDispute(
    id=5656565656565656,
    referenceId=E20018183202201201450u34sDjD7334,
    reason=fraud,
    status=delivered,
    flow=out,
    tags=[dispute, fraud],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["dispute", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixDispute{
    id: "5656565656565656",
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: ["dispute", "fraud"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixDispute(
    id: "5656565656565656",
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "delivered",
    flow: "out",
    tags: [ "dispute", "fraud" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    ReferenceId: "E20018183202201201450u34sDjD7334",
    Reason: "fraud",
    Status: "delivered",
    Flow: "out",
    Tags: ["dispute", "fraud"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :reference-id "E20018183202201201450u34sDjD7334"
 :reason "fraud"
 :status "delivered"
 :flow "out"
 :tags ["dispute" "fraud"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "dispute": {
        "id": "5656565656565656",
        "referenceId": "E20018183202201201450u34sDjD7334",
        "reason": "fraud",
        "status": "delivered",
        "flow": "out",
        "tags": ["dispute", "fraud"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

Cancel a Pix Dispute

Cancel a Pix dispute you initiated.

Parameters

id REQUIRED

Id of the Pix dispute entity.

ENDPOINT
DELETE /v2/pix-dispute/:id
REQUEST

Python

import starkinfra

dispute = starkinfra.pixdispute.cancel("5656565656565656")

print(dispute)
  

Javascript

const starkinfra = require('starkinfra')

const dispute = await starkinfra.pixDispute.cancel("5656565656565656")

console.log(dispute)
  

PHP

Java

import com.starkinfra.*;

PixDispute dispute = PixDispute.cancel("5656565656565656");

System.out.println(dispute);
  

Ruby

require('starkinfra')

dispute = StarkInfra::PixDispute.cancel("5656565656565656")

puts dispute
  

Elixir

dispute = StarkInfra.PixDispute.cancel!("5656565656565656")

IO.inspect(dispute)
  

C#

using StarkInfra;

PixDispute dispute = PixDispute.Cancel("5656565656565656");

Console.WriteLine(dispute);
  

Go

package main

import (
    "fmt"
    PixDispute "github.com/starkinfra/sdk-go/starkinfra/pixdispute"
)

dispute, err := PixDispute.Cancel("5656565656565656", nil)

fmt.Println(dispute)
  

Clojure

(def dispute
    (starkinfra.pix-dispute/cancel "5656565656565656"))

(println dispute)
  

Curl

curl --location --request DELETE '{{baseUrl}}/v2/pix-dispute/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixDispute(
    id="5656565656565656",
    reference_id="E20018183202201201450u34sDjD7334",
    bacen_id="817fc523-9e9d-40ab-9e53-dacb71454a05",
    method="scam",
    description="Transaction reported by the account holder as fraudulent.",
    operator_email="ned.stark@starkbank.com",
    operator_phone="+5511999999999",
    status="canceled",
    tags=["dispute", "scam"],
    flow="out",
    min_transaction_amount=100,
    max_transaction_count=10,
    max_hop_count=5,
    max_hop_interval=3600,
    transactions=[],
    created="2022-01-01T00:00:00+00:00",
    updated="2022-06-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "canceled",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

PHP

PixDispute Object (
    [id] => 5656565656565656
    [referenceId] => E20018183202201201450u34sDjD7334
    [reason] => fraud
    [status] => canceled
    [flow] => out
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-06-01T00:00:00+00:00
)
  

Java

PixDispute(
    id=5656565656565656,
    referenceId=E20018183202201201450u34sDjD7334,
    reason=fraud,
    status=canceled,
    flow=out,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-06-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "canceled",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixDispute{
    id: "5656565656565656",
    reference_id: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "canceled",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
}
  

C#

PixDispute(
    id: "5656565656565656",
    referenceId: "E20018183202201201450u34sDjD7334",
    reason: "fraud",
    status: "canceled",
    flow: "out",
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-06-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    ReferenceId: "E20018183202201201450u34sDjD7334",
    Reason: "fraud",
    Status: "canceled",
    Flow: "out",
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-06-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :reference-id "E20018183202201201450u34sDjD7334"
 :reason "fraud"
 :status "canceled"
 :flow "out"
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-06-01T00:00:00+00:00"}
  

Curl

{
    "dispute": {
        "id": "5656565656565656",
        "referenceId": "E20018183202201201450u34sDjD7334",
        "reason": "fraud",
        "status": "canceled",
        "flow": "out",
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-06-01T00:00:00+00:00"
    }
}
  

List Pix Dispute Logs

Get a paged list of all Pix dispute logs.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

disputeIds OPTIONAL

List of strings to get logs by their Pix dispute ids.

ids OPTIONAL

Filter by Pix dispute ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

types OPTIONAL

Filter logs by log types.

ENDPOINT
GET /v2/pix-dispute/log
REQUEST

Python

import starkinfra

logs = starkinfra.pixdispute.log.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    types=["delivered"],
    dispute_ids=["5656565656565656"],
    ids=["6767676767676767"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.pixDispute.log.query({
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["delivered"]
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "types" => ["delivered"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");

Generator logs = PixDispute.Log.query(params);

for (PixDispute.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::PixDispute::Log.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["delivered"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.PixDispute.Log.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    types: ["delivered"]
)

for log <- logs do
    IO.inspect(log)
end
  

C#

using StarkInfra;

IEnumerable logs = PixDispute.Log.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    types: new List { "delivered" }
);

foreach (PixDispute.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    PixDisputeLog "github.com/starkinfra/sdk-go/starkinfra/pixdispute/log"
)

var params = map[string]interface{}{
    "limit":  10,
    "after":  "2022-01-01",
    "before": "2022-12-31",
}

logs := PixDisputeLog.Query(params, nil)

for log := range logs {
    fmt.Println(log)
}
  

Clojure

(def logs
    (starkinfra.pix-dispute.log/query {
        :limit 10
        :after "2022-01-01"
        :before "2022-12-31"
        :types ["delivered"]
    }))

(doseq [log logs]
    (println log))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-dispute/log?limit=10&after=2022-01-01&before=2022-12-31&types=delivered' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    type="delivered",
    dispute=PixDispute(
        id="5656565656565656",
        reference_id="E20018183202201201450u34sDjD7334",
        bacen_id="817fc523-9e9d-40ab-9e53-dacb71454a05",
        method="scam",
        description="Transaction reported by the account holder as fraudulent.",
        operator_email="ned.stark@starkbank.com",
        operator_phone="+5511999999999",
        status="delivered",
        tags=["dispute", "scam"],
        flow="out",
        min_transaction_amount=100,
        max_transaction_count=10,
        max_hop_count=5,
        max_hop_interval=3600,
        transactions=[],
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:00:00+00:00"
    ),
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "delivered",
    dispute: {
        id: "5656565656565656",
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "delivered",
        flow: "out",
        tags: ["dispute", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => delivered
    [dispute] => PixDispute Object (
        [id] => 5656565656565656
        [referenceId] => E20018183202201201450u34sDjD7334
        [reason] => fraud
        [status] => delivered
        [flow] => out
        [tags] => Array ( [0] => dispute [1] => fraud )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:00:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=delivered,
    dispute=PixDispute(
        id=5656565656565656,
        referenceId=E20018183202201201450u34sDjD7334,
        reason=fraud,
        status=delivered,
        flow=out,
        tags=[dispute, fraud],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:00:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "delivered",
    dispute: {
        id: "5656565656565656",
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "delivered",
        flow: "out",
        tags: ["dispute", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixDispute.Log{
    id: "6767676767676767",
    type: "delivered",
    dispute: %StarkInfra.PixDispute{
        id: "5656565656565656",
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "delivered",
        flow: "out",
        tags: ["dispute", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixDispute.Log(
    id: "6767676767676767",
    type: "delivered",
    dispute: PixDispute(
        id: "5656565656565656",
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "delivered",
        flow: "out",
        tags: [ "dispute", "fraud" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:00:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "delivered",
    Dispute: {
        Id: "5656565656565656",
        ReferenceId: "E20018183202201201450u34sDjD7334",
        Reason: "fraud",
        Status: "delivered",
        Flow: "out",
        Tags: ["dispute", "fraud"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:00:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "delivered"
 :dispute {:id "5656565656565656"
           :reference-id "E20018183202201201450u34sDjD7334"
           :reason "fraud"
           :status "delivered"
           :flow "out"
           :tags ["dispute" "fraud"]
           :created "2022-01-01T00:00:00+00:00"
           :updated "2022-01-01T00:00:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6767676767676767",
            "type": "delivered",
            "dispute": {
                "id": "5656565656565656",
                "referenceId": "E20018183202201201450u34sDjD7334",
                "reason": "fraud",
                "status": "delivered",
                "flow": "out",
                "tags": ["dispute", "fraud"],
                "created": "2022-01-01T00:00:00+00:00",
                "updated": "2022-01-01T00:00:00+00:00"
            },
            "created": "2022-01-01T00:01:00+00:00"
        }
    ]
}
  

Get a Pix Dispute Log

Get a single Pix dispute log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/pix-dispute/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.pixdispute.log.get("6767676767676767")

print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.pixDispute.log.get("6767676767676767")

console.log(log)
  

PHP

Java

import com.starkinfra.*;

PixDispute.Log log = PixDispute.Log.get("6767676767676767");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::PixDispute::Log.get("6767676767676767")

puts log
  

Elixir

log = StarkInfra.PixDispute.Log.get!("6767676767676767")

IO.inspect(log)
  

C#

using StarkInfra;

PixDispute.Log log = PixDispute.Log.Get("6767676767676767");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    PixDisputeLog "github.com/starkinfra/sdk-go/starkinfra/pixdispute/log"
)

log, err := PixDisputeLog.Get("6767676767676767", nil)

fmt.Println(log)
  

Clojure

(def log
    (starkinfra.pix-dispute.log/get "6767676767676767"))

(println log)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-dispute/log/6767676767676767' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id="6767676767676767",
    type="delivered",
    dispute=PixDispute(
        id="5656565656565656",
        reference_id="E20018183202201201450u34sDjD7334",
        bacen_id="817fc523-9e9d-40ab-9e53-dacb71454a05",
        method="scam",
        description="Transaction reported by the account holder as fraudulent.",
        operator_email="ned.stark@starkbank.com",
        operator_phone="+5511999999999",
        status="delivered",
        tags=["dispute", "scam"],
        flow="out",
        min_transaction_amount=100,
        max_transaction_count=10,
        max_hop_count=5,
        max_hop_interval=3600,
        transactions=[],
        created="2022-01-01T00:00:00+00:00",
        updated="2022-01-01T00:01:00+00:00"
    ),
    created="2022-01-01T00:01:00+00:00"
)
  

Javascript

{
    id: "6767676767676767",
    type: "delivered",
    dispute: {
        id: "5656565656565656",
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "delivered",
        flow: "out",
        tags: ["dispute", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

PHP

Log Object (
    [id] => 6767676767676767
    [type] => delivered
    [dispute] => PixDispute Object (
        [id] => 5656565656565656
        [referenceId] => E20018183202201201450u34sDjD7334
        [reason] => fraud
        [status] => delivered
        [flow] => out
        [tags] => Array ( [0] => dispute [1] => fraud )
        [created] => 2022-01-01T00:00:00+00:00
        [updated] => 2022-01-01T00:01:00+00:00
    )
    [created] => 2022-01-01T00:01:00+00:00
)
  

Java

Log(
    id=6767676767676767,
    type=delivered,
    dispute=PixDispute(
        id=5656565656565656,
        referenceId=E20018183202201201450u34sDjD7334,
        reason=fraud,
        status=delivered,
        flow=out,
        tags=[dispute, fraud],
        created=2022-01-01T00:00:00+00:00,
        updated=2022-01-01T00:01:00+00:00
    ),
    created=2022-01-01T00:01:00+00:00
)
  

Ruby

{
    id: "6767676767676767",
    type: "delivered",
    dispute: {
        id: "5656565656565656",
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "delivered",
        flow: "out",
        tags: ["dispute", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

Elixir

%StarkInfra.PixDispute.Log{
    id: "6767676767676767",
    type: "delivered",
    dispute: %StarkInfra.PixDispute{
        id: "5656565656565656",
        reference_id: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "delivered",
        flow: "out",
        tags: ["dispute", "fraud"],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    },
    created: "2022-01-01T00:01:00+00:00"
}
  

C#

PixDispute.Log(
    id: "6767676767676767",
    type: "delivered",
    dispute: PixDispute(
        id: "5656565656565656",
        referenceId: "E20018183202201201450u34sDjD7334",
        reason: "fraud",
        status: "delivered",
        flow: "out",
        tags: [ "dispute", "fraud" ],
        created: "2022-01-01T00:00:00+00:00",
        updated: "2022-01-01T00:01:00+00:00"
    ),
    created: "2022-01-01T00:01:00+00:00"
)
  

Go

{
    Id: "6767676767676767",
    Type: "delivered",
    Dispute: {
        Id: "5656565656565656",
        ReferenceId: "E20018183202201201450u34sDjD7334",
        Reason: "fraud",
        Status: "delivered",
        Flow: "out",
        Tags: ["dispute", "fraud"],
        Created: "2022-01-01T00:00:00+00:00",
        Updated: "2022-01-01T00:01:00+00:00"
    },
    Created: "2022-01-01T00:01:00+00:00"
}
  

Clojure

{:id "6767676767676767"
 :type "delivered"
 :dispute {:id "5656565656565656"
           :reference-id "E20018183202201201450u34sDjD7334"
           :reason "fraud"
           :status "delivered"
           :flow "out"
           :tags ["dispute" "fraud"]
           :created "2022-01-01T00:00:00+00:00"
           :updated "2022-01-01T00:01:00+00:00"}
 :created "2022-01-01T00:01:00+00:00"}
  

Curl

{
    "log": {
        "id": "6767676767676767",
        "type": "delivered",
        "dispute": {
            "id": "5656565656565656",
            "referenceId": "E20018183202201201450u34sDjD7334",
            "reason": "fraud",
            "status": "delivered",
            "flow": "out",
            "tags": ["dispute", "fraud"],
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:01:00+00:00"
        },
        "created": "2022-01-01T00:01:00+00:00"
    }
}
  

Pix User

The Pix User resource lets you consult, through DICT, an end user's statistics on Pix keys, Pix requests, frauds and infractions registered across Bacen's systems (e.g. SPI for Pix requests).

Here we will show you how to retrieve user data.

The Pix User Object

Attributes

id STRING

Tax ID (CPF or CNPJ) used to query the user.

statistics.value INTEGER

Number of occurrences counted for this statistic.

statistics.type STRING

Type of the statistic; the valid values depend on the source. Options: "registered", "unique" (pix-key); "settled" (pix-request); "identity", "mule", "scam", "other", "unknown", "amount", "unique" (pix-fraud); "open", "denied", "unique" (pix-infraction).

statistics.source STRING

Source of the statistic. Options: "pix-key", "pix-fraud", "pix-request", "pix-infraction".

statistics.after STRING

Datetime from which the statistic was computed. Example: "2020-04-23T23:00:00.000000+00:00".

statistics.updated STRING

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

Get a Pix User

Retrieve a user's aggregated Pix statistics — Pix keys, Pix requests, frauds and infractions — for a specific user by their tax ID.

Parameters

taxId REQUIRED

CPF or CNPJ of the user to query.

keyId OPTIONAL

Pix key to retrieve statistics for. When provided, the response returns the key statistics instead of the owner statistics.

ENDPOINT
GET /v2/pix-user/:taxId
REQUEST

Python

import starkinfra

user = starkinfra.pixuser.get("012.345.678-90")

print(user)
  

Javascript

const starkinfra = require('starkinfra')

const user = await starkinfra.pixUser.get("012.345.678-90")

console.log(user)
  

PHP

Java

import com.starkinfra.*;

PixUser user = PixUser.get("012.345.678-90");

System.out.println(user);
  

Ruby

require('starkinfra')

user = StarkInfra::PixUser.get("012.345.678-90")

puts user
  

Elixir

user = StarkInfra.PixUser.get!("012.345.678-90")

IO.inspect(user)
  

C#

using StarkInfra;

PixUser user = PixUser.Get("012.345.678-90");

Console.WriteLine(user);
  

Go

package main

import (
    "fmt"
    PixUser "github.com/starkinfra/sdk-go/starkinfra/pixuser"
)

user, err := PixUser.Get("012.345.678-90", nil)

fmt.Println(user)
  

Clojure

(def user
    (starkinfra.pix-user/get "012.345.678-90"))

(println user)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-user/012.345.678-90' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixUser(
    id="012.345.678-90",
    statistics=[
        PixUser.Statistics(
            value=3,
            type="open",
            source="pix-infraction",
            after="2020-04-23T23:00:00.000000+00:00",
            updated="2020-04-23T23:00:00.000000+00:00"
        )
    ]
)
  

Javascript

{
    id: "012.345.678-90",
    statistics: [
        {
            value: 3,
            type: "open",
            source: "pix-infraction",
            after: "2020-04-23T23:00:00.000000+00:00",
            updated: "2020-04-23T23:00:00.000000+00:00"
        }
    ]
}
  

PHP

PixUser Object (
    [id] => 012.345.678-90
    [statistics] => Array (
        [0] => StarkInfra\PixUser\Statistics Object (
            [value] => 3
            [type] => open
            [source] => pix-infraction
            [after] => 2020-04-23T23:00:00.000000+00:00
            [updated] => 2020-04-23T23:00:00.000000+00:00
        )
    )
)
  

Java

PixUser(
    id=012.345.678-90,
    statistics=[
        PixUser.Statistics(
            value=3,
            type=open,
            source=pix-infraction,
            after=2020-04-23T23:00:00.000000+00:00,
            updated=2020-04-23T23:00:00.000000+00:00
        )
    ]
)
  

Ruby

{
    id: "012.345.678-90",
    statistics: [
        {
            value: 3,
            type: "open",
            source: "pix-infraction",
            after: "2020-04-23T23:00:00.000000+00:00",
            updated: "2020-04-23T23:00:00.000000+00:00"
        }
    ]
}
  

Elixir

%StarkInfra.PixUser{
    id: "012.345.678-90",
    statistics: [
        %StarkInfra.PixUser.Statistics{
            value: 3,
            type: "open",
            source: "pix-infraction",
            after: "2020-04-23T23:00:00.000000+00:00",
            updated: "2020-04-23T23:00:00.000000+00:00"
        }
    ]
}
  

C#

PixUser(
    id: "012.345.678-90",
    statistics: [
        PixUser.Statistics(
            value: 3,
            type: "open",
            source: "pix-infraction",
            after: "2020-04-23T23:00:00.000000+00:00",
            updated: "2020-04-23T23:00:00.000000+00:00"
        )
    ]
)
  

Go

{
    Id: "012.345.678-90",
    Statistics: [
        {
            Value: 3,
            Type: "open",
            Source: "pix-infraction",
            After: "2020-04-23T23:00:00.000000+00:00",
            Updated: "2020-04-23T23:00:00.000000+00:00"
        }
    ]
}
  

Clojure

{:id "012.345.678-90"
 :statistics [{:value 3
               :type "open"
               :source "pix-infraction"
               :after "2020-04-23T23:00:00.000000+00:00"
               :updated "2020-04-23T23:00:00.000000+00:00"}]}
  

Curl

{
    "id": "012.345.678-90",
    "statistics": [
        {
            "value": 3,
            "type": "open",
            "source": "pix-infraction",
            "after": "2020-04-23T23:00:00.000000+00:00",
            "updated": "2020-04-23T23:00:00.000000+00:00"
        }
    ]
}
  

Pix Balance

The Pix Balance represents the current available balance in your Pix account.

Here we will show you how to retrieve it.

The Pix Balance Object

Attributes

id STRING

Identifier of the balance. Holds the participant bank code for direct participants or the workspace id for indirect participants.

currency STRING

Currency of the balance amount. Example: "BRL".

amount INTEGER

Current balance amount in cents. Example: 1234 (R$ 12.34).

updated STRING

ISO datetime that represents when the balance was last updated. Example: "2020-04-23T23:00:00.000000+00:00".

Get Pix Balance

Retrieve the current Pix balance of your workspace.

Parameters

before OPTIONAL

Date used to retrieve the balance as of the end of the informed day. Example: "2022-01-31". When omitted or set to the current day, the current balance is returned.

ENDPOINT
GET /v2/pix-balance
REQUEST

Python

import starkinfra

balance = starkinfra.pixbalance.get(
    before="2022-01-31"
)

print(balance)
  

Javascript

const starkinfra = require('starkinfra')

const balance = await starkinfra.pixBalance.get()

console.log(balance)
  

PHP

Java

import com.starkinfra.*;

PixBalance balance = PixBalance.get();

System.out.println(balance);
  

Ruby

require('starkinfra')

balance = StarkInfra::PixBalance.get()

puts balance
  

Elixir

balance = StarkInfra.PixBalance.get!()

IO.inspect(balance)
  

C#

using StarkInfra;

PixBalance balance = PixBalance.Get();

Console.WriteLine(balance);
  

Go

package main

import (
    "fmt"
    PixBalance "github.com/starkinfra/sdk-go/starkinfra/pixbalance"
)

balance, err := PixBalance.Get(nil)

fmt.Println(balance)
  

Clojure

(def balance
    (starkinfra.pix-balance/get))

(println balance)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-balance' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixBalance(
    id="5656565656565656",
    amount=10000000,
    currency="BRL",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    amount: 10000000,
    currency: "BRL",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixBalance Object (
    [id] => 5656565656565656
    [amount] => 10000000
    [currency] => BRL
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixBalance(
    id=5656565656565656,
    amount=10000000,
    currency=BRL,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    amount: 10000000,
    currency: "BRL",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixBalance{
    id: "5656565656565656",
    amount: 10000000,
    currency: "BRL",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixBalance(
    id: "5656565656565656",
    amount: 10000000,
    currency: "BRL",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Amount: 10000000,
    Currency: "BRL",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :amount 10000000
 :currency "BRL"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "balance": {
        "id": "5656565656565656",
        "amount": 10000000,
        "currency": "BRL",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

Pix Domain

Pix Domains are the domains Pix participants register with Bacen to provide Brcodes, along with their respective certificate chains used for secure communication.

Here we will show you how to list them.

The Pix Domain Object

Attributes

name STRING

Domain name registered in the Pix system.

certificates LIST OF OBJECTS

List of certificate objects that make up the domain's certificate chain.

certificates.content STRING

Certificate in PEM format.

List Pix Domains

List all registered Pix domains and their certificate chains.

Parameters

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-domain
REQUEST

Python

import starkinfra

domains = starkinfra.pixdomain.query()

for domain in domains:
    print(domain)
  

Javascript

const starkinfra = require('starkinfra')

const domains = await starkinfra.pixDomain.query()

for await (const domain of domains) {
    console.log(domain)
}
  

PHP

Java

import com.starkinfra.*;

Generator domains = PixDomain.query(null);

for (PixDomain domain : domains) {
    System.out.println(domain);
}
  

Ruby

require('starkinfra')

domains = StarkInfra::PixDomain.query()

domains.each do |domain|
    puts domain
end
  

Elixir

domains = StarkInfra.PixDomain.query!()

for domain <- domains do
    IO.inspect(domain)
end
  

C#

using StarkInfra;

IEnumerable domains = PixDomain.Query();

foreach (PixDomain domain in domains) {
    Console.WriteLine(domain);
}
  

Go

package main

import (
    "fmt"
    PixDomain "github.com/starkinfra/sdk-go/starkinfra/pixdomain"
)

domains := PixDomain.Query(nil, nil)

for domain := range domains {
    fmt.Println(domain)
}
  

Clojure

(def domains
    (starkinfra.pix-domain/query))

(doseq [domain domains]
    (println domain))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-domain' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixDomain(
    name="pix.starkbank.com",
    certificates=[
        pixdomain.Certificate(
            content="-----BEGIN CERTIFICATE-----..."
        )
    ]
)
  

Javascript

{
    name: "pix.starkbank.com",
    certificates: [
        {
            content: "-----BEGIN CERTIFICATE-----..."
        }
    ]
}
  

PHP

PixDomain Object (
    [name] => pix.starkbank.com
    [certificates] => Array (
        [0] => Certificate Object (
            [content] => -----BEGIN CERTIFICATE-----...
        )
    )
)
  

Java

PixDomain(
    name=pix.starkbank.com,
    certificates=[
        Certificate(
            content=-----BEGIN CERTIFICATE-----...
        )
    ]
)
  

Ruby

{
    name: "pix.starkbank.com",
    certificates: [
        {
            content: "-----BEGIN CERTIFICATE-----..."
        }
    ]
}
  

Elixir

%StarkInfra.PixDomain{
    name: "pix.starkbank.com",
    certificates: [
        %StarkInfra.PixDomain.Certificate{
            content: "-----BEGIN CERTIFICATE-----..."
        }
    ]
}
  

C#

PixDomain(
    name: "pix.starkbank.com",
    certificates: [
        Certificate(
            content: "-----BEGIN CERTIFICATE-----..."
        )
    ]
)
  

Go

{
    Name: "pix.starkbank.com",
    Certificates: [
        {
            Content: "-----BEGIN CERTIFICATE-----..."
        }
    ]
}
  

Clojure

{:name "pix.starkbank.com"
 :certificates [{:content "-----BEGIN CERTIFICATE-----..."}]}
  

Curl

{
    "domains": [
        {
            "name": "pix.starkbank.com",
            "certificates": [
                {
                    "content": "-----BEGIN CERTIFICATE-----..."
                }
            ]
        }
    ]
}
  

Pix Statement

A Pix Statement allows you to request a detailed report of all Pix transactions in your account for a given period.

Here we will show you how to create and manage them.

The Pix Statement Object

Attributes

id STRING

Unique id for the Pix statement.

after STRING

Start date of the statement period.

before STRING

End date of the statement period.

type STRING

Type of the statement. Options: "interchange", "interchangeTotal", "transaction".

status STRING

Current status. Options: "created", "looking", "success", "failed".

chunkCount INTEGER

Number of chunks the statement file is split into. Each chunk can be downloaded individually.

transactionCount INTEGER

Number of transactions in the statement.

created STRING

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

updated STRING

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

Create a Pix Statement

Request a Pix statement for a specific period and type.

Parameters

after REQUIRED

Start date of the statement period. Example: "2022-01-01".

before REQUIRED

End date of the statement period. Example: "2022-01-31".

type REQUIRED

Type of the statement. Options: "interchange", "interchangeTotal", "transaction".

ENDPOINT
POST /v2/pix-statement
REQUEST

Python

import starkinfra

statement = starkinfra.pixstatement.create(
    starkinfra.PixStatement(
        after="2022-01-01",
        before="2022-01-31",
        type="transaction"
    )
)

print(statement)
  

Javascript

const starkinfra = require('starkinfra')

const statement = await starkinfra.pixStatement.create({
    after: "2022-01-01",
    before: "2022-01-31",
    type: "transaction"
})

console.log(statement)
  

PHP

 "2022-01-01",
        "before" => "2022-01-31",
        "type" => "transaction"
    ])
);

print_r($statement);
  

Java

import com.starkinfra.*;

PixStatement statement = PixStatement.create(
    new PixStatement.Builder()
        .after("2022-01-01")
        .before("2022-01-31")
        .type("transaction")
        .build()
);

System.out.println(statement);
  

Ruby

require('starkinfra')

statement = StarkInfra::PixStatement.create(
    StarkInfra::PixStatement.new(
        after: "2022-01-01",
        before: "2022-01-31",
        type: "transaction"
    )
)

puts statement
  

Elixir

statement = StarkInfra.PixStatement.create!(
    %StarkInfra.PixStatement{
        after: "2022-01-01",
        before: "2022-01-31",
        type: "transaction"
    }
)

IO.inspect(statement)
  

C#

using StarkInfra;

PixStatement statement = PixStatement.Create(
    new PixStatement(
        after: new DateTime(2022, 1, 1),
        before: new DateTime(2022, 1, 31),
        type: "transaction"
    )
);

Console.WriteLine(statement);
  

Go

package main

import (
    "fmt"
    PixStatement "github.com/starkinfra/sdk-go/starkinfra/pixstatement"
)

statement, err := PixStatement.Create(
    PixStatement.PixStatement{
        After:  "2022-01-01",
        Before: "2022-01-31",
        Type:   "transaction",
    }, nil)

fmt.Println(statement)
  

Clojure

(def statement
    (starkinfra.pix-statement/create
        {:after "2022-01-01"
         :before "2022-01-31"
         :type "transaction"}))

(println statement)
  

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-statement' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "statement": {
        "after": "2022-01-01",
        "before": "2022-01-31",
        "type": "transaction"
    }
}'
  
RESPONSE

Python

PixStatement(
    id="5656565656565656",
    after="2022-01-01",
    before="2022-01-31",
    type="transaction",
    status="created",
    chunk_count=0,
    transaction_count=0,
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:00:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    after: "2022-01-01",
    before: "2022-01-31",
    type: "transaction",
    status: "created",
    transactionCount: 0,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixStatement Object (
    [id] => 5656565656565656
    [after] => 2022-01-01
    [before] => 2022-01-31
    [type] => transaction
    [status] => created
    [transactionCount] => 0
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixStatement(
    id=5656565656565656,
    after=2022-01-01,
    before=2022-01-31,
    type=transaction,
    status=created,
    transactionCount=0,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    after: "2022-01-01",
    before: "2022-01-31",
    type: "transaction",
    status: "created",
    transaction_count: 0,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixStatement{
    id: "5656565656565656",
    after: "2022-01-01",
    before: "2022-01-31",
    type: "transaction",
    status: "created",
    transaction_count: 0,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixStatement(
    id: "5656565656565656",
    after: "2022-01-01",
    before: "2022-01-31",
    type: "transaction",
    status: "created",
    transactionCount: 0,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    After: "2022-01-01",
    Before: "2022-01-31",
    Type: "transaction",
    Status: "created",
    TransactionCount: 0,
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :after "2022-01-01"
 :before "2022-01-31"
 :type "transaction"
 :status "created"
 :transaction-count 0
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "statement": {
        "id": "5656565656565656",
        "after": "2022-01-01",
        "before": "2022-01-31",
        "type": "transaction",
        "status": "created",
        "transactionCount": 0,
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

List Pix Statements

List and filter all Pix statements. Results are paged.

Parameters

cursor OPTIONAL

String used to get the next batch of results.

ids OPTIONAL

List of strings to get specific entities by ids.

limit OPTIONAL

Number of results per cursor. Max = 100.

ENDPOINT
GET /v2/pix-statement
REQUEST

Python

import starkinfra

statements = starkinfra.pixstatement.query(limit=10)

for statement in statements:
    print(statement)
  

Javascript

const starkinfra = require('starkinfra')

const statements = await starkinfra.pixStatement.query({ limit: 10 })

for await (const statement of statements) {
    console.log(statement)
}
  

PHP

 10]);

foreach ($statements as $statement) {
    print_r($statement);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);

Generator statements = PixStatement.query(params);

for (PixStatement statement : statements) {
    System.out.println(statement);
}
  

Ruby

require('starkinfra')

statements = StarkInfra::PixStatement.query(limit: 10)

statements.each do |statement|
    puts statement
end
  

Elixir

statements = StarkInfra.PixStatement.query!(limit: 10)

for statement <- statements do
    IO.inspect(statement)
end
  

C#

using StarkInfra;

IEnumerable statements = PixStatement.Query(limit: 10);

foreach (PixStatement statement in statements) {
    Console.WriteLine(statement);
}
  

Go

package main

import (
    "fmt"
    PixStatement "github.com/starkinfra/sdk-go/starkinfra/pixstatement"
)

var params = map[string]interface{}{
    "limit": 10,
}

statements := PixStatement.Query(params, nil)

for statement := range statements {
    fmt.Println(statement)
}
  

Clojure

(def statements
    (starkinfra.pix-statement/query {:limit 10}))

(doseq [statement statements]
    (println statement))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-statement?limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python



PixStatement(
    id="5656565656565656",
    after="2022-01-01",
    before="2022-01-31",
    type="transaction",
    status="success",
    chunk_count=2,
    transaction_count=150,
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:05:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    type: "transaction",
    status: "success",
    transactionCount: 150,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:05:00+00:00"
}
  

PHP

PixStatement Object (
    [id] => 5656565656565656
    [type] => transaction
    [status] => success
    [transactionCount] => 150
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:05:00+00:00
)
  

Java

PixStatement(
    id=5656565656565656,
    type=transaction,
    status=success,
    transactionCount=150,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:05:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    type: "transaction",
    status: "success",
    transaction_count: 150,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:05:00+00:00"
}
  

Elixir

%StarkInfra.PixStatement{
    id: "5656565656565656",
    type: "transaction",
    status: "success",
    transaction_count: 150,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:05:00+00:00"
}
  

C#

PixStatement(
    id: "5656565656565656",
    type: "transaction",
    status: "success",
    transactionCount: 150,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:05:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Type: "transaction",
    Status: "success",
    TransactionCount: 150,
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:05:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :type "transaction"
 :status "success"
 :transaction-count 150
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:05:00+00:00"}
  

Curl

{
    "cursor": null,
    "statements": [
        {
            "id": "5656565656565656",
            "type": "transaction",
            "status": "success",
            "transactionCount": 150,
            "created": "2022-01-01T00:00:00+00:00",
            "updated": "2022-01-01T00:05:00+00:00"
        }
    ]
}
  

Get a Pix Statement

Get a single Pix statement by its id.

Parameters

id REQUIRED

Id of the Pix statement entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/pix-statement/:id
REQUEST

Python

import starkinfra

statement = starkinfra.pixstatement.get("5656565656565656")

print(statement)
  

Javascript

const starkinfra = require('starkinfra')

const statement = await starkinfra.pixStatement.get("5656565656565656")

console.log(statement)
  

PHP

Java

import com.starkinfra.*;

PixStatement statement = PixStatement.get("5656565656565656");

System.out.println(statement);
  

Ruby

require('starkinfra')

statement = StarkInfra::PixStatement.get("5656565656565656")

puts statement
  

Elixir

statement = StarkInfra.PixStatement.get!("5656565656565656")

IO.inspect(statement)
  

C#

using StarkInfra;

PixStatement statement = PixStatement.Get("5656565656565656");

Console.WriteLine(statement);
  

Go

package main

import (
    "fmt"
    PixStatement "github.com/starkinfra/sdk-go/starkinfra/pixstatement"
)

statement, err := PixStatement.Get("5656565656565656", nil)

fmt.Println(statement)
  

Clojure

(def statement
    (starkinfra.pix-statement/get "5656565656565656"))

(println statement)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-statement/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

PixStatement(
    id="5656565656565656",
    after="2022-01-01",
    before="2022-01-31",
    type="transaction",
    status="success",
    chunk_count=2,
    transaction_count=150,
    created="2022-01-01T00:00:00+00:00",
    updated="2022-01-01T00:05:00+00:00"
)
  

Javascript

{
    id: "5656565656565656",
    after: "2022-01-01",
    before: "2022-01-31",
    type: "transaction",
    status: "success",
    transactionCount: 150,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:05:00+00:00"
}
  

PHP

PixStatement Object (
    [id] => 5656565656565656
    [after] => 2022-01-01
    [before] => 2022-01-31
    [type] => transaction
    [status] => success
    [transactionCount] => 150
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:05:00+00:00
)
  

Java

PixStatement(
    id=5656565656565656,
    after=2022-01-01,
    before=2022-01-31,
    type=transaction,
    status=success,
    transactionCount=150,
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:05:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    after: "2022-01-01",
    before: "2022-01-31",
    type: "transaction",
    status: "success",
    transaction_count: 150,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:05:00+00:00"
}
  

Elixir

%StarkInfra.PixStatement{
    id: "5656565656565656",
    after: "2022-01-01",
    before: "2022-01-31",
    type: "transaction",
    status: "success",
    transaction_count: 150,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:05:00+00:00"
}
  

C#

PixStatement(
    id: "5656565656565656",
    after: "2022-01-01",
    before: "2022-01-31",
    type: "transaction",
    status: "success",
    transactionCount: 150,
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:05:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    After: "2022-01-01",
    Before: "2022-01-31",
    Type: "transaction",
    Status: "success",
    TransactionCount: 150,
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:05:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :after "2022-01-01"
 :before "2022-01-31"
 :type "transaction"
 :status "success"
 :transaction-count 150
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:05:00+00:00"}
  

Curl

{
    "statement": {
        "id": "5656565656565656",
        "after": "2022-01-01",
        "before": "2022-01-31",
        "type": "transaction",
        "status": "success",
        "transactionCount": 150,
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:05:00+00:00"
    }
}
  

Get a Pix Statement CSV

Get the CSV file for a completed Pix statement. The file is returned compressed in the gzip format.

Parameters

id REQUIRED

Id of the Pix statement entity.

ENDPOINT
GET /v2/pix-statement/:id/csv
REQUEST

Python

import starkinfra

csv = starkinfra.pixstatement.csv("5656565656565656")

with open("statement.zip", "wb") as f:
    f.write(csv)
  

Javascript

const starkinfra = require('starkinfra')
const fs = require('fs')

const pdf = await starkinfra.pixStatement.pdf("5656565656565656")

fs.writeFileSync("statement.zip", pdf)
  

PHP

Java

import com.starkinfra.*;
import java.io.FileOutputStream;

byte[] pdf = PixStatement.pdf("5656565656565656");

FileOutputStream fos = new FileOutputStream("statement.zip");
fos.write(pdf);
fos.close();
  

Ruby

require('starkinfra')

pdf = StarkInfra::PixStatement.pdf("5656565656565656")

File.open("statement.zip", "wb") { |f| f.write(pdf) }
  

Elixir

pdf = StarkInfra.PixStatement.pdf!("5656565656565656")

File.write!("statement.zip", pdf)
  

C#

using StarkInfra;
using System.IO;

byte[] pdf = PixStatement.Pdf("5656565656565656");

File.WriteAllBytes("statement.zip", pdf);
  

Go

package main

import (
    "os"
    PixStatement "github.com/starkinfra/sdk-go/starkinfra/pixstatement"
)

pdf, err := PixStatement.Pdf("5656565656565656", nil)

os.WriteFile("statement.zip", pdf, 0644)
  

Clojure

(def pdf
    (starkinfra.pix-statement/pdf "5656565656565656"))

(clojure.java.io/copy pdf (java.io.File. "statement.zip"))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-statement/5656565656565656/csv' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--output statement.csv.gz
  
RESPONSE

Python


  

Javascript


  

PHP


  

Java


  

Ruby


  

Elixir


  

C#


  

Go

<[]byte: statement zip file content>
  

Clojure


  

Curl


  

Get a Pix Statement Chunk

Get a single chunk of a completed Pix statement. Large statements are split into numbered parts, letting you download one chunk at a time. The chunk is returned compressed in the gzip format.

Parameters

id REQUIRED

Id of the Pix statement entity.

number REQUIRED

Number of the chunk to retrieve, ranging from 1 to the statement's chunkCount.

ENDPOINT
GET /v2/pix-statement/:id/chunk/:number
REQUEST

Python

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/pix-statement/5656565656565656/chunk/1' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--output statement-chunk-1.csv.gz
  
RESPONSE

Python

Javascript

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl


  

Pix Director

The Pix Director represents the responsible officer for Pix operations in your institution, as required by the Brazilian Central Bank.

Here we will show you how to register them.

The Pix Director Object

Attributes

name STRING

Full name of the director.

taxId STRING

CPF of the director.

phone STRING

Phone number of the director.

email STRING

Email address of the director.

password STRING

Password for director access.

teamEmail STRING

Team email for Pix notifications.

teamPhones LIST OF STRINGS

List of team phone numbers for Pix notifications.

status STRING

Current registration status of the Pix director. Options: "success", "processing", "failed".

Create a Pix Director

Register the Pix director for your institution as required by the Brazilian Central Bank.

Parameters

email REQUIRED

Email address of the director.

name REQUIRED

Full name of the director.

password REQUIRED

Password for director access.

phone REQUIRED

Phone number of the director.

taxId REQUIRED

CPF of the director.

teamEmail REQUIRED

Team email for Pix notifications.

teamPhones REQUIRED

List of team phone numbers for Pix notifications.

ENDPOINT
POST /v2/pix-director
REQUEST

Python

import starkinfra

director = starkinfra.pixdirector.create(
    starkinfra.PixDirector(
        name="Jon Snow",
        tax_id="012.345.678-90",
        phone="+5511999999999",
        email="jon.snow@starkinfra.com",
        password="P@ssword1234",
        team_email="team@starkinfra.com",
        team_phones=["+5511888888888", "+5511777777777"]
    )
)

print(director)
  

Javascript

const starkinfra = require('starkinfra')

const director = await starkinfra.pixDirector.create({
    name: "Jon Snow",
    taxId: "012.345.678-90",
    phone: "+5511999999999",
    email: "jon.snow@starkinfra.com",
    password: "P@ssword1234",
    teamEmail: "team@starkinfra.com",
    teamPhones: ["+5511888888888", "+5511777777777"]
})

console.log(director)
  

PHP

 "Jon Snow",
        "taxId" => "012.345.678-90",
        "phone" => "+5511999999999",
        "email" => "jon.snow@starkinfra.com",
        "password" => "P@ssword1234",
        "teamEmail" => "team@starkinfra.com",
        "teamPhones" => ["+5511888888888", "+5511777777777"]
    ])
);

print_r($director);
  

Java

import com.starkinfra.*;
import java.util.Arrays;

PixDirector director = PixDirector.create(
    new PixDirector.Builder()
        .name("Jon Snow")
        .taxId("012.345.678-90")
        .phone("+5511999999999")
        .email("jon.snow@starkinfra.com")
        .password("P@ssword1234")
        .teamEmail("team@starkinfra.com")
        .teamPhones(Arrays.asList("+5511888888888", "+5511777777777"))
        .build()
);

System.out.println(director);
  

Ruby

require('starkinfra')

director = StarkInfra::PixDirector.create(
    StarkInfra::PixDirector.new(
        name: "Jon Snow",
        tax_id: "012.345.678-90",
        phone: "+5511999999999",
        email: "jon.snow@starkinfra.com",
        password: "P@ssword1234",
        team_email: "team@starkinfra.com",
        team_phones: ["+5511888888888", "+5511777777777"]
    )
)

puts director
  

Elixir

director = StarkInfra.PixDirector.create!(
    %StarkInfra.PixDirector{
        name: "Jon Snow",
        tax_id: "012.345.678-90",
        phone: "+5511999999999",
        email: "jon.snow@starkinfra.com",
        password: "P@ssword1234",
        team_email: "team@starkinfra.com",
        team_phones: ["+5511888888888", "+5511777777777"]
    }
)

IO.inspect(director)
  

C#

using StarkInfra;
using System.Collections.Generic;

PixDirector director = PixDirector.Create(
    new PixDirector(
        name: "Jon Snow",
        taxId: "012.345.678-90",
        phone: "+5511999999999",
        email: "jon.snow@starkinfra.com",
        password: "P@ssword1234",
        teamEmail: "team@starkinfra.com",
        teamPhones: new List { "+5511888888888", "+5511777777777" }
    )
);

Console.WriteLine(director);
  

Go

package main

import (
    "fmt"
    PixDirector "github.com/starkinfra/sdk-go/starkinfra/pixdirector"
)

director, err := PixDirector.Create(
    PixDirector.PixDirector{
        Name:        "Jon Snow",
        TaxId:       "012.345.678-90",
        Phone:       "+5511999999999",
        Email:       "jon.snow@starkinfra.com",
        Password:    "P@ssword1234",
        TeamEmail:   "team@starkinfra.com",
        TeamPhones:  []string{"+5511888888888", "+5511777777777"},
    }, nil)

fmt.Println(director)
  

Clojure

(def director
    (starkinfra.pix-director/create
        {:name "Jon Snow"
         :tax-id "012.345.678-90"
         :phone "+5511999999999"
         :email "jon.snow@starkinfra.com"
         :password "P@ssword1234"
         :team-email "team@starkinfra.com"
         :team-phones ["+5511888888888" "+5511777777777"]}))

(println director)
  

Curl

curl --location --request POST '{{baseUrl}}/v2/pix-director' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "director": {
        "name": "Jon Snow",
        "taxId": "012.345.678-90",
        "phone": "+5511999999999",
        "email": "jon.snow@starkinfra.com",
        "password": "P@ssword1234",
        "teamEmail": "team@starkinfra.com",
        "teamPhones": ["+5511888888888", "+5511777777777"]
    }
}'
  
RESPONSE

Python

PixDirector(
    id="5656565656565656",
    name="Jon Snow",
    tax_id="012.345.678-90",
    phone="+5511999999999",
    email="jon.snow@starkinfra.com",
    password="P@ssword1234",
    team_email="team@starkinfra.com",
    team_phones=["+5511888888888", "+5511777777777"],
    status="success"
)
  

Javascript

{
    id: "5656565656565656",
    name: "Jon Snow",
    taxId: "012.345.678-90",
    phone: "+5511999999999",
    email: "jon.snow@starkinfra.com",
    teamEmail: "team@starkinfra.com",
    teamPhones: ["+5511888888888", "+5511777777777"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

PHP

PixDirector Object (
    [id] => 5656565656565656
    [name] => Jon Snow
    [taxId] => 012.345.678-90
    [phone] => +5511999999999
    [email] => jon.snow@starkinfra.com
    [teamEmail] => team@starkinfra.com
    [teamPhones] => Array ( [0] => +5511888888888 [1] => +5511777777777 )
    [created] => 2022-01-01T00:00:00+00:00
    [updated] => 2022-01-01T00:00:00+00:00
)
  

Java

PixDirector(
    id=5656565656565656,
    name=Jon Snow,
    taxId=012.345.678-90,
    phone=+5511999999999,
    email=jon.snow@starkinfra.com,
    teamEmail=team@starkinfra.com,
    teamPhones=[+5511888888888, +5511777777777],
    created=2022-01-01T00:00:00+00:00,
    updated=2022-01-01T00:00:00+00:00
)
  

Ruby

{
    id: "5656565656565656",
    name: "Jon Snow",
    tax_id: "012.345.678-90",
    phone: "+5511999999999",
    email: "jon.snow@starkinfra.com",
    team_email: "team@starkinfra.com",
    team_phones: ["+5511888888888", "+5511777777777"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

Elixir

%StarkInfra.PixDirector{
    id: "5656565656565656",
    name: "Jon Snow",
    tax_id: "012.345.678-90",
    phone: "+5511999999999",
    email: "jon.snow@starkinfra.com",
    team_email: "team@starkinfra.com",
    team_phones: ["+5511888888888", "+5511777777777"],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
}
  

C#

PixDirector(
    id: "5656565656565656",
    name: "Jon Snow",
    taxId: "012.345.678-90",
    phone: "+5511999999999",
    email: "jon.snow@starkinfra.com",
    teamEmail: "team@starkinfra.com",
    teamPhones: [ "+5511888888888", "+5511777777777" ],
    created: "2022-01-01T00:00:00+00:00",
    updated: "2022-01-01T00:00:00+00:00"
)
  

Go

{
    Id: "5656565656565656",
    Name: "Jon Snow",
    TaxId: "012.345.678-90",
    Phone: "+5511999999999",
    Email: "jon.snow@starkinfra.com",
    TeamEmail: "team@starkinfra.com",
    TeamPhones: ["+5511888888888", "+5511777777777"],
    Created: "2022-01-01T00:00:00+00:00",
    Updated: "2022-01-01T00:00:00+00:00"
}
  

Clojure

{:id "5656565656565656"
 :name "Jon Snow"
 :tax-id "012.345.678-90"
 :phone "+5511999999999"
 :email "jon.snow@starkinfra.com"
 :team-email "team@starkinfra.com"
 :team-phones ["+5511888888888" "+5511777777777"]
 :created "2022-01-01T00:00:00+00:00"
 :updated "2022-01-01T00:00:00+00:00"}
  

Curl

{
    "director": {
        "id": "5656565656565656",
        "name": "Jon Snow",
        "taxId": "012.345.678-90",
        "phone": "+5511999999999",
        "email": "jon.snow@starkinfra.com",
        "teamEmail": "team@starkinfra.com",
        "teamPhones": ["+5511888888888", "+5511777777777"],
        "created": "2022-01-01T00:00:00+00:00",
        "updated": "2022-01-01T00:00:00+00:00"
    }
}
  

Issuing Balance

The Issuing Balance resource represents the total funds available in your issuing wallet.

This balance is separate from your main Stark Infra balance and is used exclusively for card spending.

Fund your issuing balance using Issuing Invoices and withdraw using Issuing Withdrawals.

The Issuing Balance object

Attributes

id STRING

Unique identifier for the issuing balance.

amount INTEGER

Current issuing balance amount in cents. Example: 5000000 (R$50,000.00).

limit INTEGER

Spending limit of the balance.

maxLimit INTEGER

Maximum spending limit. This field is currently always equal to limit.

currency STRING

Currency code of the balance. Example: "BRL".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Get the Issuing Balance

Get the current balance in your issuing wallet.

ENDPOINT
GET /v2/issuing-balance
REQUEST

Python

import starkinfra

balance = starkinfra.issuingbalance.get()

print(balance)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let balance = await starkinfra.issuingBalance.get();
    console.log(balance);
})();
  

PHP

$balance = StarkInfra\IssuingBalance::get();

print_r($balance);
  

Java

import com.starkinfra.*;

IssuingBalance balance = IssuingBalance.get();

System.out.println(balance);
  

Ruby

require('starkinfra')

balance = StarkInfra::IssuingBalance.get()

puts balance
  

Elixir

balance = StarkInfra.IssuingBalance.get!()

IO.inspect(balance)
  

C#

using System;

StarkInfra.IssuingBalance balance = StarkInfra.IssuingBalance.Get();

Console.WriteLine(balance);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingbalance"
)

func main() {

    balance, err := issuingbalance.Get(nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", balance)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-balance' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingBalance(
    id=5715709195239424,
    amount=5000000,
    limit=100000000,
    max_limit=100000000,
    currency=BRL,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingBalance {
    id: '5715709195239424',
    amount: 5000000,
    limit: 100000000,
    maxLimit: 100000000,
    currency: 'BRL',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingBalance Object
(
    [id] => 5715709195239424
    [amount] => 5000000
    [limit] => 100000000
    [maxLimit] => 100000000
    [currency] => BRL
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingBalance({
    "id": "5715709195239424",
    "amount": 5000000,
    "limit": 100000000,
    "maxLimit": 100000000,
    "currency": "BRL",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingbalance(
    id: 5715709195239424,
    amount: 5000000,
    limit: 100000000,
    max_limit: 100000000,
    currency: BRL,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingBalance{
    id: "5715709195239424",
    amount: 5000000,
    limit: 100000000,
    max_limit: 100000000,
    currency: "BRL",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingBalance(
    Id: 5715709195239424,
    Amount: 5000000,
    Limit: 100000000,
    MaxLimit: 100000000,
    Currency: BRL,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Amount:5000000
    Limit:100000000
    MaxLimit:100000000
    Currency:BRL
    Updated:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "balances": [
        {
            "id": "5715709195239424",
            "amount": 5000000,
            "limit": 100000000,
            "maxLimit": 100000000,
            "currency": "BRL",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Issuing Product

The Issuing Product resource lists the card products available to your workspace.

Each product has a network, funding type, holder type, and product code that define the characteristics of cards that can be created using that product.

The Issuing Product object

Attributes

id STRING

Unique identifier for the issuing product.

network STRING

Card network. Options: "Mastercard", "Visa".

fundingType STRING

Funding type of the card. Options: "prepaid", "credit".

holderType STRING

Holder type for the card. Options: "individual", "business".

code STRING

Product code that identifies the specific card product.

settlement STRING

Same as fundingType. Kept for backward compatibility.

client STRING

Same as holderType. Kept for backward compatibility.

customerType STRING

Same as holderType. Kept for backward compatibility.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

List Issuing Products

Get a list of available issuing products for your workspace.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

ENDPOINT
GET /v2/issuing-product
REQUEST

Python

import starkinfra

products = starkinfra.issuingproduct.query()

for product in products:
    print(product)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let products = await starkinfra.issuingProduct.query({});

    for await (let product of products) {
        console.log(product);
    }
})();
  

PHP

$products = StarkInfra\IssuingProduct::query();

foreach ($products as $product) {
    print_r($product);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();

Generator products = IssuingProduct.query(params);

for (IssuingProduct product : products) {
    System.out.println(product);
}
  

Ruby

require('starkinfra')

products = StarkInfra::IssuingProduct.query()

products.each do |product|
    puts product
end
  

Elixir

products = StarkInfra.IssuingProduct.query!()

products |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable products = StarkInfra.IssuingProduct.Query();

foreach (StarkInfra.IssuingProduct product in products) {
    Console.WriteLine(product);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingproduct"
)

func main() {

    products := issuingproduct.Query(nil, nil)

    for product := range products {
        fmt.Printf("%+v", product)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-product' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingProduct(
    id=5715709195239424,
    network=Mastercard,
    funding_type=credit,
    holder_type=individual,
    code=ABC,
    settlement=credit,
    client=individual,
    customer_type=individual,
    created=2022-01-01 00:00:00
)
  
  

Javascript

IssuingProduct {
    id: '5715709195239424',
    network: 'Mastercard',
    fundingType: 'credit',
    holderType: 'individual',
    code: 'ABC',
    settlement: 'credit',
    client: 'individual',
    customerType: 'individual',
    created: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingProduct Object
(
    [id] => 5715709195239424
    [network] => Mastercard
    [fundingType] => credit
    [holderType] => individual
    [code] => ABC
    [settlement] => credit
    [client] => individual
    [customerType] => individual
    [created] => DateTime Object
        (
            [date] => 2022-01-01 00:00:00.000000
            [timezone_type] => 1
            [timezone] => +00:00
        )
)
  
  

Java

IssuingProduct({
    "id": "5715709195239424",
    "network": "Mastercard",
    "fundingType": "credit",
    "holderType": "individual",
    "code": "ABC",
    "settlement": "credit",
    "client": "individual",
    "customerType": "individual",
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingproduct(
    id: 5715709195239424,
    network: Mastercard,
    funding_type: credit,
    holder_type: individual,
    code: ABC,
    settlement: credit,
    client: individual,
    customer_type: individual,
    created: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingProduct{
    id: "5715709195239424",
    network: "Mastercard",
    funding_type: "credit",
    holder_type: "individual",
    code: "ABC",
    settlement: "credit",
    client: "individual",
    customer_type: "individual",
    created: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingProduct(
    Id: 5715709195239424,
    Network: Mastercard,
    FundingType: credit,
    HolderType: individual,
    Code: ABC,
    Settlement: credit,
    Client: individual,
    CustomerType: individual,
    Created: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    Network:Mastercard
    FundingType:credit
    HolderType:individual
    Code:ABC
    Settlement:credit
    Client:individual
    CustomerType:individual
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "products": [
        {
            "id": "5715709195239424",
            "network": "Mastercard",
            "fundingType": "credit",
            "holderType": "individual",
            "code": "ABC",
            "settlement": "credit",
            "client": "individual",
            "customerType": "individual",
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Issuing Holder

The Issuing Holder resource represents the card holder entity in your workspace.

A holder is associated with one or more issuing cards and defines who can use the cards issued.

You can set rules on the holder level to control spending limits and merchant restrictions.

The Issuing Holder object

Attributes

id STRING

Unique identifier for the issuing holder.

name STRING

Full name of the holder.

taxId STRING

Holder CPF (11 digits) or CNPJ (14 digits).

externalId STRING

Your external reference for this holder. Must be unique per workspace to prevent duplicates.

status STRING

Current holder status. Options: "active", "blocked", "canceled".

tags LIST OF STRINGS

Tags associated with the holder.

rules LIST OF OBJECTS

List of spending rule objects applied to the holder.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create Issuing Holders

Use this route to create up to 100 new issuing holders at a time.

Parameters

name REQUIRED

Full name of the holder. Example: "Tony Stark".

taxId REQUIRED

Holder CPF (11 digits formatted or unformatted) or CNPJ (14 digits formatted or unformatted). Example: "012.345.678-90".

externalId REQUIRED

Your unique identifier for this holder, used to prevent duplicates. Example: "my-holder-id-1234".

rules OPTIONAL

List of spending rule objects to apply to the holder.

tags OPTIONAL

Array of strings to tag the entity for future queries.

expand OPTIONAL

Fields to return expanded in the response. Options: "rules".

ENDPOINT
POST /v2/issuing-holder
REQUEST

Python

import starkinfra

holders = starkinfra.issuingholder.create([
    starkinfra.IssuingHolder(
        name="Tony Stark",
        tax_id="012.345.678-90",
        external_id="my-holder-id-1234",
        tags=["department: tech", "team: backend"],
        rules=[
            starkinfra.IssuingRule(
                name="max-spend",
                interval="day",
                amount=10000,
                currency_code="BRL"
            )
        ]
    )
])

for holder in holders:
    print(holder)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let holders = await starkinfra.issuingHolder.create([{
        name: 'Tony Stark',
        taxId: '012.345.678-90',
        externalId: 'my-holder-id-1234',
        tags: ['department: tech', 'team: backend'],
        rules: [{
            name: 'max-spend',
            interval: 'day',
            amount: 10000,
            currencyCode: 'BRL'
        }]
    }]);

    for (let holder of holders) {
        console.log(holder);
    }
})();
  

PHP

$holders = StarkInfra\IssuingHolder::create([
    new StarkInfra\IssuingHolder([
        "name" => "Tony Stark",
        "taxId" => "012.345.678-90",
        "externalId" => "my-holder-id-1234",
        "tags" => ["department: tech", "team: backend"],
        "rules" => [
            new StarkInfra\IssuingRule([
                "name" => "max-spend",
                "interval" => "day",
                "amount" => 10000,
                "currencyCode" => "BRL"
            ])
        ]
    ])
]);

foreach ($holders as $holder) {
    print_r($holder);
}
  

Java

import com.starkinfra.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

Map data = new HashMap<>();
data.put("name", "Tony Stark");
data.put("taxId", "012.345.678-90");
data.put("externalId", "my-holder-id-1234");
data.put("tags", new String[]{"department: tech", "team: backend"});

List holders = IssuingHolder.create(Arrays.asList(new IssuingHolder(data)));

for (IssuingHolder holder : holders) {
    System.out.println(holder);
}
  

Ruby

require('starkinfra')

holders = StarkInfra::IssuingHolder.create([
    StarkInfra::IssuingHolder.new(
        name: "Tony Stark",
        tax_id: "012.345.678-90",
        external_id: "my-holder-id-1234",
        tags: ["department: tech", "team: backend"]
    )
])

holders.each do |holder|
    puts holder
end
  

Elixir

holders = StarkInfra.IssuingHolder.create!([
    %StarkInfra.IssuingHolder{
        name: "Tony Stark",
        tax_id: "012.345.678-90",
        external_id: "my-holder-id-1234",
        tags: ["department: tech", "team: backend"]
    }
])

holders |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

List holders = StarkInfra.IssuingHolder.Create(
    new List {
        new StarkInfra.IssuingHolder(
            name: "Tony Stark",
            taxID: "012.345.678-90",
            externalID: "my-holder-id-1234",
            tags: new List { "department: tech", "team: backend" }
        )
    }
);

foreach (StarkInfra.IssuingHolder holder in holders) {
    Console.WriteLine(holder);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingholder"
)

func main() {

    holders, err := issuingholder.Create(
        []issuingholder.IssuingHolder{
            {
                Name:       "Tony Stark",
                TaxId:      "012.345.678-90",
                ExternalId: "my-holder-id-1234",
                Tags:       []string{"department: tech", "team: backend"},
            },
        },
        nil,
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    for _, holder := range holders {
        fmt.Printf("%+v", holder)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request POST '{{baseUrl}}/v2/issuing-holder' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "holders": [
        {
            "name": "Tony Stark",
            "taxId": "012.345.678-90",
            "externalId": "my-holder-id-1234",
            "tags": ["department: tech", "team: backend"]
        }
    ]
}'
  
RESPONSE

Python

IssuingHolder(
    id=5715709195239424,
    name=Tony Stark,
    tax_id=012.345.678-90,
    external_id=my-holder-id-1234,
    status=active,
    tags=['department: tech'],
    rules=[
        IssuingRule(
            id=5155165527080960,
            name=General BRL,
            amount=100000,
            interval=day,
            currency_code=BRL,
            schedule=,
            purposes=[],
            categories=[],
            countries=[],
            methods=[],
            merchants=[]
        )
    ],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingHolder {
    id: '5715709195239424',
    name: 'Tony Stark',
    taxId: '012.345.678-90',
    externalId: 'my-holder-id-1234',
    status: 'active',
    tags: [ 'department: tech' ],
    rules: [
        IssuingRule {
            id: '5155165527080960',
            name: 'General BRL',
            amount: 100000,
            interval: 'day',
            currencyCode: 'BRL',
            schedule: '',
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingHolder Object
(
    [id] => 5715709195239424
    [name] => Tony Stark
    [taxId] => 012.345.678-90
    [externalId] => my-holder-id-1234
    [status] => active
    [rules] => Array
        (
            [0] => StarkInfra\IssuingRule Object
                (
                    [id] => 5155165527080960
                    [name] => General BRL
                    [amount] => 100000
                    [interval] => day
                    [currencyCode] => BRL
                    [schedule] =>
                    [purposes] => Array ( )
                    [categories] => Array ( )
                    [countries] => Array ( )
                    [methods] => Array ( )
                    [merchants] => Array ( )
                )

        )
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingHolder({
    "id": "5715709195239424",
    "name": "Tony Stark",
    "taxId": "012.345.678-90",
    "externalId": "my-holder-id-1234",
    "status": "active",
    "rules": [
        {
            "id": "5155165527080960",
            "name": "General BRL",
            "interval": "day",
            "amount": 100000,
            "currencyCode": "BRL",
            "schedule": "",
            "purposes": [],
            "categories": [],
            "countries": [],
            "methods": [],
            "merchants": []
        }
    ],
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingholder(
    id: 5715709195239424,
    name: Tony Stark,
    tax_id: 012.345.678-90,
    external_id: my-holder-id-1234,
    status: active,
    tags: ["department: tech"],
    rules: [
        issuingrule(
            id: 5155165527080960,
            name: General BRL,
            amount: 100000,
            interval: day,
            currency_code: BRL,
            schedule: ,
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        )
    ],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingHolder{
    id: "5715709195239424",
    name: "Tony Stark",
    tax_id: "012.345.678-90",
    external_id: "my-holder-id-1234",
    status: "active",
    tags: ["department: tech"],
    rules: [
        %StarkInfra.IssuingRule{
            id: "5155165527080960",
            name: "General BRL",
            amount: 100000,
            interval: "day",
            currency_code: "BRL",
            schedule: "",
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingHolder(
    Id: 5715709195239424,
    Name: Tony Stark,
    TaxId: 012.345.678-90,
    ExternalId: my-holder-id-1234,
    Status: active,
    Rules: [
        IssuingRule(
            Id: 5155165527080960,
            Name: General BRL,
            Amount: 100000,
            Interval: day,
            CurrencyCode: BRL,
            Schedule: ,
            Purposes: [],
            Categories: [],
            Countries: [],
            Methods: [],
            Merchants: []
        )
    ],
    Tags: [department: tech],
    Updated: 01/01/2022 00:00:00,
    Created: 01/01/2022 00:00:00
)
  
  

Go

{
    Name:Tony Stark
    TaxId:012.345.678-90
    ExternalId:my-holder-id-1234
    Rules:[{Name:General BRL Amount:100000 Id:5155165527080960 Interval:day CurrencyCode:BRL Schedule: Purposes:[] Categories:[] Countries:[] Methods:[] Merchants:[]}]
    Tags:[department: tech]
    Id:5715709195239424
    Status:active
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "holders": [
        {
            "id": "5715709195239424",
            "name": "Tony Stark",
            "taxId": "012.345.678-90",
            "externalId": "my-holder-id-1234",
            "status": "active",
            "tags": ["department: tech"],
            "rules": [
                {
                    "id": "5155165527080960",
                    "name": "General BRL",
                    "interval": "day",
                    "amount": 100000,
                    "currencyCode": "BRL",
                    "schedule": "",
                    "purposes": [],
                    "categories": [],
                    "countries": [],
                    "methods": [],
                    "merchants": []
                }
            ],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

List Issuing Holders

Get a list of issuing holders in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

status OPTIONAL

Filter holders by the specified status.

tags OPTIONAL

Filter entities that contain the specified tags.

ids OPTIONAL

List of strings to get specific entities by ids.

expand OPTIONAL

Fields to return expanded in the response. Options: "rules".

ENDPOINT
GET /v2/issuing-holder
REQUEST

Python

import starkinfra

holders = starkinfra.issuingholder.query(
    limit=10,
    status="active"
)

for holder in holders:
    print(holder)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let holders = await starkinfra.issuingHolder.query({
        limit: 10,
        status: 'active'
    });

    for await (let holder of holders) {
        console.log(holder);
    }
})();
  

PHP

$holders = StarkInfra\IssuingHolder::query([
    "limit" => 10,
    "status" => "active"
]);

foreach ($holders as $holder) {
    print_r($holder);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("status", "active");

Generator holders = IssuingHolder.query(params);

for (IssuingHolder holder : holders) {
    System.out.println(holder);
}
  

Ruby

require('starkinfra')

holders = StarkInfra::IssuingHolder.query(
    limit: 10,
    status: "active"
)

holders.each do |holder|
    puts holder
end
  

Elixir

holders = StarkInfra.IssuingHolder.query!(
    limit: 10,
    status: "active"
)

holders |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable holders = StarkInfra.IssuingHolder.Query(
    limit: 10,
    status: "active"
);

foreach (StarkInfra.IssuingHolder holder in holders) {
    Console.WriteLine(holder);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingholder"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["status"] = "active"

    holders, errorChannel := issuingholder.Query(params, nil)

    for holder := range holders {
        fmt.Printf("%+v", holder)
    }
    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-holder?limit=10&status=active' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingHolder(
    id=5715709195239424,
    name=Tony Stark,
    tax_id=012.345.678-90,
    external_id=my-holder-id-1234,
    status=active,
    tags=['department: tech'],
    rules=[
        IssuingRule(
            id=5155165527080960,
            name=General BRL,
            amount=100000,
            interval=day,
            currency_code=BRL,
            schedule=,
            purposes=[],
            categories=[],
            countries=[],
            methods=[],
            merchants=[]
        )
    ],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingHolder {
    id: '5715709195239424',
    name: 'Tony Stark',
    taxId: '012.345.678-90',
    externalId: 'my-holder-id-1234',
    status: 'active',
    tags: [ 'department: tech' ],
    rules: [
        IssuingRule {
            id: '5155165527080960',
            name: 'General BRL',
            amount: 100000,
            interval: 'day',
            currencyCode: 'BRL',
            schedule: '',
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingHolder Object
(
    [id] => 5715709195239424
    [name] => Tony Stark
    [taxId] => 012.345.678-90
    [externalId] => my-holder-id-1234
    [status] => active
    [rules] => Array
        (
            [0] => StarkInfra\IssuingRule Object
                (
                    [id] => 5155165527080960
                    [name] => General BRL
                    [amount] => 100000
                    [interval] => day
                    [currencyCode] => BRL
                    [schedule] =>
                    [purposes] => Array ( )
                    [categories] => Array ( )
                    [countries] => Array ( )
                    [methods] => Array ( )
                    [merchants] => Array ( )
                )

        )
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingHolder({
    "id": "5715709195239424",
    "name": "Tony Stark",
    "taxId": "012.345.678-90",
    "externalId": "my-holder-id-1234",
    "status": "active",
    "rules": [
        {
            "id": "5155165527080960",
            "name": "General BRL",
            "interval": "day",
            "amount": 100000,
            "currencyCode": "BRL",
            "schedule": "",
            "purposes": [],
            "categories": [],
            "countries": [],
            "methods": [],
            "merchants": []
        }
    ],
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingholder(
    id: 5715709195239424,
    name: Tony Stark,
    tax_id: 012.345.678-90,
    external_id: my-holder-id-1234,
    status: active,
    tags: ["department: tech"],
    rules: [
        issuingrule(
            id: 5155165527080960,
            name: General BRL,
            amount: 100000,
            interval: day,
            currency_code: BRL,
            schedule: ,
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        )
    ],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingHolder{
    id: "5715709195239424",
    name: "Tony Stark",
    tax_id: "012.345.678-90",
    external_id: "my-holder-id-1234",
    status: "active",
    tags: ["department: tech"],
    rules: [
        %StarkInfra.IssuingRule{
            id: "5155165527080960",
            name: "General BRL",
            amount: 100000,
            interval: "day",
            currency_code: "BRL",
            schedule: "",
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingHolder(
    Id: 5715709195239424,
    Name: Tony Stark,
    TaxId: 012.345.678-90,
    ExternalId: my-holder-id-1234,
    Status: active,
    Rules: [
        IssuingRule(
            Id: 5155165527080960,
            Name: General BRL,
            Amount: 100000,
            Interval: day,
            CurrencyCode: BRL,
            Schedule: ,
            Purposes: [],
            Categories: [],
            Countries: [],
            Methods: [],
            Merchants: []
        )
    ],
    Tags: [department: tech],
    Updated: 01/01/2022 00:00:00,
    Created: 01/01/2022 00:00:00
)
  
  

Go

{
    Name:Tony Stark
    TaxId:012.345.678-90
    ExternalId:my-holder-id-1234
    Rules:[{Name:General BRL Amount:100000 Id:5155165527080960 Interval:day CurrencyCode:BRL Schedule: Purposes:[] Categories:[] Countries:[] Methods:[] Merchants:[]}]
    Tags:[department: tech]
    Id:5715709195239424
    Status:active
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "holders": [
        {
            "id": "5715709195239424",
            "name": "Tony Stark",
            "taxId": "012.345.678-90",
            "externalId": "my-holder-id-1234",
            "status": "active",
            "tags": ["department: tech"],
            "rules": [
                {
                    "id": "5155165527080960",
                    "name": "General BRL",
                    "interval": "day",
                    "amount": 100000,
                    "currencyCode": "BRL",
                    "schedule": "",
                    "purposes": [],
                    "categories": [],
                    "countries": [],
                    "methods": [],
                    "merchants": []
                }
            ],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Holder

Get a single issuing holder by its id.

Parameters

id REQUIRED

Id of the issuing holder entity.

expand OPTIONAL

Fields to return expanded in the response. Options: "rules".

ENDPOINT
GET /v2/issuing-holder/:id
REQUEST

Python

import starkinfra

holder = starkinfra.issuingholder.get("5715709195239424")

print(holder)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let holder = await starkinfra.issuingHolder.get('5715709195239424');

    console.log(holder);
})();
  

PHP

$holder = StarkInfra\IssuingHolder::get("5715709195239424");

print_r($holder);
  

Java

import com.starkinfra.*;

IssuingHolder holder = IssuingHolder.get("5715709195239424");

System.out.println(holder);
  

Ruby

require('starkinfra')

holder = StarkInfra::IssuingHolder.get("5715709195239424")

puts holder
  

Elixir

holder = StarkInfra.IssuingHolder.get!("5715709195239424")

holder |> IO.inspect
  

C#

using System;

StarkInfra.IssuingHolder holder = StarkInfra.IssuingHolder.Get("5715709195239424");

Console.WriteLine(holder);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingholder"
)

func main() {

    holder, err := issuingholder.Get("5715709195239424", nil, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", holder)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-holder/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingHolder(
    id=5715709195239424,
    name=Tony Stark,
    tax_id=012.345.678-90,
    external_id=my-holder-id-1234,
    status=active,
    tags=['department: tech'],
    rules=[
        IssuingRule(
            id=5155165527080960,
            name=General BRL,
            amount=100000,
            interval=day,
            currency_code=BRL,
            schedule=,
            purposes=[],
            categories=[],
            countries=[],
            methods=[],
            merchants=[]
        )
    ],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingHolder {
    id: '5715709195239424',
    name: 'Tony Stark',
    taxId: '012.345.678-90',
    externalId: 'my-holder-id-1234',
    status: 'active',
    tags: [ 'department: tech' ],
    rules: [
        IssuingRule {
            id: '5155165527080960',
            name: 'General BRL',
            amount: 100000,
            interval: 'day',
            currencyCode: 'BRL',
            schedule: '',
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingHolder Object
(
    [id] => 5715709195239424
    [name] => Tony Stark
    [taxId] => 012.345.678-90
    [externalId] => my-holder-id-1234
    [status] => active
    [rules] => Array
        (
            [0] => StarkInfra\IssuingRule Object
                (
                    [id] => 5155165527080960
                    [name] => General BRL
                    [amount] => 100000
                    [interval] => day
                    [currencyCode] => BRL
                    [schedule] =>
                    [purposes] => Array ( )
                    [categories] => Array ( )
                    [countries] => Array ( )
                    [methods] => Array ( )
                    [merchants] => Array ( )
                )

        )
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingHolder({
    "id": "5715709195239424",
    "name": "Tony Stark",
    "taxId": "012.345.678-90",
    "externalId": "my-holder-id-1234",
    "status": "active",
    "rules": [
        {
            "id": "5155165527080960",
            "name": "General BRL",
            "interval": "day",
            "amount": 100000,
            "currencyCode": "BRL",
            "schedule": "",
            "purposes": [],
            "categories": [],
            "countries": [],
            "methods": [],
            "merchants": []
        }
    ],
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingholder(
    id: 5715709195239424,
    name: Tony Stark,
    tax_id: 012.345.678-90,
    external_id: my-holder-id-1234,
    status: active,
    tags: ["department: tech"],
    rules: [
        issuingrule(
            id: 5155165527080960,
            name: General BRL,
            amount: 100000,
            interval: day,
            currency_code: BRL,
            schedule: ,
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        )
    ],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingHolder{
    id: "5715709195239424",
    name: "Tony Stark",
    tax_id: "012.345.678-90",
    external_id: "my-holder-id-1234",
    status: "active",
    tags: ["department: tech"],
    rules: [
        %StarkInfra.IssuingRule{
            id: "5155165527080960",
            name: "General BRL",
            amount: 100000,
            interval: "day",
            currency_code: "BRL",
            schedule: "",
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingHolder(
    Id: 5715709195239424,
    Name: Tony Stark,
    TaxId: 012.345.678-90,
    ExternalId: my-holder-id-1234,
    Status: active,
    Rules: [
        IssuingRule(
            Id: 5155165527080960,
            Name: General BRL,
            Amount: 100000,
            Interval: day,
            CurrencyCode: BRL,
            Schedule: ,
            Purposes: [],
            Categories: [],
            Countries: [],
            Methods: [],
            Merchants: []
        )
    ],
    Tags: [department: tech],
    Updated: 01/01/2022 00:00:00,
    Created: 01/01/2022 00:00:00
)
  
  

Go

{
    Name:Tony Stark
    TaxId:012.345.678-90
    ExternalId:my-holder-id-1234
    Rules:[{Name:General BRL Amount:100000 Id:5155165527080960 Interval:day CurrencyCode:BRL Schedule: Purposes:[] Categories:[] Countries:[] Methods:[] Merchants:[]}]
    Tags:[department: tech]
    Id:5715709195239424
    Status:active
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "holder": {
        "id": "5715709195239424",
        "name": "Tony Stark",
        "taxId": "012.345.678-90",
        "externalId": "my-holder-id-1234",
        "status": "active",
        "tags": ["department: tech"],
        "rules": [
            {
                "id": "5155165527080960",
                "name": "General BRL",
                "interval": "day",
                "amount": 100000,
                "currencyCode": "BRL",
                "schedule": "",
                "purposes": [],
                "categories": [],
                "countries": [],
                "methods": [],
                "merchants": []
            }
        ],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Update an Issuing Holder

Update the properties of an existing issuing holder.

Parameters

id REQUIRED

Id of the issuing holder entity.

status OPTIONAL

Status to update the holder to. Options: "active", "blocked".

name OPTIONAL

New full name of the holder.

rules OPTIONAL

New list of spending rule objects to apply to the holder.

tags OPTIONAL

New array of strings to tag the holder.

ENDPOINT
PATCH /v2/issuing-holder/:id
REQUEST

Python

import starkinfra

holder = starkinfra.issuingholder.update(
    "5715709195239424",
    status="blocked"
)

print(holder)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let holder = await starkinfra.issuingHolder.update(
        '5715709195239424',
        { status: 'blocked' }
    );

    console.log(holder);
})();
  

PHP

$holder = StarkInfra\IssuingHolder::update("5715709195239424", [
    "status" => "blocked"
]);

print_r($holder);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap data = new HashMap<>();
data.put("status", "blocked");

IssuingHolder holder = IssuingHolder.update("5715709195239424", data);

System.out.println(holder);
  

Ruby

require('starkinfra')

holder = StarkInfra::IssuingHolder.update(
    "5715709195239424",
    status: "blocked"
)

puts holder
  

Elixir

holder = StarkInfra.IssuingHolder.update!(
    "5715709195239424",
    status: "blocked"
)

holder |> IO.inspect
  

C#

using System;
using System.Collections.Generic;

StarkInfra.IssuingHolder holder = StarkInfra.IssuingHolder.Update(
    "5715709195239424",
    new Dictionary { { "status", "blocked" } }
);

Console.WriteLine(holder);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingholder"
)

func main() {

    holder, err := issuingholder.Update(
        "5715709195239424",
        map[string]interface{}{"status": "blocked"},
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", holder)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/issuing-holder/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "status": "blocked"
}'
  
RESPONSE

Python

IssuingHolder(
    id=5715709195239424,
    name=Tony Stark,
    tax_id=012.345.678-90,
    external_id=my-holder-id-1234,
    status=blocked,
    tags=['department: tech'],
    rules=[
        IssuingRule(
            id=5155165527080960,
            name=General BRL,
            amount=100000,
            interval=day,
            currency_code=BRL,
            schedule=,
            purposes=[],
            categories=[],
            countries=[],
            methods=[],
            merchants=[]
        )
    ],
    created=2022-01-01 00:00:00,
    updated=2022-06-01 00:00:00
)
  
  

Javascript

IssuingHolder {
    id: '5715709195239424',
    name: 'Tony Stark',
    taxId: '012.345.678-90',
    externalId: 'my-holder-id-1234',
    status: 'blocked',
    tags: [ 'department: tech' ],
    rules: [
        IssuingRule {
            id: '5155165527080960',
            name: 'General BRL',
            amount: 100000,
            interval: 'day',
            currencyCode: 'BRL',
            schedule: '',
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingHolder Object
(
    [id] => 5715709195239424
    [name] => Tony Stark
    [taxId] => 012.345.678-90
    [externalId] => my-holder-id-1234
    [status] => blocked
    [rules] => Array
        (
            [0] => StarkInfra\IssuingRule Object
                (
                    [id] => 5155165527080960
                    [name] => General BRL
                    [amount] => 100000
                    [interval] => day
                    [currencyCode] => BRL
                    [schedule] =>
                    [purposes] => Array ( )
                    [categories] => Array ( )
                    [countries] => Array ( )
                    [methods] => Array ( )
                    [merchants] => Array ( )
                )

        )
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-06-01 00:00:00.000000 )
)
  
  

Java

IssuingHolder({
    "id": "5715709195239424",
    "name": "Tony Stark",
    "taxId": "012.345.678-90",
    "externalId": "my-holder-id-1234",
    "status": "blocked",
    "rules": [
        {
            "id": "5155165527080960",
            "name": "General BRL",
            "interval": "day",
            "amount": 100000,
            "currencyCode": "BRL",
            "schedule": "",
            "purposes": [],
            "categories": [],
            "countries": [],
            "methods": [],
            "merchants": []
        }
    ],
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingholder(
    id: 5715709195239424,
    name: Tony Stark,
    tax_id: 012.345.678-90,
    external_id: my-holder-id-1234,
    status: blocked,
    tags: ["department: tech"],
    rules: [
        issuingrule(
            id: 5155165527080960,
            name: General BRL,
            amount: 100000,
            interval: day,
            currency_code: BRL,
            schedule: ,
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        )
    ],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-06-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingHolder{
    id: "5715709195239424",
    name: "Tony Stark",
    tax_id: "012.345.678-90",
    external_id: "my-holder-id-1234",
    status: "blocked",
    tags: ["department: tech"],
    rules: [
        %StarkInfra.IssuingRule{
            id: "5155165527080960",
            name: "General BRL",
            amount: 100000,
            interval: "day",
            currency_code: "BRL",
            schedule: "",
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-06-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingHolder(
    Id: 5715709195239424,
    Name: Tony Stark,
    TaxId: 012.345.678-90,
    ExternalId: my-holder-id-1234,
    Status: blocked,
    Rules: [
        IssuingRule(
            Id: 5155165527080960,
            Name: General BRL,
            Amount: 100000,
            Interval: day,
            CurrencyCode: BRL,
            Schedule: ,
            Purposes: [],
            Categories: [],
            Countries: [],
            Methods: [],
            Merchants: []
        )
    ],
    Tags: [department: tech],
    Updated: 06/01/2022 00:00:00,
    Created: 01/01/2022 00:00:00
)
  
  

Go

{
    Name:Tony Stark
    TaxId:012.345.678-90
    ExternalId:my-holder-id-1234
    Rules:[{Name:General BRL Amount:100000 Id:5155165527080960 Interval:day CurrencyCode:BRL Schedule: Purposes:[] Categories:[] Countries:[] Methods:[] Merchants:[]}]
    Tags:[department: tech]
    Id:5715709195239424
    Status:blocked
    Updated:2022-06-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "holder": {
        "id": "5715709195239424",
        "name": "Tony Stark",
        "taxId": "012.345.678-90",
        "externalId": "my-holder-id-1234",
        "status": "blocked",
        "tags": ["department: tech"],
        "rules": [
            {
                "id": "5155165527080960",
                "name": "General BRL",
                "interval": "day",
                "amount": 100000,
                "currencyCode": "BRL",
                "schedule": "",
                "purposes": [],
                "categories": [],
                "countries": [],
                "methods": [],
                "merchants": []
            }
        ],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00"
    }
}
  

Cancel an Issuing Holder

Cancel an issuing holder. This action is irreversible.

Parameters

id REQUIRED

Id of the issuing holder entity to cancel.

ENDPOINT
DELETE /v2/issuing-holder/:id
REQUEST

Python

import starkinfra

holder = starkinfra.issuingholder.cancel("5715709195239424")

print(holder)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let holder = await starkinfra.issuingHolder.cancel('5715709195239424');

    console.log(holder);
})();
  

PHP

$holder = StarkInfra\IssuingHolder::cancel("5715709195239424");

print_r($holder);
  

Java

import com.starkinfra.*;

IssuingHolder holder = IssuingHolder.cancel("5715709195239424");

System.out.println(holder);
  

Ruby

require('starkinfra')

holder = StarkInfra::IssuingHolder.cancel("5715709195239424")

puts holder
  

Elixir

holder = StarkInfra.IssuingHolder.cancel!("5715709195239424")

holder |> IO.inspect
  

C#

using System;

StarkInfra.IssuingHolder holder = StarkInfra.IssuingHolder.Cancel("5715709195239424");

Console.WriteLine(holder);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingholder"
)

func main() {

    holder, err := issuingholder.Cancel("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", holder)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request DELETE '{{baseUrl}}/v2/issuing-holder/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingHolder(
    id=5715709195239424,
    name=Tony Stark,
    tax_id=012.345.678-90,
    external_id=my-holder-id-1234,
    status=canceled,
    tags=['department: tech'],
    rules=[
        IssuingRule(
            id=5155165527080960,
            name=General BRL,
            amount=100000,
            interval=day,
            currency_code=BRL,
            schedule=,
            purposes=[],
            categories=[],
            countries=[],
            methods=[],
            merchants=[]
        )
    ],
    created=2022-01-01 00:00:00,
    updated=2022-06-01 00:00:00
)
  
  

Javascript

IssuingHolder {
    id: '5715709195239424',
    name: 'Tony Stark',
    taxId: '012.345.678-90',
    externalId: 'my-holder-id-1234',
    status: 'canceled',
    tags: [ 'department: tech' ],
    rules: [
        IssuingRule {
            id: '5155165527080960',
            name: 'General BRL',
            amount: 100000,
            interval: 'day',
            currencyCode: 'BRL',
            schedule: '',
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingHolder Object
(
    [id] => 5715709195239424
    [name] => Tony Stark
    [taxId] => 012.345.678-90
    [externalId] => my-holder-id-1234
    [status] => canceled
    [rules] => Array
        (
            [0] => StarkInfra\IssuingRule Object
                (
                    [id] => 5155165527080960
                    [name] => General BRL
                    [amount] => 100000
                    [interval] => day
                    [currencyCode] => BRL
                    [schedule] =>
                    [purposes] => Array ( )
                    [categories] => Array ( )
                    [countries] => Array ( )
                    [methods] => Array ( )
                    [merchants] => Array ( )
                )

        )
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingHolder({
    "id": "5715709195239424",
    "name": "Tony Stark",
    "taxId": "012.345.678-90",
    "externalId": "my-holder-id-1234",
    "status": "canceled",
    "rules": [
        {
            "id": "5155165527080960",
            "name": "General BRL",
            "interval": "day",
            "amount": 100000,
            "currencyCode": "BRL",
            "schedule": "",
            "purposes": [],
            "categories": [],
            "countries": [],
            "methods": [],
            "merchants": []
        }
    ],
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingholder(
    id: 5715709195239424,
    name: Tony Stark,
    tax_id: 012.345.678-90,
    external_id: my-holder-id-1234,
    status: canceled,
    tags: ["department: tech"],
    rules: [
        issuingrule(
            id: 5155165527080960,
            name: General BRL,
            amount: 100000,
            interval: day,
            currency_code: BRL,
            schedule: ,
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        )
    ],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-06-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingHolder{
    id: "5715709195239424",
    name: "Tony Stark",
    tax_id: "012.345.678-90",
    external_id: "my-holder-id-1234",
    status: "canceled",
    tags: ["department: tech"],
    rules: [
        %StarkInfra.IssuingRule{
            id: "5155165527080960",
            name: "General BRL",
            amount: 100000,
            interval: "day",
            currency_code: "BRL",
            schedule: "",
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-06-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingHolder(
    Id: 5715709195239424,
    Name: Tony Stark,
    TaxId: 012.345.678-90,
    ExternalId: my-holder-id-1234,
    Status: canceled,
    Rules: [
        IssuingRule(
            Id: 5155165527080960,
            Name: General BRL,
            Amount: 100000,
            Interval: day,
            CurrencyCode: BRL,
            Schedule: ,
            Purposes: [],
            Categories: [],
            Countries: [],
            Methods: [],
            Merchants: []
        )
    ],
    Tags: [department: tech],
    Updated: 06/01/2022 00:00:00,
    Created: 01/01/2022 00:00:00
)
  
  

Go

{
    Name:Tony Stark
    TaxId:012.345.678-90
    ExternalId:my-holder-id-1234
    Rules:[{Name:General BRL Amount:100000 Id:5155165527080960 Interval:day CurrencyCode:BRL Schedule: Purposes:[] Categories:[] Countries:[] Methods:[] Merchants:[]}]
    Tags:[department: tech]
    Id:5715709195239424
    Status:canceled
    Updated:2022-06-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "holder": {
        "id": "5715709195239424",
        "name": "Tony Stark",
        "taxId": "012.345.678-90",
        "externalId": "my-holder-id-1234",
        "status": "canceled",
        "tags": ["department: tech"],
        "rules": [
            {
                "id": "5155165527080960",
                "name": "General BRL",
                "interval": "day",
                "amount": 100000,
                "currencyCode": "BRL",
                "schedule": "",
                "purposes": [],
                "categories": [],
                "countries": [],
                "methods": [],
                "merchants": []
            }
        ],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00"
    }
}
  

List Issuing Holder Logs

Get a paged list of issuing holder logs.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

types OPTIONAL

Filter logs by log types.

holderIds OPTIONAL

Array of holder ids to filter logs.

ids OPTIONAL

List of strings to get specific log entities by ids.

ENDPOINT
GET /v2/issuing-holder/log
REQUEST

Python

import starkinfra

logs = starkinfra.issuingholder.log.query(limit=10)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let logs = await starkinfra.issuingHolder.log.query({ limit: 10 });

    for await (let log of logs) {
        console.log(log);
    }
})();
  

PHP

$logs = StarkInfra\IssuingHolder\Log::query(["limit" => 10]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);

Generator logs = IssuingHolder.Log.query(params);

for (IssuingHolder.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::IssuingHolder::Log.query(limit: 10)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.IssuingHolder.Log.query!(limit: 10)

logs |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable logs = StarkInfra.IssuingHolder.Log.Query(limit: 10);

foreach (StarkInfra.IssuingHolder.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingholder/log"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10

    logs, errorChannel := log.Query(params, nil)

    for log := range logs {
        fmt.Printf("%+v", log)
    }
    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-holder/log?limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=5715709195239424,
    type=created,
    holder=IssuingHolder(id=5715709195239424, name=Tony Stark, status=active),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '5715709195239424',
    type: 'created',
    holder: IssuingHolder { id: '5715709195239424', name: 'Tony Stark', status: 'active' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingHolder\Log Object
(
    [id] => 5715709195239424
    [type] => created
    [holder] => StarkInfra\IssuingHolder Object ( [id] => 5715709195239424 [status] => active )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingHolder.Log({
    "id": "5715709195239424",
    "type": "created",
    "holder": {"id": "5715709195239424", "status": "active"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 5715709195239424,
    type: created,
    holder: { id: 5715709195239424, status: active },
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingHolder.Log{
    id: "5715709195239424",
    type: "created",
    holder: %{id: "5715709195239424", status: "active"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingHolder.Log(
    Id: 5715709195239424,
    Type: created,
    Holder: { Id: 5715709195239424, Status: active },
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Type:created
    Holder:{Id:5715709195239424 Status:active}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "5715709195239424",
            "type": "created",
            "holder": {
                "id": "5715709195239424",
                "status": "active"
            },
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Holder Log

Get a single issuing holder log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/issuing-holder/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.issuingholder.log.get("5715709195239424")

print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let log = await starkinfra.issuingHolder.log.get('5715709195239424');

    console.log(log);
})();
  

PHP

$log = StarkInfra\IssuingHolder\Log::get("5715709195239424");

print_r($log);
  

Java

import com.starkinfra.*;

IssuingHolder.Log log = IssuingHolder.Log.get("5715709195239424");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::IssuingHolder::Log.get("5715709195239424")

puts log
  

Elixir

log = StarkInfra.IssuingHolder.Log.get!("5715709195239424")

log |> IO.inspect
  

C#

using System;

StarkInfra.IssuingHolder.Log log = StarkInfra.IssuingHolder.Log.Get("5715709195239424");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingholder/log"
)

func main() {

    log, err := log.Get("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", log)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-holder/log/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=5715709195239424,
    type=created,
    holder=IssuingHolder(id=5715709195239424, name=Tony Stark, status=active),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '5715709195239424',
    type: 'created',
    holder: IssuingHolder { id: '5715709195239424', name: 'Tony Stark', status: 'active' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingHolder\Log Object
(
    [id] => 5715709195239424
    [type] => created
    [holder] => StarkInfra\IssuingHolder Object ( [id] => 5715709195239424 [status] => active )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingHolder.Log({
    "id": "5715709195239424",
    "type": "created",
    "holder": {"id": "5715709195239424", "status": "active"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 5715709195239424,
    type: created,
    holder: { id: 5715709195239424, status: active },
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingHolder.Log{
    id: "5715709195239424",
    type: "created",
    holder: %{id: "5715709195239424", status: "active"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingHolder.Log(
    Id: 5715709195239424,
    Type: created,
    Holder: { Id: 5715709195239424, Status: active },
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Type:created
    Holder:{Id:5715709195239424 Status:active}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "log": {
        "id": "5715709195239424",
        "type": "created",
        "holder": {
            "id": "5715709195239424",
            "status": "active"
        },
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Issuing Card

The Issuing Card resource represents a physical or virtual card issued to a holder.

Cards can be created as virtual (immediately available) or physical (requires embossing and shipping).

You can set rules on the card level to control spending limits, merchant restrictions, and other card behaviors.

The Issuing Card object

Attributes

id STRING

Unique identifier for the issuing card.

holderId STRING

Id of the IssuingHolder associated with this card.

holderName STRING

Name of the holder printed on the card.

holderTaxId STRING

Tax id of the IssuingHolder associated with this card.

holderExternalId STRING

External id of the IssuingHolder associated with this card.

displayName STRING

Name displayed on the card face. Example: "TONY STARK".

rules LIST OF OBJECTS

List of spending rule objects applied to the card.

productId STRING

Id of the IssuingProduct associated with this card.

tags LIST OF STRINGS

Tags associated with the card.

streetLine1 STRING

Primary line of the billing address.

streetLine2 STRING

Secondary line of the billing address.

district STRING

District of the billing address.

city STRING

City of the billing address.

stateCode STRING

State code of the billing address. Example: "SP".

zipCode STRING

ZIP code of the billing address. Example: "01311-000".

type STRING

Card type. Options: "virtual", "physical".

status STRING

Current card status. Options: "active", "blocked", "canceled", "expired".

number STRING

Card number (PAN). Masked unless "expand=number" is informed in the request.

securityCode STRING

Card security code (CVV). Masked unless "expand=securityCode" is informed in the request.

expiration STRING

Card expiration datetime. Masked unless "expand=expiration" is informed in the request.

isPinDefined BOOLEAN

Whether the card has a PIN defined. Returned only when "expand=isPinDefined" is informed in the request.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create Issuing Cards

Use this route to create up to 100 new issuing cards at a time.

Parameters

holderName REQUIRED

Name of the card holder. Example: "Tony Stark".

holderTaxId REQUIRED

Tax id (CPF/CNPJ) of the card holder. Example: "012.345.678-90".

holderExternalId REQUIRED

Unique id of the card holder in your system. Example: "my-holder-id-1234".

productId REQUIRED

Id of the IssuingProduct to use for this card.

type OPTIONAL

Card type. Options: "virtual", "physical". Default: "virtual".

displayName OPTIONAL

Name to be displayed on the card. Example: "TONY STARK".

rules OPTIONAL

List of spending rule objects to apply to the card.

tags OPTIONAL

Array of strings to tag the entity for future queries.

streetLine1 OPTIONAL

Primary line of the billing address.

streetLine2 OPTIONAL

Secondary line of the billing address.

district OPTIONAL

District of the billing address.

city OPTIONAL

City of the billing address.

stateCode OPTIONAL

State code of the billing address. Example: "SP".

zipCode OPTIONAL

ZIP code of the billing address. Example: "01311-000".

expand OPTIONAL

Fields to return expanded in the response. Options: "rules", "securityCode", "number", "expiration", "isPinDefined".

ENDPOINT
POST /v2/issuing-card
REQUEST

Python

import starkinfra

cards = starkinfra.issuingcard.create([
    starkinfra.IssuingCard(
        holder_name="Tony Stark",
        holder_tax_id="012.345.678-90",
        holder_external_id="my-holder-id-1234",
        product_id="654321",
        type="virtual",
        display_name="TONY STARK",
        tags=["department: tech", "team: backend"]
    )
])

for card in cards:
    print(card)
  
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let cards = await starkinfra.issuingCard.create([{
        holderName: 'Tony Stark',
        holderTaxId: '012.345.678-90',
        holderExternalId: 'my-holder-id-1234',
        productId: '654321',
        type: 'virtual',
        displayName: 'TONY STARK',
        tags: ['department: tech', 'team: backend']
    }]);

    for (let card of cards) {
        console.log(card);
    }
})();
  
  

PHP

$cards = StarkInfra\IssuingCard::create([
    new StarkInfra\IssuingCard([
        "holderName" => "Tony Stark",
        "holderTaxId" => "012.345.678-90",
        "holderExternalId" => "my-holder-id-1234",
        "productId" => "654321",
        "type" => "virtual",
        "displayName" => "TONY STARK",
        "tags" => ["department: tech", "team: backend"]
    ])
]);

foreach ($cards as $card) {
    print_r($card);
}
  
  

Java

import com.starkinfra.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

Map data = new HashMap<>();
data.put("holderName", "Tony Stark");
data.put("holderTaxId", "012.345.678-90");
data.put("holderExternalId", "my-holder-id-1234");
data.put("productId", "654321");
data.put("type", "virtual");
data.put("displayName", "TONY STARK");
data.put("tags", new String[]{"department: tech", "team: backend"});

List cards = IssuingCard.create(new ArrayList<>(List.of(new IssuingCard(data))));

for (IssuingCard card : cards) {
    System.out.println(card);
}
  
  

Ruby

require('starkinfra')

cards = StarkInfra::IssuingCard.create([
    StarkInfra::IssuingCard.new(
        holder_name: "Tony Stark",
        holder_tax_id: "012.345.678-90",
        holder_external_id: "my-holder-id-1234",
        product_id: "654321",
        type: "virtual",
        display_name: "TONY STARK",
        tags: ["department: tech", "team: backend"]
    )
])

cards.each do |card|
    puts card
end
  
  

Elixir

cards = StarkInfra.IssuingCard.create!([
    %StarkInfra.IssuingCard{
        holder_name: "Tony Stark",
        holder_tax_id: "012.345.678-90",
        holder_external_id: "my-holder-id-1234",
        product_id: "654321",
        type: "virtual",
        display_name: "TONY STARK",
        tags: ["department: tech", "team: backend"]
    }
])

cards |> Enum.each(&IO.inspect/1)
  
  

C#

using System;
using System.Collections.Generic;

List cards = StarkInfra.IssuingCard.Create(
    new List {
        new StarkInfra.IssuingCard(
            holderName: "Tony Stark",
            holderTaxID: "012.345.678-90",
            holderExternalID: "my-holder-id-1234",
            productID: "654321",
            type: "virtual",
            displayName: "TONY STARK",
            tags: new List { "department: tech", "team: backend" }
        )
    }
);

foreach (StarkInfra.IssuingCard card in cards) {
    Console.WriteLine(card);
}
  
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingcard"
)

func main() {

    cards, err := issuingcard.Create(
        []issuingcard.IssuingCard{
            {
                HolderName:       "Tony Stark",
                HolderTaxId:      "012.345.678-90",
                HolderExternalId: "my-holder-id-1234",
                ProductId:        "654321",
                Type:             "virtual",
                DisplayName:      "TONY STARK",
                Tags:             []string{"department: tech", "team: backend"},
            },
        },
        nil,
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    for _, card := range cards {
        fmt.Printf("%+v", card)
    }
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request POST '{{baseUrl}}/v2/issuing-card' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "cards": [
        {
            "holderName": "Tony Stark",
            "holderTaxId": "012.345.678-90",
            "holderExternalId": "my-holder-id-1234",
            "productId": "654321",
            "type": "virtual",
            "displayName": "TONY STARK",
            "tags": ["department: tech", "team: backend"]
        }
    ]
}'
  
RESPONSE

Python

IssuingCard(
    id=5715709195239424,
    holder_id=5155165527080960,
    holder_name=Tony Stark,
    holder_tax_id=012.345.678-90,
    holder_external_id=my-holder-id-1234,
    display_name=TONY STARK,
    product_id=654321,
    type=virtual,
    status=active,
    rules=[
        IssuingRule(
            id=5155165527080960,
            name=General BRL,
            amount=100000,
            interval=day,
            currency_code=BRL,
            schedule=,
            purposes=[],
            categories=[],
            countries=[],
            methods=[],
            merchants=[]
        )
    ],
    street_line_1=Av. Faria Lima, 1844,
    street_line_2=10 andar,
    district=Itaim Bibi,
    city=Sao Paulo,
    state_code=SP,
    zip_code=01311-000,
    tags=['department: tech', 'team: backend'],
    number=**** **** **** 1234,
    security_code=***,
    expiration=****-**-**T**:**:**.******+00:00,
    is_pin_defined=False,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingCard {
    id: '5715709195239424',
    holderName: 'Tony Stark',
    holderTaxId: '012.345.678-90',
    holderExternalId: 'my-holder-id-1234',
    displayName: 'TONY STARK',
    productId: '654321',
    type: 'virtual',
    status: 'active',
    rules: [
        IssuingRule {
            id: '5155165527080960',
            name: 'General BRL',
            amount: 100000,
            interval: 'day',
            currencyCode: 'BRL',
            schedule: '',
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    streetLine1: 'Av. Faria Lima, 1844',
    streetLine2: '10 andar',
    district: 'Itaim Bibi',
    city: 'Sao Paulo',
    stateCode: 'SP',
    zipCode: '01311-000',
    tags: [ 'department: tech', 'team: backend' ],
    number: '**** **** **** 1234',
    securityCode: '***',
    expiration: '****-**-**T**:**:**.******+00:00',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00',
    isPinDefined: false
}
  
  

PHP

StarkInfra\IssuingCard Object
(
    [id] => 5715709195239424
    [productId] => 654321
    [holderId] => 5155165527080960
    [holderName] => Tony Stark
    [holderTaxId] => 012.345.678-90
    [holderExternalId] => my-holder-id-1234
    [type] => virtual
    [displayName] => TONY STARK
    [status] => active
    [rules] => Array
        (
            [0] => StarkInfra\IssuingRule Object
                (
                    [id] => 5155165527080960
                    [name] => General BRL
                    [amount] => 100000
                    [interval] => day
                    [currencyCode] => BRL
                    [schedule] =>
                    [purposes] => Array ( )
                    [categories] => Array ( )
                    [countries] => Array ( )
                    [methods] => Array ( )
                    [merchants] => Array ( )
                )

        )
    [streetLine1] => Av. Faria Lima, 1844
    [streetLine2] => 10 andar
    [district] => Itaim Bibi
    [city] => Sao Paulo
    [stateCode] => SP
    [zipCode] => 01311-000
    [tags] => Array ( [0] => department: tech [1] => team: backend )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [number] => **** **** **** 1234
    [securityCode] => ***
    [expiration] => ****-**-**T**:**:**.******+00:00
    [isPinDefined] =>
)
  
  

Java

IssuingCard({
    "id": "5715709195239424",
    "productId": "654321",
    "holderId": "5155165527080960",
    "holderName": "Tony Stark",
    "holderTaxId": "012.345.678-90",
    "holderExternalId": "my-holder-id-1234",
    "type": "virtual",
    "displayName": "TONY STARK",
    "status": "active",
    "rules": [
        {
            "id": "5155165527080960",
            "name": "General BRL",
            "interval": "day",
            "amount": 100000,
            "currencyCode": "BRL",
            "schedule": "",
            "purposes": [],
            "categories": [],
            "countries": [],
            "methods": [],
            "merchants": []
        }
    ],
    "streetLine1": "Av. Faria Lima, 1844",
    "streetLine2": "10 andar",
    "district": "Itaim Bibi",
    "city": "Sao Paulo",
    "stateCode": "SP",
    "zipCode": "01311-000",
    "tags": ["department: tech", "team: backend"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00",
    "number": "**** **** **** 1234",
    "securityCode": "***",
    "expiration": "****-**-**T**:**:**.******+00:00",
    "isPinDefined": false
})
  
  

Ruby

issuingcard(
    id: 5715709195239424,
    product_id: 654321,
    holder_id: 5155165527080960,
    holder_name: Tony Stark,
    holder_tax_id: 012.345.678-90,
    holder_external_id: my-holder-id-1234,
    type: virtual,
    display_name: TONY STARK,
    status: active,
    rules: [
        issuingrule(
            id: 5155165527080960,
            name: General BRL,
            amount: 100000,
            interval: day,
            currency_code: BRL,
            schedule: ,
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        )
    ],
    street_line_1: Av. Faria Lima, 1844,
    street_line_2: 10 andar,
    district: Itaim Bibi,
    city: Sao Paulo,
    state_code: SP,
    zip_code: 01311-000,
    tags: ["department: tech", "team: backend"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00,
    number: **** **** **** 1234,
    security_code: ***,
    expiration: ****-**-**T**:**:**.******+00:00,
    is_pin_defined: false
)
  
  

Elixir

%StarkInfra.IssuingCard{
    id: "5715709195239424",
    product_id: "654321",
    holder_id: "5155165527080960",
    holder_name: "Tony Stark",
    holder_tax_id: "012.345.678-90",
    holder_external_id: "my-holder-id-1234",
    type: "virtual",
    display_name: "TONY STARK",
    status: "active",
    rules: [
        %StarkInfra.IssuingRule{
            id: "5155165527080960",
            name: "General BRL",
            amount: 100000,
            interval: "day",
            currency_code: "BRL",
            schedule: "",
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    street_line_1: "Av. Faria Lima, 1844",
    street_line_2: "10 andar",
    district: "Itaim Bibi",
    city: "Sao Paulo",
    state_code: "SP",
    zip_code: "01311-000",
    tags: ["department: tech", "team: backend"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00",
    number: "**** **** **** 1234",
    security_code: "***",
    expiration: "****-**-**T**:**:**.******+00:00",
    is_pin_defined: false
}
  
  

C#

IssuingCard(
    Id: 5715709195239424,
    ProductId: 654321,
    HolderId: 5155165527080960,
    HolderName: Tony Stark,
    HolderTaxId: 012.345.678-90,
    HolderExternalId: my-holder-id-1234,
    Type: virtual,
    DisplayName: TONY STARK,
    Status: active,
    Rules: [
        IssuingRule(
            Id: 5155165527080960,
            Name: General BRL,
            Amount: 100000,
            Interval: day,
            CurrencyCode: BRL,
            Schedule: ,
            Purposes: [],
            Categories: [],
            Countries: [],
            Methods: [],
            Merchants: []
        )
    ],
    StreetLine1: Av. Faria Lima, 1844,
    StreetLine2: 10 andar,
    District: Itaim Bibi,
    City: Sao Paulo,
    StateCode: SP,
    ZipCode: 01311-000,
    Tags: [department: tech, team: backend],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00,
    Number: **** **** **** 1234,
    SecurityCode: ***,
    Expiration: ****-**-**T**:**:**.******+00:00,
    IsPinDefined: false
)
  
  

Go

{
    HolderName:Tony Stark
    HolderTaxId:012.345.678-90
    HolderExternalId:my-holder-id-1234
    DisplayName:TONY STARK
    Rules:[{Name:General BRL Amount:100000 Id:5155165527080960 Interval:day CurrencyCode:BRL Schedule: Purposes:[] Categories:[] Countries:[] Methods:[] Merchants:[]}]
    ProductId:654321
    Tags:[department: tech team: backend]
    StreetLine1:Av. Faria Lima, 1844
    StreetLine2:10 andar
    District:Itaim Bibi
    City:Sao Paulo
    StateCode:SP
    ZipCode:01311-000
    Id:5715709195239424
    HolderId:5155165527080960
    Type:virtual
    Status:active
    Number:**** **** **** 1234
    SecurityCode:***
    Expiration:****-**-**T**:**:**.******+00:00
    IsPinDefined:false
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "message": "Card(s) successfully created.",
    "cards": [
        {
            "id": "5715709195239424",
            "productId": "654321",
            "holderName": "Tony Stark",
            "holderTaxId": "012.345.678-90",
            "holderExternalId": "my-holder-id-1234",
            "type": "virtual",
            "displayName": "TONY STARK",
            "status": "active",
            "rules": [
                {
                    "id": "5155165527080960",
                    "name": "General BRL",
                    "interval": "day",
                    "amount": 100000,
                    "currencyCode": "BRL",
                    "schedule": "",
                    "purposes": [],
                    "categories": [],
                    "countries": [],
                    "methods": [],
                    "merchants": []
                }
            ],
            "streetLine1": "Av. Faria Lima, 1844",
            "streetLine2": "10 andar",
            "district": "Itaim Bibi",
            "city": "Sao Paulo",
            "stateCode": "SP",
            "zipCode": "01311-000",
            "tags": ["department: tech", "team: backend"],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00",
            "number": "**** **** **** 1234",
            "securityCode": "***",
            "expiration": "****-**-**T**:**:**.******+00:00",
        "isPinDefined": false
        }
    ]
}
  

List Issuing Cards

Get a list of issuing cards in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

status OPTIONAL

Filter cards by the specified status.

types OPTIONAL

Filter cards by type. Options: "virtual", "physical".

holderIds OPTIONAL

Filter cards by holder ids.

endings OPTIONAL

List of strings to filter cards by their last 4 digits. Max 30.

tags OPTIONAL

Filter entities that contain the specified tags.

ids OPTIONAL

List of strings to get specific entities by ids.

expand OPTIONAL

Fields to return expanded in the response. Options: "rules", "securityCode", "number", "expiration", "isPinDefined".

ENDPOINT
GET /v2/issuing-card
REQUEST

Python

import starkinfra

cards = starkinfra.issuingcard.query(
    limit=10,
    status="active"
)

for card in cards:
    print(card)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let cards = await starkinfra.issuingCard.query({
        limit: 10,
        status: 'active'
    });

    for await (let card of cards) {
        console.log(card);
    }
})();
  

PHP

$cards = StarkInfra\IssuingCard::query([
    "limit" => 10,
    "status" => "active"
]);

foreach ($cards as $card) {
    print_r($card);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("status", "active");

Generator cards = IssuingCard.query(params);

for (IssuingCard card : cards) {
    System.out.println(card);
}
  

Ruby

require('starkinfra')

cards = StarkInfra::IssuingCard.query(
    limit: 10,
    status: "active"
)

cards.each do |card|
    puts card
end
  

Elixir

cards = StarkInfra.IssuingCard.query!(
    limit: 10,
    status: "active"
)

cards |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable cards = StarkInfra.IssuingCard.Query(
    limit: 10,
    status: "active"
);

foreach (StarkInfra.IssuingCard card in cards) {
    Console.WriteLine(card);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingcard"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["status"] = "active"

    cards, errorChannel := issuingcard.Query(params, nil)

    for card := range cards {
        fmt.Printf("%+v", card)
    }

    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-card?limit=10&status=active' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingCard(
    id=5715709195239424,
    holder_id=5155165527080960,
    holder_name=Tony Stark,
    holder_tax_id=012.345.678-90,
    holder_external_id=my-holder-id-1234,
    display_name=TONY STARK,
    product_id=654321,
    type=virtual,
    status=active,
    rules=[
        IssuingRule(
            id=5155165527080960,
            name=General BRL,
            amount=100000,
            interval=day,
            currency_code=BRL,
            schedule=,
            purposes=[],
            categories=[],
            countries=[],
            methods=[],
            merchants=[]
        )
    ],
    street_line_1=Av. Faria Lima, 1844,
    street_line_2=10 andar,
    district=Itaim Bibi,
    city=Sao Paulo,
    state_code=SP,
    zip_code=01311-000,
    tags=['department: tech', 'team: backend'],
    number=**** **** **** 1234,
    security_code=***,
    expiration=****-**-**T**:**:**.******+00:00,
    is_pin_defined=False,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingCard {
    id: '5715709195239424',
    holderName: 'Tony Stark',
    holderTaxId: '012.345.678-90',
    holderExternalId: 'my-holder-id-1234',
    displayName: 'TONY STARK',
    productId: '654321',
    type: 'virtual',
    status: 'active',
    rules: [
        IssuingRule {
            id: '5155165527080960',
            name: 'General BRL',
            amount: 100000,
            interval: 'day',
            currencyCode: 'BRL',
            schedule: '',
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    streetLine1: 'Av. Faria Lima, 1844',
    streetLine2: '10 andar',
    district: 'Itaim Bibi',
    city: 'Sao Paulo',
    stateCode: 'SP',
    zipCode: '01311-000',
    tags: [ 'department: tech', 'team: backend' ],
    number: '**** **** **** 1234',
    securityCode: '***',
    expiration: '****-**-**T**:**:**.******+00:00',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00',
    isPinDefined: false
}
  
  

PHP

StarkInfra\IssuingCard Object
(
    [id] => 5715709195239424
    [productId] => 654321
    [holderId] => 5155165527080960
    [holderName] => Tony Stark
    [holderTaxId] => 012.345.678-90
    [holderExternalId] => my-holder-id-1234
    [type] => virtual
    [displayName] => TONY STARK
    [status] => active
    [rules] => Array
        (
            [0] => StarkInfra\IssuingRule Object
                (
                    [id] => 5155165527080960
                    [name] => General BRL
                    [amount] => 100000
                    [interval] => day
                    [currencyCode] => BRL
                    [schedule] =>
                    [purposes] => Array ( )
                    [categories] => Array ( )
                    [countries] => Array ( )
                    [methods] => Array ( )
                    [merchants] => Array ( )
                )

        )
    [streetLine1] => Av. Faria Lima, 1844
    [streetLine2] => 10 andar
    [district] => Itaim Bibi
    [city] => Sao Paulo
    [stateCode] => SP
    [zipCode] => 01311-000
    [tags] => Array ( [0] => department: tech [1] => team: backend )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [number] => **** **** **** 1234
    [securityCode] => ***
    [expiration] => ****-**-**T**:**:**.******+00:00
    [isPinDefined] =>
)
  
  

Java

IssuingCard({
    "id": "5715709195239424",
    "productId": "654321",
    "holderId": "5155165527080960",
    "holderName": "Tony Stark",
    "holderTaxId": "012.345.678-90",
    "holderExternalId": "my-holder-id-1234",
    "type": "virtual",
    "displayName": "TONY STARK",
    "status": "active",
    "rules": [
        {
            "id": "5155165527080960",
            "name": "General BRL",
            "interval": "day",
            "amount": 100000,
            "currencyCode": "BRL",
            "schedule": "",
            "purposes": [],
            "categories": [],
            "countries": [],
            "methods": [],
            "merchants": []
        }
    ],
    "streetLine1": "Av. Faria Lima, 1844",
    "streetLine2": "10 andar",
    "district": "Itaim Bibi",
    "city": "Sao Paulo",
    "stateCode": "SP",
    "zipCode": "01311-000",
    "tags": ["department: tech", "team: backend"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00",
    "number": "**** **** **** 1234",
    "securityCode": "***",
    "expiration": "****-**-**T**:**:**.******+00:00",
    "isPinDefined": false
})
  
  

Ruby

issuingcard(
    id: 5715709195239424,
    product_id: 654321,
    holder_id: 5155165527080960,
    holder_name: Tony Stark,
    holder_tax_id: 012.345.678-90,
    holder_external_id: my-holder-id-1234,
    type: virtual,
    display_name: TONY STARK,
    status: active,
    rules: [
        issuingrule(
            id: 5155165527080960,
            name: General BRL,
            amount: 100000,
            interval: day,
            currency_code: BRL,
            schedule: ,
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        )
    ],
    street_line_1: Av. Faria Lima, 1844,
    street_line_2: 10 andar,
    district: Itaim Bibi,
    city: Sao Paulo,
    state_code: SP,
    zip_code: 01311-000,
    tags: ["department: tech", "team: backend"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00,
    number: **** **** **** 1234,
    security_code: ***,
    expiration: ****-**-**T**:**:**.******+00:00,
    is_pin_defined: false
)
  
  

Elixir

%StarkInfra.IssuingCard{
    id: "5715709195239424",
    product_id: "654321",
    holder_id: "5155165527080960",
    holder_name: "Tony Stark",
    holder_tax_id: "012.345.678-90",
    holder_external_id: "my-holder-id-1234",
    type: "virtual",
    display_name: "TONY STARK",
    status: "active",
    rules: [
        %StarkInfra.IssuingRule{
            id: "5155165527080960",
            name: "General BRL",
            amount: 100000,
            interval: "day",
            currency_code: "BRL",
            schedule: "",
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    street_line_1: "Av. Faria Lima, 1844",
    street_line_2: "10 andar",
    district: "Itaim Bibi",
    city: "Sao Paulo",
    state_code: "SP",
    zip_code: "01311-000",
    tags: ["department: tech", "team: backend"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00",
    number: "**** **** **** 1234",
    security_code: "***",
    expiration: "****-**-**T**:**:**.******+00:00",
    is_pin_defined: false
}
  
  

C#

IssuingCard(
    Id: 5715709195239424,
    ProductId: 654321,
    HolderId: 5155165527080960,
    HolderName: Tony Stark,
    HolderTaxId: 012.345.678-90,
    HolderExternalId: my-holder-id-1234,
    Type: virtual,
    DisplayName: TONY STARK,
    Status: active,
    Rules: [
        IssuingRule(
            Id: 5155165527080960,
            Name: General BRL,
            Amount: 100000,
            Interval: day,
            CurrencyCode: BRL,
            Schedule: ,
            Purposes: [],
            Categories: [],
            Countries: [],
            Methods: [],
            Merchants: []
        )
    ],
    StreetLine1: Av. Faria Lima, 1844,
    StreetLine2: 10 andar,
    District: Itaim Bibi,
    City: Sao Paulo,
    StateCode: SP,
    ZipCode: 01311-000,
    Tags: [department: tech, team: backend],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00,
    Number: **** **** **** 1234,
    SecurityCode: ***,
    Expiration: ****-**-**T**:**:**.******+00:00,
    IsPinDefined: false
)
  
  

Go

{
    HolderName:Tony Stark
    HolderTaxId:012.345.678-90
    HolderExternalId:my-holder-id-1234
    DisplayName:TONY STARK
    Rules:[{Name:General BRL Amount:100000 Id:5155165527080960 Interval:day CurrencyCode:BRL Schedule: Purposes:[] Categories:[] Countries:[] Methods:[] Merchants:[]}]
    ProductId:654321
    Tags:[department: tech team: backend]
    StreetLine1:Av. Faria Lima, 1844
    StreetLine2:10 andar
    District:Itaim Bibi
    City:Sao Paulo
    StateCode:SP
    ZipCode:01311-000
    Id:5715709195239424
    HolderId:5155165527080960
    Type:virtual
    Status:active
    Number:**** **** **** 1234
    SecurityCode:***
    Expiration:****-**-**T**:**:**.******+00:00
    IsPinDefined:false
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "cards": [
        {
            "id": "5715709195239424",
            "productId": "654321",
            "holderName": "Tony Stark",
            "holderTaxId": "012.345.678-90",
            "holderExternalId": "my-holder-id-1234",
            "type": "virtual",
            "displayName": "TONY STARK",
            "status": "active",
            "rules": [
                {
                    "id": "5155165527080960",
                    "name": "General BRL",
                    "interval": "day",
                    "amount": 100000,
                    "currencyCode": "BRL",
                    "schedule": "",
                    "purposes": [],
                    "categories": [],
                    "countries": [],
                    "methods": [],
                    "merchants": []
                }
            ],
            "streetLine1": "Av. Faria Lima, 1844",
            "streetLine2": "10 andar",
            "district": "Itaim Bibi",
            "city": "Sao Paulo",
            "stateCode": "SP",
            "zipCode": "01311-000",
            "tags": ["department: tech", "team: backend"],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00",
            "number": "**** **** **** 1234",
            "securityCode": "***",
            "expiration": "****-**-**T**:**:**.******+00:00",
        "isPinDefined": false
        }
    ]
}
  

Get an Issuing Card

Get a single issuing card by its id.

Parameters

id REQUIRED

Id of the issuing card entity.

expand OPTIONAL

Fields to return expanded in the response. Options: "rules", "securityCode", "number", "expiration", "isPinDefined".

ENDPOINT
GET /v2/issuing-card/:id
REQUEST

Python

import starkinfra

card = starkinfra.issuingcard.get("5715709195239424")

print(card)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let card = await starkinfra.issuingCard.get('5715709195239424');
    console.log(card);
})();
  

PHP

$card = StarkInfra\IssuingCard::get("5715709195239424");

print_r($card);
  

Java

import com.starkinfra.*;

IssuingCard card = IssuingCard.get("5715709195239424");

System.out.println(card);
  

Ruby

require('starkinfra')

card = StarkInfra::IssuingCard.get("5715709195239424")

puts card
  

Elixir

card = StarkInfra.IssuingCard.get!("5715709195239424")

IO.inspect(card)
  

C#

using System;

StarkInfra.IssuingCard card = StarkInfra.IssuingCard.Get("5715709195239424");

Console.WriteLine(card);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingcard"
)

func main() {

    card, err := issuingcard.Get("5715709195239424", nil, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", card)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-card/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingCard(
    id=5715709195239424,
    holder_id=5155165527080960,
    holder_name=Tony Stark,
    holder_tax_id=012.345.678-90,
    holder_external_id=my-holder-id-1234,
    display_name=TONY STARK,
    product_id=654321,
    type=virtual,
    status=active,
    rules=[
        IssuingRule(
            id=5155165527080960,
            name=General BRL,
            amount=100000,
            interval=day,
            currency_code=BRL,
            schedule=,
            purposes=[],
            categories=[],
            countries=[],
            methods=[],
            merchants=[]
        )
    ],
    street_line_1=Av. Faria Lima, 1844,
    street_line_2=10 andar,
    district=Itaim Bibi,
    city=Sao Paulo,
    state_code=SP,
    zip_code=01311-000,
    tags=['department: tech', 'team: backend'],
    number=**** **** **** 1234,
    security_code=***,
    expiration=****-**-**T**:**:**.******+00:00,
    is_pin_defined=False,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingCard {
    id: '5715709195239424',
    holderId: '5155165527080960',
    holderName: 'Tony Stark',
    holderTaxId: '012.345.678-90',
    holderExternalId: 'my-holder-id-1234',
    displayName: 'TONY STARK',
    productId: '654321',
    type: 'virtual',
    status: 'active',
    rules: [
        IssuingRule {
            id: '5155165527080960',
            name: 'General BRL',
            amount: 100000,
            interval: 'day',
            currencyCode: 'BRL',
            schedule: '',
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    streetLine1: 'Av. Faria Lima, 1844',
    streetLine2: '10 andar',
    district: 'Itaim Bibi',
    city: 'Sao Paulo',
    stateCode: 'SP',
    zipCode: '01311-000',
    tags: [ 'department: tech', 'team: backend' ],
    number: '**** **** **** 1234',
    securityCode: '***',
    expiration: '****-**-**T**:**:**.******+00:00',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00',
    isPinDefined: false
}
  
  

PHP

StarkInfra\IssuingCard Object
(
    [id] => 5715709195239424
    [productId] => 654321
    [holderId] => 5155165527080960
    [holderName] => Tony Stark
    [holderTaxId] => 012.345.678-90
    [holderExternalId] => my-holder-id-1234
    [type] => virtual
    [displayName] => TONY STARK
    [status] => active
    [rules] => Array
        (
            [0] => StarkInfra\IssuingRule Object
                (
                    [id] => 5155165527080960
                    [name] => General BRL
                    [amount] => 100000
                    [interval] => day
                    [currencyCode] => BRL
                    [schedule] =>
                    [purposes] => Array ( )
                    [categories] => Array ( )
                    [countries] => Array ( )
                    [methods] => Array ( )
                    [merchants] => Array ( )
                )

        )
    [streetLine1] => Av. Faria Lima, 1844
    [streetLine2] => 10 andar
    [district] => Itaim Bibi
    [city] => Sao Paulo
    [stateCode] => SP
    [zipCode] => 01311-000
    [tags] => Array ( [0] => department: tech [1] => team: backend )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [number] => **** **** **** 1234
    [securityCode] => ***
    [expiration] => ****-**-**T**:**:**.******+00:00
    [isPinDefined] =>
)
  
  

Java

IssuingCard({
    "id": "5715709195239424",
    "productId": "654321",
    "holderId": "5155165527080960",
    "holderName": "Tony Stark",
    "holderTaxId": "012.345.678-90",
    "holderExternalId": "my-holder-id-1234",
    "type": "virtual",
    "displayName": "TONY STARK",
    "status": "active",
    "rules": [
        {
            "id": "5155165527080960",
            "name": "General BRL",
            "interval": "day",
            "amount": 100000,
            "currencyCode": "BRL",
            "schedule": "",
            "purposes": [],
            "categories": [],
            "countries": [],
            "methods": [],
            "merchants": []
        }
    ],
    "streetLine1": "Av. Faria Lima, 1844",
    "streetLine2": "10 andar",
    "district": "Itaim Bibi",
    "city": "Sao Paulo",
    "stateCode": "SP",
    "zipCode": "01311-000",
    "tags": ["department: tech", "team: backend"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00",
    "number": "**** **** **** 1234",
    "securityCode": "***",
    "expiration": "****-**-**T**:**:**.******+00:00",
    "isPinDefined": false
})
  
  

Ruby

issuingcard(
    id: 5715709195239424,
    product_id: 654321,
    holder_id: 5155165527080960,
    holder_name: Tony Stark,
    holder_tax_id: 012.345.678-90,
    holder_external_id: my-holder-id-1234,
    type: virtual,
    display_name: TONY STARK,
    status: active,
    rules: [
        issuingrule(
            id: 5155165527080960,
            name: General BRL,
            amount: 100000,
            interval: day,
            currency_code: BRL,
            schedule: ,
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        )
    ],
    street_line_1: Av. Faria Lima, 1844,
    street_line_2: 10 andar,
    district: Itaim Bibi,
    city: Sao Paulo,
    state_code: SP,
    zip_code: 01311-000,
    tags: ["department: tech", "team: backend"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00,
    number: **** **** **** 1234,
    security_code: ***,
    expiration: ****-**-**T**:**:**.******+00:00,
    is_pin_defined: false
)
  
  

Elixir

%StarkInfra.IssuingCard{
    id: "5715709195239424",
    product_id: "654321",
    holder_id: "5155165527080960",
    holder_name: "Tony Stark",
    holder_tax_id: "012.345.678-90",
    holder_external_id: "my-holder-id-1234",
    type: "virtual",
    display_name: "TONY STARK",
    status: "active",
    rules: [
        %StarkInfra.IssuingRule{
            id: "5155165527080960",
            name: "General BRL",
            amount: 100000,
            interval: "day",
            currency_code: "BRL",
            schedule: "",
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    street_line_1: "Av. Faria Lima, 1844",
    street_line_2: "10 andar",
    district: "Itaim Bibi",
    city: "Sao Paulo",
    state_code: "SP",
    zip_code: "01311-000",
    tags: ["department: tech", "team: backend"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00",
    number: "**** **** **** 1234",
    security_code: "***",
    expiration: "****-**-**T**:**:**.******+00:00",
    is_pin_defined: false
}
  
  

C#

IssuingCard(
    Id: 5715709195239424,
    ProductId: 654321,
    HolderId: 5155165527080960,
    HolderName: Tony Stark,
    HolderTaxId: 012.345.678-90,
    HolderExternalId: my-holder-id-1234,
    Type: virtual,
    DisplayName: TONY STARK,
    Status: active,
    Rules: [
        IssuingRule(
            Id: 5155165527080960,
            Name: General BRL,
            Amount: 100000,
            Interval: day,
            CurrencyCode: BRL,
            Schedule: ,
            Purposes: [],
            Categories: [],
            Countries: [],
            Methods: [],
            Merchants: []
        )
    ],
    StreetLine1: Av. Faria Lima, 1844,
    StreetLine2: 10 andar,
    District: Itaim Bibi,
    City: Sao Paulo,
    StateCode: SP,
    ZipCode: 01311-000,
    Tags: [department: tech, team: backend],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00,
    Number: **** **** **** 1234,
    SecurityCode: ***,
    Expiration: ****-**-**T**:**:**.******+00:00,
    IsPinDefined: false
)
  
  

Go

{
    HolderName:Tony Stark
    HolderTaxId:012.345.678-90
    HolderExternalId:my-holder-id-1234
    DisplayName:TONY STARK
    Rules:[{Name:General BRL Amount:100000 Id:5155165527080960 Interval:day CurrencyCode:BRL Schedule: Purposes:[] Categories:[] Countries:[] Methods:[] Merchants:[]}]
    ProductId:654321
    Tags:[department: tech team: backend]
    StreetLine1:Av. Faria Lima, 1844
    StreetLine2:10 andar
    District:Itaim Bibi
    City:Sao Paulo
    StateCode:SP
    ZipCode:01311-000
    Id:5715709195239424
    HolderId:5155165527080960
    Type:virtual
    Status:active
    Number:**** **** **** 1234
    SecurityCode:***
    Expiration:****-**-**T**:**:**.******+00:00
    IsPinDefined:false
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "card": {
        "id": "5715709195239424",
        "productId": "654321",
        "holderId": "5155165527080960",
        "holderName": "Tony Stark",
        "holderTaxId": "012.345.678-90",
        "holderExternalId": "my-holder-id-1234",
        "type": "virtual",
        "displayName": "TONY STARK",
        "status": "active",
        "rules": [
            {
                "id": "5155165527080960",
                "name": "General BRL",
                "interval": "day",
                "amount": 100000,
                "currencyCode": "BRL",
                "schedule": "",
                "purposes": [],
                "categories": [],
                "countries": [],
                "methods": [],
                "merchants": []
            }
        ],
        "streetLine1": "Av. Faria Lima, 1844",
        "streetLine2": "10 andar",
        "district": "Itaim Bibi",
        "city": "Sao Paulo",
        "stateCode": "SP",
        "zipCode": "01311-000",
        "tags": ["department: tech", "team: backend"],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00",
        "number": "**** **** **** 1234",
        "securityCode": "***",
        "expiration": "****-**-**T**:**:**.******+00:00",
        "isPinDefined": false
    }
}
  

Update an Issuing Card

Update the properties of an existing issuing card.

Parameters

id REQUIRED

Id of the issuing card entity.

status OPTIONAL

Status to update the card to. Options: "active", "blocked".

rules OPTIONAL

New list of spending rule objects to apply to the card.

tags OPTIONAL

New array of strings to tag the card.

displayName OPTIONAL

New display name for the card.

pin OPTIONAL

Card PIN. Numeric string of 4 to 6 digits. Write-only — it is never returned; inform "expand=isPinDefined" to check whether a PIN is set. A pending physical card must receive a pin when you activate it (set status to "active").

ENDPOINT
PATCH /v2/issuing-card/:id
REQUEST

Python

import starkinfra

card = starkinfra.issuingcard.update(
    "5715709195239424",
    status="blocked",
    pin="1234",
    tags=["blocked-reason: fraud"]
)

print(card)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let card = await starkinfra.issuingCard.update('5715709195239424', {
        status: 'blocked',
        pin: '1234',
        tags: ['blocked-reason: fraud']
    });
    console.log(card);
})();
  

PHP

$card = StarkInfra\IssuingCard::update("5715709195239424", [
    "status" => "blocked",
    "pin" => "1234",
    "tags" => ["blocked-reason: fraud"]
]);

print_r($card);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap patchData = new HashMap<>();
patchData.put("status", "blocked");
patchData.put("pin", "1234");
patchData.put("tags", new String[]{"blocked-reason: fraud"});

IssuingCard card = IssuingCard.update("5715709195239424", patchData);

System.out.println(card);
  

Ruby

require('starkinfra')

card = StarkInfra::IssuingCard.update(
    "5715709195239424",
    status: "blocked",
    pin: "1234",
    tags: ["blocked-reason: fraud"]
)

puts card
  

Elixir

card = StarkInfra.IssuingCard.update!(
    "5715709195239424",
    status: "blocked",
    pin: "1234",
    tags: ["blocked-reason: fraud"]
)

IO.inspect(card)
  

C#

using System;
using System.Collections.Generic;

StarkInfra.IssuingCard card = StarkInfra.IssuingCard.Update(
    "5715709195239424",
    status: "blocked",
    pin: "1234",
    tags: new List { "blocked-reason: fraud" }
);

Console.WriteLine(card);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingcard"
)

func main() {

    card, err := issuingcard.Update(
        "5715709195239424",
        map[string]interface{}{
            "status": "blocked",
            "pin":    "1234",
            "tags":   []string{"blocked-reason: fraud"},
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", card)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/issuing-card/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "status": "blocked",
    "pin": "1234",
    "tags": ["blocked-reason: fraud"]
}'
  
RESPONSE

Python

IssuingCard(
    id=5715709195239424,
    holder_id=5155165527080960,
    holder_name=Tony Stark,
    holder_tax_id=012.345.678-90,
    holder_external_id=my-holder-id-1234,
    display_name=TONY STARK,
    product_id=654321,
    type=virtual,
    status=blocked,
    rules=[
        IssuingRule(
            id=5155165527080960,
            name=General BRL,
            amount=100000,
            interval=day,
            currency_code=BRL,
            schedule=,
            purposes=[],
            categories=[],
            countries=[],
            methods=[],
            merchants=[]
        )
    ],
    street_line_1=Av. Faria Lima, 1844,
    street_line_2=10 andar,
    district=Itaim Bibi,
    city=Sao Paulo,
    state_code=SP,
    zip_code=01311-000,
    tags=['blocked-reason: fraud'],
    number=**** **** **** 1234,
    security_code=***,
    expiration=****-**-**T**:**:**.******+00:00,
    is_pin_defined=False,
    created=2022-01-01 00:00:00,
    updated=2022-06-01 00:00:00
)
  
  

Javascript

IssuingCard {
    id: '5715709195239424',
    holderId: '5155165527080960',
    holderName: 'Tony Stark',
    holderTaxId: '012.345.678-90',
    holderExternalId: 'my-holder-id-1234',
    displayName: 'TONY STARK',
    productId: '654321',
    type: 'virtual',
    status: 'blocked',
    rules: [
        IssuingRule {
            id: '5155165527080960',
            name: 'General BRL',
            amount: 100000,
            interval: 'day',
            currencyCode: 'BRL',
            schedule: '',
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    streetLine1: 'Av. Faria Lima, 1844',
    streetLine2: '10 andar',
    district: 'Itaim Bibi',
    city: 'Sao Paulo',
    stateCode: 'SP',
    zipCode: '01311-000',
    tags: [ 'blocked-reason: fraud' ],
    number: '**** **** **** 1234',
    securityCode: '***',
    expiration: '****-**-**T**:**:**.******+00:00',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00',
    isPinDefined: false
}
  
  

PHP

StarkInfra\IssuingCard Object
(
    [id] => 5715709195239424
    [productId] => 654321
    [holderId] => 5155165527080960
    [holderName] => Tony Stark
    [holderTaxId] => 012.345.678-90
    [holderExternalId] => my-holder-id-1234
    [type] => virtual
    [displayName] => TONY STARK
    [status] => blocked
    [rules] => Array
        (
            [0] => StarkInfra\IssuingRule Object
                (
                    [id] => 5155165527080960
                    [name] => General BRL
                    [amount] => 100000
                    [interval] => day
                    [currencyCode] => BRL
                    [schedule] =>
                    [purposes] => Array ( )
                    [categories] => Array ( )
                    [countries] => Array ( )
                    [methods] => Array ( )
                    [merchants] => Array ( )
                )

        )
    [streetLine1] => Av. Faria Lima, 1844
    [streetLine2] => 10 andar
    [district] => Itaim Bibi
    [city] => Sao Paulo
    [stateCode] => SP
    [zipCode] => 01311-000
    [tags] => Array ( [0] => blocked-reason: fraud )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-06-01 00:00:00.000000 )
    [number] => **** **** **** 1234
    [securityCode] => ***
    [expiration] => ****-**-**T**:**:**.******+00:00
    [isPinDefined] =>
)
  
  

Java

IssuingCard({
    "id": "5715709195239424",
    "productId": "654321",
    "holderId": "5155165527080960",
    "holderName": "Tony Stark",
    "holderTaxId": "012.345.678-90",
    "holderExternalId": "my-holder-id-1234",
    "type": "virtual",
    "displayName": "TONY STARK",
    "status": "blocked",
    "rules": [
        {
            "id": "5155165527080960",
            "name": "General BRL",
            "interval": "day",
            "amount": 100000,
            "currencyCode": "BRL",
            "schedule": "",
            "purposes": [],
            "categories": [],
            "countries": [],
            "methods": [],
            "merchants": []
        }
    ],
    "streetLine1": "Av. Faria Lima, 1844",
    "streetLine2": "10 andar",
    "district": "Itaim Bibi",
    "city": "Sao Paulo",
    "stateCode": "SP",
    "zipCode": "01311-000",
    "tags": ["blocked-reason: fraud"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00",
    "number": "**** **** **** 1234",
    "securityCode": "***",
    "expiration": "****-**-**T**:**:**.******+00:00",
    "isPinDefined": false
})
  
  

Ruby

issuingcard(
    id: 5715709195239424,
    product_id: 654321,
    holder_id: 5155165527080960,
    holder_name: Tony Stark,
    holder_tax_id: 012.345.678-90,
    holder_external_id: my-holder-id-1234,
    type: virtual,
    display_name: TONY STARK,
    status: blocked,
    rules: [
        issuingrule(
            id: 5155165527080960,
            name: General BRL,
            amount: 100000,
            interval: day,
            currency_code: BRL,
            schedule: ,
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        )
    ],
    street_line_1: Av. Faria Lima, 1844,
    street_line_2: 10 andar,
    district: Itaim Bibi,
    city: Sao Paulo,
    state_code: SP,
    zip_code: 01311-000,
    tags: ["blocked-reason: fraud"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-06-01T00:00:00+00:00,
    number: **** **** **** 1234,
    security_code: ***,
    expiration: ****-**-**T**:**:**.******+00:00,
    is_pin_defined: false
)
  
  

Elixir

%StarkInfra.IssuingCard{
    id: "5715709195239424",
    product_id: "654321",
    holder_id: "5155165527080960",
    holder_name: "Tony Stark",
    holder_tax_id: "012.345.678-90",
    holder_external_id: "my-holder-id-1234",
    type: "virtual",
    display_name: "TONY STARK",
    status: "blocked",
    rules: [
        %StarkInfra.IssuingRule{
            id: "5155165527080960",
            name: "General BRL",
            amount: 100000,
            interval: "day",
            currency_code: "BRL",
            schedule: "",
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    street_line_1: "Av. Faria Lima, 1844",
    street_line_2: "10 andar",
    district: "Itaim Bibi",
    city: "Sao Paulo",
    state_code: "SP",
    zip_code: "01311-000",
    tags: ["blocked-reason: fraud"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-06-01T00:00:00.000000+00:00",
    number: "**** **** **** 1234",
    security_code: "***",
    expiration: "****-**-**T**:**:**.******+00:00",
    is_pin_defined: false
}
  
  

C#

IssuingCard(
    Id: 5715709195239424,
    ProductId: 654321,
    HolderId: 5155165527080960,
    HolderName: Tony Stark,
    HolderTaxId: 012.345.678-90,
    HolderExternalId: my-holder-id-1234,
    Type: virtual,
    DisplayName: TONY STARK,
    Status: blocked,
    Rules: [
        IssuingRule(
            Id: 5155165527080960,
            Name: General BRL,
            Amount: 100000,
            Interval: day,
            CurrencyCode: BRL,
            Schedule: ,
            Purposes: [],
            Categories: [],
            Countries: [],
            Methods: [],
            Merchants: []
        )
    ],
    StreetLine1: Av. Faria Lima, 1844,
    StreetLine2: 10 andar,
    District: Itaim Bibi,
    City: Sao Paulo,
    StateCode: SP,
    ZipCode: 01311-000,
    Tags: [blocked-reason: fraud],
    Created: 01/01/2022 00:00:00,
    Updated: 06/01/2022 00:00:00,
    Number: **** **** **** 1234,
    SecurityCode: ***,
    Expiration: ****-**-**T**:**:**.******+00:00,
    IsPinDefined: false
)
  
  

Go

{
    HolderName:Tony Stark
    HolderTaxId:012.345.678-90
    HolderExternalId:my-holder-id-1234
    DisplayName:TONY STARK
    Rules:[{Name:General BRL Amount:100000 Id:5155165527080960 Interval:day CurrencyCode:BRL Schedule: Purposes:[] Categories:[] Countries:[] Methods:[] Merchants:[]}]
    ProductId:654321
    Tags:[blocked-reason: fraud]
    StreetLine1:Av. Faria Lima, 1844
    StreetLine2:10 andar
    District:Itaim Bibi
    City:Sao Paulo
    StateCode:SP
    ZipCode:01311-000
    Id:5715709195239424
    HolderId:5155165527080960
    Type:virtual
    Status:blocked
    Number:**** **** **** 1234
    SecurityCode:***
    Expiration:****-**-**T**:**:**.******+00:00
    IsPinDefined:false
    Updated:2022-06-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "card": {
        "id": "5715709195239424",
        "productId": "654321",
        "holderId": "5155165527080960",
        "holderName": "Tony Stark",
        "holderTaxId": "012.345.678-90",
        "holderExternalId": "my-holder-id-1234",
        "type": "virtual",
        "displayName": "TONY STARK",
        "status": "blocked",
        "rules": [
            {
                "id": "5155165527080960",
                "name": "General BRL",
                "interval": "day",
                "amount": 100000,
                "currencyCode": "BRL",
                "schedule": "",
                "purposes": [],
                "categories": [],
                "countries": [],
                "methods": [],
                "merchants": []
            }
        ],
        "streetLine1": "Av. Faria Lima, 1844",
        "streetLine2": "10 andar",
        "district": "Itaim Bibi",
        "city": "Sao Paulo",
        "stateCode": "SP",
        "zipCode": "01311-000",
        "tags": ["blocked-reason: fraud"],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00",
        "number": "**** **** **** 1234",
        "securityCode": "***",
        "expiration": "****-**-**T**:**:**.******+00:00",
        "isPinDefined": false
    }
}
  

Cancel an Issuing Card

Cancel an issuing card. This action is irreversible.

Parameters

id REQUIRED

Id of the issuing card entity to cancel.

ENDPOINT
DELETE /v2/issuing-card/:id
REQUEST

Python

import starkinfra

card = starkinfra.issuingcard.cancel("5715709195239424")

print(card)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let card = await starkinfra.issuingCard.cancel('5715709195239424');
    console.log(card);
})();
  

PHP

$card = StarkInfra\IssuingCard::cancel("5715709195239424");

print_r($card);
  

Java

import com.starkinfra.*;

IssuingCard card = IssuingCard.cancel("5715709195239424");

System.out.println(card);
  

Ruby

require('starkinfra')

card = StarkInfra::IssuingCard.cancel("5715709195239424")

puts card
  

Elixir

card = StarkInfra.IssuingCard.cancel!("5715709195239424")

IO.inspect(card)
  

C#

using System;

StarkInfra.IssuingCard card = StarkInfra.IssuingCard.Cancel("5715709195239424");

Console.WriteLine(card);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingcard"
)

func main() {

    card, err := issuingcard.Cancel("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", card)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request DELETE '{{baseUrl}}/v2/issuing-card/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingCard(
    id=5715709195239424,
    holder_id=5155165527080960,
    holder_name=Tony Stark,
    holder_tax_id=012.345.678-90,
    holder_external_id=my-holder-id-1234,
    display_name=TONY STARK,
    product_id=654321,
    type=virtual,
    status=canceled,
    rules=[
        IssuingRule(
            id=5155165527080960,
            name=General BRL,
            amount=100000,
            interval=day,
            currency_code=BRL,
            schedule=,
            purposes=[],
            categories=[],
            countries=[],
            methods=[],
            merchants=[]
        )
    ],
    street_line_1=Av. Faria Lima, 1844,
    street_line_2=10 andar,
    district=Itaim Bibi,
    city=Sao Paulo,
    state_code=SP,
    zip_code=01311-000,
    tags=['department: tech', 'team: backend'],
    number=**** **** **** 1234,
    security_code=***,
    expiration=****-**-**T**:**:**.******+00:00,
    is_pin_defined=False,
    created=2022-01-01 00:00:00,
    updated=2022-06-01 00:00:00
)
  
  

Javascript

IssuingCard {
    id: '5715709195239424',
    holderId: '5155165527080960',
    holderName: 'Tony Stark',
    holderTaxId: '012.345.678-90',
    holderExternalId: 'my-holder-id-1234',
    displayName: 'TONY STARK',
    productId: '654321',
    type: 'virtual',
    status: 'canceled',
    rules: [
        IssuingRule {
            id: '5155165527080960',
            name: 'General BRL',
            amount: 100000,
            interval: 'day',
            currencyCode: 'BRL',
            schedule: '',
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    streetLine1: 'Av. Faria Lima, 1844',
    streetLine2: '10 andar',
    district: 'Itaim Bibi',
    city: 'Sao Paulo',
    stateCode: 'SP',
    zipCode: '01311-000',
    tags: [ 'department: tech', 'team: backend' ],
    number: '**** **** **** 1234',
    securityCode: '***',
    expiration: '****-**-**T**:**:**.******+00:00',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00',
    isPinDefined: false
}
  
  

PHP

StarkInfra\IssuingCard Object
(
    [id] => 5715709195239424
    [productId] => 654321
    [holderId] => 5155165527080960
    [holderName] => Tony Stark
    [holderTaxId] => 012.345.678-90
    [holderExternalId] => my-holder-id-1234
    [type] => virtual
    [displayName] => TONY STARK
    [status] => canceled
    [rules] => Array
        (
            [0] => StarkInfra\IssuingRule Object
                (
                    [id] => 5155165527080960
                    [name] => General BRL
                    [amount] => 100000
                    [interval] => day
                    [currencyCode] => BRL
                    [schedule] =>
                    [purposes] => Array ( )
                    [categories] => Array ( )
                    [countries] => Array ( )
                    [methods] => Array ( )
                    [merchants] => Array ( )
                )

        )
    [streetLine1] => Av. Faria Lima, 1844
    [streetLine2] => 10 andar
    [district] => Itaim Bibi
    [city] => Sao Paulo
    [stateCode] => SP
    [zipCode] => 01311-000
    [tags] => Array ( [0] => department: tech [1] => team: backend )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-06-01 00:00:00.000000 )
    [number] => **** **** **** 1234
    [securityCode] => ***
    [expiration] => ****-**-**T**:**:**.******+00:00
    [isPinDefined] =>
)
  
  

Java

IssuingCard({
    "id": "5715709195239424",
    "productId": "654321",
    "holderId": "5155165527080960",
    "holderName": "Tony Stark",
    "holderTaxId": "012.345.678-90",
    "holderExternalId": "my-holder-id-1234",
    "type": "virtual",
    "displayName": "TONY STARK",
    "status": "canceled",
    "rules": [
        {
            "id": "5155165527080960",
            "name": "General BRL",
            "interval": "day",
            "amount": 100000,
            "currencyCode": "BRL",
            "schedule": "",
            "purposes": [],
            "categories": [],
            "countries": [],
            "methods": [],
            "merchants": []
        }
    ],
    "streetLine1": "Av. Faria Lima, 1844",
    "streetLine2": "10 andar",
    "district": "Itaim Bibi",
    "city": "Sao Paulo",
    "stateCode": "SP",
    "zipCode": "01311-000",
    "tags": ["department: tech", "team: backend"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00",
    "number": "**** **** **** 1234",
    "securityCode": "***",
    "expiration": "****-**-**T**:**:**.******+00:00",
    "isPinDefined": false
})
  
  

Ruby

issuingcard(
    id: 5715709195239424,
    product_id: 654321,
    holder_id: 5155165527080960,
    holder_name: Tony Stark,
    holder_tax_id: 012.345.678-90,
    holder_external_id: my-holder-id-1234,
    type: virtual,
    display_name: TONY STARK,
    status: canceled,
    rules: [
        issuingrule(
            id: 5155165527080960,
            name: General BRL,
            amount: 100000,
            interval: day,
            currency_code: BRL,
            schedule: ,
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        )
    ],
    street_line_1: Av. Faria Lima, 1844,
    street_line_2: 10 andar,
    district: Itaim Bibi,
    city: Sao Paulo,
    state_code: SP,
    zip_code: 01311-000,
    tags: ["department: tech", "team: backend"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-06-01T00:00:00+00:00,
    number: **** **** **** 1234,
    security_code: ***,
    expiration: ****-**-**T**:**:**.******+00:00,
    is_pin_defined: false
)
  
  

Elixir

%StarkInfra.IssuingCard{
    id: "5715709195239424",
    product_id: "654321",
    holder_id: "5155165527080960",
    holder_name: "Tony Stark",
    holder_tax_id: "012.345.678-90",
    holder_external_id: "my-holder-id-1234",
    type: "virtual",
    display_name: "TONY STARK",
    status: "canceled",
    rules: [
        %StarkInfra.IssuingRule{
            id: "5155165527080960",
            name: "General BRL",
            amount: 100000,
            interval: "day",
            currency_code: "BRL",
            schedule: "",
            purposes: [],
            categories: [],
            countries: [],
            methods: [],
            merchants: []
        }
    ],
    street_line_1: "Av. Faria Lima, 1844",
    street_line_2: "10 andar",
    district: "Itaim Bibi",
    city: "Sao Paulo",
    state_code: "SP",
    zip_code: "01311-000",
    tags: ["department: tech", "team: backend"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-06-01T00:00:00.000000+00:00",
    number: "**** **** **** 1234",
    security_code: "***",
    expiration: "****-**-**T**:**:**.******+00:00",
    is_pin_defined: false
}
  
  

C#

IssuingCard(
    Id: 5715709195239424,
    ProductId: 654321,
    HolderId: 5155165527080960,
    HolderName: Tony Stark,
    HolderTaxId: 012.345.678-90,
    HolderExternalId: my-holder-id-1234,
    Type: virtual,
    DisplayName: TONY STARK,
    Status: canceled,
    Rules: [
        IssuingRule(
            Id: 5155165527080960,
            Name: General BRL,
            Amount: 100000,
            Interval: day,
            CurrencyCode: BRL,
            Schedule: ,
            Purposes: [],
            Categories: [],
            Countries: [],
            Methods: [],
            Merchants: []
        )
    ],
    StreetLine1: Av. Faria Lima, 1844,
    StreetLine2: 10 andar,
    District: Itaim Bibi,
    City: Sao Paulo,
    StateCode: SP,
    ZipCode: 01311-000,
    Tags: [department: tech, team: backend],
    Created: 01/01/2022 00:00:00,
    Updated: 06/01/2022 00:00:00,
    Number: **** **** **** 1234,
    SecurityCode: ***,
    Expiration: ****-**-**T**:**:**.******+00:00,
    IsPinDefined: false
)
  
  

Go

{
    HolderName:Tony Stark
    HolderTaxId:012.345.678-90
    HolderExternalId:my-holder-id-1234
    DisplayName:TONY STARK
    Rules:[{Name:General BRL Amount:100000 Id:5155165527080960 Interval:day CurrencyCode:BRL Schedule: Purposes:[] Categories:[] Countries:[] Methods:[] Merchants:[]}]
    ProductId:654321
    Tags:[department: tech team: backend]
    StreetLine1:Av. Faria Lima, 1844
    StreetLine2:10 andar
    District:Itaim Bibi
    City:Sao Paulo
    StateCode:SP
    ZipCode:01311-000
    Id:5715709195239424
    HolderId:5155165527080960
    Type:virtual
    Status:canceled
    Number:**** **** **** 1234
    SecurityCode:***
    Expiration:****-**-**T**:**:**.******+00:00
    IsPinDefined:false
    Updated:2022-06-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "card": {
        "id": "5715709195239424",
        "productId": "654321",
        "holderId": "5155165527080960",
        "holderName": "Tony Stark",
        "holderTaxId": "012.345.678-90",
        "holderExternalId": "my-holder-id-1234",
        "type": "virtual",
        "displayName": "TONY STARK",
        "status": "canceled",
        "rules": [
            {
                "id": "5155165527080960",
                "name": "General BRL",
                "interval": "day",
                "amount": 100000,
                "currencyCode": "BRL",
                "schedule": "",
                "purposes": [],
                "categories": [],
                "countries": [],
                "methods": [],
                "merchants": []
            }
        ],
        "streetLine1": "Av. Faria Lima, 1844",
        "streetLine2": "10 andar",
        "district": "Itaim Bibi",
        "city": "Sao Paulo",
        "stateCode": "SP",
        "zipCode": "01311-000",
        "tags": ["department: tech", "team: backend"],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00",
        "number": "**** **** **** 1234",
        "securityCode": "***",
        "expiration": "****-**-**T**:**:**.******+00:00",
        "isPinDefined": false
    }
}
  

List Issuing Card Logs

Get a paged list of issuing card logs.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

types OPTIONAL

Filter logs by log types.

cardIds OPTIONAL

Array of card ids to filter logs.

ids OPTIONAL

List of strings to get specific log entities by ids.

ENDPOINT
GET /v2/issuing-card/log
REQUEST

Python

import starkinfra

logs = starkinfra.issuingcard.log.query(
    limit=10,
    types=["blocked"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let logs = await starkinfra.issuingCard.log.query({
        limit: 10,
        types: ['blocked']
    });

    for await (let log of logs) {
        console.log(log);
    }
})();
  

PHP

$logs = StarkInfra\IssuingCard\Log::query([
    "limit" => 10,
    "types" => ["blocked"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("types", new String[]{"blocked"});

Generator logs = IssuingCard.Log.query(params);

for (IssuingCard.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::IssuingCard::Log.query(
    limit: 10,
    types: ["blocked"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.IssuingCard.Log.query!(
    limit: 10,
    types: ["blocked"]
)

logs |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable logs = StarkInfra.IssuingCard.Log.Query(
    limit: 10,
    types: new List { "blocked" }
);

foreach (StarkInfra.IssuingCard.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingcard/log"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["types"] = []string{"blocked"}

    logs, errorChannel := log.Query(params, nil)

    for log := range logs {
        fmt.Printf("%+v", log)
    }

    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-card/log?limit=10&types=blocked' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6724771005489152,
    type=blocked,
    card=IssuingCard(id=5715709195239424, status=blocked),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '6724771005489152',
    type: 'blocked',
    card: IssuingCard { id: '5715709195239424', status: 'blocked' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingCard\Log Object
(
    [id] => 6724771005489152
    [type] => blocked
    [card] => StarkInfra\IssuingCard Object ( [id] => 5715709195239424 [status] => blocked )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingCard.Log({
    "id": "6724771005489152",
    "type": "blocked",
    "card": {"id": "5715709195239424", "status": "blocked"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 6724771005489152,
    type: blocked,
    card: issuingcard(id: 5715709195239424, status: blocked),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingCard.Log{
    id: "6724771005489152",
    type: "blocked",
    card: %StarkInfra.IssuingCard{id: "5715709195239424", status: "blocked"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingCard.Log(
    Id: 6724771005489152,
    Type: blocked,
    Card: IssuingCard(Id: 5715709195239424, Status: blocked),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:6724771005489152
    Type:blocked
    Card:{Id:5715709195239424 Status:blocked}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6724771005489152",
            "type": "blocked",
            "card": {"id": "5715709195239424", "status": "blocked"},
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Card Log

Get a single issuing card log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/issuing-card/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.issuingcard.log.get("6724771005489152")

print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let log = await starkinfra.issuingCard.log.get('6724771005489152');
    console.log(log);
})();
  

PHP

$log = StarkInfra\IssuingCard\Log::get("6724771005489152");

print_r($log);
  

Java

import com.starkinfra.*;

IssuingCard.Log log = IssuingCard.Log.get("6724771005489152");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::IssuingCard::Log.get("6724771005489152")

puts log
  

Elixir

log = StarkInfra.IssuingCard.Log.get!("6724771005489152")

IO.inspect(log)
  

C#

using System;

StarkInfra.IssuingCard.Log log = StarkInfra.IssuingCard.Log.Get("6724771005489152");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingcard/log"
)

func main() {

    cardLog, err := log.Get("6724771005489152", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", cardLog)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-card/log/6724771005489152' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6724771005489152,
    type=blocked,
    card=IssuingCard(id=5715709195239424, status=blocked),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '6724771005489152',
    type: 'blocked',
    card: IssuingCard { id: '5715709195239424', status: 'blocked' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingCard\Log Object
(
    [id] => 6724771005489152
    [type] => blocked
    [card] => StarkInfra\IssuingCard Object ( [id] => 5715709195239424 [status] => blocked )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingCard.Log({
    "id": "6724771005489152",
    "type": "blocked",
    "card": {"id": "5715709195239424", "status": "blocked"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 6724771005489152,
    type: blocked,
    card: issuingcard(id: 5715709195239424, status: blocked),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingCard.Log{
    id: "6724771005489152",
    type: "blocked",
    card: %StarkInfra.IssuingCard{id: "5715709195239424", status: "blocked"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingCard.Log(
    Id: 6724771005489152,
    Type: blocked,
    Card: IssuingCard(Id: 5715709195239424, Status: blocked),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:6724771005489152
    Type:blocked
    Card:{Id:5715709195239424 Status:blocked}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "log": {
        "id": "6724771005489152",
        "type": "blocked",
        "card": {"id": "5715709195239424", "status": "blocked"},
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Issuing Design

The Issuing Design resource represents the visual design of a physical card.

Designs define the artwork, fonts, and layout used when embossing and printing cards.

You can retrieve available designs and download their PDF templates.

The Issuing Design object

Attributes

id STRING

Unique identifier for the issuing design.

name STRING

Name of the design.

type STRING

Design type. Options: "card", "envelope".

embosserIds LIST OF STRINGS

List of embosser ids that support this design.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

List Issuing Designs

Get a list of available issuing designs for your workspace.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

ids OPTIONAL

List of strings to get specific entities by ids.

ENDPOINT
GET /v2/issuing-design
REQUEST

Python

import starkinfra

designs = starkinfra.issuingdesign.query(limit=10)

for design in designs:
    print(design)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let designs = await starkinfra.issuingDesign.query({ limit: 10 });

    for await (let design of designs) {
        console.log(design);
    }
})();
  

PHP

$designs = StarkInfra\IssuingDesign::query(["limit" => 10]);

foreach ($designs as $design) {
    print_r($design);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);

Generator designs = IssuingDesign.query(params);

for (IssuingDesign design : designs) {
    System.out.println(design);
}
  

Ruby

require('starkinfra')

designs = StarkInfra::IssuingDesign.query(limit: 10)

designs.each do |design|
    puts design
end
  

Elixir

designs = StarkInfra.IssuingDesign.query!(limit: 10)

designs |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable designs = StarkInfra.IssuingDesign.Query(limit: 10);

foreach (StarkInfra.IssuingDesign design in designs) {
    Console.WriteLine(design);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingdesign"
)

func main() {

    designs := issuingdesign.Query(
        &issuingdesign.Query{Limit: 10},
        nil,
    )

    for design := range designs {
        fmt.Printf("%+v", design)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-design?limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingDesign(
    id=5715709195239424,
    name=Standard Blue,
    embosser_ids=['6724771005489152'],
    type=card,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingDesign {
    id: '5715709195239424',
    name: 'Standard Blue',
    embosserIds: [ '6724771005489152' ],
    type: 'card',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingDesign Object
(
    [id] => 5715709195239424
    [name] => Standard Blue
    [type] => card
    [embosserIds] => Array ( [0] => 6724771005489152 )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingDesign({
    "id": "5715709195239424",
    "name": "Standard Blue",
    "type": "card",
    "embosserIds": ["6724771005489152"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingdesign(
    id: 5715709195239424,
    name: Standard Blue,
    embosser_ids: ["6724771005489152"],
    type: card,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingDesign{
    id: "5715709195239424",
    name: "Standard Blue",
    type: "card",
    embosser_ids: ["6724771005489152"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingDesign(
    Id: 5715709195239424,
    Name: Standard Blue,
    Type: card,
    EmbosserIds: [6724771005489152],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    Name:Standard Blue
    EmbosserIds:[6724771005489152]
    Type:card
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "designs": [
        {
            "id": "5715709195239424",
            "name": "Standard Blue",
            "type": "card",
            "embosserIds": ["6724771005489152"],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Design

Get a single issuing design by its id.

Parameters

id REQUIRED

Id of the issuing design entity.

ENDPOINT
GET /v2/issuing-design/:id
REQUEST

Python

import starkinfra

design = starkinfra.issuingdesign.get("5715709195239424")

print(design)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let design = await starkinfra.issuingDesign.get('5715709195239424');
    console.log(design);
})();
  

PHP

$design = StarkInfra\IssuingDesign::get("5715709195239424");

print_r($design);
  

Java

import com.starkinfra.*;

IssuingDesign design = IssuingDesign.get("5715709195239424");

System.out.println(design);
  

Ruby

require('starkinfra')

design = StarkInfra::IssuingDesign.get("5715709195239424")

puts design
  

Elixir

design = StarkInfra.IssuingDesign.get!("5715709195239424")

IO.inspect(design)
  

C#

using System;

StarkInfra.IssuingDesign design = StarkInfra.IssuingDesign.Get("5715709195239424");

Console.WriteLine(design);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingdesign"
)

func main() {

    design, err := issuingdesign.Get("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", design)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-design/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingDesign(
    id=5715709195239424,
    name=Standard Blue,
    embosser_ids=['6724771005489152'],
    type=card,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingDesign {
    id: '5715709195239424',
    name: 'Standard Blue',
    embosserIds: [ '6724771005489152' ],
    type: 'card',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingDesign Object
(
    [id] => 5715709195239424
    [name] => Standard Blue
    [type] => card
    [embosserIds] => Array ( [0] => 6724771005489152 )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingDesign({
    "id": "5715709195239424",
    "name": "Standard Blue",
    "type": "card",
    "embosserIds": ["6724771005489152"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingdesign(
    id: 5715709195239424,
    name: Standard Blue,
    embosser_ids: ["6724771005489152"],
    type: card,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingDesign{
    id: "5715709195239424",
    name: "Standard Blue",
    type: "card",
    embosser_ids: ["6724771005489152"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingDesign(
    Id: 5715709195239424,
    Name: Standard Blue,
    Type: card,
    EmbosserIds: [6724771005489152],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    Name:Standard Blue
    EmbosserIds:[6724771005489152]
    Type:card
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "design": {
        "id": "5715709195239424",
        "name": "Standard Blue",
        "type": "card",
        "embosserIds": ["6724771005489152"],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Get an Issuing Design PDF

Get the PDF file for a specific issuing design. This file can be used to preview the card layout.

Parameters

id REQUIRED

Id of the issuing design entity.

ENDPOINT
GET /v2/issuing-design/:id/pdf
REQUEST

Python

import starkinfra

pdf = starkinfra.issuingdesign.pdf("5715709195239424")

with open("design.pdf", "wb") as f:
    f.write(pdf)
  

Javascript

const starkinfra = require('starkinfra');
const fs = require('fs');

(async() => {
    let pdf = await starkinfra.issuingDesign.pdf('5715709195239424');
    fs.writeFileSync('design.pdf', pdf);
})();
  

PHP

$pdf = StarkInfra\IssuingDesign::pdf("5715709195239424");

file_put_contents("design.pdf", $pdf);
  

Java

import com.starkinfra.*;
import java.io.FileOutputStream;

byte[] pdf = IssuingDesign.pdf("5715709195239424");

FileOutputStream fos = new FileOutputStream("design.pdf");
fos.write(pdf);
fos.close();
  

Ruby

require('starkinfra')

pdf = StarkInfra::IssuingDesign.pdf("5715709195239424")

File.binwrite("design.pdf", pdf)
  

Elixir

pdf = StarkInfra.IssuingDesign.pdf!("5715709195239424")

File.write!("design.pdf", pdf)
  

C#

using System.IO;

byte[] pdf = StarkInfra.IssuingDesign.Pdf("5715709195239424");

File.WriteAllBytes("design.pdf", pdf);
  

Go

package main

import (
    "os"
    "github.com/starkinfra/sdk-go/starkinfra/issuingdesign"
)

func main() {

    pdf, err := issuingdesign.Pdf("5715709195239424", nil)
    if err.Errors != nil {
        panic(err)
    }

    os.WriteFile("design.pdf", pdf, 0644)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-design/5715709195239424/pdf' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--output design.pdf
  
RESPONSE

Python

b'%PDF-1.4 ...' # Binary PDF content
  

Javascript

 // Binary PDF content
  

PHP

// Binary PDF content written to design.pdf
  

Java

// Binary PDF content written to design.pdf
  

Ruby

# Binary PDF content written to design.pdf
  

Elixir

# Binary PDF content written to design.pdf
  

C#

// Binary PDF content written to design.pdf
  

Go

// Binary PDF content written to design.pdf
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

// Binary PDF content saved to design.pdf
  

Issuing Embossing Kit

The Issuing Embossing Kit resource represents a kit used for embossing physical cards.

Each kit defines the card design and packaging used during the card personalization process.

The Issuing Embossing Kit object

Attributes

id STRING

Unique identifier for the issuing embossing kit.

name STRING

Name of the embossing kit.

designs LIST OF OBJECTS

List of objects referencing the designs that compose the kit. Each object contains the design id. Example: [{"id": "6284441486065664"}].

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

List Issuing Embossing Kits

Get a list of available issuing embossing kits for your workspace.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date. Example: "2022-01-20".

before OPTIONAL

Filter entities created before this date. Example: "2022-02-20".

designIds OPTIONAL

Filter by IssuingDesign ids.

ids OPTIONAL

List of strings to get specific entities by ids.

ENDPOINT
GET /v2/issuing-embossing-kit
REQUEST

Python

import starkinfra

kits = starkinfra.issuingembossingkit.query(limit=10)

for kit in kits:
    print(kit)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let kits = await starkinfra.issuingEmbossingKit.query({ limit: 10 });

    for await (let kit of kits) {
        console.log(kit);
    }
})();
  

PHP

$kits = StarkInfra\IssuingEmbossingKit::query(["limit" => 10]);

foreach ($kits as $kit) {
    print_r($kit);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);

Generator kits = IssuingEmbossingKit.query(params);

for (IssuingEmbossingKit kit : kits) {
    System.out.println(kit);
}
  

Ruby

require('starkinfra')

kits = StarkInfra::IssuingEmbossingKit.query(limit: 10)

kits.each do |kit|
    puts kit
end
  

Elixir

kits = StarkInfra.IssuingEmbossingKit.query!(limit: 10)

kits |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable kits = StarkInfra.IssuingEmbossingKit.Query(limit: 10);

foreach (StarkInfra.IssuingEmbossingKit kit in kits) {
    Console.WriteLine(kit);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingembossingkit"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10

    kits, errorChannel := issuingembossingkit.Query(params, nil)

    for kit := range kits {
        fmt.Printf("%+v", kit)
    }

    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-embossing-kit?limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingEmbossingKit(
    id=5715709195239424,
    name=Standard Kit,
    designs=[
        IssuingDesign(
            id=6284441486065664,
            name=None,
            embosser_ids=None,
            type=None,
            created=None,
            updated=None
        ),
        IssuingDesign(
            id=6284441486065665,
            name=None,
            embosser_ids=None,
            type=None,
            created=None,
            updated=None
        )
    ],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingEmbossingKit {
    id: '5715709195239424',
    name: 'Standard Kit',
    designs: [
        IssuingDesign {
            id: '6284441486065664',
            name: null,
            embosserIds: null,
            type: null,
            created: null,
            updated: null
        },
        IssuingDesign {
            id: '6284441486065665',
            name: null,
            embosserIds: null,
            type: null,
            created: null,
            updated: null
        }
    ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingEmbossingKit Object
(
    [id] => 5715709195239424
    [name] => Standard Kit
    [designs] => Array
        (
            [0] => StarkInfra\IssuingDesign Object
                (
                    [id] => 6284441486065664
                    [name] =>
                    [type] =>
                    [embosserIds] =>
                    [created] =>
                    [updated] =>
                )

            [1] => StarkInfra\IssuingDesign Object
                (
                    [id] => 6284441486065665
                    [name] =>
                    [type] =>
                    [embosserIds] =>
                    [created] =>
                    [updated] =>
                )

        )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingEmbossingKit({
    "id": "5715709195239424",
    "name": "Standard Kit",
    "designs": [
        {"id": "6284441486065664"},
        {"id": "6284441486065665"}
    ],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingembossingkit(
    id: 5715709195239424,
    name: Standard Kit,
    designs: [
        issuingdesign(
            id: 6284441486065664,
            name: nil,
            embosser_ids: nil,
            type: nil,
            created: nil,
            updated: nil
        ),
        issuingdesign(
            id: 6284441486065665,
            name: nil,
            embosser_ids: nil,
            type: nil,
            created: nil,
            updated: nil
        )
    ],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingEmbossingKit{
    id: "5715709195239424",
    name: "Standard Kit",
    designs: [
        %StarkInfra.IssuingDesign{id: "6284441486065664"},
        %StarkInfra.IssuingDesign{id: "6284441486065665"}
    ],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingEmbossingKit(
    Id: 5715709195239424,
    Name: Standard Kit,
    Designs: [
        IssuingDesign(
            Id: 6284441486065664,
            Name: ,
            EmbosserIds: ,
            Created: ,
            Updated: 
        ),
        IssuingDesign(
            Id: 6284441486065665,
            Name: ,
            EmbosserIds: ,
            Created: ,
            Updated: 
        )
    ],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Name:Standard Kit
    Designs:[{Id:6284441486065664} {Id:6284441486065665}]
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "kits": [
        {
            "id": "5715709195239424",
            "name": "Standard Kit",
            "designs": [
                {"id": "6284441486065664"},
                {"id": "6284441486065665"}
            ],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Embossing Kit

Get a single issuing embossing kit by its id.

Parameters

id REQUIRED

Id of the issuing embossing kit entity.

ENDPOINT
GET /v2/issuing-embossing-kit/:id
REQUEST

Python

import starkinfra

kit = starkinfra.issuingembossingkit.get("5715709195239424")

print(kit)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let kit = await starkinfra.issuingEmbossingKit.get('5715709195239424');
    console.log(kit);
})();
  

PHP

$kit = StarkInfra\IssuingEmbossingKit::get("5715709195239424");

print_r($kit);
  

Java

import com.starkinfra.*;

IssuingEmbossingKit kit = IssuingEmbossingKit.get("5715709195239424");

System.out.println(kit);
  

Ruby

require('starkinfra')

kit = StarkInfra::IssuingEmbossingKit.get("5715709195239424")

puts kit
  

Elixir

kit = StarkInfra.IssuingEmbossingKit.get!("5715709195239424")

IO.inspect(kit)
  

C#

using System;

StarkInfra.IssuingEmbossingKit kit = StarkInfra.IssuingEmbossingKit.Get("5715709195239424");

Console.WriteLine(kit);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingembossingkit"
)

func main() {

    kit, err := issuingembossingkit.Get("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", kit)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-embossing-kit/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingEmbossingKit(
    id=5715709195239424,
    name=Standard Kit,
    designs=[
        IssuingDesign(
            id=6284441486065664,
            name=None,
            embosser_ids=None,
            type=None,
            created=None,
            updated=None
        ),
        IssuingDesign(
            id=6284441486065665,
            name=None,
            embosser_ids=None,
            type=None,
            created=None,
            updated=None
        )
    ],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingEmbossingKit {
    id: '5715709195239424',
    name: 'Standard Kit',
    designs: [
        IssuingDesign {
            id: '6284441486065664',
            name: null,
            embosserIds: null,
            type: null,
            created: null,
            updated: null
        },
        IssuingDesign {
            id: '6284441486065665',
            name: null,
            embosserIds: null,
            type: null,
            created: null,
            updated: null
        }
    ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingEmbossingKit Object
(
    [id] => 5715709195239424
    [name] => Standard Kit
    [designs] => Array
        (
            [0] => StarkInfra\IssuingDesign Object
                (
                    [id] => 6284441486065664
                    [name] =>
                    [type] =>
                    [embosserIds] =>
                    [created] =>
                    [updated] =>
                )

            [1] => StarkInfra\IssuingDesign Object
                (
                    [id] => 6284441486065665
                    [name] =>
                    [type] =>
                    [embosserIds] =>
                    [created] =>
                    [updated] =>
                )

        )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingEmbossingKit({
    "id": "5715709195239424",
    "name": "Standard Kit",
    "designs": [
        {"id": "6284441486065664"},
        {"id": "6284441486065665"}
    ],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingembossingkit(
    id: 5715709195239424,
    name: Standard Kit,
    designs: [
        issuingdesign(
            id: 6284441486065664,
            name: nil,
            embosser_ids: nil,
            type: nil,
            created: nil,
            updated: nil
        ),
        issuingdesign(
            id: 6284441486065665,
            name: nil,
            embosser_ids: nil,
            type: nil,
            created: nil,
            updated: nil
        )
    ],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingEmbossingKit{
    id: "5715709195239424",
    name: "Standard Kit",
    designs: [
        %StarkInfra.IssuingDesign{id: "6284441486065664"},
        %StarkInfra.IssuingDesign{id: "6284441486065665"}
    ],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingEmbossingKit(
    Id: 5715709195239424,
    Name: Standard Kit,
    Designs: [
        IssuingDesign(
            Id: 6284441486065664,
            Name: ,
            EmbosserIds: ,
            Created: ,
            Updated: 
        ),
        IssuingDesign(
            Id: 6284441486065665,
            Name: ,
            EmbosserIds: ,
            Created: ,
            Updated: 
        )
    ],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Name:Standard Kit
    Designs:[{Id:6284441486065664} {Id:6284441486065665}]
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "kit": {
        "id": "5715709195239424",
        "name": "Standard Kit",
        "designs": [
            {"id": "6284441486065664"},
            {"id": "6284441486065665"}
        ],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Issuing Stock

The Issuing Stock resource tracks the inventory of physical card blanks available for embossing.

Each stock entry is associated with a specific card design and holder type.

Monitor your stock levels to ensure cards are available when needed.

The Issuing Stock object

Attributes

id STRING

Unique identifier for the issuing stock.

designId STRING

Id of the IssuingDesign of the card blanks in stock.

embosserId STRING

Id of the embosser that holds this stock.

embosserName STRING

Name of the embosser that holds this stock.

balance INTEGER

Number of card blanks currently available in stock. Returned when "expand=balance" is informed in the request.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

List Issuing Stocks

Get a list of issuing stocks in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

ids OPTIONAL

List of strings to get specific entities by ids.

designIds OPTIONAL

List of strings to filter stocks by specific IssuingDesign ids.

embosserIds OPTIONAL

List of strings to filter stocks by specific embosser ids.

expand OPTIONAL

Fields to expand information on the response. Options: "balance".

ENDPOINT
GET /v2/issuing-stock
REQUEST

Python

import starkinfra

stocks = starkinfra.issuingstock.query(limit=10)

for stock in stocks:
    print(stock)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let stocks = await starkinfra.issuingStock.query({ limit: 10 });

    for await (let stock of stocks) {
        console.log(stock);
    }
})();
  

PHP

$stocks = StarkInfra\IssuingStock::query(["limit" => 10]);

foreach ($stocks as $stock) {
    print_r($stock);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);

Generator stocks = IssuingStock.query(params);

for (IssuingStock stock : stocks) {
    System.out.println(stock);
}
  

Ruby

require('starkinfra')

stocks = StarkInfra::IssuingStock.query(limit: 10)

stocks.each do |stock|
    puts stock
end
  

Elixir

stocks = StarkInfra.IssuingStock.query!(limit: 10)

stocks |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable stocks = StarkInfra.IssuingStock.Query(limit: 10);

foreach (StarkInfra.IssuingStock stock in stocks) {
    Console.WriteLine(stock);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingstock"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10

    stocks, errorChannel := issuingstock.Query(params, nil)

    loop:
    for {
        select {
        case err := <-errorChannel:
            if err.Errors != nil {
                for _, e := range err.Errors {
                    fmt.Printf("code: %s, message: %s", e.Code, e.Message)
                }
            }
        case stock, ok := <-stocks:
            if !ok {
                break loop
            }
            fmt.Printf("%+v", stock)
        }
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-stock?limit=10&expand=balance' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingStock(
    id=5715709195239424,
    design_id=6724771005489152,
    embosser_id=7834882116598271,
    embosser_name=Stark Embosser,
    balance=500,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingStock {
    id: '5715709195239424',
    designId: '6724771005489152',
    embosserId: '7834882116598271',
    embosserName: 'Stark Embosser',
    balance: 500,
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingStock Object
(
    [id] => 5715709195239424
    [designId] => 6724771005489152
    [embosserId] => 7834882116598271
    [embosserName] => Stark Embosser
    [balance] => 500
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingStock({
    "id": "5715709195239424",
    "designId": "6724771005489152",
    "embosserId": "7834882116598271",
    "embosserName": "Stark Embosser",
    "balance": 500,
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingstock(
    id: 5715709195239424,
    design_id: 6724771005489152,
    embosser_id: 7834882116598271,
    embosser_name: Stark Embosser,
    balance: 500,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingStock{
    id: "5715709195239424",
    design_id: "6724771005489152",
    embosser_id: "7834882116598271",
    embosser_name: "Stark Embosser",
    balance: 500,
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingStock(
    Id: 5715709195239424,
    DesignId: 6724771005489152,
    EmbosserId: 7834882116598271,
    EmbosserName: Stark Embosser,
    Balance: 500,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    Balance:500
    DesignId:6724771005489152
    EmbosserId:7834882116598271
    EmbosserName:Stark Embosser
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "stocks": [
        {
            "id": "5715709195239424",
            "designId": "6724771005489152",
            "embosserId": "7834882116598271",
            "embosserName": "Stark Embosser",
            "balance": 500,
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Stock

Get a single issuing stock entry by its id.

Parameters

id REQUIRED

Id of the issuing stock entity.

expand OPTIONAL

Fields to expand information on the response. Options: "balance".

ENDPOINT
GET /v2/issuing-stock/:id
REQUEST

Python

import starkinfra

stock = starkinfra.issuingstock.get("5715709195239424")

print(stock)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let stock = await starkinfra.issuingStock.get('5715709195239424');
    console.log(stock);
})();
  

PHP

$stock = StarkInfra\IssuingStock::get("5715709195239424");

print_r($stock);
  

Java

import com.starkinfra.*;

IssuingStock stock = IssuingStock.get("5715709195239424");

System.out.println(stock);
  

Ruby

require('starkinfra')

stock = StarkInfra::IssuingStock.get("5715709195239424")

puts stock
  

Elixir

stock = StarkInfra.IssuingStock.get!("5715709195239424")

IO.inspect(stock)
  

C#

using System;

StarkInfra.IssuingStock stock = StarkInfra.IssuingStock.Get("5715709195239424");

Console.WriteLine(stock);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingstock"
)

func main() {

    stock, err := issuingstock.Get("5715709195239424", nil, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", stock)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-stock/5715709195239424?expand=balance' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingStock(
    id=5715709195239424,
    design_id=6724771005489152,
    embosser_id=7834882116598271,
    embosser_name=Stark Embosser,
    balance=500,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingStock {
    id: '5715709195239424',
    designId: '6724771005489152',
    embosserId: '7834882116598271',
    embosserName: 'Stark Embosser',
    balance: 500,
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingStock Object
(
    [id] => 5715709195239424
    [designId] => 6724771005489152
    [embosserId] => 7834882116598271
    [embosserName] => Stark Embosser
    [balance] => 500
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingStock({
    "id": "5715709195239424",
    "designId": "6724771005489152",
    "embosserId": "7834882116598271",
    "embosserName": "Stark Embosser",
    "balance": 500,
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingstock(
    id: 5715709195239424,
    design_id: 6724771005489152,
    embosser_id: 7834882116598271,
    embosser_name: Stark Embosser,
    balance: 500,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingStock{
    id: "5715709195239424",
    design_id: "6724771005489152",
    embosser_id: "7834882116598271",
    embosser_name: "Stark Embosser",
    balance: 500,
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingStock(
    Id: 5715709195239424,
    DesignId: 6724771005489152,
    EmbosserId: 7834882116598271,
    EmbosserName: Stark Embosser,
    Balance: 500,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    Balance:500
    DesignId:6724771005489152
    EmbosserId:7834882116598271
    EmbosserName:Stark Embosser
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "stock": {
        "id": "5715709195239424",
        "designId": "6724771005489152",
        "embosserId": "7834882116598271",
        "embosserName": "Stark Embosser",
        "balance": 500,
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

List Issuing Stock Logs

Get a paged list of issuing stock logs.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

types OPTIONAL

Filter logs by log types.

stockIds OPTIONAL

Array of stock ids to filter logs.

ids OPTIONAL

List of strings to get specific log entities by ids.

ENDPOINT
GET /v2/issuing-stock/log
REQUEST

Python

import starkinfra

logs = starkinfra.issuingstock.log.query(
    limit=10,
    types=["created"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let logs = await starkinfra.issuingStock.log.query({
        limit: 10,
        types: ['created']
    });

    for await (let log of logs) {
        console.log(log);
    }
})();
  

PHP

$logs = StarkInfra\IssuingStock\Log::query([
    "limit" => 10,
    "types" => ["created"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("types", new String[]{"created"});

Generator logs = IssuingStock.Log.query(params);

for (IssuingStock.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::IssuingStock::Log.query(
    limit: 10,
    types: ["created"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.IssuingStock.Log.query!(
    limit: 10,
    types: ["created"]
)

logs |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable logs = StarkInfra.IssuingStock.Log.Query(
    limit: 10,
    types: new List { "created" }
);

foreach (StarkInfra.IssuingStock.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingstock/log"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["types"] = []string{"created"}

    logs, errorChannel := log.Query(params, nil)

    loop:
    for {
        select {
        case err := <-errorChannel:
            if err.Errors != nil {
                for _, e := range err.Errors {
                    fmt.Printf("code: %s, message: %s", e.Code, e.Message)
                }
            }
        case stockLog, ok := <-logs:
            if !ok {
                break loop
            }
            fmt.Printf("%+v", stockLog)
        }
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-stock/log?limit=10&types=created' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6724771005489152,
    type=created,
    stock=IssuingStock(id=5715709195239424, balance=500),
    count=10,
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '6724771005489152',
    type: 'created',
    stock: IssuingStock { id: '5715709195239424', balance: 500 },
    count: 10,
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingStock\Log Object
(
    [id] => 6724771005489152
    [type] => created
    [stock] => StarkInfra\IssuingStock Object ( [id] => 5715709195239424 [balance] => 500 )
    [count] => 10
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingStock.Log({
    "id": "6724771005489152",
    "type": "created",
    "stock": {"id": "5715709195239424", "balance": 500},
    "count": 10,
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 6724771005489152,
    type: created,
    stock: issuingstock(id: 5715709195239424, balance: 500),
    count: 10,
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingStock.Log{
    id: "6724771005489152",
    type: "created",
    stock: %StarkInfra.IssuingStock{id: "5715709195239424", balance: 500},
    count: 10,
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingStock.Log(
    Id: 6724771005489152,
    Type: created,
    Stock: IssuingStock(Id: 5715709195239424, Balance: 500),
    Count: 10,
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:6724771005489152
    Type:created
    Stock:{Id:5715709195239424 Balance:500}
    Count:10
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6724771005489152",
            "type": "created",
            "stock": {"id": "5715709195239424", "balance": 500},
            "count": 10,
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Stock Log

Get a single issuing stock log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/issuing-stock/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.issuingstock.log.get("6724771005489152")

print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let log = await starkinfra.issuingStock.log.get('6724771005489152');
    console.log(log);
})();
  

PHP

$log = StarkInfra\IssuingStock\Log::get("6724771005489152");

print_r($log);
  

Java

import com.starkinfra.*;

IssuingStock.Log log = IssuingStock.Log.get("6724771005489152");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::IssuingStock::Log.get("6724771005489152")

puts log
  

Elixir

log = StarkInfra.IssuingStock.Log.get!("6724771005489152")

IO.inspect(log)
  

C#

using System;

StarkInfra.IssuingStock.Log log = StarkInfra.IssuingStock.Log.Get("6724771005489152");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingstock/log"
)

func main() {

    stockLog, err := log.Get("6724771005489152", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", stockLog)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-stock/log/6724771005489152' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6724771005489152,
    type=created,
    stock=IssuingStock(id=5715709195239424, balance=500),
    count=10,
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '6724771005489152',
    type: 'created',
    stock: IssuingStock { id: '5715709195239424', balance: 500 },
    count: 10,
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingStock\Log Object
(
    [id] => 6724771005489152
    [type] => created
    [stock] => StarkInfra\IssuingStock Object ( [id] => 5715709195239424 [balance] => 500 )
    [count] => 10
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingStock.Log({
    "id": "6724771005489152",
    "type": "created",
    "stock": {"id": "5715709195239424", "balance": 500},
    "count": 10,
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 6724771005489152,
    type: created,
    stock: issuingstock(id: 5715709195239424, balance: 500),
    count: 10,
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingStock.Log{
    id: "6724771005489152",
    type: "created",
    stock: %StarkInfra.IssuingStock{id: "5715709195239424", balance: 500},
    count: 10,
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingStock.Log(
    Id: 6724771005489152,
    Type: created,
    Stock: IssuingStock(Id: 5715709195239424, Balance: 500),
    Count: 10,
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:6724771005489152
    Type:created
    Stock:{Id:5715709195239424 Balance:500}
    Count:10
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "log": {
        "id": "6724771005489152",
        "type": "created",
        "stock": {"id": "5715709195239424", "balance": 500},
        "count": 10,
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Issuing Stock Rule

The Issuing Stock Rule resource lets you register low-balance alerts for your card stocks.

When the available count of an issuing stock falls below the configured minimum balance, the registered emails and phones are notified.

Each issuing stock can have only one active rule at a time.

The Issuing Stock Rule object

Attributes

id STRING

Unique identifier for the issuing stock rule.

minimumBalance INTEGER

Stock count threshold that triggers the alert. Example: 1000.

stockId STRING

Id of the IssuingStock monitored by this rule.

emails LIST OF STRINGS

List of email addresses notified when the rule is triggered. Max: 10.

phones LIST OF STRINGS

List of phone numbers notified when the rule is triggered. Max: 10.

tags LIST OF STRINGS

Array of strings to tag the entity for future queries.

status STRING

Current rule status. Options: "active", "canceled".

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create Issuing Stock Rules

Use this route to register stock rules.

Send a "rules" array where each element carries the parameters below. At least one email or phone must be informed per rule.

Parameters

minimumBalance REQUIRED

Stock count threshold that triggers the alert. Must be a positive integer. Example: 1000.

stockId REQUIRED

Id of the IssuingStock to monitor.

emails OPTIONAL

List of email addresses to notify. Max: 10.

phones OPTIONAL

List of phone numbers to notify. Max: 10.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/issuing-stock-rule
REQUEST

Python

import starkinfra

rules = starkinfra.issuingstockrule.create([
    starkinfra.IssuingStockRule(
        minimum_balance=1000,
        stock_id="6724771005489152",
        emails=["aria@stark.com"],
        phones=["+5511999999999"],
        tags=["stock: black-card"]
    )
])

for rule in rules:
    print(rule)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let rules = await starkinfra.issuingStockRule.create([
        new starkinfra.IssuingStockRule({
            minimumBalance: 1000,
            stockId: '6724771005489152',
            emails: ['aria@stark.com'],
            phones: ['+5511999999999'],
            tags: ['stock: black-card']
        })
    ]);

    for (let rule of rules) {
        console.log(rule);
    }
})();
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request POST '{{baseUrl}}/v2/issuing-stock-rule' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "rules": [
        {
            "minimumBalance": 1000,
            "stockId": "6724771005489152",
            "emails": ["aria@stark.com"],
            "phones": ["+5511999999999"],
            "tags": ["stock: black-card"]
        }
    ]
}'
  
RESPONSE

Python

IssuingStockRule(
    id=5715709195239424,
    minimum_balance=1000,
    stock_id=6724771005489152,
    emails=['aria@stark.com'],
    phones=['+5511999999999'],
    tags=['stock: black-card'],
    status=active,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingStockRule {
    id: '5715709195239424',
    minimumBalance: 1000,
    stockId: '6724771005489152',
    emails: [ 'aria@stark.com' ],
    phones: [ '+5511999999999' ],
    tags: [ 'stock: black-card' ],
    status: 'active',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Stock rule(s) successfully registered.",
    "rules": [
        {
            "id": "5715709195239424",
            "minimumBalance": 1000,
            "stockId": "6724771005489152",
            "emails": ["aria@stark.com"],
            "phones": ["+5511999999999"],
            "tags": ["stock: black-card"],
            "status": "active",
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

List Issuing Stock Rules

Get a list of issuing stock rules in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

status OPTIONAL

Filter entities by status. Options: "active", "canceled".

stockIds OPTIONAL

List of strings to get rules attached to specific IssuingStock ids.

ids OPTIONAL

List of strings to get specific entities by ids.

tags OPTIONAL

List of strings to filter entities by tags.

ENDPOINT
GET /v2/issuing-stock-rule
REQUEST

Python

import starkinfra

rules = starkinfra.issuingstockrule.query(
    limit=10,
    status="active"
)

for rule in rules:
    print(rule)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let rules = await starkinfra.issuingStockRule.query({
        limit: 10,
        status: 'active'
    });

    for await (let rule of rules) {
        console.log(rule);
    }
})();
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-stock-rule?limit=10&status=active' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingStockRule(
    id=5715709195239424,
    minimum_balance=1000,
    stock_id=6724771005489152,
    emails=['aria@stark.com'],
    phones=['+5511999999999'],
    tags=['stock: black-card'],
    status=active,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingStockRule {
    id: '5715709195239424',
    minimumBalance: 1000,
    stockId: '6724771005489152',
    emails: [ 'aria@stark.com' ],
    phones: [ '+5511999999999' ],
    tags: [ 'stock: black-card' ],
    status: 'active',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": null,
    "rules": [
        {
            "id": "5715709195239424",
            "minimumBalance": 1000,
            "stockId": "6724771005489152",
            "emails": ["aria@stark.com"],
            "phones": ["+5511999999999"],
            "tags": ["stock: black-card"],
            "status": "active",
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Update an Issuing Stock Rule

Update the properties of an existing issuing stock rule.

Parameters

id REQUIRED

Id of the issuing stock rule entity.

minimumBalance OPTIONAL

New stock count threshold that triggers the alert.

emails OPTIONAL

New list of email addresses to notify. Max: 10.

phones OPTIONAL

New list of phone numbers to notify. Max: 10.

tags OPTIONAL

New array of strings to tag the entity.

ENDPOINT
PATCH /v2/issuing-stock-rule/:id
REQUEST

Python

import starkinfra

rule = starkinfra.issuingstockrule.update(
    "5715709195239424",
    minimum_balance=2000,
    emails=["aria@stark.com", "tony@stark.com"]
)

print(rule)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let rule = await starkinfra.issuingStockRule.update(
        '5715709195239424',
        {
            minimumBalance: 2000,
            emails: ['aria@stark.com', 'tony@stark.com']
        }
    );

    console.log(rule);
})();
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request PATCH '{{baseUrl}}/v2/issuing-stock-rule/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "minimumBalance": 2000,
    "emails": ["aria@stark.com", "tony@stark.com"]
}'
  
RESPONSE

Python

IssuingStockRule(
    id=5715709195239424,
    minimum_balance=2000,
    stock_id=6724771005489152,
    emails=['aria@stark.com', 'tony@stark.com'],
    phones=['+5511999999999'],
    tags=['stock: black-card'],
    status=active,
    created=2022-01-01 00:00:00,
    updated=2022-06-01 00:00:00
)
  

Javascript

IssuingStockRule {
    id: '5715709195239424',
    minimumBalance: 2000,
    stockId: '6724771005489152',
    emails: [ 'aria@stark.com', 'tony@stark.com' ],
    phones: [ '+5511999999999' ],
    tags: [ 'stock: black-card' ],
    status: 'active',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "rule": {
        "id": "5715709195239424",
        "minimumBalance": 2000,
        "stockId": "6724771005489152",
        "emails": ["aria@stark.com", "tony@stark.com"],
        "phones": ["+5511999999999"],
        "tags": ["stock: black-card"],
        "status": "active",
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00"
    }
}
  

Cancel an Issuing Stock Rule

Cancel an issuing stock rule. This action is irreversible.

Parameters

id REQUIRED

Id of the issuing stock rule entity to cancel.

ENDPOINT
DELETE /v2/issuing-stock-rule/:id
REQUEST

Python

import starkinfra

rule = starkinfra.issuingstockrule.cancel("5715709195239424")

print(rule)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let rule = await starkinfra.issuingStockRule.cancel('5715709195239424');

    console.log(rule);
})();
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request DELETE '{{baseUrl}}/v2/issuing-stock-rule/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingStockRule(
    id=5715709195239424,
    minimum_balance=2000,
    stock_id=6724771005489152,
    emails=['aria@stark.com', 'tony@stark.com'],
    phones=['+5511999999999'],
    tags=['stock: black-card'],
    status=canceled,
    created=2022-01-01 00:00:00,
    updated=2022-06-01 00:00:00
)
  

Javascript

IssuingStockRule {
    id: '5715709195239424',
    minimumBalance: 2000,
    stockId: '6724771005489152',
    emails: [ 'aria@stark.com', 'tony@stark.com' ],
    phones: [ '+5511999999999' ],
    tags: [ 'stock: black-card' ],
    status: 'canceled',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Stock rule successfully canceled.",
    "rule": {
        "id": "5715709195239424",
        "minimumBalance": 2000,
        "stockId": "6724771005489152",
        "emails": ["aria@stark.com", "tony@stark.com"],
        "phones": ["+5511999999999"],
        "tags": ["stock: black-card"],
        "status": "canceled",
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00"
    }
}
  

Issuing Restock

The Issuing Restock resource is used to request additional card blanks when your stock is running low.

Each restock request specifies the quantity needed and the stock to replenish.

Monitor the status of your restock requests through the log endpoints.

The Issuing Restock object

Attributes

id STRING

Unique identifier for the issuing restock.

count INTEGER

Number of card blanks requested in this restock.

stockId STRING

Id of the IssuingStock to be replenished.

status STRING

Current restock status. Options: "created", "processing", "confirmed", "canceled".

tags LIST OF STRINGS

Tags associated with the restock.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create Issuing Restocks

Use this route to create up to 100 new issuing restock requests at a time.

Parameters

count REQUIRED

Number of card blanks to request. Example: 100.

stockId REQUIRED

Id of the IssuingStock to be replenished.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/issuing-restock
REQUEST

Python

import starkinfra

restocks = starkinfra.issuingrestock.create([
    starkinfra.IssuingRestock(
        count=100,
        stock_id="5715709195239424"
    )
])

for restock in restocks:
    print(restock)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let restocks = await starkinfra.issuingRestock.create([{
        count: 100,
        stockId: '5715709195239424'
    }]);

    for (let restock of restocks) {
        console.log(restock);
    }
})();
  

PHP

$restocks = StarkInfra\IssuingRestock::create([
    new StarkInfra\IssuingRestock([
        "count" => 100,
        "stockId" => "5715709195239424"
    ])
]);

foreach ($restocks as $restock) {
    print_r($restock);
}
  

Java

import com.starkinfra.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

Map data = new HashMap<>();
data.put("count", 100);
data.put("stockId", "5715709195239424");

List restocks = IssuingRestock.create(
    new ArrayList() {{
        add(new IssuingRestock(data));
    }}
);

for (IssuingRestock restock : restocks) {
    System.out.println(restock);
}
  

Ruby

require('starkinfra')

restocks = StarkInfra::IssuingRestock.create([
    StarkInfra::IssuingRestock.new(
        count: 100,
        stock_id: "5715709195239424"
    )
])

restocks.each do |restock|
    puts restock
end
  

Elixir

restocks = StarkInfra.IssuingRestock.create!([
    %StarkInfra.IssuingRestock{
        count: 100,
        stock_id: "5715709195239424"
    }
])

restocks |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

List restocks = StarkInfra.IssuingRestock.Create(
    new List {
        new StarkInfra.IssuingRestock(
            count: 100,
            stockID: "5715709195239424"
        )
    }
);

foreach (StarkInfra.IssuingRestock restock in restocks) {
    Console.WriteLine(restock);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingrestock"
)

func main() {

    restocks, err := issuingrestock.Create(
        []issuingrestock.IssuingRestock{
            {
                Count:   100,
                StockId: "5715709195239424",
            },
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    for _, restock := range restocks {
        fmt.Printf("%+v", restock)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request POST '{{baseUrl}}/v2/issuing-restock' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "restocks": [
        {
            "count": 100,
            "stockId": "5715709195239424"
        }
    ]
}'
  
RESPONSE

Python

IssuingRestock(
    id=6724771005489152,
    count=100,
    stock_id=5715709195239424,
    status=created,
    tags=[],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingRestock {
    id: '6724771005489152',
    count: 100,
    stockId: '5715709195239424',
    status: 'created',
    tags: [],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingRestock Object
(
    [id] => 6724771005489152
    [count] => 100
    [stockId] => 5715709195239424
    [status] => created
    [tags] => Array ( )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingRestock({
    "id": "6724771005489152",
    "count": 100,
    "stockId": "5715709195239424",
    "status": "created",
    "tags": [],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingrestock(
    id: 6724771005489152,
    count: 100,
    stock_id: 5715709195239424,
    status: created,
    tags: [],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingRestock{
    id: "6724771005489152",
    count: 100,
    stock_id: "5715709195239424",
    status: "created",
    tags: [],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingRestock(
    Id: 6724771005489152,
    Count: 100,
    StockId: 5715709195239424,
    Status: created,
    Tags: [],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Count:100
    StockId:5715709195239424
    Tags:[]
    Id:6724771005489152
    Status:created
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "restocks": [
        {
            "id": "6724771005489152",
            "count": 100,
            "stockId": "5715709195239424",
            "status": "created",
            "tags": [],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

List Issuing Restocks

Get a list of issuing restock requests in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

status OPTIONAL

Filter for status of retrieved entities. Options: "created", "processing", "confirmed", "canceled".

stockIds OPTIONAL

List of IssuingStock ids to filter retrieved entities.

ids OPTIONAL

List of strings to get specific entities by ids.

tags OPTIONAL

List of strings to filter retrieved entities by tags.

ENDPOINT
GET /v2/issuing-restock
REQUEST

Python

import starkinfra

restocks = starkinfra.issuingrestock.query(limit=10)

for restock in restocks:
    print(restock)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let restocks = await starkinfra.issuingRestock.query({ limit: 10 });

    for await (let restock of restocks) {
        console.log(restock);
    }
})();
  

PHP

$restocks = StarkInfra\IssuingRestock::query(["limit" => 10]);

foreach ($restocks as $restock) {
    print_r($restock);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);

Generator restocks = IssuingRestock.query(params);

for (IssuingRestock restock : restocks) {
    System.out.println(restock);
}
  

Ruby

require('starkinfra')

restocks = StarkInfra::IssuingRestock.query(limit: 10)

restocks.each do |restock|
    puts restock
end
  

Elixir

restocks = StarkInfra.IssuingRestock.query!(limit: 10)

restocks |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable restocks = StarkInfra.IssuingRestock.Query(limit: 10);

foreach (StarkInfra.IssuingRestock restock in restocks) {
    Console.WriteLine(restock);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingrestock"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10

    restocks, errorChannel := issuingrestock.Query(params, nil)

    for restock := range restocks {
        fmt.Printf("%+v", restock)
    }

    for err := range errorChannel {
        fmt.Println(err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-restock?limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingRestock(
    id=6724771005489152,
    count=100,
    stock_id=5715709195239424,
    status=confirmed,
    tags=[],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingRestock {
    id: '6724771005489152',
    count: 100,
    stockId: '5715709195239424',
    status: 'confirmed',
    tags: [],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingRestock Object
(
    [id] => 6724771005489152
    [count] => 100
    [stockId] => 5715709195239424
    [status] => confirmed
    [tags] => Array ( )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingRestock({
    "id": "6724771005489152",
    "count": 100,
    "stockId": "5715709195239424",
    "status": "confirmed",
    "tags": [],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingrestock(
    id: 6724771005489152,
    count: 100,
    stock_id: 5715709195239424,
    status: confirmed,
    tags: [],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingRestock{
    id: "6724771005489152",
    count: 100,
    stock_id: "5715709195239424",
    status: "confirmed",
    tags: [],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingRestock(
    Id: 6724771005489152,
    Count: 100,
    StockId: 5715709195239424,
    Status: confirmed,
    Tags: [],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Count:100
    StockId:5715709195239424
    Tags:[]
    Id:6724771005489152
    Status:confirmed
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "restocks": [
        {
            "id": "6724771005489152",
            "count": 100,
            "stockId": "5715709195239424",
            "status": "confirmed",
            "tags": [],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Restock

Get a single issuing restock by its id.

Parameters

id REQUIRED

Id of the issuing restock entity.

ENDPOINT
GET /v2/issuing-restock/:id
REQUEST

Python

import starkinfra

restock = starkinfra.issuingrestock.get("6724771005489152")

print(restock)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let restock = await starkinfra.issuingRestock.get('6724771005489152');
    console.log(restock);
})();
  

PHP

$restock = StarkInfra\IssuingRestock::get("6724771005489152");

print_r($restock);
  

Java

import com.starkinfra.*;

IssuingRestock restock = IssuingRestock.get("6724771005489152");

System.out.println(restock);
  

Ruby

require('starkinfra')

restock = StarkInfra::IssuingRestock.get("6724771005489152")

puts restock
  

Elixir

restock = StarkInfra.IssuingRestock.get!("6724771005489152")

IO.inspect(restock)
  

C#

using System;

StarkInfra.IssuingRestock restock = StarkInfra.IssuingRestock.Get("6724771005489152");

Console.WriteLine(restock);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingrestock"
)

func main() {

    restock, err := issuingrestock.Get("6724771005489152", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", restock)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-restock/6724771005489152' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingRestock(
    id=6724771005489152,
    count=100,
    stock_id=5715709195239424,
    status=confirmed,
    tags=[],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingRestock {
    id: '6724771005489152',
    count: 100,
    stockId: '5715709195239424',
    status: 'confirmed',
    tags: [],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingRestock Object
(
    [id] => 6724771005489152
    [count] => 100
    [stockId] => 5715709195239424
    [status] => confirmed
    [tags] => Array ( )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingRestock({
    "id": "6724771005489152",
    "count": 100,
    "stockId": "5715709195239424",
    "status": "confirmed",
    "tags": [],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingrestock(
    id: 6724771005489152,
    count: 100,
    stock_id: 5715709195239424,
    status: confirmed,
    tags: [],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingRestock{
    id: "6724771005489152",
    count: 100,
    stock_id: "5715709195239424",
    status: "confirmed",
    tags: [],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingRestock(
    Id: 6724771005489152,
    Count: 100,
    StockId: 5715709195239424,
    Status: confirmed,
    Tags: [],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Count:100
    StockId:5715709195239424
    Tags:[]
    Id:6724771005489152
    Status:confirmed
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "restock": {
        "id": "6724771005489152",
        "count": 100,
        "stockId": "5715709195239424",
        "status": "confirmed",
        "tags": [],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

List Issuing Restock Logs

Get a paged list of issuing restock logs.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

types OPTIONAL

Filter logs by log types.

restockIds OPTIONAL

Array of restock ids to filter logs.

ids OPTIONAL

List of strings to get specific entities by ids.

ENDPOINT
GET /v2/issuing-restock/log
REQUEST

Python

import starkinfra

logs = starkinfra.issuingrestock.log.query(
    limit=10,
    types=["confirmed"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let logs = await starkinfra.issuingRestock.log.query({
        limit: 10,
        types: ['confirmed']
    });

    for await (let log of logs) {
        console.log(log);
    }
})();
  

PHP

$logs = StarkInfra\IssuingRestock\Log::query([
    "limit" => 10,
    "types" => ["confirmed"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("types", new String[]{"confirmed"});

Generator logs = IssuingRestock.Log.query(params);

for (IssuingRestock.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::IssuingRestock::Log.query(
    limit: 10,
    types: ["confirmed"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.IssuingRestock.Log.query!(
    limit: 10,
    types: ["confirmed"]
)

logs |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable logs = StarkInfra.IssuingRestock.Log.Query(
    limit: 10,
    types: new List { "confirmed" }
);

foreach (StarkInfra.IssuingRestock.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingrestock/log"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["types"] = []string{"confirmed"}

    logs, errorChannel := log.Query(params, nil)

    for log := range logs {
        fmt.Printf("%+v", log)
    }

    for err := range errorChannel {
        fmt.Println(err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-restock/log?limit=10&types=confirmed' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=7834882116598271,
    type=confirmed,
    restock=IssuingRestock(id=6724771005489152, status=confirmed),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '7834882116598271',
    type: 'confirmed',
    restock: IssuingRestock { id: '6724771005489152', status: 'confirmed' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingRestock\Log Object
(
    [id] => 7834882116598271
    [type] => confirmed
    [restock] => StarkInfra\IssuingRestock Object ( [id] => 6724771005489152 [status] => confirmed )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingRestock.Log({
    "id": "7834882116598271",
    "type": "confirmed",
    "restock": {"id": "6724771005489152", "status": "confirmed"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 7834882116598271,
    type: confirmed,
    restock: issuingrestock(id: 6724771005489152, status: confirmed),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingRestock.Log{
    id: "7834882116598271",
    type: "confirmed",
    restock: %StarkInfra.IssuingRestock{id: "6724771005489152", status: "confirmed"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingRestock.Log(
    Id: 7834882116598271,
    Type: confirmed,
    Restock: IssuingRestock(Id: 6724771005489152, Status: confirmed),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:7834882116598271
    Type:confirmed
    Restock:{Id:6724771005489152 Status:confirmed}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "7834882116598271",
            "type": "confirmed",
            "restock": {"id": "6724771005489152", "status": "confirmed"},
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Restock Log

Get a single issuing restock log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/issuing-restock/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.issuingrestock.log.get("7834882116598271")

print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let log = await starkinfra.issuingRestock.log.get('7834882116598271');
    console.log(log);
})();
  

PHP

$log = StarkInfra\IssuingRestock\Log::get("7834882116598271");

print_r($log);
  

Java

import com.starkinfra.*;

IssuingRestock.Log log = IssuingRestock.Log.get("7834882116598271");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::IssuingRestock::Log.get("7834882116598271")

puts log
  

Elixir

log = StarkInfra.IssuingRestock.Log.get!("7834882116598271")

IO.inspect(log)
  

C#

using System;

StarkInfra.IssuingRestock.Log log = StarkInfra.IssuingRestock.Log.Get("7834882116598271");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingrestock/log"
)

func main() {

    restockLog, err := log.Get("7834882116598271", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", restockLog)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-restock/log/7834882116598271' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=7834882116598271,
    type=confirmed,
    restock=IssuingRestock(id=6724771005489152, status=confirmed),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '7834882116598271',
    type: 'confirmed',
    restock: IssuingRestock { id: '6724771005489152', status: 'confirmed' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingRestock\Log Object
(
    [id] => 7834882116598271
    [type] => confirmed
    [restock] => StarkInfra\IssuingRestock Object ( [id] => 6724771005489152 [status] => confirmed )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingRestock.Log({
    "id": "7834882116598271",
    "type": "confirmed",
    "restock": {"id": "6724771005489152", "status": "confirmed"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 7834882116598271,
    type: confirmed,
    restock: issuingrestock(id: 6724771005489152, status: confirmed),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingRestock.Log{
    id: "7834882116598271",
    type: "confirmed",
    restock: %StarkInfra.IssuingRestock{id: "6724771005489152", status: "confirmed"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingRestock.Log(
    Id: 7834882116598271,
    Type: confirmed,
    Restock: IssuingRestock(Id: 6724771005489152, Status: confirmed),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:7834882116598271
    Type:confirmed
    Restock:{Id:6724771005489152 Status:confirmed}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "log": {
        "id": "7834882116598271",
        "type": "confirmed",
        "restock": {"id": "6724771005489152", "status": "confirmed"},
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Issuing Embossing Request

The Issuing Embossing Request resource is used to initiate the personalization and delivery of a physical card.

Each request specifies the card, kit, display name, and shipping address for card delivery.

Track the embossing and shipping status through the log endpoints.

The Issuing Embossing Request object

Attributes

id STRING

Unique identifier for the issuing embossing request.

cardId STRING

Id of the IssuingCard to be embossed.

kitId STRING

Id of the IssuingEmbossingKit to be used.

displayName1 STRING

First line of the name to be printed on the card face. Example: "TONY STARK".

displayName2 STRING

Second line of the name to be printed on the card face.

displayName3 STRING

Third line of the name to be printed on the card face.

shippingCity STRING

City for card delivery.

shippingCountryCode STRING

Country code for card delivery. Example: "BRA".

shippingDistrict STRING

District for card delivery.

shippingService STRING

Shipping service type. Options: "loggi", "conveyor".

shippingStateCode STRING

State code for card delivery. Example: "SP".

shippingStreetLine1 STRING

Primary street line for card delivery.

shippingStreetLine2 STRING

Secondary street line for card delivery.

shippingTrackingNumber STRING

Tracking number for the card shipment.

shippingZipCode STRING

ZIP code for card delivery. Example: "01311-000".

embosserId STRING

Id of the embosser responsible for this request.

shippingPhone STRING

Phone number for delivery contact. Example: "+5511999999999".

status STRING

Current status of the embossing request. Options: "created", "processing", "success", "failed".

tags LIST OF STRINGS

Tags associated with the embossing request.

fee INTEGER

Fee charged in cents for the embossing request.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create Issuing Embossing Requests

Use this route to create up to 100 new issuing embossing requests at a time.

Parameters

cardId REQUIRED

Id of the IssuingCard to be embossed.

kitId REQUIRED

Id of the IssuingEmbossingKit to use.

displayName1 REQUIRED

First line of the name to be printed on the card. Example: "TONY STARK".

displayName2 OPTIONAL

Second line of the name to be printed on the card.

displayName3 OPTIONAL

Third line of the name to be printed on the card.

shippingCity REQUIRED

City for card delivery.

shippingCountryCode REQUIRED

Country code for card delivery. Example: "BRA".

shippingDistrict REQUIRED

District for card delivery.

shippingService REQUIRED

Shipping service type. Options: "loggi", "conveyor".

shippingStateCode REQUIRED

State code for card delivery. Example: "SP".

shippingStreetLine1 REQUIRED

Primary street line for card delivery.

shippingStreetLine2 REQUIRED

Secondary street line for card delivery.

shippingZipCode REQUIRED

ZIP code for card delivery. Example: "01311-000".

shippingTrackingNumber REQUIRED

Tracking number for the card shipment.

shippingPhone OPTIONAL

Phone number for delivery contact. Example: "+5511999999999".

embosserId OPTIONAL

Id of the embosser to handle this request.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/issuing-embossing-request
REQUEST

Python

import starkinfra

requests = starkinfra.issuingembossingrequest.create([
    starkinfra.IssuingEmbossingRequest(
        card_id="5715709195239424",
        kit_id="6724771005489152",
        display_name_1="TONY STARK",
        shipping_city="Sao Paulo",
        shipping_country_code="BRA",
        shipping_district="Bela Vista",
        shipping_service="loggi",
        shipping_state_code="SP",
        shipping_street_line_1="Av. Paulista, 1000",
        shipping_street_line_2="Apto 101",
        shipping_tracking_number="BR1234567890",
        shipping_zip_code="01311-000",
        embosser_id="5656565656565656",
        tags=["department: tech"]
    )
])

for request in requests:
    print(request)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let requests = await starkinfra.issuingEmbossingRequest.create([
        new starkinfra.IssuingEmbossingRequest({
            cardId: '5715709195239424',
            kitId: '6724771005489152',
            displayName1: 'TONY STARK',
            shippingCity: 'Sao Paulo',
            shippingCountryCode: 'BRA',
            shippingDistrict: 'Bela Vista',
            shippingService: 'loggi',
            shippingStateCode: 'SP',
            shippingStreetLine1: 'Av. Paulista, 1000',
            shippingStreetLine2: 'Apto 101',
            shippingTrackingNumber: 'BR1234567890',
            shippingZipCode: '01311-000',
            embosserId: '5656565656565656',
            tags: ['department: tech']
        })
    ]);

    for await (let request of requests) {
        console.log(request);
    }
})();
  

PHP

$requests = StarkInfra\IssuingEmbossingRequest::create([
    new StarkInfra\IssuingEmbossingRequest([
        "cardId" => "5715709195239424",
        "kitId" => "6724771005489152",
        "displayName1" => "TONY STARK",
        "shippingCity" => "Sao Paulo",
        "shippingCountryCode" => "BRA",
        "shippingDistrict" => "Bela Vista",
        "shippingService" => "loggi",
        "shippingStateCode" => "SP",
        "shippingStreetLine1" => "Av. Paulista, 1000",
        "shippingStreetLine2" => "Apto 101",
        "shippingPhone" => "+5511999999999",
        "shippingTrackingNumber" => "BR1234567890",
        "shippingZipCode" => "01311-000",
        "embosserId" => "5656565656565656",
        "tags" => ["department: tech"]
    ])
]);

foreach ($requests as $request) {
    print_r($request);
}
  

Java

import com.starkinfra.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

List requests = new ArrayList<>();
HashMap data = new HashMap<>();
data.put("cardId", "5715709195239424");
data.put("kitId", "6724771005489152");
data.put("displayName1", "TONY STARK");
data.put("shippingCity", "Sao Paulo");
data.put("shippingCountryCode", "BRA");
data.put("shippingDistrict", "Bela Vista");
data.put("shippingService", "loggi");
data.put("shippingStateCode", "SP");
data.put("shippingStreetLine1", "Av. Paulista, 1000");
data.put("shippingStreetLine2", "Apto 101");
data.put("shippingTrackingNumber", "BR1234567890");
data.put("shippingZipCode", "01311-000");
data.put("embosserId", "5656565656565656");
data.put("tags", new String[]{"department: tech"});
requests.add(new IssuingEmbossingRequest(data));

requests = IssuingEmbossingRequest.create(requests);

for (IssuingEmbossingRequest request : requests) {
    System.out.println(request);
}
  

Ruby

require('starkinfra')

requests = StarkInfra::IssuingEmbossingRequest.create([
    StarkInfra::IssuingEmbossingRequest.new(
        card_id: "5715709195239424",
        kit_id: "6724771005489152",
        display_name_1: "TONY STARK",
        shipping_city: "Sao Paulo",
        shipping_country_code: "BRA",
        shipping_district: "Bela Vista",
        shipping_service: "loggi",
        shipping_state_code: "SP",
        shipping_street_line_1: "Av. Paulista, 1000",
        shipping_street_line_2: "Apto 101",
        shipping_tracking_number: "BR1234567890",
        shipping_zip_code: "01311-000",
        embosser_id: "5656565656565656",
        tags: ["department: tech"]
    )
])

requests.each do |request|
    puts request
end
  

Elixir

requests = StarkInfra.IssuingEmbossingRequest.create!([
    %StarkInfra.IssuingEmbossingRequest{
        card_id: "5715709195239424",
        kit_id: "6724771005489152",
        display_name_1: "TONY STARK",
        shipping_city: "Sao Paulo",
        shipping_country_code: "BRA",
        shipping_district: "Bela Vista",
        shipping_service: "loggi",
        shipping_state_code: "SP",
        shipping_street_line_1: "Av. Paulista, 1000",
        shipping_street_line_2: "Apto 101",
        shipping_tracking_number: "BR1234567890",
        shipping_zip_code: "01311-000",
        embosser_id: "5656565656565656",
        tags: ["department: tech"]
    }
])

requests |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

List requests = StarkInfra.IssuingEmbossingRequest.Create(
    new List {
        new StarkInfra.IssuingEmbossingRequest(
            cardID: "5715709195239424",
            kitID: "6724771005489152",
            displayName1: "TONY STARK",
            shippingCity: "Sao Paulo",
            shippingCountryCode: "BRA",
            shippingDistrict: "Bela Vista",
            shippingService: "loggi",
            shippingStateCode: "SP",
            shippingStreetLine1: "Av. Paulista, 1000",
            shippingStreetLine2: "Apto 101",
            shippingTrackingNumber: "BR1234567890",
            shippingZipCode: "01311-000",
            embosserID: "5656565656565656",
            tags: new List { "department: tech" }
        )
    }
);

foreach (StarkInfra.IssuingEmbossingRequest request in requests) {
    Console.WriteLine(request);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingembossingrequest"
)

func main() {

    requests, err := issuingembossingrequest.Create(
        []issuingembossingrequest.IssuingEmbossingRequest{
            {
                CardId:                 "5715709195239424",
                KitId:                  "6724771005489152",
                DisplayName1:           "TONY STARK",
                ShippingCity:           "Sao Paulo",
                ShippingCountryCode:    "BRA",
                ShippingDistrict:       "Bela Vista",
                ShippingService:        "loggi",
                ShippingStateCode:      "SP",
                ShippingStreetLine1:    "Av. Paulista, 1000",
                ShippingStreetLine2:    "Apto 101",
                ShippingTrackingNumber: "BR1234567890",
                ShippingZipCode:        "01311-000",
                EmbosserId:             "5656565656565656",
                Tags:                   []string{"department: tech"},
            },
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    for _, request := range requests {
        fmt.Printf("%+v", request)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request POST '{{baseUrl}}/v2/issuing-embossing-request' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requests": [
        {
            "cardId": "5715709195239424",
            "kitId": "6724771005489152",
            "displayName1": "TONY STARK",
            "shippingCity": "Sao Paulo",
            "shippingCountryCode": "BRA",
            "shippingDistrict": "Bela Vista",
            "shippingService": "loggi",
            "shippingStateCode": "SP",
            "shippingStreetLine1": "Av. Paulista, 1000",
            "shippingStreetLine2": "Apto 101",
            "shippingTrackingNumber": "BR1234567890",
            "shippingZipCode": "01311-000",
            "tags": ["department: tech"]
        }
    ]
}'
  
RESPONSE

Python

IssuingEmbossingRequest(
    id=7834882116598271,
    card_id=5715709195239424,
    kit_id=6724771005489152,
    display_name_1=TONY STARK,
    display_name_2=None,
    display_name_3=None,
    shipping_city=Sao Paulo,
    shipping_country_code=BRA,
    shipping_district=Bela Vista,
    shipping_phone=+5511999999999,
    shipping_service=loggi,
    shipping_state_code=SP,
    shipping_street_line_1=Av. Paulista, 1000,
    shipping_street_line_2=Apto 101,
    shipping_tracking_number=BR1234567890,
    shipping_zip_code=01311-000,
    embosser_id=5656565656565656,
    fee=0,
    status=created,
    tags=['department: tech'],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingEmbossingRequest {
    id: '7834882116598271',
    cardId: '5715709195239424',
    kitId: '6724771005489152',
    displayName1: 'TONY STARK',
    displayName2: null,
    displayName3: null,
    shippingCity: 'Sao Paulo',
    shippingCountryCode: 'BRA',
    shippingDistrict: 'Bela Vista',
    shippingPhone: '+5511999999999',
    shippingService: 'loggi',
    shippingStateCode: 'SP',
    shippingStreetLine1: 'Av. Paulista, 1000',
    shippingStreetLine2: 'Apto 101',
    shippingTrackingNumber: 'BR1234567890',
    shippingZipCode: '01311-000',
    embosserId: '5656565656565656',
    fee: 0,
    status: 'created',
    tags: [ 'department: tech' ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingEmbossingRequest Object
(
    [id] => 7834882116598271
    [fee] => 0
    [cardId] => 5715709195239424
    [embosserId] => 5656565656565656
    [kitId] => 6724771005489152
    [displayName1] => TONY STARK
    [displayName2] =>
    [displayName3] =>
    [shippingCity] => Sao Paulo
    [shippingCountryCode] => BRA
    [shippingDistrict] => Bela Vista
    [shippingPhone] => +5511999999999
    [shippingService] => loggi
    [shippingStateCode] => SP
    [shippingStreetLine1] => Av. Paulista, 1000
    [shippingStreetLine2] => Apto 101
    [shippingTrackingNumber] => BR1234567890
    [shippingZipCode] => 01311-000
    [status] => created
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingEmbossingRequest({
    "id": "7834882116598271",
    "fee": 0,
    "cardId": "5715709195239424",
    "embosserId": "5656565656565656",
    "kitId": "6724771005489152",
    "displayName1": "TONY STARK",
    "displayName2": null,
    "displayName3": null,
    "shippingCity": "Sao Paulo",
    "shippingCountryCode": "BRA",
    "shippingDistrict": "Bela Vista",
    "shippingPhone": "+5511999999999",
    "shippingService": "loggi",
    "shippingStateCode": "SP",
    "shippingStreetLine1": "Av. Paulista, 1000",
    "shippingStreetLine2": "Apto 101",
    "shippingTrackingNumber": "BR1234567890",
    "shippingZipCode": "01311-000",
    "status": "created",
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingembossingrequest(
    id: 7834882116598271,
    card_id: 5715709195239424,
    kit_id: 6724771005489152,
    display_name_1: TONY STARK,
    display_name_2: nil,
    display_name_3: nil,
    shipping_city: Sao Paulo,
    shipping_country_code: BRA,
    shipping_district: Bela Vista,
    shipping_phone: +5511999999999,
    shipping_service: loggi,
    shipping_state_code: SP,
    shipping_street_line_1: Av. Paulista, 1000,
    shipping_street_line_2: Apto 101,
    shipping_tracking_number: BR1234567890,
    shipping_zip_code: 01311-000,
    embosser_id: 5656565656565656,
    fee: 0,
    status: created,
    tags: ["department: tech"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingEmbossingRequest{
    id: "7834882116598271",
    fee: 0,
    card_id: "5715709195239424",
    embosser_id: "5656565656565656",
    kit_id: "6724771005489152",
    display_name_1: "TONY STARK",
    display_name_2: nil,
    display_name_3: nil,
    shipping_city: "Sao Paulo",
    shipping_country_code: "BRA",
    shipping_district: "Bela Vista",
    shipping_phone: "+5511999999999",
    shipping_service: "loggi",
    shipping_state_code: "SP",
    shipping_street_line_1: "Av. Paulista, 1000",
    shipping_street_line_2: "Apto 101",
    shipping_tracking_number: "BR1234567890",
    shipping_zip_code: "01311-000",
    status: "created",
    tags: ["department: tech"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingEmbossingRequest(
    Id: 7834882116598271,
    Fee: 0,
    CardId: 5715709195239424,
    EmbosserId: 5656565656565656,
    KitId: 6724771005489152,
    DisplayName1: TONY STARK,
    DisplayName2: ,
    DisplayName3: ,
    ShippingCity: Sao Paulo,
    ShippingCountryCode: BRA,
    ShippingDistrict: Bela Vista,
    ShippingPhone: +5511999999999,
    ShippingService: loggi,
    ShippingStateCode: SP,
    ShippingStreetLine1: Av. Paulista, 1000,
    ShippingStreetLine2: Apto 101,
    ShippingTrackingNumber: BR1234567890,
    ShippingZipCode: 01311-000,
    Status: created,
    Tags: [department: tech],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    CardId:5715709195239424
    KitId:6724771005489152
    DisplayName1:TONY STARK
    DisplayName2:
    DisplayName3:
    ShippingCity:Sao Paulo
    ShippingCountryCode:BRA
    ShippingDistrict:Bela Vista
    ShippingStateCode:SP
    ShippingStreetLine1:Av. Paulista, 1000
    ShippingStreetLine2:Apto 101
    ShippingService:loggi
    ShippingTrackingNumber:BR1234567890
    ShippingZipCode:01311-000
    EmbosserId:5656565656565656
    ShippingPhone:+5511999999999
    Tags:[department: tech]
    Id:7834882116598271
    Fee:0
    Status:created
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "requests": [
        {
            "id": "7834882116598271",
            "fee": 0,
            "cardId": "5715709195239424",
            "embosserId": "5656565656565656",
            "kitId": "6724771005489152",
            "displayName1": "TONY STARK",
            "displayName2": null,
            "displayName3": null,
            "shippingCity": "Sao Paulo",
            "shippingCountryCode": "BRA",
            "shippingDistrict": "Bela Vista",
            "shippingPhone": "+5511999999999",
            "shippingService": "loggi",
            "shippingStateCode": "SP",
            "shippingStreetLine1": "Av. Paulista, 1000",
            "shippingStreetLine2": "Apto 101",
            "shippingTrackingNumber": "BR1234567890",
            "shippingZipCode": "01311-000",
            "status": "created",
            "tags": ["department: tech"],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

List Issuing Embossing Requests

Get a list of issuing embossing requests in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

status OPTIONAL

Filter requests by the specified status.

cardIds OPTIONAL

List of IssuingCard ids to filter the retrieved entities.

tags OPTIONAL

Filter entities that contain the specified tags.

ids OPTIONAL

List of strings to get specific entities by ids.

ENDPOINT
GET /v2/issuing-embossing-request
REQUEST

Python

import starkinfra

requests = starkinfra.issuingembossingrequest.query(
    limit=10,
    status="created"
)

for request in requests:
    print(request)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let requests = await starkinfra.issuingEmbossingRequest.query({
        limit: 10,
        status: 'created'
    });

    for await (let request of requests) {
        console.log(request);
    }
})();
  

PHP

$requests = StarkInfra\IssuingEmbossingRequest::query([
    "limit" => 10,
    "status" => "created"
]);

foreach ($requests as $request) {
    print_r($request);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("status", "created");

Generator requests = IssuingEmbossingRequest.query(params);

for (IssuingEmbossingRequest request : requests) {
    System.out.println(request);
}
  

Ruby

require('starkinfra')

requests = StarkInfra::IssuingEmbossingRequest.query(
    limit: 10,
    status: "created"
)

requests.each do |request|
    puts request
end
  

Elixir

requests = StarkInfra.IssuingEmbossingRequest.query!(
    limit: 10,
    status: "created"
)

requests |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable requests = StarkInfra.IssuingEmbossingRequest.Query(
    limit: 10,
    status: "created"
);

foreach (StarkInfra.IssuingEmbossingRequest request in requests) {
    Console.WriteLine(request);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingembossingrequest"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["status"] = "created"

    requests, errorChannel := issuingembossingrequest.Query(params, nil)

    for request := range requests {
        fmt.Printf("%+v", request)
    }
    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-embossing-request?limit=10&status=created' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingEmbossingRequest(
    id=7834882116598271,
    card_id=5715709195239424,
    kit_id=6724771005489152,
    display_name_1=TONY STARK,
    display_name_2=None,
    display_name_3=None,
    shipping_city=Sao Paulo,
    shipping_country_code=BRA,
    shipping_district=Bela Vista,
    shipping_phone=+5511999999999,
    shipping_service=loggi,
    shipping_state_code=SP,
    shipping_street_line_1=Av. Paulista, 1000,
    shipping_street_line_2=Apto 101,
    shipping_tracking_number=BR1234567890,
    shipping_zip_code=01311-000,
    embosser_id=5656565656565656,
    fee=0,
    status=created,
    tags=['department: tech'],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingEmbossingRequest {
    id: '7834882116598271',
    cardId: '5715709195239424',
    kitId: '6724771005489152',
    displayName1: 'TONY STARK',
    displayName2: null,
    displayName3: null,
    shippingCity: 'Sao Paulo',
    shippingCountryCode: 'BRA',
    shippingDistrict: 'Bela Vista',
    shippingPhone: '+5511999999999',
    shippingService: 'loggi',
    shippingStateCode: 'SP',
    shippingStreetLine1: 'Av. Paulista, 1000',
    shippingStreetLine2: 'Apto 101',
    shippingTrackingNumber: 'BR1234567890',
    shippingZipCode: '01311-000',
    embosserId: '5656565656565656',
    fee: 0,
    status: 'created',
    tags: [ 'department: tech' ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingEmbossingRequest Object
(
    [id] => 7834882116598271
    [fee] => 0
    [cardId] => 5715709195239424
    [embosserId] => 5656565656565656
    [kitId] => 6724771005489152
    [displayName1] => TONY STARK
    [displayName2] =>
    [displayName3] =>
    [shippingCity] => Sao Paulo
    [shippingCountryCode] => BRA
    [shippingDistrict] => Bela Vista
    [shippingPhone] => +5511999999999
    [shippingService] => loggi
    [shippingStateCode] => SP
    [shippingStreetLine1] => Av. Paulista, 1000
    [shippingStreetLine2] => Apto 101
    [shippingTrackingNumber] => BR1234567890
    [shippingZipCode] => 01311-000
    [status] => created
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingEmbossingRequest({
    "id": "7834882116598271",
    "fee": 0,
    "cardId": "5715709195239424",
    "embosserId": "5656565656565656",
    "kitId": "6724771005489152",
    "displayName1": "TONY STARK",
    "displayName2": null,
    "displayName3": null,
    "shippingCity": "Sao Paulo",
    "shippingCountryCode": "BRA",
    "shippingDistrict": "Bela Vista",
    "shippingPhone": "+5511999999999",
    "shippingService": "loggi",
    "shippingStateCode": "SP",
    "shippingStreetLine1": "Av. Paulista, 1000",
    "shippingStreetLine2": "Apto 101",
    "shippingTrackingNumber": "BR1234567890",
    "shippingZipCode": "01311-000",
    "status": "created",
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingembossingrequest(
    id: 7834882116598271,
    card_id: 5715709195239424,
    kit_id: 6724771005489152,
    display_name_1: TONY STARK,
    display_name_2: nil,
    display_name_3: nil,
    shipping_city: Sao Paulo,
    shipping_country_code: BRA,
    shipping_district: Bela Vista,
    shipping_phone: +5511999999999,
    shipping_service: loggi,
    shipping_state_code: SP,
    shipping_street_line_1: Av. Paulista, 1000,
    shipping_street_line_2: Apto 101,
    shipping_tracking_number: BR1234567890,
    shipping_zip_code: 01311-000,
    embosser_id: 5656565656565656,
    fee: 0,
    status: created,
    tags: ["department: tech"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingEmbossingRequest{
    id: "7834882116598271",
    fee: 0,
    card_id: "5715709195239424",
    embosser_id: "5656565656565656",
    kit_id: "6724771005489152",
    display_name_1: "TONY STARK",
    display_name_2: nil,
    display_name_3: nil,
    shipping_city: "Sao Paulo",
    shipping_country_code: "BRA",
    shipping_district: "Bela Vista",
    shipping_phone: "+5511999999999",
    shipping_service: "loggi",
    shipping_state_code: "SP",
    shipping_street_line_1: "Av. Paulista, 1000",
    shipping_street_line_2: "Apto 101",
    shipping_tracking_number: "BR1234567890",
    shipping_zip_code: "01311-000",
    status: "created",
    tags: ["department: tech"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingEmbossingRequest(
    Id: 7834882116598271,
    Fee: 0,
    CardId: 5715709195239424,
    EmbosserId: 5656565656565656,
    KitId: 6724771005489152,
    DisplayName1: TONY STARK,
    DisplayName2: ,
    DisplayName3: ,
    ShippingCity: Sao Paulo,
    ShippingCountryCode: BRA,
    ShippingDistrict: Bela Vista,
    ShippingPhone: +5511999999999,
    ShippingService: loggi,
    ShippingStateCode: SP,
    ShippingStreetLine1: Av. Paulista, 1000,
    ShippingStreetLine2: Apto 101,
    ShippingTrackingNumber: BR1234567890,
    ShippingZipCode: 01311-000,
    Status: created,
    Tags: [department: tech],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    CardId:5715709195239424
    KitId:6724771005489152
    DisplayName1:TONY STARK
    DisplayName2:
    DisplayName3:
    ShippingCity:Sao Paulo
    ShippingCountryCode:BRA
    ShippingDistrict:Bela Vista
    ShippingStateCode:SP
    ShippingStreetLine1:Av. Paulista, 1000
    ShippingStreetLine2:Apto 101
    ShippingService:loggi
    ShippingTrackingNumber:BR1234567890
    ShippingZipCode:01311-000
    EmbosserId:5656565656565656
    ShippingPhone:+5511999999999
    Tags:[department: tech]
    Id:7834882116598271
    Fee:0
    Status:created
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "requests": [
        {
            "id": "7834882116598271",
            "fee": 0,
            "cardId": "5715709195239424",
            "embosserId": "5656565656565656",
            "kitId": "6724771005489152",
            "displayName1": "TONY STARK",
            "displayName2": null,
            "displayName3": null,
            "shippingCity": "Sao Paulo",
            "shippingCountryCode": "BRA",
            "shippingDistrict": "Bela Vista",
            "shippingPhone": "+5511999999999",
            "shippingService": "loggi",
            "shippingStateCode": "SP",
            "shippingStreetLine1": "Av. Paulista, 1000",
            "shippingStreetLine2": "Apto 101",
            "shippingTrackingNumber": "BR1234567890",
            "shippingZipCode": "01311-000",
            "status": "created",
            "tags": ["department: tech"],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Embossing Request

Get a single issuing embossing request by its id.

Parameters

id REQUIRED

Id of the issuing embossing request entity.

ENDPOINT
GET /v2/issuing-embossing-request/:id
REQUEST

Python

import starkinfra

request = starkinfra.issuingembossingrequest.get("7834882116598271")

print(request)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let request = await starkinfra.issuingEmbossingRequest.get('7834882116598271');
    console.log(request);
})();
  

PHP

$request = StarkInfra\IssuingEmbossingRequest::get("7834882116598271");

print_r($request);
  

Java

import com.starkinfra.*;

IssuingEmbossingRequest request = IssuingEmbossingRequest.get("7834882116598271");

System.out.println(request);
  

Ruby

require('starkinfra')

request = StarkInfra::IssuingEmbossingRequest.get("7834882116598271")

puts request
  

Elixir

request = StarkInfra.IssuingEmbossingRequest.get!("7834882116598271")

IO.inspect(request)
  

C#

using System;

StarkInfra.IssuingEmbossingRequest request = StarkInfra.IssuingEmbossingRequest.Get("7834882116598271");

Console.WriteLine(request);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingembossingrequest"
)

func main() {

    request, err := issuingembossingrequest.Get("7834882116598271", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", request)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-embossing-request/7834882116598271' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingEmbossingRequest(
    id=7834882116598271,
    card_id=5715709195239424,
    kit_id=6724771005489152,
    display_name_1=TONY STARK,
    display_name_2=None,
    display_name_3=None,
    shipping_city=Sao Paulo,
    shipping_country_code=BRA,
    shipping_district=Bela Vista,
    shipping_phone=+5511999999999,
    shipping_service=loggi,
    shipping_state_code=SP,
    shipping_street_line_1=Av. Paulista, 1000,
    shipping_street_line_2=Apto 101,
    shipping_tracking_number=BR1234567890,
    shipping_zip_code=01311-000,
    embosser_id=5656565656565656,
    fee=0,
    status=created,
    tags=['department: tech'],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingEmbossingRequest {
    id: '7834882116598271',
    cardId: '5715709195239424',
    kitId: '6724771005489152',
    displayName1: 'TONY STARK',
    displayName2: null,
    displayName3: null,
    shippingCity: 'Sao Paulo',
    shippingCountryCode: 'BRA',
    shippingDistrict: 'Bela Vista',
    shippingPhone: '+5511999999999',
    shippingService: 'loggi',
    shippingStateCode: 'SP',
    shippingStreetLine1: 'Av. Paulista, 1000',
    shippingStreetLine2: 'Apto 101',
    shippingTrackingNumber: 'BR1234567890',
    shippingZipCode: '01311-000',
    embosserId: '5656565656565656',
    fee: 0,
    status: 'created',
    tags: [ 'department: tech' ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingEmbossingRequest Object
(
    [id] => 7834882116598271
    [fee] => 0
    [cardId] => 5715709195239424
    [embosserId] => 5656565656565656
    [kitId] => 6724771005489152
    [displayName1] => TONY STARK
    [displayName2] =>
    [displayName3] =>
    [shippingCity] => Sao Paulo
    [shippingCountryCode] => BRA
    [shippingDistrict] => Bela Vista
    [shippingPhone] => +5511999999999
    [shippingService] => loggi
    [shippingStateCode] => SP
    [shippingStreetLine1] => Av. Paulista, 1000
    [shippingStreetLine2] => Apto 101
    [shippingTrackingNumber] => BR1234567890
    [shippingZipCode] => 01311-000
    [status] => created
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingEmbossingRequest({
    "id": "7834882116598271",
    "fee": 0,
    "cardId": "5715709195239424",
    "embosserId": "5656565656565656",
    "kitId": "6724771005489152",
    "displayName1": "TONY STARK",
    "displayName2": null,
    "displayName3": null,
    "shippingCity": "Sao Paulo",
    "shippingCountryCode": "BRA",
    "shippingDistrict": "Bela Vista",
    "shippingPhone": "+5511999999999",
    "shippingService": "loggi",
    "shippingStateCode": "SP",
    "shippingStreetLine1": "Av. Paulista, 1000",
    "shippingStreetLine2": "Apto 101",
    "shippingTrackingNumber": "BR1234567890",
    "shippingZipCode": "01311-000",
    "status": "created",
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingembossingrequest(
    id: 7834882116598271,
    card_id: 5715709195239424,
    kit_id: 6724771005489152,
    display_name_1: TONY STARK,
    display_name_2: nil,
    display_name_3: nil,
    shipping_city: Sao Paulo,
    shipping_country_code: BRA,
    shipping_district: Bela Vista,
    shipping_phone: +5511999999999,
    shipping_service: loggi,
    shipping_state_code: SP,
    shipping_street_line_1: Av. Paulista, 1000,
    shipping_street_line_2: Apto 101,
    shipping_tracking_number: BR1234567890,
    shipping_zip_code: 01311-000,
    embosser_id: 5656565656565656,
    fee: 0,
    status: created,
    tags: ["department: tech"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingEmbossingRequest{
    id: "7834882116598271",
    fee: 0,
    card_id: "5715709195239424",
    embosser_id: "5656565656565656",
    kit_id: "6724771005489152",
    display_name_1: "TONY STARK",
    display_name_2: nil,
    display_name_3: nil,
    shipping_city: "Sao Paulo",
    shipping_country_code: "BRA",
    shipping_district: "Bela Vista",
    shipping_phone: "+5511999999999",
    shipping_service: "loggi",
    shipping_state_code: "SP",
    shipping_street_line_1: "Av. Paulista, 1000",
    shipping_street_line_2: "Apto 101",
    shipping_tracking_number: "BR1234567890",
    shipping_zip_code: "01311-000",
    status: "created",
    tags: ["department: tech"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingEmbossingRequest(
    Id: 7834882116598271,
    Fee: 0,
    CardId: 5715709195239424,
    EmbosserId: 5656565656565656,
    KitId: 6724771005489152,
    DisplayName1: TONY STARK,
    DisplayName2: ,
    DisplayName3: ,
    ShippingCity: Sao Paulo,
    ShippingCountryCode: BRA,
    ShippingDistrict: Bela Vista,
    ShippingPhone: +5511999999999,
    ShippingService: loggi,
    ShippingStateCode: SP,
    ShippingStreetLine1: Av. Paulista, 1000,
    ShippingStreetLine2: Apto 101,
    ShippingTrackingNumber: BR1234567890,
    ShippingZipCode: 01311-000,
    Status: created,
    Tags: [department: tech],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    CardId:5715709195239424
    KitId:6724771005489152
    DisplayName1:TONY STARK
    DisplayName2:
    DisplayName3:
    ShippingCity:Sao Paulo
    ShippingCountryCode:BRA
    ShippingDistrict:Bela Vista
    ShippingStateCode:SP
    ShippingStreetLine1:Av. Paulista, 1000
    ShippingStreetLine2:Apto 101
    ShippingService:loggi
    ShippingTrackingNumber:BR1234567890
    ShippingZipCode:01311-000
    EmbosserId:5656565656565656
    ShippingPhone:+5511999999999
    Tags:[department: tech]
    Id:7834882116598271
    Fee:0
    Status:created
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "request": {
        "id": "7834882116598271",
        "fee": 0,
        "cardId": "5715709195239424",
        "embosserId": "5656565656565656",
        "kitId": "6724771005489152",
        "displayName1": "TONY STARK",
        "displayName2": null,
        "displayName3": null,
        "shippingCity": "Sao Paulo",
        "shippingCountryCode": "BRA",
        "shippingDistrict": "Bela Vista",
        "shippingPhone": "+5511999999999",
        "shippingService": "loggi",
        "shippingStateCode": "SP",
        "shippingStreetLine1": "Av. Paulista, 1000",
        "shippingStreetLine2": "Apto 101",
        "shippingTrackingNumber": "BR1234567890",
        "shippingZipCode": "01311-000",
        "status": "created",
        "tags": ["department: tech"],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

List Issuing Embossing Request Logs

Get a paged list of issuing embossing request logs.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

types OPTIONAL

Filter logs by log types.

requestIds OPTIONAL

Array of embossing request ids to filter logs.

ids OPTIONAL

List of strings to get specific entities by ids.

ENDPOINT
GET /v2/issuing-embossing-request/log
REQUEST

Python

import starkinfra

logs = starkinfra.issuingembossingrequest.log.query(
    limit=10,
    types=["sent"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let logs = await starkinfra.issuingEmbossingRequest.log.query({
        limit: 10,
        types: ['sent']
    });

    for await (let log of logs) {
        console.log(log);
    }
})();
  

PHP

$logs = StarkInfra\IssuingEmbossingRequest\Log::query([
    "limit" => 10,
    "types" => ["sent"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("types", new String[]{"sent"});

Generator logs = IssuingEmbossingRequest.Log.query(params);

for (IssuingEmbossingRequest.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::IssuingEmbossingRequest::Log.query(
    limit: 10,
    types: ["sent"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.IssuingEmbossingRequest.Log.query!(
    limit: 10,
    types: ["sent"]
)

logs |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable logs = StarkInfra.IssuingEmbossingRequest.Log.Query(
    limit: 10,
    types: new List { "sent" }
);

foreach (StarkInfra.IssuingEmbossingRequest.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingembossingrequest/log"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["types"] = []string{"sent"}

    logs, errorChannel := log.Query(params, nil)

    for log := range logs {
        fmt.Printf("%+v", log)
    }
    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-embossing-request/log?limit=10&types=sent' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=8945993227707382,
    type=sent,
    request=IssuingEmbossingRequest(id=7834882116598271, status=processing),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '8945993227707382',
    type: 'sent',
    request: IssuingEmbossingRequest { id: '7834882116598271', status: 'processing' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingEmbossingRequest\Log Object
(
    [id] => 8945993227707382
    [type] => sent
    [request] => StarkInfra\IssuingEmbossingRequest Object ( [id] => 7834882116598271 [status] => processing )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingEmbossingRequest.Log({
    "id": "8945993227707382",
    "type": "sent",
    "request": {"id": "7834882116598271", "status": "processing"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 8945993227707382,
    type: sent,
    request: issuingembossingrequest(id: 7834882116598271, status: processing),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingEmbossingRequest.Log{
    id: "8945993227707382",
    type: "sent",
    request: %StarkInfra.IssuingEmbossingRequest{id: "7834882116598271", status: "processing"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingEmbossingRequest.Log(
    Id: 8945993227707382,
    Type: sent,
    Request: IssuingEmbossingRequest(Id: 7834882116598271, Status: processing),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:8945993227707382
    Type:sent
    Request:{Id:7834882116598271 Status:processing}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "8945993227707382",
            "type": "sent",
            "request": {"id": "7834882116598271", "status": "processing"},
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Embossing Request Log

Get a single issuing embossing request log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/issuing-embossing-request/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.issuingembossingrequest.log.get("8945993227707382")

print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let log = await starkinfra.issuingEmbossingRequest.log.get('8945993227707382');
    console.log(log);
})();
  

PHP

$log = StarkInfra\IssuingEmbossingRequest\Log::get("8945993227707382");

print_r($log);
  

Java

import com.starkinfra.*;

IssuingEmbossingRequest.Log log = IssuingEmbossingRequest.Log.get("8945993227707382");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::IssuingEmbossingRequest::Log.get("8945993227707382")

puts log
  

Elixir

log = StarkInfra.IssuingEmbossingRequest.Log.get!("8945993227707382")

IO.inspect(log)
  

C#

using System;

StarkInfra.IssuingEmbossingRequest.Log log = StarkInfra.IssuingEmbossingRequest.Log.Get("8945993227707382");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingembossingrequest/log"
)

func main() {

    requestLog, err := log.Get("8945993227707382", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", requestLog)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-embossing-request/log/8945993227707382' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=8945993227707382,
    type=sent,
    request=IssuingEmbossingRequest(id=7834882116598271, status=processing),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '8945993227707382',
    type: 'sent',
    request: IssuingEmbossingRequest { id: '7834882116598271', status: 'processing' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingEmbossingRequest\Log Object
(
    [id] => 8945993227707382
    [type] => sent
    [request] => StarkInfra\IssuingEmbossingRequest Object ( [id] => 7834882116598271 [status] => processing )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingEmbossingRequest.Log({
    "id": "8945993227707382",
    "type": "sent",
    "request": {"id": "7834882116598271", "status": "processing"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 8945993227707382,
    type: sent,
    request: issuingembossingrequest(id: 7834882116598271, status: processing),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingEmbossingRequest.Log{
    id: "8945993227707382",
    type: "sent",
    request: %StarkInfra.IssuingEmbossingRequest{id: "7834882116598271", status: "processing"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingEmbossingRequest.Log(
    Id: 8945993227707382,
    Type: sent,
    Request: IssuingEmbossingRequest(Id: 7834882116598271, Status: processing),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:8945993227707382
    Type:sent
    Request:{Id:7834882116598271 Status:processing}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "log": {
        "id": "8945993227707382",
        "type": "sent",
        "request": {"id": "7834882116598271", "status": "processing"},
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Issuing Token

The Issuing Token resource represents a tokenized version of a card stored in a digital wallet.

Tokens allow cardholders to make purchases using digital wallets without exposing the actual card number.

You can manage token status and monitor token activity through the log endpoints.

The Issuing Token object

Attributes

id STRING

Unique identifier for the issuing token.

cardId STRING

Id of the IssuingCard this token is associated with.

walletId STRING

Id of the digital wallet where the token is stored.

walletName STRING

Name of the digital wallet. Example: "Apple Pay", "Google Pay".

merchantId STRING

Id of the merchant if the token is merchant-specific.

externalId STRING

Unique external identifier of the token.

walletDeviceScore FLOAT

Device score informed by the digital wallet.

walletAccountScore FLOAT

Account score informed by the digital wallet.

status STRING

Current token status. Options: "active", "blocked", "canceled", "frozen", "pending", "denied".

tags LIST OF STRINGS

Tags associated with the token.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

List Issuing Tokens

Get a list of issuing tokens in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

status OPTIONAL

Filter tokens by the specified status.

cardIds OPTIONAL

Filter tokens by card ids.

externalIds OPTIONAL

Filter tokens by external ids.

tags OPTIONAL

Filter entities that contain the specified tags.

ids OPTIONAL

List of strings to get specific entities by ids.

ENDPOINT
GET /v2/issuing-token
REQUEST

Python

import starkinfra

tokens = starkinfra.issuingtoken.query(
    limit=10,
    status="active"
)

for token in tokens:
    print(token)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let tokens = await starkinfra.issuingToken.query({
        limit: 10,
        status: 'active'
    });

    for await (let token of tokens) {
        console.log(token);
    }
})();
  

PHP

$tokens = StarkInfra\IssuingToken::query([
    "limit" => 10,
    "status" => "active"
]);

foreach ($tokens as $token) {
    print_r($token);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("status", "active");

Generator tokens = IssuingToken.query(params);

for (IssuingToken token : tokens) {
    System.out.println(token);
}
  

Ruby

require('starkinfra')

tokens = StarkInfra::IssuingToken.query(
    limit: 10,
    status: "active"
)

tokens.each do |token|
    puts token
end
  

Elixir

tokens = StarkInfra.IssuingToken.query!(
    limit: 10,
    status: "active"
)

tokens |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable tokens = StarkInfra.IssuingToken.Query(
    limit: 10,
    status: "active"
);

foreach (StarkInfra.IssuingToken token in tokens) {
    Console.WriteLine(token);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtoken"
)

func main() {

    tokens := issuingtoken.Query(
        &issuingtoken.Query{
            Limit:  10,
            Status: "active",
        },
        nil,
    )

    for token := range tokens {
        fmt.Printf("%+v", token)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-token?limit=10&status=active' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingToken(
    id=5715709195239424,
    card_id=6724771005489152,
    wallet_id=apple,
    wallet_name=Apple Pay,
    merchant_id=5656565656565656,
    external_id=DNITHE301234567890123456789012345678,
    wallet_device_score=None,
    wallet_account_score=None,
    status=active,
    tags=['department: tech'],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingToken {
    id: '5715709195239424',
    cardId: '6724771005489152',
    walletId: 'apple',
    walletName: 'Apple Pay',
    merchantId: '5656565656565656',
    externalId: 'DNITHE301234567890123456789012345678',
    walletDeviceScore: null,
    walletAccountScore: null,
    status: 'active',
    tags: [ 'department: tech' ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingToken Object
(
    [id] => 5715709195239424
    [status] => active
    [cardId] => 6724771005489152
    [walletId] => apple
    [walletName] => Apple Pay
    [merchantId] => 5656565656565656
    [externalId] => DNITHE301234567890123456789012345678
    [walletDeviceScore] =>
    [walletAccountScore] =>
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingToken({
    "id": "5715709195239424",
    "cardId": "6724771005489152",
    "walletId": "apple",
    "walletName": "Apple Pay",
    "merchantId": "5656565656565656",
    "externalId": "DNITHE301234567890123456789012345678",
    "walletDeviceScore": null,
    "walletAccountScore": null,
    "status": "active",
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingtoken(
    id: 5715709195239424,
    status: active,
    card_id: 6724771005489152,
    wallet_id: apple,
    wallet_name: Apple Pay,
    merchant_id: 5656565656565656,
    external_id: DNITHE301234567890123456789012345678,
    wallet_device_score: nil,
    wallet_account_score: nil,
    tags: ["department: tech"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingToken{
    id: "5715709195239424",
    card_id: "6724771005489152",
    wallet_id: "apple-pay-wallet-id",
    wallet_name: "Apple Pay",
    merchant_id: "5656565656565656",
    external_id: "DNITHE301234567890123456789012345678",
    wallet_device_score: nil,
    wallet_account_score: nil,
    status: "active",
    tags: ["department: tech"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingToken(
    Id: 5715709195239424,
    CardId: 6724771005489152,
    WalletId: apple-pay-wallet-id,
    WalletName: Apple Pay,
    MerchantId: 5656565656565656,
    ExternalId: DNITHE301234567890123456789012345678,
    WalletDeviceScore: ,
    WalletAccountScore: ,
    Status: active,
    Tags: [department: tech],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    CardId:6724771005489152
    WalletId:apple-pay-wallet-id
    WalletName:Apple Pay
    MerchantId:5656565656565656
    ExternalId:DNITHE301234567890123456789012345678
    WalletDeviceScore:
    WalletAccountScore:
    Status:active
    Tags:[department: tech]
    Created:2022-01-01 00:00:00 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "tokens": [
        {
            "id": "5715709195239424",
            "status": "active",
            "cardId": "6724771005489152",
            "walletId": "apple",
            "walletName": "Apple Pay",
            "merchantId": "5656565656565656",
            "externalId": "DNITHE301234567890123456789012345678",
            "walletDeviceScore": null,
            "walletAccountScore": null,
            "tags": ["department: tech"],
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Token

Get a single issuing token by its id.

Parameters

id REQUIRED

Id of the issuing token entity.

ENDPOINT
GET /v2/issuing-token/:id
REQUEST

Python

import starkinfra

token = starkinfra.issuingtoken.get("5715709195239424")

print(token)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let token = await starkinfra.issuingToken.get('5715709195239424');
    console.log(token);
})();
  

PHP

$token = StarkInfra\IssuingToken::get("5715709195239424");

print_r($token);
  

Java

import com.starkinfra.*;

IssuingToken token = IssuingToken.get("5715709195239424");

System.out.println(token);
  

Ruby

require('starkinfra')

token = StarkInfra::IssuingToken.get("5715709195239424")

puts token
  

Elixir

token = StarkInfra.IssuingToken.get!("5715709195239424")

IO.inspect(token)
  

C#

using System;

StarkInfra.IssuingToken token = StarkInfra.IssuingToken.Get("5715709195239424");

Console.WriteLine(token);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtoken"
)

func main() {

    token, err := issuingtoken.Get("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", token)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-token/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingToken(
    id=5715709195239424,
    card_id=6724771005489152,
    wallet_id=apple,
    wallet_name=Apple Pay,
    merchant_id=5656565656565656,
    external_id=DNITHE301234567890123456789012345678,
    wallet_device_score=None,
    wallet_account_score=None,
    status=active,
    tags=['department: tech'],
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingToken {
    id: '5715709195239424',
    cardId: '6724771005489152',
    walletId: 'apple',
    walletName: 'Apple Pay',
    merchantId: '5656565656565656',
    externalId: 'DNITHE301234567890123456789012345678',
    walletDeviceScore: null,
    walletAccountScore: null,
    status: 'active',
    tags: [ 'department: tech' ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingToken Object
(
    [id] => 5715709195239424
    [status] => active
    [cardId] => 6724771005489152
    [walletId] => apple
    [walletName] => Apple Pay
    [merchantId] => 5656565656565656
    [externalId] => DNITHE301234567890123456789012345678
    [walletDeviceScore] =>
    [walletAccountScore] =>
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingToken({
    "id": "5715709195239424",
    "cardId": "6724771005489152",
    "walletId": "apple",
    "walletName": "Apple Pay",
    "merchantId": "5656565656565656",
    "externalId": "DNITHE301234567890123456789012345678",
    "walletDeviceScore": null,
    "walletAccountScore": null,
    "status": "active",
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingtoken(
    id: 5715709195239424,
    status: active,
    card_id: 6724771005489152,
    wallet_id: apple,
    wallet_name: Apple Pay,
    merchant_id: 5656565656565656,
    external_id: DNITHE301234567890123456789012345678,
    wallet_device_score: nil,
    wallet_account_score: nil,
    tags: ["department: tech"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingToken{
    id: "5715709195239424",
    card_id: "6724771005489152",
    wallet_id: "apple-pay-wallet-id",
    wallet_name: "Apple Pay",
    merchant_id: "5656565656565656",
    external_id: "DNITHE301234567890123456789012345678",
    wallet_device_score: nil,
    wallet_account_score: nil,
    status: "active",
    tags: ["department: tech"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingToken(
    Id: 5715709195239424,
    CardId: 6724771005489152,
    WalletId: apple-pay-wallet-id,
    WalletName: Apple Pay,
    MerchantId: 5656565656565656,
    ExternalId: DNITHE301234567890123456789012345678,
    WalletDeviceScore: ,
    WalletAccountScore: ,
    Status: active,
    Tags: [department: tech],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    CardId:6724771005489152
    WalletId:apple-pay-wallet-id
    WalletName:Apple Pay
    MerchantId:5656565656565656
    ExternalId:DNITHE301234567890123456789012345678
    WalletDeviceScore:
    WalletAccountScore:
    Status:active
    Tags:[department: tech]
    Created:2022-01-01 00:00:00 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "token": {
        "id": "5715709195239424",
        "status": "active",
        "cardId": "6724771005489152",
        "walletId": "apple",
        "walletName": "Apple Pay",
        "merchantId": "5656565656565656",
        "externalId": "DNITHE301234567890123456789012345678",
        "walletDeviceScore": null,
        "walletAccountScore": null,
        "tags": ["department: tech"],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Update an Issuing Token

Update the status or tags of an existing issuing token.

Parameters

id REQUIRED

Id of the issuing token entity.

status OPTIONAL

Status to update the token to. Options: "active", "blocked".

tags OPTIONAL

New array of strings to tag the token.

ENDPOINT
PATCH /v2/issuing-token/:id
REQUEST

Python

import starkinfra

token = starkinfra.issuingtoken.update(
    "5715709195239424",
    status="blocked",
    tags=["blocked-reason: lost"]
)

print(token)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let token = await starkinfra.issuingToken.update('5715709195239424', {
        status: 'blocked',
        tags: ['blocked-reason: lost']
    });
    console.log(token);
})();
  

PHP

$token = StarkInfra\IssuingToken::update("5715709195239424", [
    "status" => "blocked",
    "tags" => ["blocked-reason: lost"]
]);

print_r($token);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap patchData = new HashMap<>();
patchData.put("status", "blocked");
patchData.put("tags", new String[]{"blocked-reason: lost"});

IssuingToken token = IssuingToken.update("5715709195239424", patchData);

System.out.println(token);
  

Ruby

require('starkinfra')

token = StarkInfra::IssuingToken.update(
    "5715709195239424",
    status: "blocked",
    tags: ["blocked-reason: lost"]
)

puts token
  

Elixir

token = StarkInfra.IssuingToken.update!(
    "5715709195239424",
    status: "blocked",
    tags: ["blocked-reason: lost"]
)

IO.inspect(token)
  

C#

using System;
using System.Collections.Generic;

StarkInfra.IssuingToken token = StarkInfra.IssuingToken.Update(
    "5715709195239424",
    status: "blocked",
    tags: new List { "blocked-reason: lost" }
);

Console.WriteLine(token);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtoken"
)

func main() {

    token, err := issuingtoken.Update(
        "5715709195239424",
        map[string]interface{}{
            "status": "blocked",
            "tags":   []string{"blocked-reason: lost"},
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", token)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/issuing-token/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "status": "blocked",
    "tags": ["blocked-reason: lost"]
}'
  
RESPONSE

Python

IssuingToken(
    id=5715709195239424,
    card_id=6724771005489152,
    wallet_id=apple,
    wallet_name=Apple Pay,
    merchant_id=5656565656565656,
    external_id=DNITHE301234567890123456789012345678,
    wallet_device_score=None,
    wallet_account_score=None,
    status=blocked,
    tags=['department: tech'],
    created=2022-01-01 00:00:00,
    updated=2022-06-01 00:00:00
)
  
  

Javascript

IssuingToken {
    id: '5715709195239424',
    cardId: '6724771005489152',
    walletId: 'apple',
    walletName: 'Apple Pay',
    merchantId: '5656565656565656',
    externalId: 'DNITHE301234567890123456789012345678',
    walletDeviceScore: null,
    walletAccountScore: null,
    status: 'blocked',
    tags: [ 'department: tech' ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingToken Object
(
    [id] => 5715709195239424
    [status] => blocked
    [cardId] => 6724771005489152
    [walletId] => apple
    [walletName] => Apple Pay
    [merchantId] => 5656565656565656
    [externalId] => DNITHE301234567890123456789012345678
    [walletDeviceScore] =>
    [walletAccountScore] =>
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-06-01 00:00:00.000000 )
)
  
  

Java

IssuingToken({
    "id": "5715709195239424",
    "cardId": "6724771005489152",
    "walletId": "apple",
    "walletName": "Apple Pay",
    "merchantId": "5656565656565656",
    "externalId": "DNITHE301234567890123456789012345678",
    "walletDeviceScore": null,
    "walletAccountScore": null,
    "status": "blocked",
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingtoken(
    id: 5715709195239424,
    status: blocked,
    card_id: 6724771005489152,
    wallet_id: apple,
    wallet_name: Apple Pay,
    merchant_id: 5656565656565656,
    external_id: DNITHE301234567890123456789012345678,
    wallet_device_score: nil,
    wallet_account_score: nil,
    tags: ["department: tech"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-06-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingToken{
    id: "5715709195239424",
    card_id: "6724771005489152",
    wallet_id: "apple-pay-wallet-id",
    wallet_name: "Apple Pay",
    merchant_id: "5656565656565656",
    external_id: "DNITHE301234567890123456789012345678",
    wallet_device_score: nil,
    wallet_account_score: nil,
    status: "blocked",
    tags: ["blocked-reason: lost"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingToken(
    Id: 5715709195239424,
    CardId: 6724771005489152,
    WalletId: apple-pay-wallet-id,
    WalletName: Apple Pay,
    MerchantId: 5656565656565656,
    ExternalId: DNITHE301234567890123456789012345678,
    WalletDeviceScore: ,
    WalletAccountScore: ,
    Status: blocked,
    Tags: [blocked-reason: lost],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    CardId:6724771005489152
    WalletId:apple-pay-wallet-id
    WalletName:Apple Pay
    MerchantId:5656565656565656
    ExternalId:DNITHE301234567890123456789012345678
    WalletDeviceScore:
    WalletAccountScore:
    Status:blocked
    Tags:[blocked-reason: lost]
    Created:2022-01-01 00:00:00 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "token": {
        "id": "5715709195239424",
        "status": "blocked",
        "cardId": "6724771005489152",
        "walletId": "apple",
        "walletName": "Apple Pay",
        "merchantId": "5656565656565656",
        "externalId": "DNITHE301234567890123456789012345678",
        "walletDeviceScore": null,
        "walletAccountScore": null,
        "tags": ["department: tech"],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00"
    }
}
  

Cancel an Issuing Token

Cancel an issuing token. This action is irreversible.

Parameters

id REQUIRED

Id of the issuing token entity to cancel.

ENDPOINT
DELETE /v2/issuing-token/:id
REQUEST

Python

import starkinfra

token = starkinfra.issuingtoken.cancel("5715709195239424")

print(token)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let token = await starkinfra.issuingToken.cancel('5715709195239424');
    console.log(token);
})();
  

PHP

$token = StarkInfra\IssuingToken::cancel("5715709195239424");

print_r($token);
  

Java

import com.starkinfra.*;

IssuingToken token = IssuingToken.cancel("5715709195239424");

System.out.println(token);
  

Ruby

require('starkinfra')

token = StarkInfra::IssuingToken.cancel("5715709195239424")

puts token
  

Elixir

token = StarkInfra.IssuingToken.cancel!("5715709195239424")

IO.inspect(token)
  

C#

using System;

StarkInfra.IssuingToken token = StarkInfra.IssuingToken.Cancel("5715709195239424");

Console.WriteLine(token);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtoken"
)

func main() {

    token, err := issuingtoken.Cancel("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", token)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request DELETE '{{baseUrl}}/v2/issuing-token/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingToken(
    id=5715709195239424,
    card_id=6724771005489152,
    wallet_id=apple,
    wallet_name=Apple Pay,
    merchant_id=5656565656565656,
    external_id=DNITHE301234567890123456789012345678,
    wallet_device_score=None,
    wallet_account_score=None,
    status=canceled,
    tags=['department: tech'],
    created=2022-01-01 00:00:00,
    updated=2022-06-01 00:00:00
)
  
  

Javascript

IssuingToken {
    id: '5715709195239424',
    cardId: '6724771005489152',
    walletId: 'apple',
    walletName: 'Apple Pay',
    merchantId: '5656565656565656',
    externalId: 'DNITHE301234567890123456789012345678',
    walletDeviceScore: null,
    walletAccountScore: null,
    status: 'canceled',
    tags: [ 'department: tech' ],
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingToken Object
(
    [id] => 5715709195239424
    [status] => canceled
    [cardId] => 6724771005489152
    [walletId] => apple
    [walletName] => Apple Pay
    [merchantId] => 5656565656565656
    [externalId] => DNITHE301234567890123456789012345678
    [walletDeviceScore] =>
    [walletAccountScore] =>
    [tags] => Array ( [0] => department: tech )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-06-01 00:00:00.000000 )
)
  
  

Java

IssuingToken({
    "id": "5715709195239424",
    "cardId": "6724771005489152",
    "walletId": "apple",
    "walletName": "Apple Pay",
    "merchantId": "5656565656565656",
    "externalId": "DNITHE301234567890123456789012345678",
    "walletDeviceScore": null,
    "walletAccountScore": null,
    "status": "canceled",
    "tags": ["department: tech"],
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingtoken(
    id: 5715709195239424,
    status: canceled,
    card_id: 6724771005489152,
    wallet_id: apple,
    wallet_name: Apple Pay,
    merchant_id: 5656565656565656,
    external_id: DNITHE301234567890123456789012345678,
    wallet_device_score: nil,
    wallet_account_score: nil,
    tags: ["department: tech"],
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-06-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingToken{
    id: "5715709195239424",
    card_id: "6724771005489152",
    wallet_id: "apple-pay-wallet-id",
    wallet_name: "Apple Pay",
    merchant_id: "5656565656565656",
    external_id: "DNITHE301234567890123456789012345678",
    wallet_device_score: nil,
    wallet_account_score: nil,
    status: "canceled",
    tags: ["department: tech"],
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingToken(
    Id: 5715709195239424,
    CardId: 6724771005489152,
    WalletId: apple-pay-wallet-id,
    WalletName: Apple Pay,
    MerchantId: 5656565656565656,
    ExternalId: DNITHE301234567890123456789012345678,
    WalletDeviceScore: ,
    WalletAccountScore: ,
    Status: canceled,
    Tags: [department: tech],
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    CardId:6724771005489152
    WalletId:apple-pay-wallet-id
    WalletName:Apple Pay
    MerchantId:5656565656565656
    ExternalId:DNITHE301234567890123456789012345678
    WalletDeviceScore:
    WalletAccountScore:
    Status:canceled
    Tags:[department: tech]
    Created:2022-01-01 00:00:00 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "token": {
        "id": "5715709195239424",
        "status": "canceled",
        "cardId": "6724771005489152",
        "walletId": "apple",
        "walletName": "Apple Pay",
        "merchantId": "5656565656565656",
        "externalId": "DNITHE301234567890123456789012345678",
        "walletDeviceScore": null,
        "walletAccountScore": null,
        "tags": ["department: tech"],
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00"
    }
}
  

List Issuing Token Logs

Get a paged list of issuing token logs.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

types OPTIONAL

Filter logs by log types.

tokenIds OPTIONAL

Array of token ids to filter logs.

tokenTags OPTIONAL

Filter logs by the tags of their tokens.

ENDPOINT
GET /v2/issuing-token/log
REQUEST

Python

import starkinfra

logs = starkinfra.issuingtoken.log.query(
    limit=10,
    types=["created"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let logs = await starkinfra.issuingToken.log.query({
        limit: 10,
        types: ['created']
    });

    for await (let log of logs) {
        console.log(log);
    }
})();
  

PHP

$logs = StarkInfra\IssuingToken\Log::query([
    "limit" => 10,
    "types" => ["created"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("types", new String[]{"created"});

Generator logs = IssuingToken.Log.query(params);

for (IssuingToken.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::IssuingToken::Log.query(
    limit: 10,
    types: ["created"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.IssuingToken.Log.query!(
    limit: 10,
    types: ["created"]
)

logs |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable logs = StarkInfra.IssuingToken.Log.Query(
    limit: 10,
    types: new List { "created" }
);

foreach (StarkInfra.IssuingToken.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtoken/log"
)

func main() {

    logs := log.Query(
        &log.Query{
            Limit: 10,
            Types: []string{"created"},
        },
        nil,
    )

    for log := range logs {
        fmt.Printf("%+v", log)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-token/log?limit=10&types=created' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6724771005489152,
    type=created,
    errors=[],
    token=IssuingToken(id=5715709195239424, status=active),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '6724771005489152',
    type: 'created',
    errors: [],
    token: IssuingToken { id: '5715709195239424', status: 'active' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingToken\Log Object
(
    [id] => 6724771005489152
    [type] => created
    [errors] => Array ( )
    [token] => StarkInfra\IssuingToken Object ( [id] => 5715709195239424 [status] => active )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingToken.Log({
    "id": "6724771005489152",
    "type": "created",
    "errors": [],
    "token": {"id": "5715709195239424", "status": "active"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 6724771005489152,
    type: created,
    errors: [],
    token: issuingtoken(id: 5715709195239424, status: active),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingToken.Log{
    id: "6724771005489152",
    type: "created",
    errors: [],
    token: %StarkInfra.IssuingToken{id: "5715709195239424", status: "active"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingToken.Log(
    Id: 6724771005489152,
    Type: created,
    Errors: [],
    Token: IssuingToken(Id: 5715709195239424, Status: active),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:6724771005489152
    Type:created
    Errors:[]
    Token:{Id:5715709195239424 Status:active}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6724771005489152",
            "type": "created",
            "errors": [],
            "token": {"id": "5715709195239424", "status": "active"},
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Token Log

Get a single issuing token log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/issuing-token/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.issuingtoken.log.get("6724771005489152")

print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let log = await starkinfra.issuingToken.log.get('6724771005489152');
    console.log(log);
})();
  

PHP

$log = StarkInfra\IssuingToken\Log::get("6724771005489152");

print_r($log);
  

Java

import com.starkinfra.*;

IssuingToken.Log log = IssuingToken.Log.get("6724771005489152");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::IssuingToken::Log.get("6724771005489152")

puts log
  

Elixir

log = StarkInfra.IssuingToken.Log.get!("6724771005489152")

IO.inspect(log)
  

C#

using System;

StarkInfra.IssuingToken.Log log = StarkInfra.IssuingToken.Log.Get("6724771005489152");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtoken/log"
)

func main() {

    tokenLog, err := log.Get("6724771005489152", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", tokenLog)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-token/log/6724771005489152' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6724771005489152,
    type=created,
    errors=[],
    token=IssuingToken(id=5715709195239424, status=active),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '6724771005489152',
    type: 'created',
    errors: [],
    token: IssuingToken { id: '5715709195239424', status: 'active' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingToken\Log Object
(
    [id] => 6724771005489152
    [type] => created
    [errors] => Array ( )
    [token] => StarkInfra\IssuingToken Object ( [id] => 5715709195239424 [status] => active )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingToken.Log({
    "id": "6724771005489152",
    "type": "created",
    "errors": [],
    "token": {"id": "5715709195239424", "status": "active"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 6724771005489152,
    type: created,
    errors: [],
    token: issuingtoken(id: 5715709195239424, status: active),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingToken.Log{
    id: "6724771005489152",
    type: "created",
    errors: [],
    token: %StarkInfra.IssuingToken{id: "5715709195239424", status: "active"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingToken.Log(
    Id: 6724771005489152,
    Type: created,
    Errors: [],
    Token: IssuingToken(Id: 5715709195239424, Status: active),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:6724771005489152
    Type:created
    Errors:[]
    Token:{Id:5715709195239424 Status:active}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "log": {
        "id": "6724771005489152",
        "type": "created",
        "errors": [],
        "token": {"id": "5715709195239424", "status": "active"},
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Issuing Token Request

The Issuing Token Request resource is used to initiate the tokenization of a card for digital wallets.

When a cardholder attempts to add a card to a digital wallet (e.g., Apple Pay, Google Pay), a token request is generated.

Process the token request to approve or decline the card tokenization.

The Issuing Token Request object

Attributes

cardId STRING

Id of the IssuingCard to be tokenized.

walletId STRING

Id of the digital wallet requesting tokenization. Options: "apple", "google", "merchant".

methodCode STRING

Provisioning method. Options: "app", "manual".

content STRING

Processed content of the tokenization request.

signature STRING

Digital signature of the content.

metadata OBJECT

Additional data passed along with the tokenization request.

Create an Issuing Token Request

Use this route to process a tokenization request from a digital wallet provider.

Parameters

cardId REQUIRED

Id of the IssuingCard to be tokenized.

walletId REQUIRED

Id of the digital wallet making the tokenization request. Options: "apple", "google", "merchant".

methodCode REQUIRED

Provisioning method. Options: "app", "manual".

metadata OPTIONAL

Additional data to pass along with the tokenization request.

ENDPOINT
POST /v2/issuing-token-request
REQUEST

Python

import starkinfra

token_request = starkinfra.issuingtokenrequest.create(
    starkinfra.IssuingTokenRequest(
        card_id="5715709195239424",
        wallet_id="apple",
        method_code="app"
    )
)

print(token_request)
  

Javascript

const starkinfra = require('starkinfra');

await (async() => {
    let tokenRequest = await starkinfra.issuingTokenRequest.create(
        new starkinfra.IssuingTokenRequest({
            cardId: '5715709195239424',
            walletId: 'apple',
            methodCode: 'app'
        })
    );

    console.log(tokenRequest);
})();
  

PHP

$tokenRequest = StarkInfra\IssuingTokenRequest::create(
    new StarkInfra\IssuingTokenRequest([
        "cardId" => "5715709195239424",
        "walletId" => "apple",
        "methodCode" => "app"
    ])
);

print_r($tokenRequest);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap data = new HashMap<>();
data.put("cardId", "5715709195239424");
data.put("walletId", "apple");
data.put("methodCode", "app");

IssuingTokenRequest tokenRequest = IssuingTokenRequest.create(new IssuingTokenRequest(data));

System.out.println(tokenRequest);
  

Ruby

require('starkinfra')

token_request = StarkInfra::IssuingTokenRequest.create(
    StarkInfra::IssuingTokenRequest.new(
        card_id: "5715709195239424",
        wallet_id: "apple",
        method_code: "app"
    )
)

puts token_request
  

Elixir

token_request = StarkInfra.IssuingTokenRequest.create!(
    %StarkInfra.IssuingTokenRequest{
        card_id: "5715709195239424",
        wallet_id: "apple",
        method_code: "app"
    }
)

IO.inspect(token_request)
  

C#

using System;

StarkInfra.IssuingTokenRequest tokenRequest = StarkInfra.IssuingTokenRequest.Create(
    new StarkInfra.IssuingTokenRequest(
        cardId: "5715709195239424",
        walletId: "apple",
        methodCode: "app"
    )
);

Console.WriteLine(tokenRequest);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtokenrequest"
)

func main() {

    tokenRequest, err := issuingtokenrequest.Create(
        issuingtokenrequest.IssuingTokenRequest{
            CardId:     "5715709195239424",
            WalletId:   "apple",
            MethodCode: "app",
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", tokenRequest)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request POST '{{baseUrl}}/v2/issuing-token-request' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "cardId": "5715709195239424",
    "walletId": "apple",
    "methodCode": "app"
}'
  
RESPONSE

Python

IssuingTokenRequest(
    card_id=5715709195239424,
    wallet_id=apple,
    method_code=app,
    content=eyJhcHBsaWNhdGlvbklkIjoiY29tLmFwcGxl...,
    signature=MEUCIQDp3GTGqsqDeKLN9aLhxAZ...,
    metadata={}
)
  

Javascript

IssuingTokenRequest {
    cardId: '5715709195239424',
    walletId: 'apple',
    methodCode: 'app',
    content: 'eyJhcHBsaWNhdGlvbklkIjoiY29tLmFwcGxl...',
    signature: 'MEUCIQDp3GTGqsqDeKLN9aLhxAZ...',
    metadata: {}
}
  

PHP

StarkInfra\IssuingTokenRequest Object
(
    [cardId] => 5715709195239424
    [walletId] => apple
    [methodCode] => app
    [content] => eyJhcHBsaWNhdGlvbklkIjoiY29tLmFwcGxl...
    [signature] => MEUCIQDp3GTGqsqDeKLN9aLhxAZ...
    [metadata] => Array ( )
)
  

Java

IssuingTokenRequest({
    "cardId": "5715709195239424",
    "walletId": "apple",
    "methodCode": "app",
    "content": "eyJhcHBsaWNhdGlvbklkIjoiY29tLmFwcGxl...",
    "signature": "MEUCIQDp3GTGqsqDeKLN9aLhxAZ...",
    "metadata": {}
})
  

Ruby

issuingtokenrequest(
    card_id: 5715709195239424,
    wallet_id: apple,
    method_code: app,
    content: eyJhcHBsaWNhdGlvbklkIjoiY29tLmFwcGxl...,
    signature: MEUCIQDp3GTGqsqDeKLN9aLhxAZ...,
    metadata: {}
)
  
  

Elixir

%StarkInfra.IssuingTokenRequest{
    card_id: "5715709195239424",
    wallet_id: "apple",
    method_code: "app",
    content: "eyJhcHBsaWNhdGlvbklkIjoiY29tLmFwcGxl...",
    signature: "MEUCIQDp3GTGqsqDeKLN9aLhxAZ...",
    metadata: %{}
}
  
  

C#

IssuingTokenRequest(
    CardId: 5715709195239424,
    WalletId: apple,
    MethodCode: app,
    Content: eyJhcHBsaWNhdGlvbklkIjoiY29tLmFwcGxl...,
    Signature: MEUCIQDp3GTGqsqDeKLN9aLhxAZ...,
    Metadata: {}
)
  

Go

{
    CardId:5715709195239424
    WalletId:apple
    MethodCode:app
    Content:eyJhcHBsaWNhdGlvbklkIjoiY29tLmFwcGxl...
    Signature:MEUCIQDp3GTGqsqDeKLN9aLhxAZ...
    Metadata:map[]
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "request": {
        "cardId": "5715709195239424",
        "walletId": "apple",
        "methodCode": "app",
        "content": "eyJhcHBsaWNhdGlvbklkIjoiY29tLmFwcGxl...",
        "signature": "MEUCIQDp3GTGqsqDeKLN9aLhxAZ...",
        "metadata": {}
    }
}
  

Issuing Token Design

The Issuing Token Design resource represents the visual design used to display a tokenized card in a digital wallet.

Designs include the card artwork shown in the wallet app.

You can retrieve available token designs and download their PDF files.

The Issuing Token Design object

Attributes

id STRING

Unique identifier for the issuing token design.

name STRING

Name of the token design.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

List Issuing Token Designs

Get a list of available issuing token designs for your workspace.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

ids OPTIONAL

List of strings to get specific entities by ids.

ENDPOINT
GET /v2/issuing-token-design
REQUEST

Python

import starkinfra

designs = starkinfra.issuingtokendesign.query(limit=10)

for design in designs:
    print(design)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let designs = await starkinfra.issuingTokenDesign.query({ limit: 10 });

    for await (let design of designs) {
        console.log(design);
    }
})();
  

PHP

$designs = StarkInfra\IssuingTokenDesign::query(["limit" => 10]);

foreach ($designs as $design) {
    print_r($design);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);

Generator designs = IssuingTokenDesign.query(params);

for (IssuingTokenDesign design : designs) {
    System.out.println(design);
}
  

Ruby

require('starkinfra')

designs = StarkInfra::IssuingTokenDesign.query(limit: 10)

designs.each do |design|
    puts design
end
  

Elixir

designs = StarkInfra.IssuingTokenDesign.query!(limit: 10)

designs |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable designs = StarkInfra.IssuingTokenDesign.Query(limit: 10);

foreach (StarkInfra.IssuingTokenDesign design in designs) {
    Console.WriteLine(design);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtokendesign"
)

func main() {

    designs := issuingtokendesign.Query(
        &issuingtokendesign.Query{Limit: 10},
        nil,
    )

    for design := range designs {
        fmt.Printf("%+v", design)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-token-design?limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingTokenDesign(
    id=5715709195239424,
    name=Apple Pay Card Art,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingTokenDesign {
    id: '5715709195239424',
    name: 'Apple Pay Card Art',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingTokenDesign Object
(
    [id] => 5715709195239424
    [name] => Apple Pay Card Art
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingTokenDesign({
    "id": "5715709195239424",
    "name": "Apple Pay Card Art",
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingtokendesign(
    id: 5715709195239424,
    name: Apple Pay Card Art,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingTokenDesign{
    id: "5715709195239424",
    name: "Apple Pay Card Art",
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingTokenDesign(
    Id: 5715709195239424,
    Name: Apple Pay Card Art,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Name:Apple Pay Card Art
    Created:2022-01-01 00:00:00 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "designs": [
        {
            "id": "5715709195239424",
            "name": "Apple Pay Card Art",
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Token Design

Get a single issuing token design by its id.

Parameters

id REQUIRED

Id of the issuing token design entity.

ENDPOINT
GET /v2/issuing-token-design/:id
REQUEST

Python

import starkinfra

design = starkinfra.issuingtokendesign.get("5715709195239424")

print(design)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let design = await starkinfra.issuingTokenDesign.get('5715709195239424');
    console.log(design);
})();
  

PHP

$design = StarkInfra\IssuingTokenDesign::get("5715709195239424");

print_r($design);
  

Java

import com.starkinfra.*;

IssuingTokenDesign design = IssuingTokenDesign.get("5715709195239424");

System.out.println(design);
  

Ruby

require('starkinfra')

design = StarkInfra::IssuingTokenDesign.get("5715709195239424")

puts design
  

Elixir

design = StarkInfra.IssuingTokenDesign.get!("5715709195239424")

IO.inspect(design)
  

C#

using System;

StarkInfra.IssuingTokenDesign design = StarkInfra.IssuingTokenDesign.Get("5715709195239424");

Console.WriteLine(design);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtokendesign"
)

func main() {

    design, err := issuingtokendesign.Get("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", design)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-token-design/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingTokenDesign(
    id=5715709195239424,
    name=Apple Pay Card Art,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingTokenDesign {
    id: '5715709195239424',
    name: 'Apple Pay Card Art',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingTokenDesign Object
(
    [id] => 5715709195239424
    [name] => Apple Pay Card Art
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingTokenDesign({
    "id": "5715709195239424",
    "name": "Apple Pay Card Art",
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingtokendesign(
    id: 5715709195239424,
    name: Apple Pay Card Art,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingTokenDesign{
    id: "5715709195239424",
    name: "Apple Pay Card Art",
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingTokenDesign(
    Id: 5715709195239424,
    Name: Apple Pay Card Art,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Name:Apple Pay Card Art
    Created:2022-01-01 00:00:00 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "design": {
        "id": "5715709195239424",
        "name": "Apple Pay Card Art",
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Get an Issuing Token Design PDF

Get the PDF file for a specific issuing token design. This file is used to represent the card in digital wallets.

Parameters

id REQUIRED

Id of the issuing token design entity.

ENDPOINT
GET /v2/issuing-token-design/:id/pdf
REQUEST

Python

import starkinfra

pdf = starkinfra.issuingtokendesign.pdf("5715709195239424")

with open("token-design.pdf", "wb") as f:
    f.write(pdf)
  

Javascript

const starkinfra = require('starkinfra');
const fs = require('fs');

(async() => {
    let pdf = await starkinfra.issuingTokenDesign.pdf('5715709195239424');
    fs.writeFileSync('token-design.pdf', pdf);
})();
  

PHP

$pdf = StarkInfra\IssuingTokenDesign::pdf("5715709195239424");

file_put_contents("token-design.pdf", $pdf);
  

Java

import com.starkinfra.*;
import java.io.FileOutputStream;

byte[] pdf = IssuingTokenDesign.pdf("5715709195239424");

FileOutputStream fos = new FileOutputStream("token-design.pdf");
fos.write(pdf);
fos.close();
  

Ruby

require('starkinfra')

pdf = StarkInfra::IssuingTokenDesign.pdf("5715709195239424")

File.binwrite("token-design.pdf", pdf)
  

Elixir

pdf = StarkInfra.IssuingTokenDesign.pdf!("5715709195239424")

File.write!("token-design.pdf", pdf)
  

C#

using System.IO;

byte[] pdf = StarkInfra.IssuingTokenDesign.Pdf("5715709195239424");

File.WriteAllBytes("token-design.pdf", pdf);
  

Go

package main

import (
    "os"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtokendesign"
)

func main() {

    pdf, err := issuingtokendesign.Pdf("5715709195239424", nil)
    if err.Errors != nil {
        panic(err)
    }

    os.WriteFile("token-design.pdf", pdf, 0644)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-token-design/5715709195239424/pdf' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--output token-design.pdf
  
RESPONSE

Python

b'%PDF-1.4 ...' # Binary PDF content
  

Javascript

 // Binary PDF content
  

PHP

// Binary PDF content written to token-design.pdf
  

Java

// Binary PDF content written to token-design.pdf
  

Ruby

# Binary PDF content written to token-design.pdf
  

Elixir

# Binary PDF content written to token-design.pdf
  

C#

// Binary PDF content written to token-design.pdf
  

Go

// Binary PDF content written to token-design.pdf
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

// Binary PDF content saved to token-design.pdf
  

Issuing Invoice

The Issuing Invoice resource is used to add funds to your issuing balance.

Generate a Pix invoice (brcode) to receive deposits directly into your issuing wallet.

Once paid, the funds become available in your issuing balance for card spending.

The Issuing Invoice object

Attributes

id STRING

Unique identifier for the issuing invoice.

amount INTEGER

Invoice amount in cents. Example: 10000 (R$100.00).

taxId STRING

Payer CPF (11 digits) or CNPJ (14 digits).

name STRING

Payer full name.

tags LIST OF STRINGS

Tags associated with the invoice.

metadata OBJECT

Free-form map you can attach to the invoice.

status STRING

Current invoice status. Options: "created", "expired", "paid".

brcode STRING

Pix brcode string for payment.

due STRING

Invoice due datetime. Example: "2022-01-01T00:00:00.000000+00:00".

link STRING

Public URL to the invoice payment page.

issuingTransactionId STRING

Id of the IssuingTransaction created when the invoice is paid. Null until payment.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create an Issuing Invoice

Use this route to create a new issuing invoice to fund your issuing balance.

Parameters

amount REQUIRED

Amount in cents to be deposited. Example: 10000 (R$100.00).

taxId OPTIONAL

Payer CPF or CNPJ. Example: "012.345.678-90".

name OPTIONAL

Payer full name. Example: "Tony Stark".

tags OPTIONAL

Array of strings to tag the entity for future queries.

metadata OPTIONAL

Free-form map you can attach to the invoice.

ENDPOINT
POST /v2/issuing-invoice
REQUEST

Python

import starkinfra

invoice = starkinfra.issuinginvoice.create(
    starkinfra.IssuingInvoice(
        amount=10000,
        tax_id="012.345.678-90",
        name="Tony Stark",
        tags=["department: tech"]
    )
)

print(invoice)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let invoice = await starkinfra.issuingInvoice.create({
        amount: 10000,
        taxId: '012.345.678-90',
        name: 'Tony Stark',
        tags: ['department: tech']
    });
    console.log(invoice);
})();
  

PHP

$invoice = StarkInfra\IssuingInvoice::create(
    new StarkInfra\IssuingInvoice([
        "amount" => 10000,
        "taxId" => "012.345.678-90",
        "name" => "Tony Stark",
        "tags" => ["department: tech"]
    ])
);

print_r($invoice);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap data = new HashMap<>();
data.put("amount", 10000);
data.put("taxId", "012.345.678-90");
data.put("name", "Tony Stark");
data.put("tags", new String[]{"department: tech"});

IssuingInvoice invoice = IssuingInvoice.create(new IssuingInvoice(data));

System.out.println(invoice);
  

Ruby

require('starkinfra')

invoice = StarkInfra::IssuingInvoice.create(
    StarkInfra::IssuingInvoice.new(
        amount: 10000,
        tax_id: "012.345.678-90",
        name: "Tony Stark",
        tags: ["department: tech"]
    )
)

puts invoice
  

Elixir

invoice = StarkInfra.IssuingInvoice.create!(
    %StarkInfra.IssuingInvoice{
        amount: 10000,
        tax_id: "012.345.678-90",
        name: "Tony Stark",
        tags: ["department: tech"]
    }
)

IO.inspect(invoice)
  

C#

using System;
using System.Collections.Generic;

StarkInfra.IssuingInvoice invoice = StarkInfra.IssuingInvoice.Create(
    new StarkInfra.IssuingInvoice(
        amount: 10000,
        taxID: "012.345.678-90",
        name: "Tony Stark",
        tags: new List { "department: tech" }
    )
);

Console.WriteLine(invoice);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuinginvoice"
)

func main() {

    invoice, err := issuinginvoice.Create(
        issuinginvoice.IssuingInvoice{
            Amount: 10000,
            TaxId:  "012.345.678-90",
            Name:   "Tony Stark",
            Tags:   []string{"department: tech"},
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", invoice)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request POST '{{baseUrl}}/v2/issuing-invoice' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 10000,
    "taxId": "012.345.678-90",
    "name": "Tony Stark",
    "tags": ["department: tech"],
    "metadata": {}
}'
  
RESPONSE

Python

IssuingInvoice(
    id=5715709195239424,
    amount=10000,
    tax_id=012.345.678-90,
    name=Tony Stark,
    tags=['department: tech'],
    metadata={},
    status=created,
    brcode=00020101021226870014br.gov.bcb.pix2565...,
    due=2022-02-10 00:00:00,
    link=https://sandbox.api.starkinfra.com/invoicelink/5715709195239424,
    issuing_transaction_id=None,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingInvoice {
    id: '5715709195239424',
    amount: 10000,
    taxId: '012.345.678-90',
    name: 'Tony Stark',
    tags: [ 'department: tech' ],
    metadata: {},
    status: 'created',
    brcode: '00020101021226870014br.gov.bcb.pix2565...',
    due: '2022-02-10T00:00:00.000000+00:00',
    link: 'https://sandbox.api.starkinfra.com/invoicelink/5715709195239424',
    issuingTransactionId: null,
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingInvoice Object
(
    [id] => 5715709195239424
    [amount] => 10000
    [taxId] => 012.345.678-90
    [name] => Tony Stark
    [tags] => Array ( [0] => department: tech )
    [metadata] => Array ( )
    [status] => created
    [brcode] => 00020101021226870014br.gov.bcb.pix2565...
    [due] => DateTime Object ( [date] => 2022-02-10 00:00:00.000000 )
    [link] => https://sandbox.api.starkinfra.com/invoicelink/5715709195239424
    [issuingTransactionId] =>
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingInvoice({
    "id": "5715709195239424",
    "amount": 10000,
    "taxId": "012.345.678-90",
    "name": "Tony Stark",
    "tags": ["department: tech"],
    "metadata": {},
    "status": "created",
    "brcode": "00020101021226870014br.gov.bcb.pix2565...",
    "due": "2022-02-10T00:00:00.000000+00:00",
    "link": "https://sandbox.api.starkinfra.com/invoicelink/5715709195239424",
    "issuingTransactionId": null,
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuinginvoice(
    id: 5715709195239424,
    amount: 10000,
    tax_id: 012.345.678-90,
    name: Tony Stark,
    tags: ["department: tech"],
    metadata: {},
    status: created,
    brcode: 00020101021226870014br.gov.bcb.pix2565...,
    due: 2022-02-10T00:00:00+00:00,
    link: https://sandbox.api.starkinfra.com/invoicelink/5715709195239424,
    issuing_transaction_id: nil,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingInvoice{
    id: "5715709195239424",
    amount: 10000,
    tax_id: "012.345.678-90",
    name: "Tony Stark",
    tags: ["department: tech"],
    metadata: %{},
    status: "created",
    brcode: "00020101021226870014br.gov.bcb.pix2565...",
    due: "2022-02-10T00:00:00.000000+00:00",
    link: "https://sandbox.api.starkinfra.com/invoicelink/5715709195239424",
    issuing_transaction_id: nil,
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingInvoice(
    Id: 5715709195239424,
    Amount: 10000,
    TaxId: 012.345.678-90,
    Name: Tony Stark,
    Tags: [department: tech],
    Metadata: {},
    Status: created,
    Brcode: 00020101021226870014br.gov.bcb.pix2565...,
    Due: 02/10/2022 00:00:00,
    Link: https://sandbox.api.starkinfra.com/invoicelink/5715709195239424,
    IssuingTransactionID: ,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Amount:10000
    TaxId:012.345.678-90
    Name:Tony Stark
    Tags:[department: tech]
    Metadata:map[]
    Brcode:00020101021226870014br.gov.bcb.pix2565...
    Due:2022-02-10 00:00:00 +0000 +0000
    Link:https://sandbox.api.starkinfra.com/invoicelink/5715709195239424
    Status:created
    IssuingTransactionId:
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "invoice": {
        "id": "5715709195239424",
        "amount": 10000,
        "taxId": "012.345.678-90",
        "name": "Tony Stark",
        "tags": ["department: tech"],
        "metadata": {},
        "status": "created",
        "brcode": "00020101021226870014br.gov.bcb.pix2565...",
        "due": "2022-02-10T00:00:00.000000+00:00",
        "link": "https://sandbox.api.starkinfra.com/invoicelink/5715709195239424",
        "issuingTransactionId": null,
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

List Issuing Invoices

Get a list of issuing invoices in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

status OPTIONAL

Filter invoices by the specified status.

tags OPTIONAL

Filter entities that contain the specified tags.

ENDPOINT
GET /v2/issuing-invoice
REQUEST

Python

import starkinfra

invoices = starkinfra.issuinginvoice.query(
    limit=10,
    status="created"
)

for invoice in invoices:
    print(invoice)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let invoices = await starkinfra.issuingInvoice.query({
        limit: 10,
        status: 'created'
    });

    for await (let invoice of invoices) {
        console.log(invoice);
    }
})();
  

PHP

$invoices = StarkInfra\IssuingInvoice::query([
    "limit" => 10,
    "status" => "created"
]);

foreach ($invoices as $invoice) {
    print_r($invoice);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("status", "created");

Generator invoices = IssuingInvoice.query(params);

for (IssuingInvoice invoice : invoices) {
    System.out.println(invoice);
}
  

Ruby

require('starkinfra')

invoices = StarkInfra::IssuingInvoice.query(
    limit: 10,
    status: "created"
)

invoices.each do |invoice|
    puts invoice
end
  

Elixir

invoices = StarkInfra.IssuingInvoice.query!(
    limit: 10,
    status: "created"
)

invoices |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable invoices = StarkInfra.IssuingInvoice.Query(
    limit: 10,
    status: "created"
);

foreach (StarkInfra.IssuingInvoice invoice in invoices) {
    Console.WriteLine(invoice);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuinginvoice"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["status"] = "created"

    invoices, errorChannel := issuinginvoice.Query(params, nil)

    for invoice := range invoices {
        fmt.Printf("%+v", invoice)
    }
    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-invoice?limit=10&status=created' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingInvoice(
    id=5715709195239424,
    amount=10000,
    tax_id=012.345.678-90,
    name=Tony Stark,
    tags=['department: tech'],
    metadata={},
    status=created,
    brcode=00020101021226870014br.gov.bcb.pix2565...,
    due=2022-02-10 00:00:00,
    link=https://sandbox.api.starkinfra.com/invoicelink/5715709195239424,
    issuing_transaction_id=None,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingInvoice {
    id: '5715709195239424',
    amount: 10000,
    taxId: '012.345.678-90',
    name: 'Tony Stark',
    tags: [ 'department: tech' ],
    metadata: {},
    status: 'created',
    brcode: '00020101021226870014br.gov.bcb.pix2565...',
    due: '2022-02-10T00:00:00.000000+00:00',
    link: 'https://sandbox.api.starkinfra.com/invoicelink/5715709195239424',
    issuingTransactionId: null,
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingInvoice Object
(
    [id] => 5715709195239424
    [amount] => 10000
    [taxId] => 012.345.678-90
    [name] => Tony Stark
    [tags] => Array ( [0] => department: tech )
    [metadata] => Array ( )
    [status] => created
    [brcode] => 00020101021226870014br.gov.bcb.pix2565...
    [due] => DateTime Object ( [date] => 2022-02-10 00:00:00.000000 )
    [link] => https://sandbox.api.starkinfra.com/invoicelink/5715709195239424
    [issuingTransactionId] =>
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingInvoice({
    "id": "5715709195239424",
    "amount": 10000,
    "taxId": "012.345.678-90",
    "name": "Tony Stark",
    "tags": ["department: tech"],
    "metadata": {},
    "status": "created",
    "brcode": "00020101021226870014br.gov.bcb.pix2565...",
    "due": "2022-02-10T00:00:00.000000+00:00",
    "link": "https://sandbox.api.starkinfra.com/invoicelink/5715709195239424",
    "issuingTransactionId": null,
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuinginvoice(
    id: 5715709195239424,
    amount: 10000,
    tax_id: 012.345.678-90,
    name: Tony Stark,
    tags: ["department: tech"],
    metadata: {},
    status: created,
    brcode: 00020101021226870014br.gov.bcb.pix2565...,
    due: 2022-02-10T00:00:00+00:00,
    link: https://sandbox.api.starkinfra.com/invoicelink/5715709195239424,
    issuing_transaction_id: nil,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingInvoice{
    id: "5715709195239424",
    amount: 10000,
    tax_id: "012.345.678-90",
    name: "Tony Stark",
    tags: ["department: tech"],
    metadata: %{},
    status: "created",
    brcode: "00020101021226870014br.gov.bcb.pix2565...",
    due: "2022-02-10T00:00:00.000000+00:00",
    link: "https://sandbox.api.starkinfra.com/invoicelink/5715709195239424",
    issuing_transaction_id: nil,
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingInvoice(
    Id: 5715709195239424,
    Amount: 10000,
    TaxId: 012.345.678-90,
    Name: Tony Stark,
    Tags: [department: tech],
    Metadata: {},
    Status: created,
    Brcode: 00020101021226870014br.gov.bcb.pix2565...,
    Due: 02/10/2022 00:00:00,
    Link: https://sandbox.api.starkinfra.com/invoicelink/5715709195239424,
    IssuingTransactionID: ,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Amount:10000
    TaxId:012.345.678-90
    Name:Tony Stark
    Tags:[department: tech]
    Metadata:map[]
    Brcode:00020101021226870014br.gov.bcb.pix2565...
    Due:2022-02-10 00:00:00 +0000 +0000
    Link:https://sandbox.api.starkinfra.com/invoicelink/5715709195239424
    Status:created
    IssuingTransactionId:
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "invoices": [
        {
            "id": "5715709195239424",
            "amount": 10000,
            "taxId": "012.345.678-90",
            "name": "Tony Stark",
            "tags": ["department: tech"],
            "metadata": {},
            "status": "created",
            "brcode": "00020101021226870014br.gov.bcb.pix2565...",
            "due": "2022-02-10T00:00:00.000000+00:00",
            "link": "https://sandbox.api.starkinfra.com/invoicelink/5715709195239424",
            "issuingTransactionId": null,
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Invoice

Get a single issuing invoice by its id.

Parameters

id REQUIRED

Id of the issuing invoice entity.

ENDPOINT
GET /v2/issuing-invoice/:id
REQUEST

Python

import starkinfra

invoice = starkinfra.issuinginvoice.get("5715709195239424")

print(invoice)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let invoice = await starkinfra.issuingInvoice.get('5715709195239424');
    console.log(invoice);
})();
  

PHP

$invoice = StarkInfra\IssuingInvoice::get("5715709195239424");

print_r($invoice);
  

Java

import com.starkinfra.*;

IssuingInvoice invoice = IssuingInvoice.get("5715709195239424");

System.out.println(invoice);
  

Ruby

require('starkinfra')

invoice = StarkInfra::IssuingInvoice.get("5715709195239424")

puts invoice
  

Elixir

invoice = StarkInfra.IssuingInvoice.get!("5715709195239424")

IO.inspect(invoice)
  

C#

using System;

StarkInfra.IssuingInvoice invoice = StarkInfra.IssuingInvoice.Get("5715709195239424");

Console.WriteLine(invoice);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuinginvoice"
)

func main() {

    invoice, err := issuinginvoice.Get("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", invoice)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-invoice/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingInvoice(
    id=5715709195239424,
    amount=10000,
    tax_id=012.345.678-90,
    name=Tony Stark,
    tags=['department: tech'],
    metadata={},
    status=created,
    brcode=00020101021226870014br.gov.bcb.pix2565...,
    due=2022-02-10 00:00:00,
    link=https://sandbox.api.starkinfra.com/invoicelink/5715709195239424,
    issuing_transaction_id=None,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingInvoice {
    id: '5715709195239424',
    amount: 10000,
    taxId: '012.345.678-90',
    name: 'Tony Stark',
    tags: [ 'department: tech' ],
    metadata: {},
    status: 'created',
    brcode: '00020101021226870014br.gov.bcb.pix2565...',
    due: '2022-02-10T00:00:00.000000+00:00',
    link: 'https://sandbox.api.starkinfra.com/invoicelink/5715709195239424',
    issuingTransactionId: null,
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingInvoice Object
(
    [id] => 5715709195239424
    [amount] => 10000
    [taxId] => 012.345.678-90
    [name] => Tony Stark
    [tags] => Array ( [0] => department: tech )
    [metadata] => Array ( )
    [status] => created
    [brcode] => 00020101021226870014br.gov.bcb.pix2565...
    [due] => DateTime Object ( [date] => 2022-02-10 00:00:00.000000 )
    [link] => https://sandbox.api.starkinfra.com/invoicelink/5715709195239424
    [issuingTransactionId] =>
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingInvoice({
    "id": "5715709195239424",
    "amount": 10000,
    "taxId": "012.345.678-90",
    "name": "Tony Stark",
    "tags": ["department: tech"],
    "metadata": {},
    "status": "created",
    "brcode": "00020101021226870014br.gov.bcb.pix2565...",
    "due": "2022-02-10T00:00:00.000000+00:00",
    "link": "https://sandbox.api.starkinfra.com/invoicelink/5715709195239424",
    "issuingTransactionId": null,
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuinginvoice(
    id: 5715709195239424,
    amount: 10000,
    tax_id: 012.345.678-90,
    name: Tony Stark,
    tags: ["department: tech"],
    metadata: {},
    status: created,
    brcode: 00020101021226870014br.gov.bcb.pix2565...,
    due: 2022-02-10T00:00:00+00:00,
    link: https://sandbox.api.starkinfra.com/invoicelink/5715709195239424,
    issuing_transaction_id: nil,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingInvoice{
    id: "5715709195239424",
    amount: 10000,
    tax_id: "012.345.678-90",
    name: "Tony Stark",
    tags: ["department: tech"],
    metadata: %{},
    status: "created",
    brcode: "00020101021226870014br.gov.bcb.pix2565...",
    due: "2022-02-10T00:00:00.000000+00:00",
    link: "https://sandbox.api.starkinfra.com/invoicelink/5715709195239424",
    issuing_transaction_id: nil,
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingInvoice(
    Id: 5715709195239424,
    Amount: 10000,
    TaxId: 012.345.678-90,
    Name: Tony Stark,
    Tags: [department: tech],
    Metadata: {},
    Status: created,
    Brcode: 00020101021226870014br.gov.bcb.pix2565...,
    Due: 02/10/2022 00:00:00,
    Link: https://sandbox.api.starkinfra.com/invoicelink/5715709195239424,
    IssuingTransactionID: ,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Amount:10000
    TaxId:012.345.678-90
    Name:Tony Stark
    Tags:[department: tech]
    Metadata:map[]
    Brcode:00020101021226870014br.gov.bcb.pix2565...
    Due:2022-02-10 00:00:00 +0000 +0000
    Link:https://sandbox.api.starkinfra.com/invoicelink/5715709195239424
    Status:created
    IssuingTransactionId:
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "invoice": {
        "id": "5715709195239424",
        "amount": 10000,
        "taxId": "012.345.678-90",
        "name": "Tony Stark",
        "tags": ["department: tech"],
        "metadata": {},
        "status": "created",
        "brcode": "00020101021226870014br.gov.bcb.pix2565...",
        "due": "2022-02-10T00:00:00.000000+00:00",
        "link": "https://sandbox.api.starkinfra.com/invoicelink/5715709195239424",
        "issuingTransactionId": null,
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

List Issuing Invoice Logs

Get a paged list of issuing invoice logs.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

types OPTIONAL

Filter logs by log types.

ids OPTIONAL

Array of invoice ids to filter logs.

ENDPOINT
GET /v2/issuing-invoice/log
REQUEST

Python

import starkinfra

logs = starkinfra.issuinginvoice.log.query(
    limit=10,
    types=["paid"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let logs = await starkinfra.issuingInvoice.log.query({
        limit: 10,
        types: ['paid']
    });

    for await (let log of logs) {
        console.log(log);
    }
})();
  

PHP

$logs = StarkInfra\IssuingInvoice\Log::query([
    "limit" => 10,
    "types" => ["paid"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("types", new String[]{"paid"});

Generator logs = IssuingInvoice.Log.query(params);

for (IssuingInvoice.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::IssuingInvoice::Log.query(
    limit: 10,
    types: ["paid"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.IssuingInvoice.Log.query!(
    limit: 10,
    types: ["paid"]
)

logs |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable logs = StarkInfra.IssuingInvoice.Log.Query(
    limit: 10,
    types: new List { "paid" }
);

foreach (StarkInfra.IssuingInvoice.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuinginvoice/log"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["types"] = []string{"paid"}

    logs, errorChannel := log.Query(params, nil)

    for log := range logs {
        fmt.Printf("%+v", log)
    }
    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-invoice/log?limit=10&types=paid' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6724771005489152,
    type=paid,
    invoice=IssuingInvoice(id=5715709195239424, amount=10000, status=paid),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '6724771005489152',
    type: 'paid',
    invoice: IssuingInvoice { id: '5715709195239424', amount: 10000, status: 'paid' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingInvoice\Log Object
(
    [id] => 6724771005489152
    [type] => paid
    [invoice] => StarkInfra\IssuingInvoice Object ( [id] => 5715709195239424 [amount] => 10000 [status] => paid )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingInvoice.Log({
    "id": "6724771005489152",
    "type": "paid",
    "invoice": {"id": "5715709195239424", "amount": 10000, "status": "paid"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 6724771005489152,
    type: paid,
    invoice: issuinginvoice(id: 5715709195239424, amount: 10000, status: paid),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingInvoice.Log{
    id: "6724771005489152",
    type: "paid",
    invoice: %StarkInfra.IssuingInvoice{id: "5715709195239424", amount: 10000, status: "paid"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingInvoice.Log(
    Id: 6724771005489152,
    Type: paid,
    Invoice: IssuingInvoice(Id: 5715709195239424, Amount: 10000, Status: paid),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:6724771005489152
    Type:paid
    Invoice:{Id:5715709195239424 Amount:10000 Status:paid}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6724771005489152",
            "type": "paid",
            "invoice": {"id": "5715709195239424", "amount": 10000, "status": "paid"},
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Invoice Log

Get a single issuing invoice log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/issuing-invoice/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.issuinginvoice.log.get("6724771005489152")

print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let log = await starkinfra.issuingInvoice.log.get('6724771005489152');
    console.log(log);
})();
  

PHP

$log = StarkInfra\IssuingInvoice\Log::get("6724771005489152");

print_r($log);
  

Java

import com.starkinfra.*;

IssuingInvoice.Log log = IssuingInvoice.Log.get("6724771005489152");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::IssuingInvoice::Log.get("6724771005489152")

puts log
  

Elixir

log = StarkInfra.IssuingInvoice.Log.get!("6724771005489152")

IO.inspect(log)
  

C#

using System;

StarkInfra.IssuingInvoice.Log log = StarkInfra.IssuingInvoice.Log.Get("6724771005489152");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuinginvoice/log"
)

func main() {

    invoiceLog, err := log.Get("6724771005489152", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", invoiceLog)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-invoice/log/6724771005489152' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6724771005489152,
    type=paid,
    invoice=IssuingInvoice(id=5715709195239424, amount=10000, status=paid),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '6724771005489152',
    type: 'paid',
    invoice: IssuingInvoice { id: '5715709195239424', amount: 10000, status: 'paid' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingInvoice\Log Object
(
    [id] => 6724771005489152
    [type] => paid
    [invoice] => StarkInfra\IssuingInvoice Object ( [id] => 5715709195239424 [amount] => 10000 [status] => paid )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingInvoice.Log({
    "id": "6724771005489152",
    "type": "paid",
    "invoice": {"id": "5715709195239424", "amount": 10000, "status": "paid"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 6724771005489152,
    type: paid,
    invoice: issuinginvoice(id: 5715709195239424, amount: 10000, status: paid),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingInvoice.Log{
    id: "6724771005489152",
    type: "paid",
    invoice: %StarkInfra.IssuingInvoice{id: "5715709195239424", amount: 10000, status: "paid"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingInvoice.Log(
    Id: 6724771005489152,
    Type: paid,
    Invoice: IssuingInvoice(Id: 5715709195239424, Amount: 10000, Status: paid),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:6724771005489152
    Type:paid
    Invoice:{Id:5715709195239424 Amount:10000 Status:paid}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "log": {
        "id": "6724771005489152",
        "type": "paid",
        "invoice": {"id": "5715709195239424", "amount": 10000, "status": "paid"},
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Issuing Billing Invoice

The Issuing Billing Invoice resource represents the invoice that settles the postpaid usage of your issuing operation in a billing period.

Each invoice consolidates the purchases and withdrawals settled in the billing period and can be paid via its brcode or link.

Fine and interest are applied when the invoice is paid after the due date.

The Issuing Billing Invoice object

Attributes

id STRING

Unique identifier for the issuing billing invoice.

taxId STRING

Tax id (CPF or CNPJ) of the invoice payer. Example: "012.345.678-90".

name STRING

Name of the invoice payer.

amount INTEGER

Current invoice amount in cents, including fine and interest when overdue. Example: 100000 (= R$ 1,000.00).

nominalAmount INTEGER

Original invoice amount in cents, before fine and interest. Example: 100000 (= R$ 1,000.00).

fine FLOAT

Fine percentage applied when paid after the due date. Example: 2.0.

interest FLOAT

Monthly interest percentage applied when paid after the due date. Example: 1.0.

status STRING

Current invoice status. Options: "created", "pending", "overdue", "expired", "paid".

brcode STRING

Pix BR Code that can be used to pay the invoice.

link STRING

Link to the invoice payment page.

due STRING

Invoice due datetime. Example: "2022-02-10T00:00:00.000000+00:00".

start STRING

Start datetime of the billing period. Example: "2022-01-01T00:00:00.000000+00:00".

end STRING

End datetime of the billing period. Example: "2022-01-31T23:59:59.999999+00:00".

created STRING

Creation datetime. Example: "2022-02-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-02-01T00:00:00.000000+00:00".

List Issuing Billing Invoices

Get a list of issuing billing invoices in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

status OPTIONAL

Filter entities by status. Options: "created", "pending", "overdue", "expired", "paid".

ids OPTIONAL

List of strings to get specific entities by ids.

ENDPOINT
GET /v2/issuing-billing-invoice
REQUEST

Python

import starkinfra
from datetime import date

billing_invoices = starkinfra.issuingbillinginvoice.query(
    after=date(2023, 1, 1),
    before=date(2024, 3, 1),
    limit=10
)

for billing_invoice in billing_invoices:
    print(billing_invoice)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let billingInvoices = await starkinfra.issuingBillingInvoice.query({
        after: '2023-01-01',
        before: '2024-03-01',
        limit: 10
    });

    for await (let billingInvoice of billingInvoices) {
        console.log(billingInvoice);
    }
})();
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-billing-invoice?limit=10&status=pending' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingBillingInvoice(
    id=5715709195239424,
    name=Tony Stark,
    tax_id=012.345.678-90,
    fine=2.0,
    interest=1.0,
    status=pending,
    amount=100000,
    nominal_amount=100000,
    brcode=00020101021226930014br.gov.bcb.pix2571brcode-h.sandbox.starkinfra.com/v2/d6a916beba1c41a5bbe31d63a93553c35204000053039865802BR5925Stark Bank S.A.6009Sao Paulo62070503***6304811B,
    link=https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978,
    due=2022-02-10 00:00:00,
    start=2022-01-01 00:00:00,
    end=2022-01-31 23:59:59,
    created=2022-02-01 00:00:00,
    updated=2022-02-01 00:00:00
)
  

Javascript

IssuingBillingInvoice {
    id: '5715709195239424',
    name: 'Tony Stark',
    taxId: '012.345.678-90',
    fine: 2.0,
    interest: 1.0,
    status: 'pending',
    amount: 100000,
    nominalAmount: 100000,
    brcode: '00020101021226930014br.gov.bcb.pix2571brcode-h.sandbox.starkinfra.com/v2/d6a916beba1c41a5bbe31d63a93553c35204000053039865802BR5925Stark Bank S.A.6009Sao Paulo62070503***6304811B',
    link: 'https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978',
    due: '2022-02-10T00:00:00.000000+00:00',
    start: '2022-01-01T00:00:00.000000+00:00',
    end: '2022-01-31T23:59:59.999999+00:00',
    created: '2022-02-01T00:00:00.000000+00:00',
    updated: '2022-02-01T00:00:00.000000+00:00'
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": null,
    "invoices": [
        {
            "id": "5715709195239424",
            "taxId": "012.345.678-90",
            "name": "Tony Stark",
            "amount": 100000,
            "nominalAmount": 100000,
            "fine": 2.0,
            "interest": 1.0,
            "status": "pending",
            "brcode": "00020101021226930014br.gov.bcb.pix2571brcode-h.sandbox.starkinfra.com/v2/d6a916beba1c41a5bbe31d63a93553c35204000053039865802BR5925Stark Bank S.A.6009Sao Paulo62070503***6304811B",
            "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978",
            "due": "2022-02-10T00:00:00.000000+00:00",
            "start": "2022-01-01T00:00:00.000000+00:00",
            "end": "2022-01-31T23:59:59.999999+00:00",
            "created": "2022-02-01T00:00:00.000000+00:00",
            "updated": "2022-02-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Billing Invoice

Get a single issuing billing invoice by its id.

Parameters

id REQUIRED

Id of the issuing billing invoice entity.

ENDPOINT
GET /v2/issuing-billing-invoice/:id
REQUEST

Python

import starkinfra

billing_invoice = starkinfra.issuingbillinginvoice.get("5715709195239424")

print(billing_invoice)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let billingInvoice = await starkinfra.issuingBillingInvoice.get('5715709195239424');
    console.log(billingInvoice);
})();
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-billing-invoice/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingBillingInvoice(
    id=5715709195239424,
    name=Tony Stark,
    tax_id=012.345.678-90,
    fine=2.0,
    interest=1.0,
    status=pending,
    amount=100000,
    nominal_amount=100000,
    brcode=00020101021226930014br.gov.bcb.pix2571brcode-h.sandbox.starkinfra.com/v2/d6a916beba1c41a5bbe31d63a93553c35204000053039865802BR5925Stark Bank S.A.6009Sao Paulo62070503***6304811B,
    link=https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978,
    due=2022-02-10 00:00:00,
    start=2022-01-01 00:00:00,
    end=2022-01-31 23:59:59,
    created=2022-02-01 00:00:00,
    updated=2022-02-01 00:00:00
)
  

Javascript

IssuingBillingInvoice {
    id: '5715709195239424',
    name: 'Tony Stark',
    taxId: '012.345.678-90',
    fine: 2.0,
    interest: 1.0,
    status: 'pending',
    amount: 100000,
    nominalAmount: 100000,
    brcode: '00020101021226930014br.gov.bcb.pix2571brcode-h.sandbox.starkinfra.com/v2/d6a916beba1c41a5bbe31d63a93553c35204000053039865802BR5925Stark Bank S.A.6009Sao Paulo62070503***6304811B',
    link: 'https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978',
    due: '2022-02-10T00:00:00.000000+00:00',
    start: '2022-01-01T00:00:00.000000+00:00',
    end: '2022-01-31T23:59:59.999999+00:00',
    created: '2022-02-01T00:00:00.000000+00:00',
    updated: '2022-02-01T00:00:00.000000+00:00'
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "invoice": {
        "id": "5715709195239424",
        "taxId": "012.345.678-90",
        "name": "Tony Stark",
        "amount": 100000,
        "nominalAmount": 100000,
        "fine": 2.0,
        "interest": 1.0,
        "status": "pending",
        "brcode": "00020101021226930014br.gov.bcb.pix2571brcode-h.sandbox.starkinfra.com/v2/d6a916beba1c41a5bbe31d63a93553c35204000053039865802BR5925Stark Bank S.A.6009Sao Paulo62070503***6304811B",
        "link": "https://invoice-h.sandbox.starkbank.com/invoicelink/851ff545535c40ba88e24a05accb9978",
        "due": "2022-02-10T00:00:00.000000+00:00",
        "start": "2022-01-01T00:00:00.000000+00:00",
        "end": "2022-01-31T23:59:59.999999+00:00",
        "created": "2022-02-01T00:00:00.000000+00:00",
        "updated": "2022-02-01T00:00:00.000000+00:00"
    }
}
  

Issuing Billing Transaction

The Issuing Billing Transaction resource represents an entry that composes an issuing billing invoice.

Each purchase or withdrawal settled in a billing period generates billing transactions, including the installments of installment purchases.

The Issuing Billing Transaction object

Attributes

id STRING

Unique identifier for the issuing billing transaction.

installment INTEGER

Number of this installment. Example: 1.

installmentCount INTEGER

Total number of installments of the source purchase. Example: 3.

amount INTEGER

Transaction amount in cents. Example: 30000 (= R$ 300.00).

balance INTEGER

Invoice balance in cents after this transaction.

source STRING

Entity that originated the transaction. Example: "issuing-purchase/5155165527080960".

externalId STRING

Unique external identifier of the transaction.

description STRING

Transaction description, usually the merchant name.

cardEnding STRING

Last 4 digits of the card that originated the transaction. Example: "1234".

holderName STRING

Name of the holder of the card that originated the transaction.

tax INTEGER

IOF amount in cents applied to the transaction.

rate FLOAT

Conversion rate applied to international transactions.

merchantAmount INTEGER

Amount in cents in the merchant currency. Example: 30000.

merchantCurrencyCode STRING

Currency code of the merchant amount. Example: "BRL".

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

List Issuing Billing Transactions

Get a list of issuing billing transactions in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

invoiceId OPTIONAL

Filter transactions that compose a specific IssuingBillingInvoice.

ids OPTIONAL

List of strings to get specific entities by ids.

tags OPTIONAL

List of strings to filter entities by tags.

ENDPOINT
GET /v2/issuing-billing-transaction
REQUEST

Python

import starkinfra

transactions = starkinfra.issuingbillingtransaction.query(
    limit=10,
    invoice_id="5715709195239424"
)

for transaction in transactions:
    print(transaction)
  
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let transactions = await starkinfra.issuingBillingTransaction.query({
        limit: 10,
        invoiceId: '5715709195239424'
    });
    for await (let transaction of transactions) {
        console.log(transaction);
    }
})();
  
  

PHP

$transactions = StarkInfraIssuingBillingTransaction::query([
    "limit" => 10,
    "invoiceId" => "5715709195239424"
]);

foreach ($transactions as $transaction) {
    print_r($transaction);
}
  
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("invoiceId", "5715709195239424");

Generator transactions = IssuingBillingTransaction.query(params);

for (IssuingBillingTransaction transaction : transactions) {
    System.out.println(transaction);
}
  
  

Ruby

require('starkinfra')

transactions = StarkInfra::IssuingBillingTransaction.query(
    limit: 10,
    invoice_id: "5715709195239424"
)

transactions.each do |transaction|
    puts transaction
end
  
  

Elixir

transactions = StarkInfra.IssuingBillingTransaction.query!(
    limit: 10,
    invoice_id: "5715709195239424"
)

transactions |> Enum.each(&IO.inspect/1)
  
  

C#

using System;
using System.Collections.Generic;

IEnumerable transactions = StarkInfra.IssuingBillingTransaction.Query(
    limit: 10,
    invoiceId: "5715709195239424"
);

foreach (StarkInfra.IssuingBillingTransaction transaction in transactions) {
    Console.WriteLine(transaction);
}
  
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingbillingtransaction"
)

func main() {

    var params = map[string]interface{}{
        "limit":     10,
        "invoiceId": "5715709195239424",
    }

    transactions := issuingbillingtransaction.Query(params, nil)

    for transaction := range transactions {
        fmt.Printf("%+v", transaction)
    }
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-billing-transaction?limit=10&invoiceId=5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
  
RESPONSE

Python

IssuingBillingTransaction(
    id=5715709195239424,
    installment=1,
    installment_count=3,
    amount=30000,
    balance=60000,
    source=issuing-purchase/5155165527080960,
    external_id=5155165527080960-1,
    description=Stark Coffee Shop,
    card_ending=1234,
    holder_name=Tony Stark,
    tax=0,
    rate=1.0,
    merchant_amount=30000,
    merchant_currency_code=BRL,
    created=2022-01-01 00:00:00
)
  
  

Javascript

IssuingBillingTransaction {
    id: '5715709195239424',
    installment: 1,
    installmentCount: 3,
    amount: 30000,
    balance: 60000,
    source: 'issuing-purchase/5155165527080960',
    externalId: '5155165527080960-1',
    description: 'Stark Coffee Shop',
    cardEnding: '1234',
    holderName: 'Tony Stark',
    tax: 0,
    rate: 1.0,
    merchantAmount: 30000,
    merchantCurrencyCode: 'BRL',
    created: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfraIssuingBillingTransaction Object
(
    [id] => 5715709195239424
    [installment] => 1
    [installmentCount] => 3
    [amount] => 30000
    [balance] => 60000
    [source] => issuing-purchase/5155165527080960
    [externalId] => 5155165527080960-1
    [description] => Stark Coffee Shop
    [cardEnding] => 1234
    [holderName] => Tony Stark
    [tax] => 0
    [rate] => 1
    [merchantAmount] => 30000
    [merchantCurrencyCode] => BRL
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingBillingTransaction({
    "id": "5715709195239424",
    "installment": 1,
    "installmentCount": 3,
    "amount": 30000,
    "balance": 60000,
    "source": "issuing-purchase/5155165527080960",
    "externalId": "5155165527080960-1",
    "description": "Stark Coffee Shop",
    "cardEnding": "1234",
    "holderName": "Tony Stark",
    "tax": 0,
    "rate": 1.0,
    "merchantAmount": 30000,
    "merchantCurrencyCode": "BRL",
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingbillingtransaction(
    id: 5715709195239424,
    installment: 1,
    installment_count: 3,
    amount: 30000,
    balance: 60000,
    source: issuing-purchase/5155165527080960,
    external_id: 5155165527080960-1,
    description: Stark Coffee Shop,
    card_ending: 1234,
    holder_name: Tony Stark,
    tax: 0,
    rate: 1.0,
    merchant_amount: 30000,
    merchant_currency_code: BRL,
    created: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingBillingTransaction{
    id: "5715709195239424",
    installment: 1,
    installment_count: 3,
    amount: 30000,
    balance: 60000,
    source: "issuing-purchase/5155165527080960",
    external_id: "5155165527080960-1",
    description: "Stark Coffee Shop",
    card_ending: "1234",
    holder_name: "Tony Stark",
    tax: 0,
    rate: 1.0,
    merchant_amount: 30000,
    merchant_currency_code: "BRL",
    created: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingBillingTransaction(
    Id: 5715709195239424,
    Installment: 1,
    InstallmentCount: 3,
    Amount: 30000,
    Balance: 60000,
    Source: issuing-purchase/5155165527080960,
    ExternalId: 5155165527080960-1,
    Description: Stark Coffee Shop,
    CardEnding: 1234,
    HolderName: Tony Stark,
    Tax: 0,
    Rate: 1.0,
    MerchantAmount: 30000,
    MerchantCurrencyCode: BRL,
    Created: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    Installment:1
    InstallmentCount:3
    Amount:30000
    Balance:60000
    Source:issuing-purchase/5155165527080960
    ExternalId:5155165527080960-1
    Description:Stark Coffee Shop
    CardEnding:1234
    HolderName:Tony Stark
    Tax:0
    Rate:1
    MerchantAmount:30000
    MerchantCurrencyCode:BRL
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "transactions": [
        {
            "id": "5715709195239424",
            "installment": 1,
            "installmentCount": 3,
            "amount": 30000,
            "balance": 60000,
            "source": "issuing-purchase/5155165527080960",
            "externalId": "5155165527080960-1",
            "description": "Stark Coffee Shop",
            "cardEnding": "1234",
            "holderName": "Tony Stark",
            "tax": 0,
            "rate": 1.0,
            "merchantAmount": 30000,
            "merchantCurrencyCode": "BRL",
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ],
    "cursor": null
}
  
  

Issuing Purchase

The Issuing Purchase resource represents a purchase transaction made with an issuing card.

Purchases are created when a cardholder makes a payment at a merchant using an issued card.

You can list, retrieve, and update purchases, as well as monitor purchase events through the log endpoints.

The Issuing Purchase object

Attributes

id STRING

Unique identifier for the issuing purchase.

productId STRING

Id of the IssuingProduct of the card used in the purchase.

holderName STRING

Name of the cardholder.

cardId STRING

Id of the IssuingCard used for the purchase.

amount INTEGER

Purchase amount in cents in the issuer currency.

tax INTEGER

Tax amount in cents charged on the purchase.

issuerAmount INTEGER

Amount in cents in the issuer currency.

issuerCurrencyCode STRING

ISO 4217 currency code of the issuer. Example: "BRL".

issuerCurrencySymbol STRING

Currency symbol of the issuer. Example: "R$".

merchantAmount INTEGER

Amount in cents in the merchant currency.

merchantCurrencyCode STRING

ISO 4217 currency code of the merchant. Example: "USD".

merchantCurrencySymbol STRING

Currency symbol of the merchant. Example: "$".

merchantCategoryCode STRING

Merchant category code (MCC) for the purchase.

merchantCategoryNumber INTEGER

MCC number of the merchant category. Example: 5814.

merchantCategoryType STRING

Type of the merchant category. Example: "food".

merchantCountryCode STRING

ISO 3166 country code of the merchant. Example: "BRA".

acquirerId STRING

Id of the payment acquirer.

merchantId STRING

Id of the merchant.

merchantName STRING

Name of the merchant.

merchantFee INTEGER

Merchant fee in cents.

walletId STRING

Id of the digital wallet used if this was a token purchase.

methodCode STRING

Payment method code. Options: "chip", "token", "server", "manual", "magstripe", "contactless".

score FLOAT

Fraud risk score from 0 to 1. Higher values indicate higher risk.

endToEndId STRING

End-to-end transaction identifier.

tags LIST OF STRINGS

Tags associated with the purchase.

zipCode STRING

ZIP code of the merchant location.

issuingTransactionIds LIST OF STRINGS

Ids of the IssuingTransactions linked to this purchase.

purpose STRING

Purchase purpose. Options: "purchase", "withdrawal", "verification", "purchaseRefund", "cashbackPurchase", "paymentTransaction".

installmentCount INTEGER

Number of installments of the purchase. Example: 1.

cardEnding STRING

Last 4 digits of the card number used.

metadata OBJECT

Additional data related to the purchase, such as the authorizationId.

description STRING

Purchase description provided by the merchant.

confirmed STRING

Confirmation datetime. Null until the purchase is confirmed.

status STRING

Current purchase status. Options: "approved", "canceled", "denied", "confirmed", "voided".

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

List Issuing Purchases

Get a list of issuing purchases in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

status OPTIONAL

Filter purchases by the specified status.

cardIds OPTIONAL

Filter purchases by card ids.

holderIds OPTIONAL

Filter purchases by holder ids.

endToEndIds OPTIONAL

Filter purchases by their end-to-end transaction ids.

tags OPTIONAL

Filter entities that contain the specified tags.

ids OPTIONAL

List of strings to get specific entities by ids.

ENDPOINT
GET /v2/issuing-purchase
REQUEST

Python

import starkinfra

purchases = starkinfra.issuingpurchase.query(
    limit=10,
    status="approved"
)

for purchase in purchases:
    print(purchase)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let purchases = await starkinfra.issuingPurchase.query({
        limit: 10,
        status: 'approved'
    });

    for await (let purchase of purchases) {
        console.log(purchase);
    }
})();
  

PHP

$purchases = StarkInfra\IssuingPurchase::query([
    "limit" => 10,
    "status" => "approved"
]);

foreach ($purchases as $purchase) {
    print_r($purchase);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("status", "approved");

Generator purchases = IssuingPurchase.query(params);

for (IssuingPurchase purchase : purchases) {
    System.out.println(purchase);
}
  

Ruby

require('starkinfra')

purchases = StarkInfra::IssuingPurchase.query(
    limit: 10,
    status: "approved"
)

purchases.each do |purchase|
    puts purchase
end
  

Elixir

purchases = StarkInfra.IssuingPurchase.query!(
    limit: 10,
    status: "approved"
)

purchases |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable purchases = StarkInfra.IssuingPurchase.Query(
    limit: 10,
    status: "approved"
);

foreach (StarkInfra.IssuingPurchase purchase in purchases) {
    Console.WriteLine(purchase);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingpurchase"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["status"] = "approved"

    purchases := issuingpurchase.Query(params, nil)

    for purchase := range purchases {
        fmt.Printf("%+v", purchase)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-purchase?limit=10&status=approved' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingPurchase(
    id=5715709195239424,
    holder_name=Tony Stark,
    product_id=654321,
    card_id=7834882116598271,
    card_ending=1234,
    purpose=purchase,
    installment_count=1,
    amount=5000,
    tax=0,
    issuer_amount=5000,
    issuer_currency_code=BRL,
    issuer_currency_symbol=R$,
    merchant_amount=5000,
    merchant_currency_code=BRL,
    merchant_currency_symbol=R$,
    merchant_category_code=fastFoodRestaurants,
    merchant_category_number=5814,
    merchant_category_type=food,
    merchant_country_code=BRA,
    acquirer_id=5656565656565656,
    merchant_id=5656565656565656,
    merchant_name=Stark Store,
    merchant_fee=0,
    wallet_id=None,
    method_code=chip,
    score=0.9775689825217906,
    end_to_end_id=79fcf95d-1dfb-40db-9fa8-679e329c58f0,
    tags=[],
    issuing_transaction_ids=['5155165527080960'],
    status=approved,
    description=,
    metadata={},
    zip_code=01311-000,
    confirmed=2022-01-01 00:00:02,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingPurchase {
    id: '5715709195239424',
    holderName: 'Tony Stark',
    productId: '654321',
    cardId: '7834882116598271',
    cardEnding: '1234',
    purpose: 'purchase',
    installmentCount: 1,
    amount: 5000,
    tax: 0,
    issuerAmount: 5000,
    issuerCurrencyCode: 'BRL',
    issuerCurrencySymbol: 'R$',
    merchantAmount: 5000,
    merchantCurrencyCode: 'BRL',
    merchantCurrencySymbol: 'R$',
    merchantCategoryCode: 'fastFoodRestaurants',
    merchantCategoryNumber: 5814,
    merchantCategoryType: 'food',
    merchantCountryCode: 'BRA',
    acquirerId: '5656565656565656',
    merchantId: '5656565656565656',
    merchantName: 'Stark Store',
    merchantFee: 0,
    walletId: null,
    methodCode: 'chip',
    score: 0.9775689825217906,
    endToEndId: '79fcf95d-1dfb-40db-9fa8-679e329c58f0',
    tags: [],
    issuingTransactionIds: [ '5155165527080960' ],
    status: 'approved',
    description: '',
    confirmed: '2022-01-01T00:00:02.000000+00:00',
    metadata: {},
    zipCode: '01311-000',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingPurchase Object
(
    [id] => 5715709195239424
    [holderName] => Tony Stark
    [productId] => 654321
    [cardId] => 7834882116598271
    [cardEnding] => 1234
    [purpose] => purchase
    [installmentCount] => 1
    [amount] => 5000
    [tax] => 0
    [merchantFee] => 0
    [issuerAmount] => 5000
    [issuerCurrencyCode] => BRL
    [issuerCurrencySymbol] => R$
    [merchantAmount] => 5000
    [merchantCurrencyCode] => BRL
    [merchantCurrencySymbol] => R$
    [merchantCategoryCode] => fastFoodRestaurants
    [merchantCategoryNumber] => 5814
    [merchantCategoryType] => food
    [merchantCountryCode] => BRA
    [acquirerId] => 5656565656565656
    [merchantId] => 5656565656565656
    [merchantName] => Stark Store
    [walletId] =>
    [methodCode] => chip
    [score] => 0.9775689825217906
    [issuingTransactionIds] => Array ( [0] => 5155165527080960 )
    [endToEndId] => 79fcf95d-1dfb-40db-9fa8-679e329c58f0
    [zipCode] => 01311-000
    [status] => approved
    [tags] => Array ( )
    [metadata] => Array ( )
    [description] =>
    [confirmed] => DateTime Object ( [date] => 2022-01-01 00:00:02.000000 )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingPurchase({
    "id": "5715709195239424",
    "holderName": "Tony Stark",
    "productId": "654321",
    "cardId": "7834882116598271",
    "cardEnding": "1234",
    "purpose": "purchase",
    "installmentCount": 1,
    "amount": 5000,
    "tax": 0,
    "merchantFee": 0,
    "issuerAmount": 5000,
    "issuerCurrencyCode": "BRL",
    "issuerCurrencySymbol": "R$",
    "merchantAmount": 5000,
    "merchantCurrencyCode": "BRL",
    "merchantCurrencySymbol": "R$",
    "merchantCategoryCode": "fastFoodRestaurants",
    "merchantCategoryNumber": 5814,
    "merchantCategoryType": "food",
    "merchantCountryCode": "BRA",
    "acquirerId": "5656565656565656",
    "merchantId": "5656565656565656",
    "merchantName": "Stark Store",
    "walletId": null,
    "methodCode": "chip",
    "score": 0.9775689825217906,
    "issuingTransactionIds": ["5155165527080960"],
    "endToEndId": "79fcf95d-1dfb-40db-9fa8-679e329c58f0",
    "zipCode": "01311-000",
    "status": "approved",
    "tags": [],
    "metadata": {},
    "description": "",
    "confirmed": "2022-01-01T00:00:02.000000+00:00",
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingpurchase(
    id: 5715709195239424,
    holder_name: Tony Stark,
    product_id: 654321,
    card_id: 7834882116598271,
    card_ending: 1234,
    purpose: purchase,
    installment_count: 1,
    amount: 5000,
    tax: 0,
    issuer_amount: 5000,
    issuer_currency_code: BRL,
    issuer_currency_symbol: R$,
    merchant_amount: 5000,
    merchant_currency_code: BRL,
    merchant_currency_symbol: R$,
    merchant_category_code: fastFoodRestaurants,
    merchant_category_number: 5814,
    merchant_category_type: food,
    merchant_country_code: BRA,
    acquirer_id: 5656565656565656,
    merchant_id: 5656565656565656,
    merchant_name: Stark Store,
    merchant_fee: 0,
    wallet_id: nil,
    method_code: chip,
    score: 0.9775689825217906,
    end_to_end_id: 79fcf95d-1dfb-40db-9fa8-679e329c58f0,
    tags: [],
    issuing_transaction_ids: ["5155165527080960"],
    status: approved,
    description: ,
    metadata: {},
    zip_code: 01311-000,
    confirmed: 2022-01-01T00:00:02+00:00,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingPurchase{
    id: "5715709195239424",
    holder_name: "Tony Stark",
    product_id: "654321",
    card_id: "7834882116598271",
    card_ending: "1234",
    purpose: "purchase",
    installment_count: 1,
    amount: 5000,
    tax: 0,
    merchant_fee: 0,
    issuer_amount: 5000,
    issuer_currency_code: "BRL",
    issuer_currency_symbol: "R$",
    merchant_amount: 5000,
    merchant_currency_code: "BRL",
    merchant_currency_symbol: "R$",
    merchant_category_code: "fastFoodRestaurants",
    merchant_category_number: 5814,
    merchant_category_type: "food",
    merchant_country_code: "BRA",
    acquirer_id: "5656565656565656",
    merchant_id: "5656565656565656",
    merchant_name: "Stark Store",
    wallet_id: nil,
    method_code: "chip",
    score: 0.9775689825217906,
    issuing_transaction_ids: ["5155165527080960"],
    end_to_end_id: "79fcf95d-1dfb-40db-9fa8-679e329c58f0",
    zip_code: "01311-000",
    status: "approved",
    tags: [],
    metadata: %{},
    description: "",
    confirmed: "2022-01-01T00:00:02.000000+00:00",
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingPurchase(
    Id: 5715709195239424,
    HolderName: Tony Stark,
    ProductId: 654321,
    CardId: 7834882116598271,
    CardEnding: 1234,
    Purpose: purchase,
    InstallmentCount: 1,
    Amount: 5000,
    Tax: 0,
    MerchantFee: 0,
    IssuerAmount: 5000,
    IssuerCurrencyCode: BRL,
    IssuerCurrencySymbol: R$,
    MerchantAmount: 5000,
    MerchantCurrencyCode: BRL,
    MerchantCurrencySymbol: R$,
    MerchantCategoryCode: fastFoodRestaurants,
    MerchantCategoryNumber: 5814,
    MerchantCategoryType: food,
    MerchantCountryCode: BRA,
    AcquirerId: 5656565656565656,
    MerchantId: 5656565656565656,
    MerchantName: Stark Store,
    WalletId: ,
    MethodCode: chip,
    Score: 0.9775689825217906,
    IssuingTransactionIds: [5155165527080960],
    EndToEndId: 79fcf95d-1dfb-40db-9fa8-679e329c58f0,
    ZipCode: 01311-000,
    Status: approved,
    Tags: [],
    Metadata: {},
    Description: ,
    Confirmed: 01/01/2022 00:00:02,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    HolderName:Tony Stark
    ProductId:654321
    CardId:7834882116598271
    CardEnding:1234
    Purpose:purchase
    InstallmentCount:1
    Amount:5000
    Tax:0
    MerchantFee:0
    IssuerAmount:5000
    IssuerCurrencyCode:BRL
    IssuerCurrencySymbol:R$
    MerchantAmount:5000
    MerchantCurrencyCode:BRL
    MerchantCurrencySymbol:R$
    MerchantCategoryCode:fastFoodRestaurants
    MerchantCategoryNumber:5814
    MerchantCategoryType:food
    MerchantCountryCode:BRA
    AcquirerId:5656565656565656
    MerchantId:5656565656565656
    MerchantName:Stark Store
    WalletId:
    MethodCode:chip
    Score:0.9775689825217906
    IssuingTransactionIds:[5155165527080960]
    EndToEndId:79fcf95d-1dfb-40db-9fa8-679e329c58f0
    ZipCode:01311-000
    Status:approved
    Tags:[]
    Metadata:map[]
    Description:
    Confirmed:2022-01-01 00:00:02 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "purchases": [
        {
            "id": "5715709195239424",
            "holderName": "Tony Stark",
            "productId": "654321",
            "cardId": "7834882116598271",
            "cardEnding": "1234",
            "purpose": "purchase",
            "installmentCount": 1,
            "amount": 5000,
            "tax": 0,
            "merchantFee": 0,
            "issuerAmount": 5000,
            "issuerCurrencyCode": "BRL",
            "issuerCurrencySymbol": "R$",
            "merchantAmount": 5000,
            "merchantCurrencyCode": "BRL",
            "merchantCurrencySymbol": "R$",
            "merchantCategoryCode": "fastFoodRestaurants",
            "merchantCategoryNumber": 5814,
            "merchantCategoryType": "food",
            "merchantCountryCode": "BRA",
            "acquirerId": "5656565656565656",
            "merchantId": "5656565656565656",
            "merchantName": "Stark Store",
            "walletId": null,
            "methodCode": "chip",
            "score": 0.9775689825217906,
            "issuingTransactionIds": ["5155165527080960"],
            "endToEndId": "79fcf95d-1dfb-40db-9fa8-679e329c58f0",
            "zipCode": "01311-000",
            "status": "approved",
            "tags": [],
            "metadata": {},
            "description": "",
            "confirmed": "2022-01-01T00:00:02.000000+00:00",
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Purchase

Get a single issuing purchase by its id.

Parameters

id REQUIRED

Id of the issuing purchase entity.

ENDPOINT
GET /v2/issuing-purchase/:id
REQUEST

Python

import starkinfra

purchase = starkinfra.issuingpurchase.get("5715709195239424")

print(purchase)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let purchase = await starkinfra.issuingPurchase.get('5715709195239424');
    console.log(purchase);
})();
  

PHP

$purchase = StarkInfra\IssuingPurchase::get("5715709195239424");

print_r($purchase);
  

Java

import com.starkinfra.*;

IssuingPurchase purchase = IssuingPurchase.get("5715709195239424");

System.out.println(purchase);
  

Ruby

require('starkinfra')

purchase = StarkInfra::IssuingPurchase.get("5715709195239424")

puts purchase
  

Elixir

purchase = StarkInfra.IssuingPurchase.get!("5715709195239424")

IO.inspect(purchase)
  

C#

using System;

StarkInfra.IssuingPurchase purchase = StarkInfra.IssuingPurchase.Get("5715709195239424");

Console.WriteLine(purchase);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingpurchase"
)

func main() {

    purchase, err := issuingpurchase.Get("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", purchase)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-purchase/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingPurchase(
    id=5715709195239424,
    holder_name=Tony Stark,
    product_id=654321,
    card_id=7834882116598271,
    card_ending=1234,
    purpose=purchase,
    installment_count=1,
    amount=5000,
    tax=0,
    issuer_amount=5000,
    issuer_currency_code=BRL,
    issuer_currency_symbol=R$,
    merchant_amount=5000,
    merchant_currency_code=BRL,
    merchant_currency_symbol=R$,
    merchant_category_code=fastFoodRestaurants,
    merchant_category_number=5814,
    merchant_category_type=food,
    merchant_country_code=BRA,
    acquirer_id=5656565656565656,
    merchant_id=5656565656565656,
    merchant_name=Stark Store,
    merchant_fee=0,
    wallet_id=None,
    method_code=chip,
    score=0.9775689825217906,
    end_to_end_id=79fcf95d-1dfb-40db-9fa8-679e329c58f0,
    tags=[],
    issuing_transaction_ids=['5155165527080960'],
    status=approved,
    description=,
    metadata={},
    zip_code=01311-000,
    confirmed=2022-01-01 00:00:02,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  
  

Javascript

IssuingPurchase {
    id: '5715709195239424',
    holderName: 'Tony Stark',
    productId: '654321',
    cardId: '7834882116598271',
    cardEnding: '1234',
    purpose: 'purchase',
    installmentCount: 1,
    amount: 5000,
    tax: 0,
    issuerAmount: 5000,
    issuerCurrencyCode: 'BRL',
    issuerCurrencySymbol: 'R$',
    merchantAmount: 5000,
    merchantCurrencyCode: 'BRL',
    merchantCurrencySymbol: 'R$',
    merchantCategoryCode: 'fastFoodRestaurants',
    merchantCategoryNumber: 5814,
    merchantCategoryType: 'food',
    merchantCountryCode: 'BRA',
    acquirerId: '5656565656565656',
    merchantId: '5656565656565656',
    merchantName: 'Stark Store',
    merchantFee: 0,
    walletId: null,
    methodCode: 'chip',
    score: 0.9775689825217906,
    endToEndId: '79fcf95d-1dfb-40db-9fa8-679e329c58f0',
    tags: [],
    issuingTransactionIds: [ '5155165527080960' ],
    status: 'approved',
    description: '',
    confirmed: '2022-01-01T00:00:02.000000+00:00',
    metadata: {},
    zipCode: '01311-000',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingPurchase Object
(
    [id] => 5715709195239424
    [holderName] => Tony Stark
    [productId] => 654321
    [cardId] => 7834882116598271
    [cardEnding] => 1234
    [purpose] => purchase
    [installmentCount] => 1
    [amount] => 5000
    [tax] => 0
    [merchantFee] => 0
    [issuerAmount] => 5000
    [issuerCurrencyCode] => BRL
    [issuerCurrencySymbol] => R$
    [merchantAmount] => 5000
    [merchantCurrencyCode] => BRL
    [merchantCurrencySymbol] => R$
    [merchantCategoryCode] => fastFoodRestaurants
    [merchantCategoryNumber] => 5814
    [merchantCategoryType] => food
    [merchantCountryCode] => BRA
    [acquirerId] => 5656565656565656
    [merchantId] => 5656565656565656
    [merchantName] => Stark Store
    [walletId] =>
    [methodCode] => chip
    [score] => 0.9775689825217906
    [issuingTransactionIds] => Array ( [0] => 5155165527080960 )
    [endToEndId] => 79fcf95d-1dfb-40db-9fa8-679e329c58f0
    [zipCode] => 01311-000
    [status] => approved
    [tags] => Array ( )
    [metadata] => Array ( )
    [description] =>
    [confirmed] => DateTime Object ( [date] => 2022-01-01 00:00:02.000000 )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingPurchase({
    "id": "5715709195239424",
    "holderName": "Tony Stark",
    "productId": "654321",
    "cardId": "7834882116598271",
    "cardEnding": "1234",
    "purpose": "purchase",
    "installmentCount": 1,
    "amount": 5000,
    "tax": 0,
    "merchantFee": 0,
    "issuerAmount": 5000,
    "issuerCurrencyCode": "BRL",
    "issuerCurrencySymbol": "R$",
    "merchantAmount": 5000,
    "merchantCurrencyCode": "BRL",
    "merchantCurrencySymbol": "R$",
    "merchantCategoryCode": "fastFoodRestaurants",
    "merchantCategoryNumber": 5814,
    "merchantCategoryType": "food",
    "merchantCountryCode": "BRA",
    "acquirerId": "5656565656565656",
    "merchantId": "5656565656565656",
    "merchantName": "Stark Store",
    "walletId": null,
    "methodCode": "chip",
    "score": 0.9775689825217906,
    "issuingTransactionIds": ["5155165527080960"],
    "endToEndId": "79fcf95d-1dfb-40db-9fa8-679e329c58f0",
    "zipCode": "01311-000",
    "status": "approved",
    "tags": [],
    "metadata": {},
    "description": "",
    "confirmed": "2022-01-01T00:00:02.000000+00:00",
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingpurchase(
    id: 5715709195239424,
    holder_name: Tony Stark,
    product_id: 654321,
    card_id: 7834882116598271,
    card_ending: 1234,
    purpose: purchase,
    installment_count: 1,
    amount: 5000,
    tax: 0,
    issuer_amount: 5000,
    issuer_currency_code: BRL,
    issuer_currency_symbol: R$,
    merchant_amount: 5000,
    merchant_currency_code: BRL,
    merchant_currency_symbol: R$,
    merchant_category_code: fastFoodRestaurants,
    merchant_category_number: 5814,
    merchant_category_type: food,
    merchant_country_code: BRA,
    acquirer_id: 5656565656565656,
    merchant_id: 5656565656565656,
    merchant_name: Stark Store,
    merchant_fee: 0,
    wallet_id: nil,
    method_code: chip,
    score: 0.9775689825217906,
    end_to_end_id: 79fcf95d-1dfb-40db-9fa8-679e329c58f0,
    tags: [],
    issuing_transaction_ids: ["5155165527080960"],
    status: approved,
    description: ,
    metadata: {},
    zip_code: 01311-000,
    confirmed: 2022-01-01T00:00:02+00:00,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingPurchase{
    id: "5715709195239424",
    holder_name: "Tony Stark",
    product_id: "654321",
    card_id: "7834882116598271",
    card_ending: "1234",
    purpose: "purchase",
    installment_count: 1,
    amount: 5000,
    tax: 0,
    merchant_fee: 0,
    issuer_amount: 5000,
    issuer_currency_code: "BRL",
    issuer_currency_symbol: "R$",
    merchant_amount: 5000,
    merchant_currency_code: "BRL",
    merchant_currency_symbol: "R$",
    merchant_category_code: "fastFoodRestaurants",
    merchant_category_number: 5814,
    merchant_category_type: "food",
    merchant_country_code: "BRA",
    acquirer_id: "5656565656565656",
    merchant_id: "5656565656565656",
    merchant_name: "Stark Store",
    wallet_id: nil,
    method_code: "chip",
    score: 0.9775689825217906,
    issuing_transaction_ids: ["5155165527080960"],
    end_to_end_id: "79fcf95d-1dfb-40db-9fa8-679e329c58f0",
    zip_code: "01311-000",
    status: "approved",
    tags: [],
    metadata: %{},
    description: "",
    confirmed: "2022-01-01T00:00:02.000000+00:00",
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingPurchase(
    Id: 5715709195239424,
    HolderName: Tony Stark,
    ProductId: 654321,
    CardId: 7834882116598271,
    CardEnding: 1234,
    Purpose: purchase,
    InstallmentCount: 1,
    Amount: 5000,
    Tax: 0,
    MerchantFee: 0,
    IssuerAmount: 5000,
    IssuerCurrencyCode: BRL,
    IssuerCurrencySymbol: R$,
    MerchantAmount: 5000,
    MerchantCurrencyCode: BRL,
    MerchantCurrencySymbol: R$,
    MerchantCategoryCode: fastFoodRestaurants,
    MerchantCategoryNumber: 5814,
    MerchantCategoryType: food,
    MerchantCountryCode: BRA,
    AcquirerId: 5656565656565656,
    MerchantId: 5656565656565656,
    MerchantName: Stark Store,
    WalletId: ,
    MethodCode: chip,
    Score: 0.9775689825217906,
    IssuingTransactionIds: [5155165527080960],
    EndToEndId: 79fcf95d-1dfb-40db-9fa8-679e329c58f0,
    ZipCode: 01311-000,
    Status: approved,
    Tags: [],
    Metadata: {},
    Description: ,
    Confirmed: 01/01/2022 00:00:02,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    HolderName:Tony Stark
    ProductId:654321
    CardId:7834882116598271
    CardEnding:1234
    Purpose:purchase
    InstallmentCount:1
    Amount:5000
    Tax:0
    MerchantFee:0
    IssuerAmount:5000
    IssuerCurrencyCode:BRL
    IssuerCurrencySymbol:R$
    MerchantAmount:5000
    MerchantCurrencyCode:BRL
    MerchantCurrencySymbol:R$
    MerchantCategoryCode:fastFoodRestaurants
    MerchantCategoryNumber:5814
    MerchantCategoryType:food
    MerchantCountryCode:BRA
    AcquirerId:5656565656565656
    MerchantId:5656565656565656
    MerchantName:Stark Store
    WalletId:
    MethodCode:chip
    Score:0.9775689825217906
    IssuingTransactionIds:[5155165527080960]
    EndToEndId:79fcf95d-1dfb-40db-9fa8-679e329c58f0
    ZipCode:01311-000
    Status:approved
    Tags:[]
    Metadata:map[]
    Description:
    Confirmed:2022-01-01 00:00:02 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "purchase": {
        "id": "5715709195239424",
        "holderName": "Tony Stark",
        "productId": "654321",
        "cardId": "7834882116598271",
        "cardEnding": "1234",
        "purpose": "purchase",
        "installmentCount": 1,
        "amount": 5000,
        "tax": 0,
        "merchantFee": 0,
        "issuerAmount": 5000,
        "issuerCurrencyCode": "BRL",
        "issuerCurrencySymbol": "R$",
        "merchantAmount": 5000,
        "merchantCurrencyCode": "BRL",
        "merchantCurrencySymbol": "R$",
        "merchantCategoryCode": "fastFoodRestaurants",
        "merchantCategoryNumber": 5814,
        "merchantCategoryType": "food",
        "merchantCountryCode": "BRA",
        "acquirerId": "5656565656565656",
        "merchantId": "5656565656565656",
        "merchantName": "Stark Store",
        "walletId": null,
        "methodCode": "chip",
        "score": 0.9775689825217906,
        "issuingTransactionIds": ["5155165527080960"],
        "endToEndId": "79fcf95d-1dfb-40db-9fa8-679e329c58f0",
        "zipCode": "01311-000",
        "status": "approved",
        "tags": [],
        "metadata": {},
        "description": "",
        "confirmed": "2022-01-01T00:00:02.000000+00:00",
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Update an Issuing Purchase

Update the tags of an existing issuing purchase.

Parameters

id REQUIRED

Id of the issuing purchase entity.

tags OPTIONAL

New array of strings to tag the purchase.

description OPTIONAL

New description for the purchase. Max of 140 characters.

ENDPOINT
PATCH /v2/issuing-purchase/:id
REQUEST

Python

import starkinfra

purchase = starkinfra.issuingpurchase.update(
    "5715709195239424",
    tags=["reconciled", "month: january"]
)

print(purchase)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let purchase = await starkinfra.issuingPurchase.update('5715709195239424', {
        tags: ['reconciled', 'month: january']
    });
    console.log(purchase);
})();
  

PHP

$purchase = StarkInfra\IssuingPurchase::update("5715709195239424", [
    "tags" => ["reconciled", "month: january"]
]);

print_r($purchase);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap patchData = new HashMap<>();
patchData.put("tags", new String[]{"reconciled", "month: january"});

IssuingPurchase purchase = IssuingPurchase.update("5715709195239424", patchData);

System.out.println(purchase);
  

Ruby

require('starkinfra')

purchase = StarkInfra::IssuingPurchase.update(
    "5715709195239424",
    tags: ["reconciled", "month: january"]
)

puts purchase
  

Elixir

purchase = StarkInfra.IssuingPurchase.update!(
    "5715709195239424",
    tags: ["reconciled", "month: january"]
)

IO.inspect(purchase)
  

C#

using System;
using System.Collections.Generic;

StarkInfra.IssuingPurchase purchase = StarkInfra.IssuingPurchase.Update(
    "5715709195239424",
    new Dictionary {
        { "tags", new List { "reconciled", "month: january" } }
    }
);

Console.WriteLine(purchase);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingpurchase"
)

func main() {

    purchase, err := issuingpurchase.Update(
        "5715709195239424",
        map[string]interface{}{
            "tags": []string{"reconciled", "month: january"},
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", purchase)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/issuing-purchase/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tags": ["reconciled", "month: january"]
}'
  
RESPONSE

Python

IssuingPurchase(
    id=5715709195239424,
    holder_name=Tony Stark,
    product_id=654321,
    card_id=7834882116598271,
    card_ending=1234,
    purpose=purchase,
    installment_count=1,
    amount=5000,
    tax=0,
    issuer_amount=5000,
    issuer_currency_code=BRL,
    issuer_currency_symbol=R$,
    merchant_amount=5000,
    merchant_currency_code=BRL,
    merchant_currency_symbol=R$,
    merchant_category_code=fastFoodRestaurants,
    merchant_category_number=5814,
    merchant_category_type=food,
    merchant_country_code=BRA,
    acquirer_id=5656565656565656,
    merchant_id=5656565656565656,
    merchant_name=Stark Store,
    merchant_fee=0,
    wallet_id=None,
    method_code=chip,
    score=0.9775689825217906,
    end_to_end_id=79fcf95d-1dfb-40db-9fa8-679e329c58f0,
    tags=['reconciled', 'month: january'],
    issuing_transaction_ids=['5155165527080960'],
    status=approved,
    description=,
    metadata={},
    zip_code=01311-000,
    confirmed=2022-01-01 00:00:02,
    created=2022-01-01 00:00:00,
    updated=2022-06-01 00:00:00
)
  
  

Javascript

IssuingPurchase {
    id: '5715709195239424',
    holderName: 'Tony Stark',
    productId: '654321',
    cardId: '7834882116598271',
    cardEnding: '1234',
    purpose: 'purchase',
    installmentCount: 1,
    amount: 5000,
    tax: 0,
    issuerAmount: 5000,
    issuerCurrencyCode: 'BRL',
    issuerCurrencySymbol: 'R$',
    merchantAmount: 5000,
    merchantCurrencyCode: 'BRL',
    merchantCurrencySymbol: 'R$',
    merchantCategoryCode: 'fastFoodRestaurants',
    merchantCategoryNumber: 5814,
    merchantCategoryType: 'food',
    merchantCountryCode: 'BRA',
    acquirerId: '5656565656565656',
    merchantId: '5656565656565656',
    merchantName: 'Stark Store',
    merchantFee: 0,
    walletId: null,
    methodCode: 'chip',
    score: 0.9775689825217906,
    endToEndId: '79fcf95d-1dfb-40db-9fa8-679e329c58f0',
    tags: [ 'reconciled', 'month: january' ],
    issuingTransactionIds: [ '5155165527080960' ],
    status: 'approved',
    description: '',
    confirmed: '2022-01-01T00:00:02.000000+00:00',
    metadata: {},
    zipCode: '01311-000',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfra\IssuingPurchase Object
(
    [id] => 5715709195239424
    [holderName] => Tony Stark
    [productId] => 654321
    [cardId] => 7834882116598271
    [cardEnding] => 1234
    [purpose] => purchase
    [installmentCount] => 1
    [amount] => 5000
    [tax] => 0
    [merchantFee] => 0
    [issuerAmount] => 5000
    [issuerCurrencyCode] => BRL
    [issuerCurrencySymbol] => R$
    [merchantAmount] => 5000
    [merchantCurrencyCode] => BRL
    [merchantCurrencySymbol] => R$
    [merchantCategoryCode] => fastFoodRestaurants
    [merchantCategoryNumber] => 5814
    [merchantCategoryType] => food
    [merchantCountryCode] => BRA
    [acquirerId] => 5656565656565656
    [merchantId] => 5656565656565656
    [merchantName] => Stark Store
    [walletId] =>
    [methodCode] => chip
    [score] => 0.9775689825217906
    [issuingTransactionIds] => Array ( [0] => 5155165527080960 )
    [endToEndId] => 79fcf95d-1dfb-40db-9fa8-679e329c58f0
    [zipCode] => 01311-000
    [status] => approved
    [tags] => Array ( [0] => reconciled [1] => month: january )
    [metadata] => Array ( )
    [description] =>
    [confirmed] => DateTime Object ( [date] => 2022-01-01 00:00:02.000000 )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-06-01 00:00:00.000000 )
)
  
  

Java

IssuingPurchase({
    "id": "5715709195239424",
    "holderName": "Tony Stark",
    "productId": "654321",
    "cardId": "7834882116598271",
    "cardEnding": "1234",
    "purpose": "purchase",
    "installmentCount": 1,
    "amount": 5000,
    "tax": 0,
    "merchantFee": 0,
    "issuerAmount": 5000,
    "issuerCurrencyCode": "BRL",
    "issuerCurrencySymbol": "R$",
    "merchantAmount": 5000,
    "merchantCurrencyCode": "BRL",
    "merchantCurrencySymbol": "R$",
    "merchantCategoryCode": "fastFoodRestaurants",
    "merchantCategoryNumber": 5814,
    "merchantCategoryType": "food",
    "merchantCountryCode": "BRA",
    "acquirerId": "5656565656565656",
    "merchantId": "5656565656565656",
    "merchantName": "Stark Store",
    "walletId": null,
    "methodCode": "chip",
    "score": 0.9775689825217906,
    "issuingTransactionIds": ["5155165527080960"],
    "endToEndId": "79fcf95d-1dfb-40db-9fa8-679e329c58f0",
    "zipCode": "01311-000",
    "status": "approved",
    "tags": ["reconciled", "month: january"],
    "metadata": {},
    "description": "",
    "confirmed": "2022-01-01T00:00:02.000000+00:00",
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingpurchase(
    id: 5715709195239424,
    holder_name: Tony Stark,
    product_id: 654321,
    card_id: 7834882116598271,
    card_ending: 1234,
    purpose: purchase,
    installment_count: 1,
    amount: 5000,
    tax: 0,
    issuer_amount: 5000,
    issuer_currency_code: BRL,
    issuer_currency_symbol: R$,
    merchant_amount: 5000,
    merchant_currency_code: BRL,
    merchant_currency_symbol: R$,
    merchant_category_code: fastFoodRestaurants,
    merchant_category_number: 5814,
    merchant_category_type: food,
    merchant_country_code: BRA,
    acquirer_id: 5656565656565656,
    merchant_id: 5656565656565656,
    merchant_name: Stark Store,
    merchant_fee: 0,
    wallet_id: nil,
    method_code: chip,
    score: 0.9775689825217906,
    end_to_end_id: 79fcf95d-1dfb-40db-9fa8-679e329c58f0,
    tags: ["reconciled", "month: january"],
    issuing_transaction_ids: ["5155165527080960"],
    status: approved,
    description: ,
    metadata: {},
    zip_code: 01311-000,
    confirmed: 2022-01-01T00:00:02+00:00,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-06-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingPurchase{
    id: "5715709195239424",
    holder_name: "Tony Stark",
    product_id: "654321",
    card_id: "7834882116598271",
    card_ending: "1234",
    purpose: "purchase",
    installment_count: 1,
    amount: 5000,
    tax: 0,
    merchant_fee: 0,
    issuer_amount: 5000,
    issuer_currency_code: "BRL",
    issuer_currency_symbol: "R$",
    merchant_amount: 5000,
    merchant_currency_code: "BRL",
    merchant_currency_symbol: "R$",
    merchant_category_code: "fastFoodRestaurants",
    merchant_category_number: 5814,
    merchant_category_type: "food",
    merchant_country_code: "BRA",
    acquirer_id: "5656565656565656",
    merchant_id: "5656565656565656",
    merchant_name: "Stark Store",
    wallet_id: nil,
    method_code: "chip",
    score: 0.9775689825217906,
    issuing_transaction_ids: ["5155165527080960"],
    end_to_end_id: "79fcf95d-1dfb-40db-9fa8-679e329c58f0",
    zip_code: "01311-000",
    status: "approved",
    tags: ["reconciled", "month: january"],
    metadata: %{},
    description: "",
    confirmed: "2022-01-01T00:00:02.000000+00:00",
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-06-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingPurchase(
    Id: 5715709195239424,
    HolderName: Tony Stark,
    ProductId: 654321,
    CardId: 7834882116598271,
    CardEnding: 1234,
    Purpose: purchase,
    InstallmentCount: 1,
    Amount: 5000,
    Tax: 0,
    MerchantFee: 0,
    IssuerAmount: 5000,
    IssuerCurrencyCode: BRL,
    IssuerCurrencySymbol: R$,
    MerchantAmount: 5000,
    MerchantCurrencyCode: BRL,
    MerchantCurrencySymbol: R$,
    MerchantCategoryCode: fastFoodRestaurants,
    MerchantCategoryNumber: 5814,
    MerchantCategoryType: food,
    MerchantCountryCode: BRA,
    AcquirerId: 5656565656565656,
    MerchantId: 5656565656565656,
    MerchantName: Stark Store,
    WalletId: ,
    MethodCode: chip,
    Score: 0.9775689825217906,
    IssuingTransactionIds: [5155165527080960],
    EndToEndId: 79fcf95d-1dfb-40db-9fa8-679e329c58f0,
    ZipCode: 01311-000,
    Status: approved,
    Tags: [reconciled, month: january],
    Metadata: {},
    Description: ,
    Confirmed: 01/01/2022 00:00:02,
    Created: 01/01/2022 00:00:00,
    Updated: 06/01/2022 00:00:00
)
  
  

Go

{
    Id:5715709195239424
    HolderName:Tony Stark
    ProductId:654321
    CardId:7834882116598271
    CardEnding:1234
    Purpose:purchase
    InstallmentCount:1
    Amount:5000
    Tax:0
    MerchantFee:0
    IssuerAmount:5000
    IssuerCurrencyCode:BRL
    IssuerCurrencySymbol:R$
    MerchantAmount:5000
    MerchantCurrencyCode:BRL
    MerchantCurrencySymbol:R$
    MerchantCategoryCode:fastFoodRestaurants
    MerchantCategoryNumber:5814
    MerchantCategoryType:food
    MerchantCountryCode:BRA
    AcquirerId:5656565656565656
    MerchantId:5656565656565656
    MerchantName:Stark Store
    WalletId:
    MethodCode:chip
    Score:0.9775689825217906
    IssuingTransactionIds:[5155165527080960]
    EndToEndId:79fcf95d-1dfb-40db-9fa8-679e329c58f0
    ZipCode:01311-000
    Status:approved
    Tags:[reconciled month: january]
    Metadata:map[]
    Description:
    Confirmed:2022-01-01 00:00:02 +0000 +0000
    Updated:2022-06-01 00:00:00 +0000 +0000
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "purchase": {
        "id": "5715709195239424",
        "holderName": "Tony Stark",
        "productId": "654321",
        "cardId": "7834882116598271",
        "cardEnding": "1234",
        "purpose": "purchase",
        "installmentCount": 1,
        "amount": 5000,
        "tax": 0,
        "merchantFee": 0,
        "issuerAmount": 5000,
        "issuerCurrencyCode": "BRL",
        "issuerCurrencySymbol": "R$",
        "merchantAmount": 5000,
        "merchantCurrencyCode": "BRL",
        "merchantCurrencySymbol": "R$",
        "merchantCategoryCode": "fastFoodRestaurants",
        "merchantCategoryNumber": 5814,
        "merchantCategoryType": "food",
        "merchantCountryCode": "BRA",
        "acquirerId": "5656565656565656",
        "merchantId": "5656565656565656",
        "merchantName": "Stark Store",
        "walletId": null,
        "methodCode": "chip",
        "score": 0.9775689825217906,
        "issuingTransactionIds": ["5155165527080960"],
        "endToEndId": "79fcf95d-1dfb-40db-9fa8-679e329c58f0",
        "zipCode": "01311-000",
        "status": "approved",
        "tags": ["reconciled", "month: january"],
        "metadata": {},
        "description": "",
        "confirmed": "2022-01-01T00:00:02.000000+00:00",
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00"
    }
}
  

List Issuing Purchase Logs

Get a paged list of issuing purchase logs.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

types OPTIONAL

Filter logs by log types.

purchaseIds OPTIONAL

Array of purchase ids to filter logs.

ENDPOINT
GET /v2/issuing-purchase/log
REQUEST

Python

import starkinfra

logs = starkinfra.issuingpurchase.log.query(
    limit=10,
    types=["approved"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let logs = await starkinfra.issuingPurchase.log.query({
        limit: 10,
        types: ['approved']
    });

    for await (let log of logs) {
        console.log(log);
    }
})();
  

PHP

$logs = StarkInfra\IssuingPurchase\Log::query([
    "limit" => 10,
    "types" => ["approved"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("types", new String[]{"approved"});

Generator logs = IssuingPurchase.Log.query(params);

for (IssuingPurchase.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::IssuingPurchase::Log.query(
    limit: 10,
    types: ["approved"]
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.IssuingPurchase.Log.query!(
    limit: 10,
    types: ["approved"]
)

logs |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable logs = StarkInfra.IssuingPurchase.Log.Query(
    limit: 10,
    types: new List { "approved" }
);

foreach (StarkInfra.IssuingPurchase.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingpurchase/log"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["types"] = []string{"approved"}

    logs := log.Query(params, nil)

    for log := range logs {
        fmt.Printf("%+v", log)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-purchase/log?limit=10&types=approved' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6724771005489152,
    type=approved,
    purchase=IssuingPurchase(id=5715709195239424, amount=5000, status=approved),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '6724771005489152',
    type: 'approved',
    purchase: IssuingPurchase { id: '5715709195239424', amount: 5000, status: 'approved' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingPurchase\Log Object
(
    [id] => 6724771005489152
    [type] => approved
    [purchase] => StarkInfra\IssuingPurchase Object ( [id] => 5715709195239424 [amount] => 5000 [status] => approved )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingPurchase.Log({
    "id": "6724771005489152",
    "type": "approved",
    "purchase": {"id": "5715709195239424", "amount": 5000, "status": "approved"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 6724771005489152,
    type: approved,
    purchase: issuingpurchase(id: 5715709195239424, amount: 5000, status: approved),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingPurchase.Log{
    id: "6724771005489152",
    type: "approved",
    purchase: %StarkInfra.IssuingPurchase{id: "5715709195239424", amount: 5000, status: "approved"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingPurchase.Log(
    Id: 6724771005489152,
    Type: approved,
    Purchase: IssuingPurchase(Id: 5715709195239424, Amount: 5000, Status: approved),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:6724771005489152
    Type:approved
    Purchase:{Id:5715709195239424 Amount:5000 Status:approved}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6724771005489152",
            "type": "approved",
            "purchase": {"id": "5715709195239424", "amount": 5000, "status": "approved"},
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Issuing Purchase Log

Get a single issuing purchase log by its id.

Parameters

id REQUIRED

Id of the log entity.

ENDPOINT
GET /v2/issuing-purchase/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.issuingpurchase.log.get("6724771005489152")

print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let log = await starkinfra.issuingPurchase.log.get('6724771005489152');
    console.log(log);
})();
  

PHP

$log = StarkInfra\IssuingPurchase\Log::get("6724771005489152");

print_r($log);
  

Java

import com.starkinfra.*;

IssuingPurchase.Log log = IssuingPurchase.Log.get("6724771005489152");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::IssuingPurchase::Log.get("6724771005489152")

puts log
  

Elixir

log = StarkInfra.IssuingPurchase.Log.get!("6724771005489152")

IO.inspect(log)
  

C#

using System;

StarkInfra.IssuingPurchase.Log log = StarkInfra.IssuingPurchase.Log.Get("6724771005489152");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingpurchase/log"
)

func main() {

    purchaseLog, err := log.Get("6724771005489152", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", purchaseLog)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-purchase/log/6724771005489152' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6724771005489152,
    type=approved,
    purchase=IssuingPurchase(id=5715709195239424, amount=5000, status=approved),
    created=2022-01-01 00:00:00
)
  

Javascript

Log {
    id: '6724771005489152',
    type: 'approved',
    purchase: IssuingPurchase { id: '5715709195239424', amount: 5000, status: 'approved' },
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingPurchase\Log Object
(
    [id] => 6724771005489152
    [type] => approved
    [purchase] => StarkInfra\IssuingPurchase Object ( [id] => 5715709195239424 [amount] => 5000 [status] => approved )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingPurchase.Log({
    "id": "6724771005489152",
    "type": "approved",
    "purchase": {"id": "5715709195239424", "amount": 5000, "status": "approved"},
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 6724771005489152,
    type: approved,
    purchase: issuingpurchase(id: 5715709195239424, amount: 5000, status: approved),
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingPurchase.Log{
    id: "6724771005489152",
    type: "approved",
    purchase: %StarkInfra.IssuingPurchase{id: "5715709195239424", amount: 5000, status: "approved"},
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingPurchase.Log(
    Id: 6724771005489152,
    Type: approved,
    Purchase: IssuingPurchase(Id: 5715709195239424, Amount: 5000, Status: approved),
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:6724771005489152
    Type:approved
    Purchase:{Id:5715709195239424 Amount:5000 Status:approved}
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "log": {
        "id": "6724771005489152",
        "type": "approved",
        "purchase": {"id": "5715709195239424", "amount": 5000, "status": "approved"},
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Issuing Preview Installment

The Issuing Preview Installment resource represents an upcoming installment of an installment purchase that has not been billed yet.

Use it to preview the amounts that will compose your future issuing billing invoices.

The Issuing Preview Installment object

Attributes

id STRING

Unique identifier for the issuing preview installment.

description STRING

Installment description, usually the merchant name.

amount INTEGER

Installment amount in cents. Example: 30000 (= R$ 300.00).

totalAmount INTEGER

Total amount in cents of the source purchase. Example: 90000 (= R$ 900.00).

source STRING

Entity that originated the installment. Example: "issuing-purchase/5155165527080960".

number INTEGER

Number of this installment. Example: 2.

count INTEGER

Total number of installments of the source purchase. Example: 3.

due STRING

Datetime when the installment will be billed. Example: "2022-02-01T00:00:00.000000+00:00".

tags LIST OF STRINGS

Array of strings to tag the entity for future queries.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

List Issuing Preview Installments

Get a list of issuing preview installments in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

sort OPTIONAL

Sort order for the results. Options: "created", "-created", "due", "-due". Default: "-created".

ids OPTIONAL

List of strings to get specific entities by ids.

tags OPTIONAL

List of strings to filter entities by tags.

ENDPOINT
GET /v2/issuing-preview-installment
REQUEST

Python

import starkinfra

installments = starkinfra.issuingpreviewinstallment.query(
    limit=10,
    sort="due"
)

for installment in installments:
    print(installment)
  
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let installments = await starkinfra.issuingPreviewInstallment.query({
        limit: 10,
        sort: 'due'
    });
    for await (let installment of installments) {
        console.log(installment);
    }
})();
  
  

PHP

$installments = StarkInfraIssuingPreviewInstallment::query([
    "limit" => 10,
    "sort" => "due"
]);

foreach ($installments as $installment) {
    print_r($installment);
}
  
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("sort", "due");

Generator installments = IssuingPreviewInstallment.query(params);

for (IssuingPreviewInstallment installment : installments) {
    System.out.println(installment);
}
  
  

Ruby

require('starkinfra')

installments = StarkInfra::IssuingPreviewInstallment.query(
    limit: 10,
    sort: "due"
)

installments.each do |installment|
    puts installment
end
  
  

Elixir

installments = StarkInfra.IssuingPreviewInstallment.query!(
    limit: 10,
    sort: "due"
)

installments |> Enum.each(&IO.inspect/1)
  
  

C#

using System;
using System.Collections.Generic;

IEnumerable installments = StarkInfra.IssuingPreviewInstallment.Query(
    limit: 10,
    sort: "due"
);

foreach (StarkInfra.IssuingPreviewInstallment installment in installments) {
    Console.WriteLine(installment);
}
  
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingpreviewinstallment"
)

func main() {

    var params = map[string]interface{}{
        "limit": 10,
        "sort":  "due",
    }

    installments := issuingpreviewinstallment.Query(params, nil)

    for installment := range installments {
        fmt.Printf("%+v", installment)
    }
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-preview-installment?limit=10&sort=due' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
  
RESPONSE

Python

IssuingPreviewInstallment(
    id=6724771005489152,
    description=Stark Coffee Shop,
    amount=30000,
    total_amount=90000,
    source=issuing-purchase/5155165527080960,
    number=2,
    count=3,
    due=2022-02-01 00:00:00,
    tags=[],
    created=2022-01-01 00:00:00
)
  
  

Javascript

IssuingPreviewInstallment {
    id: '6724771005489152',
    description: 'Stark Coffee Shop',
    amount: 30000,
    totalAmount: 90000,
    source: 'issuing-purchase/5155165527080960',
    number: 2,
    count: 3,
    due: '2022-02-01T00:00:00.000000+00:00',
    tags: [],
    created: '2022-01-01T00:00:00.000000+00:00'
}
  
  

PHP

StarkInfraIssuingPreviewInstallment Object
(
    [id] => 6724771005489152
    [description] => Stark Coffee Shop
    [amount] => 30000
    [totalAmount] => 90000
    [source] => issuing-purchase/5155165527080960
    [number] => 2
    [count] => 3
    [due] => DateTime Object ( [date] => 2022-02-01 00:00:00.000000 )
    [tags] => Array ( )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  
  

Java

IssuingPreviewInstallment({
    "id": "6724771005489152",
    "description": "Stark Coffee Shop",
    "amount": 30000,
    "totalAmount": 90000,
    "source": "issuing-purchase/5155165527080960",
    "number": 2,
    "count": 3,
    "due": "2022-02-01T00:00:00.000000+00:00",
    "tags": [],
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  
  

Ruby

issuingpreviewinstallment(
    id: 6724771005489152,
    description: Stark Coffee Shop,
    amount: 30000,
    total_amount: 90000,
    source: issuing-purchase/5155165527080960,
    number: 2,
    count: 3,
    due: 2022-02-01T00:00:00+00:00,
    tags: [],
    created: 2022-01-01T00:00:00+00:00
)
  
  

Elixir

%StarkInfra.IssuingPreviewInstallment{
    id: "6724771005489152",
    description: "Stark Coffee Shop",
    amount: 30000,
    total_amount: 90000,
    source: "issuing-purchase/5155165527080960",
    number: 2,
    count: 3,
    due: "2022-02-01T00:00:00.000000+00:00",
    tags: [],
    created: "2022-01-01T00:00:00.000000+00:00"
}
  
  

C#

IssuingPreviewInstallment(
    Id: 6724771005489152,
    Description: Stark Coffee Shop,
    Amount: 30000,
    TotalAmount: 90000,
    Source: issuing-purchase/5155165527080960,
    Number: 2,
    Count: 3,
    Due: 02/01/2022 00:00:00,
    Tags: {  },
    Created: 01/01/2022 00:00:00
)
  
  

Go

{
    Id:6724771005489152
    Description:Stark Coffee Shop
    Amount:30000
    TotalAmount:90000
    Source:issuing-purchase/5155165527080960
    Number:2
    Count:3
    Due:2022-02-01 00:00:00 +0000 +0000
    Tags:[]
    Created:2022-01-01 00:00:00 +0000 +0000
}
  
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "installments": [
        {
            "id": "6724771005489152",
            "description": "Stark Coffee Shop",
            "amount": 30000,
            "totalAmount": 90000,
            "source": "issuing-purchase/5155165527080960",
            "number": 2,
            "count": 3,
            "due": "2022-02-01T00:00:00.000000+00:00",
            "tags": [],
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ],
    "cursor": null
}
  
  

Issuing Transaction

The Issuing Transaction resource represents a change in your issuing balance.

Each purchase, invoice payment, withdrawal, or fee generates an issuing transaction.

Use transactions to reconcile your issuing balance and understand fund movements.

The Issuing Transaction object

Attributes

id STRING

Unique identifier for the issuing transaction.

amount INTEGER

Transaction amount in cents. Positive for credits, negative for debits.

balance INTEGER

Issuing balance in cents after this transaction.

description STRING

Description of the transaction.

source STRING

Source entity that generated this transaction.

tags LIST OF STRINGS

Tags associated with the transaction.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

List Issuing Transactions

Get a list of issuing transactions in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

tags OPTIONAL

Filter entities that contain the specified tags.

ids OPTIONAL

List of strings to get specific entities by ids.

externalIds OPTIONAL

List of strings to get specific entities by their external ids.

source OPTIONAL

Filter entities by the source entity that generated the transaction.

ENDPOINT
GET /v2/issuing-transaction
REQUEST

Python

import starkinfra

transactions = starkinfra.issuingtransaction.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    tags=["tony", "stark"]
)

for transaction in transactions:
    print(transaction)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let transactions = await starkinfra.issuingTransaction.query({
        limit: 10,
        after: '2022-01-01',
        before: '2022-12-31',
        tags: ['tony', 'stark']
    });
    for await (let transaction of transactions) {
        console.log(transaction);
    }
})();
  

PHP

$transactions = StarkInfra\IssuingTransaction::query([
    "limit" => 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "tags" => ["tony", "stark"]
]);

foreach ($transactions as $transaction) {
    print_r($transaction);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("tags", Arrays.asList("tony", "stark"));

Generator transactions = IssuingTransaction.query(params);

for (IssuingTransaction transaction : transactions) {
    System.out.println(transaction);
}
  

Ruby

require('starkinfra')

transactions = StarkInfra::IssuingTransaction.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    tags: ["tony", "stark"]
)

transactions.each do |transaction|
    puts transaction
end
  

Elixir

transactions = StarkInfra.IssuingTransaction.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    tags: ["tony", "stark"]
)

transactions |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable transactions = StarkInfra.IssuingTransaction.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    tags: new List { "tony", "stark" }
);

foreach (StarkInfra.IssuingTransaction transaction in transactions) {
    Console.WriteLine(transaction);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtransaction"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["after"] = "2022-01-01"
    params["before"] = "2022-12-31"
    params["tags"] = []string{"tony", "stark"}

    transactions, errorChannel := issuingtransaction.Query(params, nil)

    for transaction := range transactions {
        fmt.Printf("%+v", transaction)
    }

    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-transaction?limit=10&after=2022-01-01&before=2022-12-31&tags=tony,stark' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingTransaction(
    id=5715709195239424,
    amount=-1500,
    balance=5000000,
    description=Issuing purchase 6724771005489152,
    source=issuingPurchase/6724771005489152,
    tags=['tony', 'stark'],
    created=2022-01-01 00:00:00
)
  

Javascript

IssuingTransaction {
    id: '5715709195239424',
    amount: -1500,
    balance: 5000000,
    description: 'Issuing purchase 6724771005489152',
    source: 'issuingPurchase/6724771005489152',
    tags: ['tony', 'stark'],
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingTransaction Object
(
    [id] => 5715709195239424
    [amount] => -1500
    [balance] => 5000000
    [description] => Issuing purchase 6724771005489152
    [source] => issuingPurchase/6724771005489152
    [tags] => Array ( [0] => tony [1] => stark )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingTransaction({
    "id": "5715709195239424",
    "amount": -1500,
    "balance": 5000000,
    "description": "Issuing purchase 6724771005489152",
    "source": "issuingPurchase/6724771005489152",
    "tags": ["tony", "stark"],
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingtransaction(
    id: 5715709195239424,
    amount: -1500,
    balance: 5000000,
    description: Issuing purchase 6724771005489152,
    source: issuingPurchase/6724771005489152,
    tags: ['tony', 'stark'],
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingTransaction{
    id: "5715709195239424",
    amount: -1500,
    balance: 5000000,
    description: "Issuing purchase 6724771005489152",
    source: "issuingPurchase/6724771005489152",
    tags: ["tony", "stark"],
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingTransaction(
    Id: 5715709195239424,
    Amount: -1500,
    Balance: 5000000,
    Description: Issuing purchase 6724771005489152,
    Source: issuingPurchase/6724771005489152,
    Tags: { tony, stark },
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Amount:-1500
    Balance:5000000
    Description:Issuing purchase 6724771005489152
    Source:issuingPurchase/6724771005489152
    Tags:[tony stark]
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "transactions": [
        {
            "id": "5715709195239424",
            "amount": -1500,
            "balance": 5000000,
            "description": "Issuing purchase 6724771005489152",
            "source": "issuingPurchase/6724771005489152",
            "tags": ["tony", "stark"],
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ],
    "cursor": null
}
  

Get an Issuing Transaction

Get a single issuing transaction by its id.

Parameters

id REQUIRED

Id of the issuing transaction entity.

ENDPOINT
GET /v2/issuing-transaction/:id
REQUEST

Python

import starkinfra

transaction = starkinfra.issuingtransaction.get("5715709195239424")

print(transaction)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let transaction = await starkinfra.issuingTransaction.get('5715709195239424');
    console.log(transaction);
})();
  

PHP

$transaction = StarkInfra\IssuingTransaction::get("5715709195239424");

print_r($transaction);
  

Java

import com.starkinfra.*;

IssuingTransaction transaction = IssuingTransaction.get("5715709195239424");

System.out.println(transaction);
  

Ruby

require('starkinfra')

transaction = StarkInfra::IssuingTransaction.get("5715709195239424")

puts transaction
  

Elixir

transaction = StarkInfra.IssuingTransaction.get!("5715709195239424")

IO.inspect(transaction)
  

C#

using System;

StarkInfra.IssuingTransaction transaction = StarkInfra.IssuingTransaction.Get("5715709195239424");

Console.WriteLine(transaction);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingtransaction"
)

func main() {

    transaction, err := issuingtransaction.Get("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", transaction)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-transaction/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingTransaction(
    id=5715709195239424,
    amount=-1500,
    balance=5000000,
    description=Issuing purchase 6724771005489152,
    source=issuingPurchase/6724771005489152,
    tags=['tony', 'stark'],
    created=2022-01-01 00:00:00
)
  

Javascript

IssuingTransaction {
    id: '5715709195239424',
    amount: -1500,
    balance: 5000000,
    description: 'Issuing purchase 6724771005489152',
    source: 'issuingPurchase/6724771005489152',
    tags: ['tony', 'stark'],
    created: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingTransaction Object
(
    [id] => 5715709195239424
    [amount] => -1500
    [balance] => 5000000
    [description] => Issuing purchase 6724771005489152
    [source] => issuingPurchase/6724771005489152
    [tags] => Array ( [0] => tony [1] => stark )
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingTransaction({
    "id": "5715709195239424",
    "amount": -1500,
    "balance": 5000000,
    "description": "Issuing purchase 6724771005489152",
    "source": "issuingPurchase/6724771005489152",
    "tags": ["tony", "stark"],
    "created": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingtransaction(
    id: 5715709195239424,
    amount: -1500,
    balance: 5000000,
    description: Issuing purchase 6724771005489152,
    source: issuingPurchase/6724771005489152,
    tags: ['tony', 'stark'],
    created: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingTransaction{
    id: "5715709195239424",
    amount: -1500,
    balance: 5000000,
    description: "Issuing purchase 6724771005489152",
    source: "issuingPurchase/6724771005489152",
    tags: ["tony", "stark"],
    created: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingTransaction(
    Id: 5715709195239424,
    Amount: -1500,
    Balance: 5000000,
    Description: Issuing purchase 6724771005489152,
    Source: issuingPurchase/6724771005489152,
    Tags: { tony, stark },
    Created: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Amount:-1500
    Balance:5000000
    Description:Issuing purchase 6724771005489152
    Source:issuingPurchase/6724771005489152
    Tags:[tony stark]
    Created:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "transaction": {
        "id": "5715709195239424",
        "amount": -1500,
        "balance": 5000000,
        "description": "Issuing purchase 6724771005489152",
        "source": "issuingPurchase/6724771005489152",
        "tags": ["tony", "stark"],
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Issuing Withdrawal

The Issuing Withdrawal resource is used to transfer funds from your issuing balance back to your main balance.

Use withdrawals to move excess funds from your issuing wallet to your regular Stark Infra account.

The Issuing Withdrawal object

Attributes

id STRING

Unique identifier for the issuing withdrawal.

amount INTEGER

Amount in cents to be withdrawn. Example: 10000 (R$100.00).

externalId STRING

Your unique identifier for this withdrawal. Must be unique per workspace to prevent duplicates.

description STRING

Description of the withdrawal.

tags LIST OF STRINGS

Tags associated with the withdrawal.

transactionId STRING

Id of the bank transaction linked to this withdrawal.

issuingTransactionId STRING

Id of the issuing transaction linked to this withdrawal.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create an Issuing Withdrawal

Use this route to create a new issuing withdrawal and move funds from your issuing balance.

Parameters

amount REQUIRED

Amount in cents to withdraw. Example: 10000 (R$100.00).

externalId REQUIRED

Your unique identifier for this withdrawal, used to prevent duplicates. Example: "withdrawal-2024-001".

description REQUIRED

Description of the withdrawal purpose.

tags OPTIONAL

Array of strings to tag the entity for future queries.

ENDPOINT
POST /v2/issuing-withdrawal
REQUEST

Python

import starkinfra

withdrawal = starkinfra.issuingwithdrawal.create(
    starkinfra.IssuingWithdrawal(
        amount=10000,
        external_id="withdrawal-2022-001",
        description="Excess funds withdrawal",
        tags=["tony", "stark"]
    )
)

print(withdrawal)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let withdrawal = await starkinfra.issuingWithdrawal.create({
        amount: 10000,
        externalId: 'withdrawal-2022-001',
        description: 'Excess funds withdrawal',
        tags: ['tony', 'stark']
    });
    console.log(withdrawal);
})();
  

PHP

$withdrawal = StarkInfra\IssuingWithdrawal::create(
    new StarkInfra\IssuingWithdrawal([
        "amount" => 10000,
        "externalId" => "withdrawal-2022-001",
        "description" => "Excess funds withdrawal",
        "tags" => ["tony", "stark"]
    ])
);

print_r($withdrawal);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap data = new HashMap<>();
data.put("amount", 10000);
data.put("externalId", "withdrawal-2022-001");
data.put("description", "Excess funds withdrawal");
data.put("tags", new String[]{"tony", "stark"});

IssuingWithdrawal withdrawal = IssuingWithdrawal.create(new IssuingWithdrawal(data));

System.out.println(withdrawal);
  

Ruby

require('starkinfra')

withdrawal = StarkInfra::IssuingWithdrawal.create(
    StarkInfra::IssuingWithdrawal.new(
        amount: 10000,
        external_id: "withdrawal-2022-001",
        description: "Excess funds withdrawal",
        tags: ["tony", "stark"]
    )
)

puts withdrawal
  

Elixir

withdrawal = StarkInfra.IssuingWithdrawal.create!(
    %StarkInfra.IssuingWithdrawal{
        amount: 10000,
        external_id: "withdrawal-2022-001",
        description: "Excess funds withdrawal",
        tags: ["tony", "stark"]
    }
)

IO.inspect(withdrawal)
  

C#

using System;
using System.Collections.Generic;

StarkInfra.IssuingWithdrawal withdrawal = StarkInfra.IssuingWithdrawal.Create(
    new StarkInfra.IssuingWithdrawal(
        amount: 10000,
        externalID: "withdrawal-2022-001",
        description: "Excess funds withdrawal",
        tags: new List { "tony", "stark" }
    )
);

Console.WriteLine(withdrawal);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingwithdrawal"
)

func main() {

    withdrawal, err := issuingwithdrawal.Create(
        issuingwithdrawal.IssuingWithdrawal{
            Amount:      10000,
            ExternalId:  "withdrawal-2022-001",
            Description: "Excess funds withdrawal",
            Tags:        []string{"tony", "stark"},
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", withdrawal)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request POST '{{baseUrl}}/v2/issuing-withdrawal' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 10000,
    "externalId": "withdrawal-2022-001",
    "description": "Excess funds withdrawal",
    "tags": ["tony", "stark"]
}'
  
RESPONSE

Python

IssuingWithdrawal(
    id=5715709195239424,
    amount=10000,
    external_id=withdrawal-2022-001,
    description=Excess funds withdrawal,
    tags=['tony', 'stark'],
    transaction_id=6724771005489152,
    issuing_transaction_id=7834882116598271,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingWithdrawal {
    id: '5715709195239424',
    amount: 10000,
    externalId: 'withdrawal-2022-001',
    description: 'Excess funds withdrawal',
    tags: ['tony', 'stark'],
    transactionId: '6724771005489152',
    issuingTransactionId: '7834882116598271',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingWithdrawal Object
(
    [id] => 5715709195239424
    [amount] => 10000
    [externalId] => withdrawal-2022-001
    [description] => Excess funds withdrawal
    [tags] => Array ( [0] => tony [1] => stark )
    [transactionId] => 6724771005489152
    [issuingTransactionId] => 7834882116598271
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingWithdrawal({
    "id": "5715709195239424",
    "amount": 10000,
    "externalId": "withdrawal-2022-001",
    "description": "Excess funds withdrawal",
    "tags": ["tony", "stark"],
    "transactionId": "6724771005489152",
    "issuingTransactionId": "7834882116598271",
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingwithdrawal(
    id: 5715709195239424,
    amount: 10000,
    external_id: withdrawal-2022-001,
    description: Excess funds withdrawal,
    tags: ['tony', 'stark'],
    transaction_id: 6724771005489152,
    issuing_transaction_id: 7834882116598271,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingWithdrawal{
    id: "5715709195239424",
    amount: 10000,
    external_id: "withdrawal-2022-001",
    description: "Excess funds withdrawal",
    tags: ["tony", "stark"],
    transaction_id: "6724771005489152",
    issuing_transaction_id: "7834882116598271",
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingWithdrawal(
    Id: 5715709195239424,
    Amount: 10000,
    ExternalId: withdrawal-2022-001,
    Description: Excess funds withdrawal,
    Tags: { tony, stark },
    TransactionId: 6724771005489152,
    IssuingTransactionId: 7834882116598271,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Amount:10000
    ExternalId:withdrawal-2022-001
    Description:Excess funds withdrawal
    Tags:[tony stark]
    TransactionId:6724771005489152
    IssuingTransactionId:7834882116598271
    Created:2022-01-01 00:00:00 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "withdrawal": {
        "id": "5715709195239424",
        "amount": 10000,
        "externalId": "withdrawal-2022-001",
        "description": "Excess funds withdrawal",
        "tags": ["tony", "stark"],
        "transactionId": "6724771005489152",
        "issuingTransactionId": "7834882116598271",
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

List Issuing Withdrawals

Get a list of issuing withdrawals in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

tags OPTIONAL

Filter entities that contain the specified tags.

externalIds OPTIONAL

List of strings to get specific entities by their external ids.

ENDPOINT
GET /v2/issuing-withdrawal
REQUEST

Python

import starkinfra

withdrawals = starkinfra.issuingwithdrawal.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    tags=["tony", "stark"]
)

for withdrawal in withdrawals:
    print(withdrawal)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let withdrawals = await starkinfra.issuingWithdrawal.query({
        limit: 10,
        after: '2022-01-01',
        before: '2022-12-31',
        tags: ['tony', 'stark']
    });
    for await (let withdrawal of withdrawals) {
        console.log(withdrawal);
    }
})();
  

PHP

$withdrawals = StarkInfra\IssuingWithdrawal::query([
    "limit" => 10,
    "after" => "2022-01-01",
    "before" => "2022-12-31",
    "tags" => ["tony", "stark"]
]);

foreach ($withdrawals as $withdrawal) {
    print_r($withdrawal);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;
import java.util.HashMap;

HashMap params = new HashMap<>();
params.put("limit", 10);
params.put("after", "2022-01-01");
params.put("before", "2022-12-31");
params.put("tags", Arrays.asList("tony", "stark"));

Generator withdrawals = IssuingWithdrawal.query(params);

for (IssuingWithdrawal withdrawal : withdrawals) {
    System.out.println(withdrawal);
}
  

Ruby

require('starkinfra')

withdrawals = StarkInfra::IssuingWithdrawal.query(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    tags: ["tony", "stark"]
)

withdrawals.each do |withdrawal|
    puts withdrawal
end
  

Elixir

withdrawals = StarkInfra.IssuingWithdrawal.query!(
    limit: 10,
    after: "2022-01-01",
    before: "2022-12-31",
    tags: ["tony", "stark"]
)

withdrawals |> Enum.each(&IO.inspect/1)
  

C#

using System;
using System.Collections.Generic;

IEnumerable withdrawals = StarkInfra.IssuingWithdrawal.Query(
    limit: 10,
    after: new DateTime(2022, 1, 1),
    before: new DateTime(2022, 12, 31),
    tags: new List { "tony", "stark" }
);

foreach (StarkInfra.IssuingWithdrawal withdrawal in withdrawals) {
    Console.WriteLine(withdrawal);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingwithdrawal"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["after"] = "2022-01-01"
    params["before"] = "2022-12-31"
    params["tags"] = []string{"tony", "stark"}

    withdrawals, errorChannel := issuingwithdrawal.Query(params, nil)

    for withdrawal := range withdrawals {
        fmt.Printf("%+v", withdrawal)
    }

    for err := range errorChannel {
        fmt.Printf("%+v", err)
    }
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-withdrawal?limit=10&after=2022-01-01&before=2022-12-31&tags=tony,stark' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingWithdrawal(
    id=5715709195239424,
    amount=10000,
    external_id=withdrawal-2022-001,
    description=Excess funds withdrawal,
    tags=['tony', 'stark'],
    transaction_id=6724771005489152,
    issuing_transaction_id=7834882116598271,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingWithdrawal {
    id: '5715709195239424',
    amount: 10000,
    externalId: 'withdrawal-2022-001',
    description: 'Excess funds withdrawal',
    tags: ['tony', 'stark'],
    transactionId: '6724771005489152',
    issuingTransactionId: '7834882116598271',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingWithdrawal Object
(
    [id] => 5715709195239424
    [amount] => 10000
    [externalId] => withdrawal-2022-001
    [description] => Excess funds withdrawal
    [tags] => Array ( [0] => tony [1] => stark )
    [transactionId] => 6724771005489152
    [issuingTransactionId] => 7834882116598271
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingWithdrawal({
    "id": "5715709195239424",
    "amount": 10000,
    "externalId": "withdrawal-2022-001",
    "description": "Excess funds withdrawal",
    "tags": ["tony", "stark"],
    "transactionId": "6724771005489152",
    "issuingTransactionId": "7834882116598271",
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingwithdrawal(
    id: 5715709195239424,
    amount: 10000,
    external_id: withdrawal-2022-001,
    description: Excess funds withdrawal,
    tags: ['tony', 'stark'],
    transaction_id: 6724771005489152,
    issuing_transaction_id: 7834882116598271,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingWithdrawal{
    id: "5715709195239424",
    amount: 10000,
    external_id: "withdrawal-2022-001",
    description: "Excess funds withdrawal",
    tags: ["tony", "stark"],
    transaction_id: "6724771005489152",
    issuing_transaction_id: "7834882116598271",
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingWithdrawal(
    Id: 5715709195239424,
    Amount: 10000,
    ExternalId: withdrawal-2022-001,
    Description: Excess funds withdrawal,
    Tags: { tony, stark },
    TransactionId: 6724771005489152,
    IssuingTransactionId: 7834882116598271,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Amount:10000
    ExternalId:withdrawal-2022-001
    Description:Excess funds withdrawal
    Tags:[tony stark]
    TransactionId:6724771005489152
    IssuingTransactionId:7834882116598271
    Created:2022-01-01 00:00:00 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "withdrawals": [
        {
            "id": "5715709195239424",
            "amount": 10000,
            "externalId": "withdrawal-2022-001",
            "description": "Excess funds withdrawal",
            "tags": ["tony", "stark"],
            "transactionId": "6724771005489152",
            "issuingTransactionId": "7834882116598271",
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ],
    "cursor": null
}
  

Get an Issuing Withdrawal

Get a single issuing withdrawal by its id.

Parameters

id REQUIRED

Id of the issuing withdrawal entity.

ENDPOINT
GET /v2/issuing-withdrawal/:id
REQUEST

Python

import starkinfra

withdrawal = starkinfra.issuingwithdrawal.get("5715709195239424")

print(withdrawal)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let withdrawal = await starkinfra.issuingWithdrawal.get('5715709195239424');
    console.log(withdrawal);
})();
  

PHP

$withdrawal = StarkInfra\IssuingWithdrawal::get("5715709195239424");

print_r($withdrawal);
  

Java

import com.starkinfra.*;

IssuingWithdrawal withdrawal = IssuingWithdrawal.get("5715709195239424");

System.out.println(withdrawal);
  

Ruby

require('starkinfra')

withdrawal = StarkInfra::IssuingWithdrawal.get("5715709195239424")

puts withdrawal
  

Elixir

withdrawal = StarkInfra.IssuingWithdrawal.get!("5715709195239424")

IO.inspect(withdrawal)
  

C#

using System;

StarkInfra.IssuingWithdrawal withdrawal = StarkInfra.IssuingWithdrawal.Get("5715709195239424");

Console.WriteLine(withdrawal);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/issuingwithdrawal"
)

func main() {

    withdrawal, err := issuingwithdrawal.Get("5715709195239424", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", withdrawal)
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/issuing-withdrawal/5715709195239424' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IssuingWithdrawal(
    id=5715709195239424,
    amount=10000,
    external_id=withdrawal-2022-001,
    description=Excess funds withdrawal,
    tags=['tony', 'stark'],
    transaction_id=6724771005489152,
    issuing_transaction_id=7834882116598271,
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

IssuingWithdrawal {
    id: '5715709195239424',
    amount: 10000,
    externalId: 'withdrawal-2022-001',
    description: 'Excess funds withdrawal',
    tags: ['tony', 'stark'],
    transactionId: '6724771005489152',
    issuingTransactionId: '7834882116598271',
    created: '2022-01-01T00:00:00.000000+00:00',
    updated: '2022-01-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\IssuingWithdrawal Object
(
    [id] => 5715709195239424
    [amount] => 10000
    [externalId] => withdrawal-2022-001
    [description] => Excess funds withdrawal
    [tags] => Array ( [0] => tony [1] => stark )
    [transactionId] => 6724771005489152
    [issuingTransactionId] => 7834882116598271
    [created] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
    [updated] => DateTime Object ( [date] => 2022-01-01 00:00:00.000000 )
)
  

Java

IssuingWithdrawal({
    "id": "5715709195239424",
    "amount": 10000,
    "externalId": "withdrawal-2022-001",
    "description": "Excess funds withdrawal",
    "tags": ["tony", "stark"],
    "transactionId": "6724771005489152",
    "issuingTransactionId": "7834882116598271",
    "created": "2022-01-01T00:00:00.000000+00:00",
    "updated": "2022-01-01T00:00:00.000000+00:00"
})
  

Ruby

issuingwithdrawal(
    id: 5715709195239424,
    amount: 10000,
    external_id: withdrawal-2022-001,
    description: Excess funds withdrawal,
    tags: ['tony', 'stark'],
    transaction_id: 6724771005489152,
    issuing_transaction_id: 7834882116598271,
    created: 2022-01-01T00:00:00+00:00,
    updated: 2022-01-01T00:00:00+00:00
)
  

Elixir

%StarkInfra.IssuingWithdrawal{
    id: "5715709195239424",
    amount: 10000,
    external_id: "withdrawal-2022-001",
    description: "Excess funds withdrawal",
    tags: ["tony", "stark"],
    transaction_id: "6724771005489152",
    issuing_transaction_id: "7834882116598271",
    created: "2022-01-01T00:00:00.000000+00:00",
    updated: "2022-01-01T00:00:00.000000+00:00"
}
  

C#

IssuingWithdrawal(
    Id: 5715709195239424,
    Amount: 10000,
    ExternalId: withdrawal-2022-001,
    Description: Excess funds withdrawal,
    Tags: { tony, stark },
    TransactionId: 6724771005489152,
    IssuingTransactionId: 7834882116598271,
    Created: 01/01/2022 00:00:00,
    Updated: 01/01/2022 00:00:00
)
  

Go

{
    Id:5715709195239424
    Amount:10000
    ExternalId:withdrawal-2022-001
    Description:Excess funds withdrawal
    Tags:[tony stark]
    TransactionId:6724771005489152
    IssuingTransactionId:7834882116598271
    Created:2022-01-01 00:00:00 +0000 +0000
    Updated:2022-01-01 00:00:00 +0000 +0000
}
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "withdrawal": {
        "id": "5715709195239424",
        "amount": 10000,
        "externalId": "withdrawal-2022-001",
        "description": "Excess funds withdrawal",
        "tags": ["tony", "stark"],
        "transactionId": "6724771005489152",
        "issuingTransactionId": "7834882116598271",
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Credit Note

Credit Notes represent credit operations issued to individuals or businesses as Bank Credit Bills (Cédula de Crédito Bancário - CCB). They carry all the information needed to formalize a lending operation, including signers, installment invoices and the disbursement payment details.

Once created, the credit note generates a contract that must be digitally signed by all signers. After signing, the disbursement is transferred via Pix to the borrower's account and each installment is tracked through invoices.

Here we will show you how to create and manage them.

The CreditNote object

Attributes

id STRING

Unique id for the credit note.

templateId STRING

ID of the credit note template used. Templates are enabled for your workspace through your credit profile.

name STRING

Borrower full name.

taxId STRING

Borrower CPF or CNPJ.

nominalAmount INTEGER

Nominal amount in cents of the credit note, before taxes. Example: 100000 (R$1,000.00).

rebateAmount INTEGER

Amount in cents discounted from the disbursed amount. Example: 100 (R$1.00).

taxAmount INTEGER

Tax amount in cents (IOF) embedded in the operation, computed from the borrower type (individual or business) and the operation duration.

amount INTEGER

Net amount in cents disbursed to the borrower.

interest FLOAT

Effective interest rate of the credit operation, in % per year, computed from the disbursed amount and the invoice schedule. Example: 27.5.

nominalInterest FLOAT

Nominal interest rate of the credit operation, in % per year, computed from the nominal amount and the invoice schedule. Example: 25.2.

rules LIST OF OBJECTS

List of rules modifying the credit note behavior, as {"key", "value"} objects. Currently available key: "invoiceCreationMode", with values "scheduled" (default - each installment invoice is issued a few days before its due date), "instant" (all invoices are issued as soon as the note is disbursed) or "never" (invoices are not issued automatically).

scheduled STRING

Datetime when the credit note will be disbursed after signing. Example: "2022-06-28T00:00:00.000000+00:00".

expiration INTEGER

Time span, in seconds, counted from the scheduled datetime, for the borrower and signers to sign the contract before the credit note expires. Default: 604800 (7 days).

externalId STRING

Unique external ID that prevents the creation of duplicate credit notes on unintended retries.

tags LIST OF STRINGS

Tags associated with the credit note.

status STRING

Current status of the credit note. Options: "created" (awaiting signatures), "signed" (contract signed by all signers), "processing" (disbursement in progress), "success" (disbursement settled), "failed" (disbursement failed), "canceled" and "expired" (not signed before the expiration).

signers LIST OF OBJECTS

List of CreditSigner objects representing every person or entity that must sign the contract, as {"id", "name", "contact", "method", "signed"} objects. Signers registered in your credit profile and the SCD signature are appended automatically.

invoices LIST OF OBJECTS

List of Invoice objects representing the installments to be paid by the borrower, with their "id", "amount", "due", "fine", "interest", "expiration", "descriptions" and "tags".

payment OBJECT

Transfer object used to disburse the credit amount to the borrower, including its "id" and "status" once the disbursement is initiated.

paymentType STRING

Type of the payment object. Options: "transfer".

streetLine1 STRING

Borrower main address street line.

streetLine2 STRING

Borrower complement address street line.

district STRING

Borrower address district.

city STRING

Borrower address city.

stateCode STRING

Borrower address state code. Example: "SP".

zipCode STRING

Borrower address zip code. Example: "01310-100".

documentId STRING

Unique id of the digital signing document attached to this credit note.

workspaceId STRING

ID of the workspace that issued the credit note.

debtorWorkspaceId STRING

ID of the borrower's workspace, when it differs from the issuing workspace.

transactionIds LIST OF STRINGS

Ledger transaction ids linked to the disbursement and its chargebacks.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create Credit Notes

Create credit notes in bulk. You can create up to 100 credit notes in a single request.

Provide either the nominalAmount (pre-tax) or the amount (net disbursed value) - the other one, along with the taxAmount (IOF) and the interest rates, is computed from the invoice schedule.

Parameters

templateId REQUIRED

ID of the credit note template to be used. Templates are enabled for your workspace through your credit profile.

name REQUIRED

Borrower full name. Example: "Jamie Lannister"

taxId REQUIRED

Borrower CPF (11 digits) or CNPJ (14 digits). Example: "012.345.678-90"

scheduled REQUIRED

Datetime when the credit note should be disbursed after signing. Example: "2022-06-28"

invoices REQUIRED

List of up to 100 Invoice objects representing the installments to be paid by the borrower. Each invoice takes a required "amount" (in cents) and optional "due", "fine" (default 2.0), "interest" (default 1.0), "expiration", "descriptions" and "tags". All invoices must share the same fine and interest.

payment REQUIRED

Transfer object used to disburse the credit amount to the borrower's account, with required "name", "taxId", "bankCode" (receiver institution ISPB, 8 digits), "branchCode" and "accountNumber", and optional "accountType" ("checking", "payment", "salary" or "savings") and "tags".

Do not send an "amount" in the payment object - the disbursed amount is computed by the API.

paymentType REQUIRED

Type of the payment object. Options: "transfer".

signers REQUIRED

List of up to 10 CreditSigner objects representing every person or entity that must sign the contract, each with required "name", "contact" and "method". Methods: "link" (signing link sent to an email or phone contact), "token" (signing token sent to an email or phone contact), "server" and "organization" (automatic signatures over URL contacts). Signers registered in your credit profile and the SCD signature are appended automatically.

externalId REQUIRED

Unique external ID to prevent the creation of duplicate credit notes on unintended retries. Example: "my-internal-id-123456"

streetLine1 REQUIRED

Borrower main address street line.

streetLine2 REQUIRED

Borrower complement address street line.

district REQUIRED

Borrower address district.

city REQUIRED

Borrower address city.

stateCode REQUIRED

Borrower address state code. Example: "SP".

zipCode REQUIRED

Borrower address zip code. Example: "01310-100".

nominalAmount OPTIONAL

Nominal amount in cents to be lent, before taxes. Provide either nominalAmount or amount. Example: 100000 (R$1,000.00).

amount OPTIONAL

Net amount in cents to be disbursed to the borrower. Provide either nominalAmount or amount. Example: 100000 (R$1,000.00).

rebateAmount OPTIONAL

Amount in cents to be discounted from the disbursed amount. Example: 100 (R$1.00).

expiration OPTIONAL

Time span, in seconds, counted from the scheduled datetime, for the contract to be signed before the credit note expires. Default: 604800 (7 days).

rules OPTIONAL

List of rules modifying the credit note behavior, as {"key", "value"} objects. Currently available key: "invoiceCreationMode", with values "scheduled" (default), "instant" or "never".

tags OPTIONAL

List of strings to tag the credit note for future queries.

ENDPOINT
POST /v2/credit-note
REQUEST

Python

import starkinfra

notes = starkinfra.creditnote.create([
    starkinfra.CreditNote(
        template_id="5745297609744384",
        name="Jamie Lannister",
        tax_id="012.345.678-90",
        nominal_amount=100000,
        scheduled="2022-06-28",
        invoices=[
            starkinfra.creditnote.Invoice(
                amount=102612,
                due="2022-07-28"
            )
        ],
        payment=starkinfra.creditnote.Transfer(
            bank_code="20018183",
            branch_code="1234",
            account_number="129340-1",
            name="Jamie Lannister",
            tax_id="012.345.678-90"
        ),
        payment_type="transfer",
        signers=[
            starkinfra.creditsigner.CreditSigner(
                name="Jamie Lannister",
                contact="jamie.lannister@gmail.com",
                method="link"
            )
        ],
        external_id="my-internal-id-123456",
        street_line_1="Av. Paulista, 200",
        street_line_2="Apto. 51",
        district="Bela Vista",
        city="Sao Paulo",
        state_code="SP",
        zip_code="01310-100"
    )
])

for note in notes:
    print(note)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let notes = await starkinfra.creditNote.create([
        {
            templateId: '5745297609744384',
            name: 'Jamie Lannister',
            taxId: '012.345.678-90',
            nominalAmount: 100000,
            scheduled: '2022-06-28',
            invoices: [
                { amount: 102612, due: '2022-07-28' }
            ],
            payment: {
                bankCode: '20018183',
                branchCode: '1234',
                accountNumber: '129340-1',
                name: 'Jamie Lannister',
                taxId: '012.345.678-90'
            },
            paymentType: 'transfer',
            signers: [
                { name: 'Jamie Lannister', contact: 'jamie.lannister@gmail.com', method: 'link' }
            ],
            externalId: 'my-internal-id-123456',
            streetLine1: 'Av. Paulista, 200',
            streetLine2: 'Apto. 51',
            district: 'Bela Vista',
            city: 'Sao Paulo',
            stateCode: 'SP',
            zipCode: '01310-100'
        }
    ]);

    for (let note of notes) {
        console.log(note);
    }
})();
  

PHP

$notes = StarkInfra\CreditNote::create([
    new StarkInfra\CreditNote([
        "templateId" => "5745297609744384",
        "name" => "Jamie Lannister",
        "taxId" => "012.345.678-90",
        "nominalAmount" => 100000,
        "scheduled" => "2022-06-28",
        "invoices" => [
            new StarkInfra\CreditNote\Invoice(["amount" => 102612, "due" => "2022-07-28"])
        ],
        "payment" => new StarkInfra\CreditNote\Transfer([
            "bankCode" => "20018183",
            "branchCode" => "1234",
            "accountNumber" => "129340-1",
            "name" => "Jamie Lannister",
            "taxId" => "012.345.678-90"
        ]),
        "paymentType" => "transfer",
        "signers" => [
            new StarkInfra\CreditSigner(["name" => "Jamie Lannister", "contact" => "jamie.lannister@gmail.com", "method" => "link"])
        ],
        "externalId" => "my-internal-id-123456",
        "streetLine1" => "Av. Paulista, 200",
        "streetLine2" => "Apto. 51",
        "district" => "Bela Vista",
        "city" => "Sao Paulo",
        "stateCode" => "SP",
        "zipCode" => "01310-100"
    ])
]);

foreach ($notes as $note) {
    print_r($note);
}
  

Java

import com.starkinfra.*;
import java.util.Arrays;
import java.util.HashMap;

HashMap<String, Object> invoiceData = new HashMap<>();
invoiceData.put("amount", 102612);
invoiceData.put("due", "2022-07-28");

HashMap<String, Object> paymentData = new HashMap<>();
paymentData.put("bankCode", "20018183");
paymentData.put("branchCode", "1234");
paymentData.put("accountNumber", "129340-1");
paymentData.put("name", "Jamie Lannister");
paymentData.put("taxId", "012.345.678-90");

HashMap<String, Object> signerData = new HashMap<>();
signerData.put("name", "Jamie Lannister");
signerData.put("contact", "jamie.lannister@gmail.com");
signerData.put("method", "link");

HashMap<String, Object> data = new HashMap<>();
data.put("templateId", "5745297609744384");
data.put("name", "Jamie Lannister");
data.put("taxId", "012.345.678-90");
data.put("nominalAmount", 100000);
data.put("scheduled", "2022-06-28");
data.put("invoices", Arrays.asList(new CreditNote.Invoice(invoiceData)));
data.put("payment", new CreditNote.Transfer(paymentData));
data.put("paymentType", "transfer");
data.put("signers", Arrays.asList(new CreditSigner(signerData)));
data.put("externalId", "my-internal-id-123456");
data.put("streetLine1", "Av. Paulista, 200");
data.put("streetLine2", "Apto. 51");
data.put("district", "Bela Vista");
data.put("city", "Sao Paulo");
data.put("stateCode", "SP");
data.put("zipCode", "01310-100");

List<CreditNote> notes = CreditNote.create(Arrays.asList(new CreditNote(data)));

for (CreditNote note : notes) {
    System.out.println(note);
}
  

Ruby

require('starkinfra')

notes = StarkInfra::CreditNote.create([
    StarkInfra::CreditNote.new(
        template_id: '5745297609744384',
        name: 'Jamie Lannister',
        tax_id: '012.345.678-90',
        nominal_amount: 100000,
        scheduled: '2022-06-28',
        invoices: [
            StarkInfra::CreditNote::Invoice.new(amount: 102612, due: '2022-07-28')
        ],
        payment: StarkInfra::CreditNote::Transfer.new(
            bank_code: '20018183',
            branch_code: '1234',
            account_number: '129340-1',
            name: 'Jamie Lannister',
            tax_id: '012.345.678-90'
        ),
        payment_type: 'transfer',
        signers: [
            StarkInfra::CreditSigner.new(name: 'Jamie Lannister', contact: 'jamie.lannister@gmail.com', method: 'link')
        ],
        external_id: 'my-internal-id-123456',
        street_line_1: 'Av. Paulista, 200',
        street_line_2: 'Apto. 51',
        district: 'Bela Vista',
        city: 'Sao Paulo',
        state_code: 'SP',
        zip_code: '01310-100'
    )
])

notes.each do |note|
    puts note
end
  

Elixir

notes = StarkInfra.CreditNote.create!([
    %StarkInfra.CreditNote{
        template_id: "5745297609744384",
        name: "Jamie Lannister",
        tax_id: "012.345.678-90",
        nominal_amount: 100000,
        scheduled: "2022-06-28",
        invoices: [%StarkInfra.CreditNote.Invoice{amount: 102612, due: "2022-07-28"}],
        payment: %StarkInfra.CreditNote.Transfer{
            bank_code: "20018183",
            branch_code: "1234",
            account_number: "129340-1",
            name: "Jamie Lannister",
            tax_id: "012.345.678-90"
        },
        payment_type: "transfer",
        signers: [%StarkInfra.CreditSigner{name: "Jamie Lannister", contact: "jamie.lannister@gmail.com", method: "link"}],
        external_id: "my-internal-id-123456",
        street_line_1: "Av. Paulista, 200",
        street_line_2: "Apto. 51",
        district: "Bela Vista",
        city: "Sao Paulo",
        state_code: "SP",
        zip_code: "01310-100"
    }
])

for note <- notes do
    note |> IO.inspect
end
  

C#

using System;
using System.Collections.Generic;

List<StarkInfra.CreditNote> notes = StarkInfra.CreditNote.Create(
    new List<StarkInfra.CreditNote> {
        new StarkInfra.CreditNote(
            templateId: "5745297609744384",
            name: "Jamie Lannister",
            taxId: "012.345.678-90",
            nominalAmount: 100000,
            scheduled: "2022-06-28",
            invoices: new List<StarkInfra.CreditNote.Invoice> {
                new StarkInfra.CreditNote.Invoice(amount: 102612, due: "2022-07-28")
            },
            payment: new StarkInfra.CreditNote.Transfer(
                bankCode: "20018183",
                branchCode: "1234",
                accountNumber: "129340-1",
                name: "Jamie Lannister",
                taxId: "012.345.678-90"
            ),
            paymentType: "transfer",
            signers: new List<StarkInfra.CreditSigner> {
                new StarkInfra.CreditSigner(name: "Jamie Lannister", contact: "jamie.lannister@gmail.com", method: "link")
            },
            externalId: "my-internal-id-123456",
            streetLine1: "Av. Paulista, 200",
            streetLine2: "Apto. 51",
            district: "Bela Vista",
            city: "Sao Paulo",
            stateCode: "SP",
            zipCode: "01310-100"
        )
    }
);

foreach (StarkInfra.CreditNote note in notes) {
    Console.WriteLine(note);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/creditnote"
    "github.com/starkinfra/sdk-go/starkinfra/creditsigner"
)

func main() {

    notes, err := creditnote.Create(
        []creditnote.CreditNote{
            {
                TemplateId:    "5745297609744384",
                Name:          "Jamie Lannister",
                TaxId:         "012.345.678-90",
                NominalAmount: 100000,
                Scheduled:     "2022-06-28",
                Invoices: []creditnote.Invoice{
                    {
                        Amount: 102612,
                        Due:    "2022-07-28",
                    },
                },
                Payment: creditnote.Transfer{
                    BankCode:      "20018183",
                    BranchCode:    "1234",
                    AccountNumber: "129340-1",
                    Name:          "Jamie Lannister",
                    TaxId:         "012.345.678-90",
                },
                PaymentType: "transfer",
                Signers: []creditsigner.CreditSigner{
                    {
                        Name:    "Jamie Lannister",
                        Contact: "jamie.lannister@gmail.com",
                        Method:  "link",
                    },
                },
                ExternalId:  "my-internal-id-123456",
                StreetLine1: "Av. Paulista, 200",
                StreetLine2: "Apto. 51",
                District:    "Bela Vista",
                City:        "Sao Paulo",
                StateCode:   "SP",
                ZipCode:     "01310-100",
            },
        }, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    for _, note := range notes {
        fmt.Printf("%+v", note)
    }
}
  

Clojure

(def notes
  (starkinfra.credit-note/create
    [{
      :template-id "5745297609744384"
      :name "Jamie Lannister"
      :tax-id "012.345.678-90"
      :nominal-amount 100000
      :scheduled "2022-06-28"
      :invoices [{:amount 102612 :due "2022-07-28"}]
      :payment {
        :bank-code "20018183"
        :branch-code "1234"
        :account-number "129340-1"
        :name "Jamie Lannister"
        :tax-id "012.345.678-90"
      }
      :payment-type "transfer"
      :signers [{:name "Jamie Lannister" :contact "jamie.lannister@gmail.com" :method "link"}]
      :external-id "my-internal-id-123456"
      :street-line-1 "Av. Paulista, 200"
      :street-line-2 "Apto. 51"
      :district "Bela Vista"
      :city "Sao Paulo"
      :state-code "SP"
      :zip-code "01310-100"
    }]))
(dorun (map println notes))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/credit-note' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "notes": [
        {
            "templateId": "5745297609744384",
            "name": "Jamie Lannister",
            "taxId": "012.345.678-90",
            "nominalAmount": 100000,
            "scheduled": "2022-06-28",
            "invoices": [{"amount": 102612, "due": "2022-07-28"}],
            "payment": {"bankCode": "20018183", "branchCode": "1234", "accountNumber": "129340-1", "name": "Jamie Lannister", "taxId": "012.345.678-90"},
            "paymentType": "transfer",
            "signers": [{"name": "Jamie Lannister", "contact": "jamie.lannister@gmail.com", "method": "link"}],
            "externalId": "my-internal-id-123456",
            "streetLine1": "Av. Paulista, 200",
            "streetLine2": "Apto. 51",
            "district": "Bela Vista",
            "city": "Sao Paulo",
            "stateCode": "SP",
            "zipCode": "01310-100"
        }
    ]
}'
  
RESPONSE

Python

CreditNote(
    id=5745297609744385,
    template_id=5745297609744384,
    name=Jamie Lannister,
    tax_id=012.345.678-90,
    nominal_amount=100000,
    tax_amount=626,
    amount=99374,
    interest=38.61,
    nominal_interest=30.69,
    status=created,
    external_id=my-internal-id-123456,
    scheduled=2022-06-28T00:00:00.000000+00:00,
    expiration=604800,
    payment_type=transfer,
    created=2022-06-01T00:00:00.000000+00:00,
    updated=2022-06-01T00:00:00.000000+00:00
)
  

Javascript

CreditNote {
    id: '5745297609744385',
    templateId: '5745297609744384',
    name: 'Jamie Lannister',
    taxId: '012.345.678-90',
    nominalAmount: 100000,
    taxAmount: 626,
    amount: 99374,
    interest: 38.61,
    nominalInterest: 30.69,
    status: 'created',
    externalId: 'my-internal-id-123456',
    scheduled: '2022-06-28T00:00:00.000000+00:00',
    expiration: 604800,
    paymentType: 'transfer',
    created: '2022-06-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\CreditNote Object
(
    [id] => 5745297609744385
    [templateId] => 5745297609744384
    [name] => Jamie Lannister
    [taxId] => 012.345.678-90
    [nominalAmount] => 100000
    [taxAmount] => 626
    [amount] => 99374
    [interest] => 38.61
    [nominalInterest] => 30.69
    [status] => created
    [externalId] => my-internal-id-123456
    [scheduled] => 2022-06-28T00:00:00.000000+00:00
    [expiration] => 604800
    [paymentType] => transfer
    [created] => 2022-06-01T00:00:00.000000+00:00
    [updated] => 2022-06-01T00:00:00.000000+00:00
)
  

Java

CreditNote({
    "id": "5745297609744385",
    "templateId": "5745297609744384",
    "name": "Jamie Lannister",
    "taxId": "012.345.678-90",
    "nominalAmount": 100000,
    "taxAmount": 626,
    "amount": 99374,
    "interest": 38.61,
    "nominalInterest": 30.69,
    "status": "created",
    "externalId": "my-internal-id-123456",
    "scheduled": "2022-06-28T00:00:00.000000+00:00",
    "expiration": 604800,
    "paymentType": "transfer",
    "created": "2022-06-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00"
})
  

Ruby

credit_note(
    id: 5745297609744385,
    template_id: 5745297609744384,
    name: Jamie Lannister,
    tax_id: 012.345.678-90,
    nominal_amount: 100000,
    tax_amount: 626,
    amount: 99374,
    interest: 38.61,
    nominal_interest: 30.69,
    status: created,
    external_id: my-internal-id-123456,
    scheduled: 2022-06-28T00:00:00.000000+00:00,
    expiration: 604800,
    payment_type: transfer,
    created: 2022-06-01T00:00:00.000000+00:00,
    updated: 2022-06-01T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditNote{
    id: "5745297609744385",
    template_id: "5745297609744384",
    name: "Jamie Lannister",
    tax_id: "012.345.678-90",
    nominal_amount: 100000,
    tax_amount: 626,
    amount: 99374,
    interest: 38.61,
    nominal_interest: 30.69,
    status: "created",
    external_id: "my-internal-id-123456",
    scheduled: "2022-06-28T00:00:00.000000+00:00",
    expiration: 604800,
    payment_type: "transfer",
    created: "2022-06-01T00:00:00.000000+00:00",
    updated: "2022-06-01T00:00:00.000000+00:00"
}
  

C#

CreditNote(
    Id: 5745297609744385,
    TemplateId: 5745297609744384,
    Name: Jamie Lannister,
    TaxId: 012.345.678-90,
    NominalAmount: 100000,
    TaxAmount: 626,
    Amount: 99374,
    Interest: 38.61,
    NominalInterest: 30.69,
    Status: created,
    ExternalId: my-internal-id-123456,
    Scheduled: 2022-06-28T00:00:00.000000+00:00,
    Expiration: 604800,
    PaymentType: transfer,
    Created: 2022-06-01T00:00:00.000000+00:00,
    Updated: 2022-06-01T00:00:00.000000+00:00
)
  

Go

{
    Id:5745297609744385
    TemplateId:5745297609744384
    Name:Jamie Lannister
    TaxId:012.345.678-90
    NominalAmount:100000
    TaxAmount:626
    Amount:99374
    Interest:38.61
    NominalInterest:30.69
    Status:created
    ExternalId:my-internal-id-123456
    Scheduled:2022-06-28T00:00:00.000000+00:00
    Expiration:604800
    PaymentType:transfer
    Created:2022-06-01T00:00:00.000000+00:00
    Updated:2022-06-01T00:00:00.000000+00:00
}
  

Clojure

{:id "5745297609744385",
 :template-id "5745297609744384",
 :name "Jamie Lannister",
 :tax-id "012.345.678-90",
 :nominal-amount 100000,
 :tax-amount 626,
 :amount 99374,
 :interest 38.61,
 :nominal-interest 30.69,
 :status "created",
 :external-id "my-internal-id-123456",
 :scheduled "2022-06-28T00:00:00.000000+00:00",
 :expiration 604800,
 :payment-type "transfer",
 :created "2022-06-01T00:00:00.000000+00:00",
 :updated "2022-06-01T00:00:00.000000+00:00"}
  

Curl

{
    "notes": [
        {
            "id": "5745297609744385",
            "templateId": "5745297609744384",
            "name": "Jamie Lannister",
            "taxId": "012.345.678-90",
            "rules": [],
            "tags": [],
            "streetLine1": "Av. Paulista, 200",
            "streetLine2": "Apto. 51",
            "district": "Bela Vista",
            "city": "Sao Paulo",
            "stateCode": "SP",
            "zipCode": "01310-100",
            "nominalAmount": 100000,
            "rebateAmount": 0,
            "taxAmount": 626,
            "amount": 99374,
            "interest": 38.61,
            "nominalInterest": 30.69,
            "externalId": "my-internal-id-123456",
            "signers": [
                {"id": "6306107546853376", "name": "Jamie Lannister", "method": "link", "contact": "jamie.lannister@gmail.com", "signed": ""}
            ],
            "invoices": [
                {"amount": 102612, "due": "2022-07-28", "fine": 2.0, "interest": 1.0}
            ],
            "payment": {"id": "", "status": "", "amount": 99374, "name": "Jamie Lannister", "taxId": "012.345.678-90", "bankCode": "20018183", "branchCode": "1234", "accountNumber": "129340-1"},
            "paymentType": "transfer",
            "status": "created",
            "scheduled": "2022-06-28T00:00:00.000000+00:00",
            "expiration": 604800,
            "documentId": "07d05b14-9d83-4439-9622-d2b313b05a10",
            "workspaceId": "6341320293482496",
            "debtorWorkspaceId": "6341320293482496",
            "transactionIds": [],
            "created": "2022-06-01T00:00:00.000000+00:00",
            "updated": "2022-06-01T00:00:00.000000+00:00"
        }
    ]
}
  

List Credit Notes

List and filter all credit notes created in your workspace. Results are returned paged.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter credit notes by the specified status. Options: "created", "signed", "processing", "success", "failed", "canceled", "expired".

tags OPTIONAL

Filter entities that contain the specified tags.

ids OPTIONAL

List of strings to get specific entities by ids. Max = 100.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/credit-note
REQUEST

Python

import starkinfra

notes = starkinfra.creditnote.query(
    limit=10,
    status="signed",
    after="2022-06-01",
    before="2022-06-30"
)

for note in notes:
    print(note)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let notes = await starkinfra.creditNote.query({
        limit: 10,
        status: 'signed',
        after: '2022-06-01',
        before: '2022-06-30'
    });

    for await (let note of notes) {
        console.log(note);
    }
})();
  

PHP

$notes = StarkInfra\CreditNote::query([
    "limit" => 10,
    "status" => "signed",
    "after" => "2022-06-01",
    "before" => "2022-06-30"
]);

foreach ($notes as $note) {
    print_r($note);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap<String, Object> params = new HashMap<>();
params.put("limit", 10);
params.put("status", "signed");
params.put("after", "2022-06-01");
params.put("before", "2022-06-30");

Generator<CreditNote> notes = CreditNote.query(params);

for (CreditNote note : notes) {
    System.out.println(note);
}
  

Ruby

require('starkinfra')

notes = StarkInfra::CreditNote.query(
    limit: 10,
    status: 'signed',
    after: '2022-06-01',
    before: '2022-06-30'
)

notes.each do |note|
    puts note
end
  

Elixir

notes = StarkInfra.CreditNote.query!(
    limit: 10,
    status: "signed",
    after: "2022-06-01",
    before: "2022-06-30"
)

for note <- notes do
    note |> IO.inspect
end
  

C#

using System;
using System.Collections.Generic;

IEnumerable<StarkInfra.CreditNote> notes = StarkInfra.CreditNote.Query(
    limit: 10,
    status: "signed",
    after: DateTime.Parse("2022-06-01"),
    before: DateTime.Parse("2022-06-30")
);

foreach (StarkInfra.CreditNote note in notes) {
    Console.WriteLine(note);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/creditnote"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["status"] = "signed"
    params["after"] = "2022-06-01"
    params["before"] = "2022-06-30"

    notes := creditnote.Query(params, nil)

    for note := range notes {
        fmt.Printf("%+v", note)
    }
}
  

Clojure

(def notes
  (starkinfra.credit-note/query
    {
      :limit 10
      :status "signed"
      :after "2022-06-01"
      :before "2022-06-30"
    }))
(dorun (map println notes))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/credit-note?limit=10&status=signed&after=2022-06-01&before=2022-06-30' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

CreditNote(
    id=5745297609744385,
    template_id=5745297609744384,
    name=Jamie Lannister,
    tax_id=012.345.678-90,
    nominal_amount=100000,
    tax_amount=626,
    amount=99374,
    interest=38.61,
    nominal_interest=30.69,
    status=signed,
    external_id=my-internal-id-123456,
    scheduled=2022-06-28T00:00:00.000000+00:00,
    expiration=604800,
    payment_type=transfer,
    created=2022-06-01T00:00:00.000000+00:00,
    updated=2022-06-02T00:00:00.000000+00:00
)
  

Javascript

CreditNote {
    id: '5745297609744385',
    templateId: '5745297609744384',
    name: 'Jamie Lannister',
    taxId: '012.345.678-90',
    nominalAmount: 100000,
    taxAmount: 626,
    amount: 99374,
    interest: 38.61,
    nominalInterest: 30.69,
    status: 'signed',
    externalId: 'my-internal-id-123456',
    scheduled: '2022-06-28T00:00:00.000000+00:00',
    expiration: 604800,
    paymentType: 'transfer',
    created: '2022-06-01T00:00:00.000000+00:00',
    updated: '2022-06-02T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\CreditNote Object
(
    [id] => 5745297609744385
    [templateId] => 5745297609744384
    [name] => Jamie Lannister
    [taxId] => 012.345.678-90
    [nominalAmount] => 100000
    [taxAmount] => 626
    [amount] => 99374
    [interest] => 38.61
    [nominalInterest] => 30.69
    [status] => signed
    [externalId] => my-internal-id-123456
    [scheduled] => 2022-06-28T00:00:00.000000+00:00
    [expiration] => 604800
    [paymentType] => transfer
    [created] => 2022-06-01T00:00:00.000000+00:00
    [updated] => 2022-06-02T00:00:00.000000+00:00
)
  

Java

CreditNote({
    "id": "5745297609744385",
    "templateId": "5745297609744384",
    "name": "Jamie Lannister",
    "taxId": "012.345.678-90",
    "nominalAmount": 100000,
    "taxAmount": 626,
    "amount": 99374,
    "interest": 38.61,
    "nominalInterest": 30.69,
    "status": "signed",
    "externalId": "my-internal-id-123456",
    "scheduled": "2022-06-28T00:00:00.000000+00:00",
    "expiration": 604800,
    "paymentType": "transfer",
    "created": "2022-06-01T00:00:00.000000+00:00",
    "updated": "2022-06-02T00:00:00.000000+00:00"
})
  

Ruby

credit_note(
    id: 5745297609744385,
    template_id: 5745297609744384,
    name: Jamie Lannister,
    tax_id: 012.345.678-90,
    nominal_amount: 100000,
    tax_amount: 626,
    amount: 99374,
    interest: 38.61,
    nominal_interest: 30.69,
    status: signed,
    external_id: my-internal-id-123456,
    scheduled: 2022-06-28T00:00:00.000000+00:00,
    expiration: 604800,
    payment_type: transfer,
    created: 2022-06-01T00:00:00.000000+00:00,
    updated: 2022-06-02T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditNote{
    id: "5745297609744385",
    template_id: "5745297609744384",
    name: "Jamie Lannister",
    tax_id: "012.345.678-90",
    nominal_amount: 100000,
    tax_amount: 626,
    amount: 99374,
    interest: 38.61,
    nominal_interest: 30.69,
    status: "signed",
    external_id: "my-internal-id-123456",
    scheduled: "2022-06-28T00:00:00.000000+00:00",
    expiration: 604800,
    payment_type: "transfer",
    created: "2022-06-01T00:00:00.000000+00:00",
    updated: "2022-06-02T00:00:00.000000+00:00"
}
  

C#

CreditNote(
    Id: 5745297609744385,
    TemplateId: 5745297609744384,
    Name: Jamie Lannister,
    TaxId: 012.345.678-90,
    NominalAmount: 100000,
    TaxAmount: 626,
    Amount: 99374,
    Interest: 38.61,
    NominalInterest: 30.69,
    Status: signed,
    ExternalId: my-internal-id-123456,
    Scheduled: 2022-06-28T00:00:00.000000+00:00,
    Expiration: 604800,
    PaymentType: transfer,
    Created: 2022-06-01T00:00:00.000000+00:00,
    Updated: 2022-06-02T00:00:00.000000+00:00
)
  

Go

{
    Id:5745297609744385
    TemplateId:5745297609744384
    Name:Jamie Lannister
    TaxId:012.345.678-90
    NominalAmount:100000
    TaxAmount:626
    Amount:99374
    Interest:38.61
    NominalInterest:30.69
    Status:signed
    ExternalId:my-internal-id-123456
    Scheduled:2022-06-28T00:00:00.000000+00:00
    Expiration:604800
    PaymentType:transfer
    Created:2022-06-01T00:00:00.000000+00:00
    Updated:2022-06-02T00:00:00.000000+00:00
}
  

Clojure

{:id "5745297609744385",
 :template-id "5745297609744384",
 :name "Jamie Lannister",
 :tax-id "012.345.678-90",
 :nominal-amount 100000,
 :tax-amount 626,
 :amount 99374,
 :interest 38.61,
 :nominal-interest 30.69,
 :status "signed",
 :external-id "my-internal-id-123456",
 :scheduled "2022-06-28T00:00:00.000000+00:00",
 :expiration 604800,
 :payment-type "transfer",
 :created "2022-06-01T00:00:00.000000+00:00",
 :updated "2022-06-02T00:00:00.000000+00:00"}
  

Curl

{
    "cursor": null,
    "notes": [
        {
            "id": "5745297609744385",
            "templateId": "5745297609744384",
            "name": "Jamie Lannister",
            "taxId": "012.345.678-90",
            "nominalAmount": 100000,
            "taxAmount": 626,
            "amount": 99374,
            "interest": 38.61,
            "nominalInterest": 30.69,
            "status": "signed",
            "externalId": "my-internal-id-123456",
            "scheduled": "2022-06-28T00:00:00.000000+00:00",
            "expiration": 604800,
            "paymentType": "transfer",
            "created": "2022-06-01T00:00:00.000000+00:00",
            "updated": "2022-06-02T00:00:00.000000+00:00"
        }
    ]
}
  

Get a Credit Note

Get a single credit note by its id.

Parameters

id REQUIRED

Id of the credit note entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/credit-note/:id
REQUEST

Python

import starkinfra

note = starkinfra.creditnote.get("5745297609744385")

print(note)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let note = await starkinfra.creditNote.get('5745297609744385');
    console.log(note);
})();
  

PHP

$note = StarkInfra\CreditNote::get("5745297609744385");

print_r($note);
  

Java

import com.starkinfra.*;

CreditNote note = CreditNote.get("5745297609744385");

System.out.println(note);
  

Ruby

require('starkinfra')

note = StarkInfra::CreditNote.get('5745297609744385')

puts note
  

Elixir

note = StarkInfra.CreditNote.get!("5745297609744385")

note |> IO.inspect
  

C#

using System;

StarkInfra.CreditNote note = StarkInfra.CreditNote.Get("5745297609744385");

Console.WriteLine(note);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/creditnote"
)

func main() {

    note, err := creditnote.Get("5745297609744385", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", note)
}
  

Clojure

(def note (starkinfra.credit-note/get "5745297609744385"))
(println note)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/credit-note/5745297609744385' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

CreditNote(
    id=5745297609744385,
    template_id=5745297609744384,
    name=Jamie Lannister,
    tax_id=012.345.678-90,
    nominal_amount=100000,
    tax_amount=626,
    amount=99374,
    interest=38.61,
    nominal_interest=30.69,
    status=signed,
    signers=[{id: 6306107546853376, name: Jamie Lannister, method: link, contact: jamie.lannister@gmail.com, signed: 2022-06-02T00:00:00.000000+00:00}],
    document_id=07d05b14-9d83-4439-9622-d2b313b05a10,
    external_id=my-internal-id-123456,
    scheduled=2022-06-28T00:00:00.000000+00:00,
    expiration=604800,
    payment_type=transfer,
    created=2022-06-01T00:00:00.000000+00:00,
    updated=2022-06-02T00:00:00.000000+00:00
)
  

Javascript

CreditNote {
    id: '5745297609744385',
    templateId: '5745297609744384',
    name: 'Jamie Lannister',
    taxId: '012.345.678-90',
    nominalAmount: 100000,
    taxAmount: 626,
    amount: 99374,
    interest: 38.61,
    nominalInterest: 30.69,
    status: 'signed',
    signers: [{id: '6306107546853376', name: 'Jamie Lannister', method: 'link', contact: 'jamie.lannister@gmail.com', signed: '2022-06-02T00:00:00.000000+00:00'}],
    documentId: '07d05b14-9d83-4439-9622-d2b313b05a10',
    externalId: 'my-internal-id-123456',
    scheduled: '2022-06-28T00:00:00.000000+00:00',
    expiration: 604800,
    paymentType: 'transfer',
    created: '2022-06-01T00:00:00.000000+00:00',
    updated: '2022-06-02T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\CreditNote Object
(
    [id] => 5745297609744385
    [templateId] => 5745297609744384
    [name] => Jamie Lannister
    [taxId] => 012.345.678-90
    [nominalAmount] => 100000
    [taxAmount] => 626
    [amount] => 99374
    [interest] => 38.61
    [nominalInterest] => 30.69
    [status] => signed
    [signers] => Array([0] => Array([id] => 6306107546853376, [name] => Jamie Lannister, [method] => link, [contact] => jamie.lannister@gmail.com, [signed] => 2022-06-02T00:00:00.000000+00:00))
    [documentId] => 07d05b14-9d83-4439-9622-d2b313b05a10
    [externalId] => my-internal-id-123456
    [scheduled] => 2022-06-28T00:00:00.000000+00:00
    [expiration] => 604800
    [paymentType] => transfer
    [created] => 2022-06-01T00:00:00.000000+00:00
    [updated] => 2022-06-02T00:00:00.000000+00:00
)
  

Java

CreditNote({
    "id": "5745297609744385",
    "templateId": "5745297609744384",
    "name": "Jamie Lannister",
    "taxId": "012.345.678-90",
    "nominalAmount": 100000,
    "taxAmount": 626,
    "amount": 99374,
    "interest": 38.61,
    "nominalInterest": 30.69,
    "status": "signed",
    "signers": [{"id": "6306107546853376", "name": "Jamie Lannister", "method": "link", "contact": "jamie.lannister@gmail.com", "signed": "2022-06-02T00:00:00.000000+00:00"}],
    "documentId": "07d05b14-9d83-4439-9622-d2b313b05a10",
    "externalId": "my-internal-id-123456",
    "scheduled": "2022-06-28T00:00:00.000000+00:00",
    "expiration": 604800,
    "paymentType": "transfer",
    "created": "2022-06-01T00:00:00.000000+00:00",
    "updated": "2022-06-02T00:00:00.000000+00:00"
})
  

Ruby

credit_note(
    id: 5745297609744385,
    template_id: 5745297609744384,
    name: Jamie Lannister,
    tax_id: 012.345.678-90,
    nominal_amount: 100000,
    tax_amount: 626,
    amount: 99374,
    interest: 38.61,
    nominal_interest: 30.69,
    status: signed,
    signers: [{id: 6306107546853376, name: Jamie Lannister, method: link, contact: jamie.lannister@gmail.com, signed: 2022-06-02T00:00:00.000000+00:00}],
    document_id: 07d05b14-9d83-4439-9622-d2b313b05a10,
    external_id: my-internal-id-123456,
    scheduled: 2022-06-28T00:00:00.000000+00:00,
    expiration: 604800,
    payment_type: transfer,
    created: 2022-06-01T00:00:00.000000+00:00,
    updated: 2022-06-02T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditNote{
    id: "5745297609744385",
    template_id: "5745297609744384",
    name: "Jamie Lannister",
    tax_id: "012.345.678-90",
    nominal_amount: 100000,
    tax_amount: 626,
    amount: 99374,
    interest: 38.61,
    nominal_interest: 30.69,
    status: "signed",
    signers: [%{id: "6306107546853376", name: "Jamie Lannister", method: "link", contact: "jamie.lannister@gmail.com", signed: "2022-06-02T00:00:00.000000+00:00"}],
    document_id: "07d05b14-9d83-4439-9622-d2b313b05a10",
    external_id: "my-internal-id-123456",
    scheduled: "2022-06-28T00:00:00.000000+00:00",
    expiration: 604800,
    payment_type: "transfer",
    created: "2022-06-01T00:00:00.000000+00:00",
    updated: "2022-06-02T00:00:00.000000+00:00"
}
  

C#

CreditNote(
    Id: 5745297609744385,
    TemplateId: 5745297609744384,
    Name: Jamie Lannister,
    TaxId: 012.345.678-90,
    NominalAmount: 100000,
    TaxAmount: 626,
    Amount: 99374,
    Interest: 38.61,
    NominalInterest: 30.69,
    Status: signed,
    Signers: [{Id: 6306107546853376, Name: Jamie Lannister, Method: link, Contact: jamie.lannister@gmail.com, Signed: 2022-06-02T00:00:00.000000+00:00}],
    DocumentId: 07d05b14-9d83-4439-9622-d2b313b05a10,
    ExternalId: my-internal-id-123456,
    Scheduled: 2022-06-28T00:00:00.000000+00:00,
    Expiration: 604800,
    PaymentType: transfer,
    Created: 2022-06-01T00:00:00.000000+00:00,
    Updated: 2022-06-02T00:00:00.000000+00:00
)
  

Go

{
    Id:5745297609744385
    TemplateId:5745297609744384
    Name:Jamie Lannister
    TaxId:012.345.678-90
    NominalAmount:100000
    TaxAmount:626
    Amount:99374
    Interest:38.61
    NominalInterest:30.69
    Status:signed
    Signers:[{Id:6306107546853376 Name:Jamie Lannister Method:link Contact:jamie.lannister@gmail.com Signed:2022-06-02T00:00:00.000000+00:00}]
    DocumentId:07d05b14-9d83-4439-9622-d2b313b05a10
    ExternalId:my-internal-id-123456
    Scheduled:2022-06-28T00:00:00.000000+00:00
    Expiration:604800
    PaymentType:transfer
    Created:2022-06-01T00:00:00.000000+00:00
    Updated:2022-06-02T00:00:00.000000+00:00
}
  

Clojure

{:id "5745297609744385",
 :template-id "5745297609744384",
 :name "Jamie Lannister",
 :tax-id "012.345.678-90",
 :nominal-amount 100000,
 :tax-amount 626,
 :amount 99374,
 :interest 38.61,
 :nominal-interest 30.69,
 :status "signed",
 :signers [{:id "6306107546853376" :name "Jamie Lannister" :method "link" :contact "jamie.lannister@gmail.com" :signed "2022-06-02T00:00:00.000000+00:00"}],
 :document-id "07d05b14-9d83-4439-9622-d2b313b05a10",
 :external-id "my-internal-id-123456",
 :scheduled "2022-06-28T00:00:00.000000+00:00",
 :expiration 604800,
 :payment-type "transfer",
 :created "2022-06-01T00:00:00.000000+00:00",
 :updated "2022-06-02T00:00:00.000000+00:00"}
  

Curl

{
    "note": {
        "id": "5745297609744385",
        "templateId": "5745297609744384",
        "name": "Jamie Lannister",
        "taxId": "012.345.678-90",
        "rules": [],
        "tags": [],
        "streetLine1": "Av. Paulista, 200",
        "streetLine2": "Apto. 51",
        "district": "Bela Vista",
        "city": "Sao Paulo",
        "stateCode": "SP",
        "zipCode": "01310-100",
        "nominalAmount": 100000,
        "rebateAmount": 0,
        "taxAmount": 626,
        "amount": 99374,
        "interest": 38.61,
        "nominalInterest": 30.69,
        "externalId": "my-internal-id-123456",
        "signers": [
            {"id": "6306107546853376", "name": "Jamie Lannister", "method": "link", "contact": "jamie.lannister@gmail.com", "signed": "2022-06-02T00:00:00.000000+00:00"}
        ],
        "invoices": [
            {"id": "5155165527080960", "amount": 102612, "due": "2022-07-28", "fine": 2.0, "interest": 1.0}
        ],
        "payment": {"id": "", "status": "", "amount": 99374, "name": "Jamie Lannister", "taxId": "012.345.678-90", "bankCode": "20018183", "branchCode": "1234", "accountNumber": "129340-1"},
        "paymentType": "transfer",
        "status": "signed",
        "scheduled": "2022-06-28T00:00:00.000000+00:00",
        "expiration": 604800,
        "documentId": "07d05b14-9d83-4439-9622-d2b313b05a10",
        "workspaceId": "6341320293482496",
        "debtorWorkspaceId": "6341320293482496",
        "transactionIds": [],
        "created": "2022-06-01T00:00:00.000000+00:00",
        "updated": "2022-06-02T00:00:00.000000+00:00"
    }
}
  

Cancel a Credit Note

Cancel a credit note that has not reached a final status yet. Credit notes with status "created", "signed" or "processing" can be canceled, which also cancels the signing document. Credit notes with status "success", "failed", "expired" or already "canceled" are returned unchanged.

Parameters

id REQUIRED

Id of the credit note entity.

ENDPOINT
DELETE /v2/credit-note/:id
REQUEST

Python

import starkinfra

note = starkinfra.creditnote.cancel("5745297609744385")

print(note)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let note = await starkinfra.creditNote.cancel('5745297609744385');
    console.log(note);
})();
  

PHP

$note = StarkInfra\CreditNote::cancel("5745297609744385");

print_r($note);
  

Java

import com.starkinfra.*;

CreditNote note = CreditNote.cancel("5745297609744385");

System.out.println(note);
  

Ruby

require('starkinfra')

note = StarkInfra::CreditNote.cancel('5745297609744385')

puts note
  

Elixir

note = StarkInfra.CreditNote.cancel!("5745297609744385")

note |> IO.inspect
  

C#

using System;

StarkInfra.CreditNote note = StarkInfra.CreditNote.Cancel("5745297609744385");

Console.WriteLine(note);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/creditnote"
)

func main() {

    note, err := creditnote.Cancel("5745297609744385", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", note)
}
  

Clojure

(def note (starkinfra.credit-note/cancel "5745297609744385"))
(println note)
  

Curl

curl --location --request DELETE '{{baseUrl}}/v2/credit-note/5745297609744385' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

CreditNote(
    id=5745297609744385,
    template_id=5745297609744384,
    name=Jamie Lannister,
    tax_id=012.345.678-90,
    nominal_amount=100000,
    status=canceled,
    external_id=my-internal-id-123456,
    created=2022-06-01T00:00:00.000000+00:00,
    updated=2022-06-03T00:00:00.000000+00:00
)
  

Javascript

CreditNote {
    id: '5745297609744385',
    templateId: '5745297609744384',
    name: 'Jamie Lannister',
    taxId: '012.345.678-90',
    nominalAmount: 100000,
    status: 'canceled',
    externalId: 'my-internal-id-123456',
    created: '2022-06-01T00:00:00.000000+00:00',
    updated: '2022-06-03T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\CreditNote Object
(
    [id] => 5745297609744385
    [templateId] => 5745297609744384
    [name] => Jamie Lannister
    [taxId] => 012.345.678-90
    [nominalAmount] => 100000
    [status] => canceled
    [externalId] => my-internal-id-123456
    [created] => 2022-06-01T00:00:00.000000+00:00
    [updated] => 2022-06-03T00:00:00.000000+00:00
)
  

Java

CreditNote({
    "id": "5745297609744385",
    "templateId": "5745297609744384",
    "name": "Jamie Lannister",
    "taxId": "012.345.678-90",
    "nominalAmount": 100000,
    "status": "canceled",
    "externalId": "my-internal-id-123456",
    "created": "2022-06-01T00:00:00.000000+00:00",
    "updated": "2022-06-03T00:00:00.000000+00:00"
})
  

Ruby

credit_note(
    id: 5745297609744385,
    template_id: 5745297609744384,
    name: Jamie Lannister,
    tax_id: 012.345.678-90,
    nominal_amount: 100000,
    status: canceled,
    external_id: my-internal-id-123456,
    created: 2022-06-01T00:00:00.000000+00:00,
    updated: 2022-06-03T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditNote{
    id: "5745297609744385",
    template_id: "5745297609744384",
    name: "Jamie Lannister",
    tax_id: "012.345.678-90",
    nominal_amount: 100000,
    status: "canceled",
    external_id: "my-internal-id-123456",
    created: "2022-06-01T00:00:00.000000+00:00",
    updated: "2022-06-03T00:00:00.000000+00:00"
}
  

C#

CreditNote(
    Id: 5745297609744385,
    TemplateId: 5745297609744384,
    Name: Jamie Lannister,
    TaxId: 012.345.678-90,
    NominalAmount: 100000,
    Status: canceled,
    ExternalId: my-internal-id-123456,
    Created: 2022-06-01T00:00:00.000000+00:00,
    Updated: 2022-06-03T00:00:00.000000+00:00
)
  

Go

{
    Id:5745297609744385
    TemplateId:5745297609744384
    Name:Jamie Lannister
    TaxId:012.345.678-90
    NominalAmount:100000
    Status:canceled
    ExternalId:my-internal-id-123456
    Created:2022-06-01T00:00:00.000000+00:00
    Updated:2022-06-03T00:00:00.000000+00:00
}
  

Clojure

{:id "5745297609744385",
 :template-id "5745297609744384",
 :name "Jamie Lannister",
 :tax-id "012.345.678-90",
 :nominal-amount 100000,
 :status "canceled",
 :external-id "my-internal-id-123456",
 :created "2022-06-01T00:00:00.000000+00:00",
 :updated "2022-06-03T00:00:00.000000+00:00"}
  

Curl

{
    "note": {
        "id": "5745297609744385",
        "templateId": "5745297609744384",
        "name": "Jamie Lannister",
        "taxId": "012.345.678-90",
        "nominalAmount": 100000,
        "status": "canceled",
        "externalId": "my-internal-id-123456",
        "created": "2022-06-01T00:00:00.000000+00:00",
        "updated": "2022-06-03T00:00:00.000000+00:00"
    }
}
  

Get a Credit Note PDF

Get the CCB contract PDF file of a credit note. After all signers have signed, the returned file carries the digital signatures.

Parameters

id REQUIRED

Id of the credit note entity.

ENDPOINT
GET /v2/credit-note/:id/pdf
REQUEST

Python

import starkinfra

pdf = starkinfra.creditnote.pdf("5745297609744385")

with open("credit-note.pdf", "wb") as file:
    file.write(pdf)
  

Javascript

const starkinfra = require('starkinfra');
const fs = require('fs').promises;

(async() => {
    let pdf = await starkinfra.creditNote.pdf('5745297609744385');
    await fs.writeFile('credit-note.pdf', pdf);
})();
  

PHP

$pdf = StarkInfra\CreditNote::pdf("5745297609744385");

$fp = fopen('credit-note.pdf', 'w');
fwrite($fp, $pdf);
fclose($fp);
  

Java

import com.starkinfra.*;
import java.io.File;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;

InputStream pdf = CreditNote.pdf("5745297609744385");

Files.copy(pdf, new File("credit-note.pdf").toPath(), StandardCopyOption.REPLACE_EXISTING);
  

Ruby

require('starkinfra')

pdf = StarkInfra::CreditNote.pdf('5745297609744385')

File.binwrite('credit-note.pdf', pdf)
  

Elixir

pdf = StarkInfra.CreditNote.pdf!("5745297609744385")

file = File.open!("credit-note.pdf", [:write])
IO.binwrite(file, pdf)
File.close(file)
  

C#

using System;
using System.IO;

byte[] pdf = StarkInfra.CreditNote.Pdf("5745297609744385");

File.WriteAllBytes("credit-note.pdf", pdf);
  

Go

package main

import (
    "fmt"
    "os"
    "github.com/starkinfra/sdk-go/starkinfra/creditnote"
)

func main() {

    pdf, err := creditnote.Pdf("5745297609744385", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    errFile := os.WriteFile("credit-note.pdf", pdf, 0666)
    if errFile != nil {
        fmt.Print(errFile)
    }
}
  

Clojure

(def pdf (starkinfra.credit-note/pdf "5745297609744385"))
(clojure.java.io/copy pdf (clojure.java.io/file "credit-note.pdf"))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/credit-note/5745297609744385/pdf' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--output credit-note.pdf
  
RESPONSE

Python

(binary PDF file content)
  

Javascript

(binary PDF file content)
  

PHP

(binary PDF file content)
  

Java

(binary PDF file content)
  

Ruby

(binary PDF file content)
  

Elixir

(binary PDF file content)
  

C#

(binary PDF file content)
  

Go

(binary PDF file content)
  

Clojure

(binary PDF file content)
  

Curl

(binary PDF file content)
  

Get a Credit Note Payment PDF

Get the disbursement transfer receipt PDF file of a credit note. Only available for credit notes with status "success".

Parameters

id REQUIRED

Id of the credit note entity.

ENDPOINT
GET /v2/credit-note/:id/payment/pdf
REQUEST

Python

import starkinfra

pdf = starkinfra.request.get(
    path="/credit-note/5745297609744385/payment/pdf"
).content

with open("credit-note-payment.pdf", "wb") as file:
    file.write(pdf)
  

Javascript

const starkinfra = require('starkinfra');
const fs = require('fs').promises;

(async() => {
    let pdf = await starkinfra.request.get('/credit-note/5745297609744385/payment/pdf');
    await fs.writeFile('credit-note-payment.pdf', pdf);
})();
  

PHP

$pdf = StarkInfra\Request::get("/credit-note/5745297609744385/payment/pdf");

$fp = fopen('credit-note-payment.pdf', 'w');
fwrite($fp, $pdf);
fclose($fp);
  

Java

import com.starkinfra.*;

String pdf = Request.get("/credit-note/5745297609744385/payment/pdf").content();
  

Ruby

require('starkinfra')

pdf = StarkInfra::Request.get('/credit-note/5745297609744385/payment/pdf')

File.binwrite('credit-note-payment.pdf', pdf)
  

Elixir

pdf = StarkInfra.Request.get!("/credit-note/5745297609744385/payment/pdf")

file = File.open!("credit-note-payment.pdf", [:write])
IO.binwrite(file, pdf)
File.close(file)
  

C#

using System;
using System.IO;

string pdf = StarkInfra.Request.Get("/credit-note/5745297609744385/payment/pdf");
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/request"
)

func main() {

    pdf, err := request.Get("/credit-note/5745297609744385/payment/pdf", nil, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", pdf)
}
  

Clojure

(def pdf (starkinfra.request/get "/credit-note/5745297609744385/payment/pdf"))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/credit-note/5745297609744385/payment/pdf' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--output credit-note-payment.pdf
  
RESPONSE

Python

(binary PDF file content)
  

Javascript

(binary PDF file content)
  

PHP

(binary PDF file content)
  

Java

(binary PDF file content)
  

Ruby

(binary PDF file content)
  

Elixir

(binary PDF file content)
  

C#

(binary PDF file content)
  

Go

(binary PDF file content)
  

Clojure

(binary PDF file content)
  

Curl

(binary PDF file content)
  

List Credit Note Logs

Get a paged list of all credit note logs. A log tracks a change in the credit note entity according to its life cycle, as {"id", "type", "errors", "note", "created"} objects.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Number of results per cursor. Max = 100.

noteIds OPTIONAL

List of credit note ids linked to the desired logs. Max = 100.

types OPTIONAL

Filter logs by log type. Options: "created", "signing", "signed", "sending", "sent", "success", "failed", "refunded", "canceled", "expired", "updated", "registered".

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/credit-note/log
REQUEST

Python

import starkinfra

logs = starkinfra.creditnote.log.query(
    limit=10,
    note_ids=["5745297609744385"],
    types=["signed"]
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let logs = await starkinfra.creditNote.log.query({
        limit: 10,
        noteIds: ['5745297609744385'],
        types: ['signed']
    });

    for await (let log of logs) {
        console.log(log);
    }
})();
  

PHP

$logs = StarkInfra\CreditNote\Log::query([
    "limit" => 10,
    "noteIds" => ["5745297609744385"],
    "types" => ["signed"]
]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import java.util.HashMap;
import java.util.Arrays;

HashMap<String, Object> params = new HashMap<>();
params.put("limit", 10);
params.put("noteIds", Arrays.asList("5745297609744385"));
params.put("types", Arrays.asList("signed"));

Generator<CreditNote.Log> logs = CreditNote.Log.query(params);

for (CreditNote.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::CreditNote::Log.query(
    limit: 10,
    note_ids: ['5745297609744385'],
    types: ['signed']
)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.CreditNote.Log.query!(
    limit: 10,
    note_ids: ["5745297609744385"],
    types: ["signed"]
)

for log <- logs do
    log |> IO.inspect
end
  

C#

using System;
using System.Collections.Generic;

IEnumerable<StarkInfra.CreditNote.Log> logs = StarkInfra.CreditNote.Log.Query(
    limit: 10,
    noteIds: new List<string> { "5745297609744385" },
    types: new List<string> { "signed" }
);

foreach (StarkInfra.CreditNote.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    creditNoteLog "github.com/starkinfra/sdk-go/starkinfra/creditnote/log"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["noteIds"] = []string{"5745297609744385"}
    params["types"] = []string{"signed"}

    logs := creditNoteLog.Query(params, nil)

    for log := range logs {
        fmt.Printf("%+v", log)
    }
}
  

Clojure

(def logs
  (starkinfra.credit-note.log/query
    {
      :limit 10
      :note-ids ["5745297609744385"]
      :types ["signed"]
    }))
(dorun (map println logs))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/credit-note/log?limit=10¬eIds=5745297609744385&types=signed' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6532638269505536,
    type=signed,
    errors=[],
    note=CreditNote(
        id=5745297609744385,
        name=Jamie Lannister,
        status=signed
    ),
    created=2022-06-02T00:00:00.000000+00:00
)
  

Javascript

CreditNoteLog {
    id: '6532638269505536',
    type: 'signed',
    errors: [],
    note: CreditNote {
        id: '5745297609744385',
        name: 'Jamie Lannister',
        status: 'signed'
    },
    created: '2022-06-02T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\CreditNote\Log Object
(
    [id] => 6532638269505536
    [type] => signed
    [errors] => Array()
    [note] => StarkInfra\CreditNote Object
        (
            [id] => 5745297609744385
            [name] => Jamie Lannister
            [status] => signed
        )
    [created] => 2022-06-02T00:00:00.000000+00:00
)
  

Java

Log({
    "id": "6532638269505536",
    "type": "signed",
    "errors": [],
    "note": {
        "id": "5745297609744385",
        "name": "Jamie Lannister",
        "status": "signed"
    },
    "created": "2022-06-02T00:00:00.000000+00:00"
})
  

Ruby

credit_note_log(
    id: 6532638269505536,
    type: signed,
    errors: [],
    note: credit_note(
        id: 5745297609744385,
        name: Jamie Lannister,
        status: signed
    ),
    created: 2022-06-02T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditNote.Log{
    id: "6532638269505536",
    type: "signed",
    errors: [],
    note: %StarkInfra.CreditNote{
        id: "5745297609744385",
        name: "Jamie Lannister",
        status: "signed"
    },
    created: "2022-06-02T00:00:00.000000+00:00"
}
  

C#

Log(
    Id: 6532638269505536,
    Type: signed,
    Errors: [],
    Note: CreditNote(
        Id: 5745297609744385,
        Name: Jamie Lannister,
        Status: signed
    ),
    Created: 2022-06-02T00:00:00.000000+00:00
)
  

Go

{
    Id:6532638269505536
    Type:signed
    Errors:[]
    Note:{
        Id:5745297609744385
        Name:Jamie Lannister
        Status:signed
    }
    Created:2022-06-02T00:00:00.000000+00:00
}
  

Clojure

{:id "6532638269505536",
 :type "signed",
 :errors [],
 :note {:id "5745297609744385",
        :name "Jamie Lannister",
        :status "signed"},
 :created "2022-06-02T00:00:00.000000+00:00"}
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "6532638269505536",
            "type": "signed",
            "errors": [],
            "note": {
                "id": "5745297609744385",
                "name": "Jamie Lannister",
                "status": "signed"
            },
            "created": "2022-06-02T00:00:00.000000+00:00"
        }
    ]
}
  

Get a Credit Note Log

Get a single credit note log by its id.

Parameters

id REQUIRED

Id of the credit note log entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/credit-note/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.creditnote.log.get("6532638269505536")

print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let log = await starkinfra.creditNote.log.get('6532638269505536');
    console.log(log);
})();
  

PHP

$log = StarkInfra\CreditNote\Log::get("6532638269505536");

print_r($log);
  

Java

import com.starkinfra.*;

CreditNote.Log log = CreditNote.Log.get("6532638269505536");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::CreditNote::Log.get('6532638269505536')

puts log
  

Elixir

log = StarkInfra.CreditNote.Log.get!("6532638269505536")

log |> IO.inspect
  

C#

using System;

StarkInfra.CreditNote.Log log = StarkInfra.CreditNote.Log.Get("6532638269505536");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    creditNoteLog "github.com/starkinfra/sdk-go/starkinfra/creditnote/log"
)

func main() {

    log, err := creditNoteLog.Get("6532638269505536", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", log)
}
  

Clojure

(def log (starkinfra.credit-note.log/get "6532638269505536"))
(println log)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/credit-note/log/6532638269505536' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=6532638269505536,
    type=signed,
    errors=[],
    note=CreditNote(
        id=5745297609744385,
        name=Jamie Lannister,
        status=signed
    ),
    created=2022-06-02T00:00:00.000000+00:00
)
  

Javascript

CreditNoteLog {
    id: '6532638269505536',
    type: 'signed',
    errors: [],
    note: CreditNote {
        id: '5745297609744385',
        name: 'Jamie Lannister',
        status: 'signed'
    },
    created: '2022-06-02T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\CreditNote\Log Object
(
    [id] => 6532638269505536
    [type] => signed
    [errors] => Array()
    [note] => StarkInfra\CreditNote Object
        (
            [id] => 5745297609744385
            [name] => Jamie Lannister
            [status] => signed
        )
    [created] => 2022-06-02T00:00:00.000000+00:00
)
  

Java

Log({
    "id": "6532638269505536",
    "type": "signed",
    "errors": [],
    "note": {
        "id": "5745297609744385",
        "name": "Jamie Lannister",
        "status": "signed"
    },
    "created": "2022-06-02T00:00:00.000000+00:00"
})
  

Ruby

credit_note_log(
    id: 6532638269505536,
    type: signed,
    errors: [],
    note: credit_note(
        id: 5745297609744385,
        name: Jamie Lannister,
        status: signed
    ),
    created: 2022-06-02T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditNote.Log{
    id: "6532638269505536",
    type: "signed",
    errors: [],
    note: %StarkInfra.CreditNote{
        id: "5745297609744385",
        name: "Jamie Lannister",
        status: "signed"
    },
    created: "2022-06-02T00:00:00.000000+00:00"
}
  

C#

Log(
    Id: 6532638269505536,
    Type: signed,
    Errors: [],
    Note: CreditNote(
        Id: 5745297609744385,
        Name: Jamie Lannister,
        Status: signed
    ),
    Created: 2022-06-02T00:00:00.000000+00:00
)
  

Go

{
    Id:6532638269505536
    Type:signed
    Errors:[]
    Note:{
        Id:5745297609744385
        Name:Jamie Lannister
        Status:signed
    }
    Created:2022-06-02T00:00:00.000000+00:00
}
  

Clojure

{:id "6532638269505536",
 :type "signed",
 :errors [],
 :note {:id "5745297609744385",
        :name "Jamie Lannister",
        :status "signed"},
 :created "2022-06-02T00:00:00.000000+00:00"}
  

Curl

{
    "log": {
        "id": "6532638269505536",
        "type": "signed",
        "errors": [],
        "note": {
            "id": "5745297609744385",
            "name": "Jamie Lannister",
            "status": "signed"
        },
        "created": "2022-06-02T00:00:00.000000+00:00"
    }
}
  

Credit Signer

Credit Signers represent every person or entity that must sign the CCB contract of a Credit Note.

Signers are created together with the Credit Note, through its "signers" parameter, and are returned embedded in the CreditNote object. Signers registered in your credit profile and the SCD signature are appended automatically.

When the method is "link" or "token", the signer receives the signing link or token on the registered contact (email or phone). If a signer misses it, you can trigger a new delivery.

The CreditSigner object

Attributes

id STRING

Unique id for the credit signer.

name STRING

Signer full name.

contact STRING

Signer contact that receives the signing link or token. Can be an email, a phone number or, for the "server" and "organization" methods, a URL.

method STRING

Signing method. Options: "link" (signing link sent to the contact), "token" (signing token sent to the contact), "server" and "organization" (automatic signatures over URL contacts).

signed STRING

Datetime when the signer signed the contract. Empty until the signature happens. Example: "2022-06-02T00:00:00.000000+00:00".

Update a Credit Signer

Update the delivery state of a credit signer's signing token or link. Setting "isSent" to false marks it as not delivered, causing it to be sent again to the signer's contact. Use it when a signer misses the original email or SMS.

Parameters

id REQUIRED

Id of the credit signer entity, as returned in the "signers" field of the CreditNote object.

isSent REQUIRED

Delivery state of the signing token or link. Set to false to trigger a new delivery.

ENDPOINT
PATCH /v2/credit-signer/:id
REQUEST

Python

import starkinfra

signer = starkinfra.creditsigner.resend_token("6306107546853376")

print(signer)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let signer = await starkinfra.request.patch(
        '/credit-signer/6306107546853376',
        { isSent: false }
    );
    console.log(signer);
})();
  

PHP

$signer = StarkInfra\Request::patch(
    "/credit-signer/6306107546853376",
    ["isSent" => false]
);

print_r($signer);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap<String, Object> data = new HashMap<>();
data.put("isSent", false);

String signer = Request.patch("/credit-signer/6306107546853376", data).content();

System.out.println(signer);
  

Ruby

require('starkinfra')

signer = StarkInfra::Request.patch(
    '/credit-signer/6306107546853376',
    payload: { isSent: false }
)

puts signer
  

Elixir

signer = StarkInfra.Request.patch!(
    "/credit-signer/6306107546853376",
    payload: %{isSent: false}
)

signer |> IO.inspect
  

C#

using System;
using System.Collections.Generic;

Dictionary<string, object> data = new Dictionary<string, object> {
    { "isSent", false }
};

string signer = StarkInfra.Request.Patch("/credit-signer/6306107546853376", data);

Console.WriteLine(signer);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/request"
)

func main() {

    var data = map[string]interface{}{}
    data["isSent"] = false

    signer, err := request.Patch("/credit-signer/6306107546853376", data, nil, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", signer)
}
  

Clojure

(def signer
  (starkinfra.request/patch
    "/credit-signer/6306107546853376"
    {:is-sent false}))
(println signer)
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/credit-signer/6306107546853376' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "isSent": false
}'
  
RESPONSE

Python

CreditSigner(
    id=6306107546853376,
    name=Jamie Lannister,
    contact=jamie.lannister@gmail.com,
    method=link,
    signed=
)
  

Javascript

{
    signer: {
        id: '6306107546853376',
        name: 'Jamie Lannister',
        contact: 'jamie.lannister@gmail.com',
        method: 'link',
        signed: ''
    }
}
  

PHP

Array
(
    [signer] => Array
        (
            [id] => 6306107546853376
            [name] => Jamie Lannister
            [contact] => jamie.lannister@gmail.com
            [method] => link
            [signed] =>
        )
)
  

Java

{
    "signer": {
        "id": "6306107546853376",
        "name": "Jamie Lannister",
        "contact": "jamie.lannister@gmail.com",
        "method": "link",
        "signed": ""
    }
}
  

Ruby

{
    signer: {
        id: 6306107546853376,
        name: Jamie Lannister,
        contact: jamie.lannister@gmail.com,
        method: link,
        signed:
    }
}
  

Elixir

%{
    signer: %{
        id: "6306107546853376",
        name: "Jamie Lannister",
        contact: "jamie.lannister@gmail.com",
        method: "link",
        signed: ""
    }
}
  

C#

{
    "signer": {
        "id": "6306107546853376",
        "name": "Jamie Lannister",
        "contact": "jamie.lannister@gmail.com",
        "method": "link",
        "signed": ""
    }
}
  

Go

{
    Signer:{
        Id:6306107546853376
        Name:Jamie Lannister
        Contact:jamie.lannister@gmail.com
        Method:link
        Signed:
    }
}
  

Clojure

{:signer {:id "6306107546853376",
          :name "Jamie Lannister",
          :contact "jamie.lannister@gmail.com",
          :method "link",
          :signed ""}}
  

Curl

{
    "signer": {
        "id": "6306107546853376",
        "name": "Jamie Lannister",
        "contact": "jamie.lannister@gmail.com",
        "method": "link",
        "signed": ""
    }
}
  

Credit Preview

CreditPreviews are used to preview a credit operation before creating it.

You can simulate the installment schedule, the IOF tax amount, the disbursed amount and the effective interest rates of a Credit Note without persisting anything. Previews are computed on the fly and are not saved.

The CreditPreview object

Attributes

type STRING

Type of the credit preview. Options: "credit-note".

credit OBJECT

CreditNotePreview object with the simulation parameters and, in the response, the computed results.

Its "type" defines the amortization schedule: "sac" (constant amortization), "price" (fixed installments), "american" (periodic interest and principal at maturity), "bullet" (principal and interest at maturity) or "custom" (you provide the invoices and the rates are computed).

Input fields: "taxId", "scheduled" (disbursement datetime), "nominalInterest" (% per year), "initialDue" (first installment due datetime), "count" (number of installments), "initialAmount" (installment amount in cents), "interval" ("day", "week", "month", "quarter", "semester" or "year" - default "month"), "nominalAmount" or "amount" (in cents), "rebateAmount" and, for the "custom" type, "invoices" as {"amount", "due"} objects.

Computed fields returned: "amount" (net disbursed amount), "taxAmount" (IOF), "interest" (effective rate, % per year), "nominalInterest", "count", "initialDue", "initialAmount" and the full "invoices" schedule.

Create Credit Previews

Create credit previews to simulate credit notes before actually creating them. You can create up to 100 previews in a single request.

For the "sac" and "price" types, provide exactly one of "count" or "initialAmount" - the other one is computed. For all types except "custom", provide exactly one of "nominalAmount" or "amount".

Parameters

type REQUIRED

Type of the credit preview. Options: "credit-note".

credit REQUIRED

CreditNotePreview object with the simulation parameters.

Required fields by credit type: "sac" and "price" take "nominalInterest", "scheduled", "initialDue", "taxId" and one of "count" or "initialAmount"; "american" takes "nominalInterest", "scheduled", "initialDue", "count" and "taxId"; "bullet" takes "nominalInterest", "scheduled", "initialDue" and "taxId"; "custom" takes "scheduled", "taxId" and "invoices".

Optional fields: "nominalAmount" or "amount" (one of them is required except for "custom" with amounts in the invoices), "rebateAmount" and "interval".

ENDPOINT
POST /v2/credit-preview
REQUEST

Python

import starkinfra

previews = starkinfra.creditpreview.create([
    starkinfra.CreditPreview(
        type="credit-note",
        credit=starkinfra.creditpreview.CreditNotePreview(
            type="sac",
            nominal_amount=100000,
            nominal_interest=15.0,
            scheduled="2022-06-28",
            initial_due="2022-07-28",
            count=12,
            tax_id="012.345.678-90"
        )
    )
])

for preview in previews:
    print(preview)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let previews = await starkinfra.creditPreview.create([
        {
            type: 'credit-note',
            credit: {
                type: 'sac',
                nominalAmount: 100000,
                nominalInterest: 15.0,
                scheduled: '2022-06-28',
                initialDue: '2022-07-28',
                count: 12,
                taxId: '012.345.678-90'
            }
        }
    ]);

    for (let preview of previews) {
        console.log(preview);
    }
})();
  

PHP

$previews = StarkInfra\CreditPreview::create([
    new StarkInfra\CreditPreview([
        "type" => "credit-note",
        "credit" => new StarkInfra\CreditPreview\CreditNotePreview([
            "type" => "sac",
            "nominalAmount" => 100000,
            "nominalInterest" => 15.0,
            "scheduled" => "2022-06-28",
            "initialDue" => "2022-07-28",
            "count" => 12,
            "taxId" => "012.345.678-90"
        ])
    ])
]);

foreach ($previews as $preview) {
    print_r($preview);
}
  

Java

import com.starkinfra.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

HashMap<String, Object> creditData = new HashMap<>();
creditData.put("type", "sac");
creditData.put("nominalAmount", 100000);
creditData.put("nominalInterest", 15.0);
creditData.put("scheduled", "2022-06-28");
creditData.put("initialDue", "2022-07-28");
creditData.put("count", 12);
creditData.put("taxId", "012.345.678-90");

List<CreditPreview> previews = new ArrayList<>();
previews.add(new CreditPreview(new CreditPreview.CreditNotePreview(creditData), "credit-note"));

List<CreditPreview> response = CreditPreview.create(previews);

for (CreditPreview preview : response) {
    System.out.println(preview);
}
  

Ruby

require('starkinfra')

previews = StarkInfra::CreditPreview.create([
    StarkInfra::CreditPreview.new(
        type: "credit-note",
        credit: StarkInfra::CreditPreview::CreditNotePreview.new(
            type: "sac",
            nominal_amount: 100000,
            nominal_interest: 15.0,
            scheduled: "2022-06-28",
            initial_due: "2022-07-28",
            count: 12,
            tax_id: "012.345.678-90"
        )
    )
])

previews.each do |preview|
    puts preview
end
  

Elixir

previews = StarkInfra.CreditPreview.create!([
    %StarkInfra.CreditPreview{
        type: "credit-note",
        credit: %StarkInfra.CreditPreview.CreditNotePreview{
            type: "sac",
            nominal_amount: 100000,
            nominal_interest: 15.0,
            scheduled: "2022-06-28",
            initial_due: "2022-07-28",
            count: 12,
            tax_id: "012.345.678-90"
        }
    }
])

for preview <- previews do
    preview |> IO.inspect
end
  

C#

using System;
using System.Collections.Generic;

List<StarkInfra.CreditPreview> previews = StarkInfra.CreditPreview.Create(
    new List<StarkInfra.CreditPreview> {
        new StarkInfra.CreditPreview(
            type: "credit-note",
            credit: new StarkInfra.CreditPreview.CreditNotePreview(
                type: "sac",
                nominalAmount: 100000,
                nominalInterest: 15.0,
                scheduled: "2022-06-28",
                initialDue: "2022-07-28",
                count: 12,
                taxId: "012.345.678-90"
            )
        )
    }
);

foreach (StarkInfra.CreditPreview preview in previews) {
    Console.WriteLine(preview);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/creditpreview"
)

func main() {

    previews, err := creditpreview.Create(
        []creditpreview.CreditPreview{
            {
                Type: "credit-note",
                Credit: creditpreview.CreditNotePreview{
                    Type:            "sac",
                    NominalAmount:   100000,
                    NominalInterest: 15.0,
                    Scheduled:       "2022-06-28",
                    InitialDue:      "2022-07-28",
                    Count:           12,
                    TaxId:           "012.345.678-90",
                },
            },
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    for _, preview := range previews {
        fmt.Printf("%+v", preview)
    }
}
  

Clojure

(def previews
    (starkinfra.credit-preview/create
        [{:type "credit-note"
          :credit {:type "sac"
                   :nominal-amount 100000
                   :nominal-interest 15.0
                   :scheduled "2022-06-28"
                   :initial-due "2022-07-28"
                   :count 12
                   :tax-id "012.345.678-90"}}]))

(dorun (map println previews))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/credit-preview' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "previews": [
        {
            "type": "credit-note",
            "credit": {
                "type": "sac",
                "nominalAmount": 100000,
                "nominalInterest": 15.0,
                "scheduled": "2022-06-28",
                "initialDue": "2022-07-28",
                "count": 12,
                "taxId": "012.345.678-90"
            }
        }
    ]
}'
  
RESPONSE

Python

CreditPreview(
    type=credit-note,
    credit=CreditNotePreview(
        type=sac,
        nominal_amount=100000,
        rebate_amount=0,
        tax_amount=1126,
        amount=98874,
        interest=17.34,
        nominal_interest=15.0,
        scheduled=2022-06-28T00:00:00.000000+00:00,
        initial_due=2022-07-28T00:00:00.000000+00:00,
        initial_amount=9583,
        count=12,
        invoices=[Invoice(amount=9583, due=2022-07-28), ..., Invoice(amount=8438, due=2023-06-28)]
    )
)
  

Javascript

CreditPreview {
    type: 'credit-note',
    credit: CreditNotePreview {
        type: 'sac',
        nominalAmount: 100000,
        rebateAmount: 0,
        taxAmount: 1126,
        amount: 98874,
        interest: 17.34,
        nominalInterest: 15.0,
        scheduled: '2022-06-28T00:00:00.000000+00:00',
        initialDue: '2022-07-28T00:00:00.000000+00:00',
        initialAmount: 9583,
        count: 12,
        invoices: [{amount: 9583, due: '2022-07-28'}, ..., {amount: 8438, due: '2023-06-28'}]
    }
}
  

PHP

StarkInfra\CreditPreview Object
(
    [type] => credit-note
    [credit] => StarkInfra\CreditPreview\CreditNotePreview Object
        (
            [type] => sac
            [nominalAmount] => 100000
            [rebateAmount] => 0
            [taxAmount] => 1126
            [amount] => 98874
            [interest] => 17.34
            [nominalInterest] => 15.0
            [scheduled] => 2022-06-28T00:00:00.000000+00:00
            [initialDue] => 2022-07-28T00:00:00.000000+00:00
            [initialAmount] => 9583
            [count] => 12
            [invoices] => Array(...)
        )
)
  

Java

CreditPreview({
    "type": "credit-note",
    "credit": {
        "type": "sac",
        "nominalAmount": 100000,
        "rebateAmount": 0,
        "taxAmount": 1126,
        "amount": 98874,
        "interest": 17.34,
        "nominalInterest": 15.0,
        "scheduled": "2022-06-28T00:00:00.000000+00:00",
        "initialDue": "2022-07-28T00:00:00.000000+00:00",
        "initialAmount": 9583,
        "count": 12,
        "invoices": [{"amount": 9583, "due": "2022-07-28"}, ..., {"amount": 8438, "due": "2023-06-28"}]
    }
})
  

Ruby

credit_preview(
    type: credit-note,
    credit: credit_note_preview(
        type: sac,
        nominal_amount: 100000,
        rebate_amount: 0,
        tax_amount: 1126,
        amount: 98874,
        interest: 17.34,
        nominal_interest: 15.0,
        scheduled: 2022-06-28T00:00:00.000000+00:00,
        initial_due: 2022-07-28T00:00:00.000000+00:00,
        initial_amount: 9583,
        count: 12,
        invoices: [...]
    )
)
  

Elixir

%StarkInfra.CreditPreview{
    type: "credit-note",
    credit: %StarkInfra.CreditPreview.CreditNotePreview{
        type: "sac",
        nominal_amount: 100000,
        rebate_amount: 0,
        tax_amount: 1126,
        amount: 98874,
        interest: 17.34,
        nominal_interest: 15.0,
        scheduled: "2022-06-28T00:00:00.000000+00:00",
        initial_due: "2022-07-28T00:00:00.000000+00:00",
        initial_amount: 9583,
        count: 12,
        invoices: [...]
    }
}
  

C#

CreditPreview(
    Type: credit-note,
    Credit: CreditNotePreview(
        Type: sac,
        NominalAmount: 100000,
        RebateAmount: 0,
        TaxAmount: 1126,
        Amount: 98874,
        Interest: 17.34,
        NominalInterest: 15.0,
        Scheduled: 2022-06-28T00:00:00.000000+00:00,
        InitialDue: 2022-07-28T00:00:00.000000+00:00,
        InitialAmount: 9583,
        Count: 12,
        Invoices: [...]
    )
)
  

Go

{
    Type:credit-note
    Credit:{
        Type:sac
        NominalAmount:100000
        RebateAmount:0
        TaxAmount:1126
        Amount:98874
        Interest:17.34
        NominalInterest:15.0
        Scheduled:2022-06-28T00:00:00.000000+00:00
        InitialDue:2022-07-28T00:00:00.000000+00:00
        InitialAmount:9583
        Count:12
        Invoices:[...]
    }
}
  

Clojure

{:type "credit-note",
 :credit {:type "sac",
          :nominal-amount 100000,
          :rebate-amount 0,
          :tax-amount 1126,
          :amount 98874,
          :interest 17.34,
          :nominal-interest 15.0,
          :scheduled "2022-06-28T00:00:00.000000+00:00",
          :initial-due "2022-07-28T00:00:00.000000+00:00",
          :initial-amount 9583,
          :count 12,
          :invoices [...]}}
  

Curl

{
    "previews": [
        {
            "type": "credit-note",
            "credit": {
                "type": "sac",
                "nominalAmount": 100000,
                "rebateAmount": 0,
                "taxAmount": 1126,
                "amount": 98874,
                "interest": 17.34,
                "nominalInterest": 15.0,
                "scheduled": "2022-06-28T00:00:00.000000+00:00",
                "initialDue": "2022-07-28T00:00:00.000000+00:00",
                "initialAmount": 9583,
                "count": 12,
                "invoices": [
                    {"amount": 9583, "due": "2022-07-28"},
                    {"amount": 8438, "due": "2023-06-28"}
                ]
            }
        }
    ]
}
  

Credit Holmes

CreditHolmes are used to request the credit analysis of a tax ID.

The analysis retrieves credit information from official sources for a given CPF or CNPJ, helping you evaluate the creditworthiness of a borrower.

The CreditHolmes object

Attributes

id STRING

Unique id for the credit holmes.

taxId STRING

CPF or CNPJ of the entity to be analyzed.

competence STRING

Month and year of the credit analysis in YYYY-MM format. Example: "2022-06".

status STRING

Current status of the credit analysis. Options: "created", "solved", "failed".

result OBJECT

Credit analysis result containing financial and credit data for the tax ID.

tags LIST OF STRINGS

Tags associated with the credit holmes.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create Credit Holmes

Create credit holmes requests to analyze the credit profile of a tax ID.

You can create up to 100 requests in a single call.

Parameters

taxId REQUIRED

CPF (11 digits) or CNPJ (14 digits) of the entity to analyze. Example: "012.345.678-90"

competence OPTIONAL

Month and year of analysis in YYYY-MM format. Defaults to the current month. Example: "2022-06"

tags OPTIONAL

List of strings to tag the entity for future queries.

ENDPOINT
POST /v2/credit-holmes
REQUEST

Python

import starkinfra

holmes = starkinfra.creditholmes.create([
    starkinfra.CreditHolmes(
        tax_id="012.345.678-90",
        competence="2022-06",
        tags=["credit-analysis"]
    )
])

for sherlock in holmes:
    print(sherlock)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let holmes = await starkinfra.creditHolmes.create([
        {
            taxId: '012.345.678-90',
            competence: '2022-06',
            tags: ['credit-analysis']
        }
    ]);

    for (let sherlock of holmes) {
        console.log(sherlock);
    }
})();
  

PHP

$holmes = StarkInfra\CreditHolmes::create([
    new StarkInfra\CreditHolmes([
        "taxId" => "012.345.678-90",
        "competence" => "2022-06",
        "tags" => ["credit-analysis"]
    ])
]);

foreach ($holmes as $sherlock) {
    print_r($sherlock);
}
  

Java

import com.starkinfra.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

List<CreditHolmes> holmes = new ArrayList<>();
holmes.add(new CreditHolmes.Builder()
    .taxId("012.345.678-90")
    .competence("2022-06")
    .tags(Arrays.asList("credit-analysis"))
    .build()
);

List<CreditHolmes> response = CreditHolmes.create(holmes);

for (CreditHolmes sherlock : response) {
    System.out.println(sherlock);
}
  

Ruby

require('starkinfra')

holmes = StarkInfra::CreditHolmes.create([
    StarkInfra::CreditHolmes.new(
        tax_id: "012.345.678-90",
        competence: "2022-06",
        tags: ["credit-analysis"]
    )
])

holmes.each do |sherlock|
    puts sherlock
end
  

Elixir

holmes = StarkInfra.CreditHolmes.create!([
    %StarkInfra.CreditHolmes{
        tax_id: "012.345.678-90",
        competence: "2022-06",
        tags: ["credit-analysis"]
    }
])

for sherlock <- holmes do
    sherlock |> IO.inspect
end
  

C#

using System;
using System.Collections.Generic;

List<StarkInfra.CreditHolmes> holmes = StarkInfra.CreditHolmes.Create(
    new List<StarkInfra.CreditHolmes> {
        new StarkInfra.CreditHolmes(
            taxId: "012.345.678-90",
            competence: "2022-06",
            tags: new List<string> { "credit-analysis" }
        )
    }
);

foreach (StarkInfra.CreditHolmes sherlock in holmes) {
    Console.WriteLine(sherlock);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/creditholmes"
)

func main() {

    holmes, err := creditholmes.Create(
        []creditholmes.CreditHolmes{
            {
                TaxId:      "012.345.678-90",
                Competence: "2022-06",
                Tags:       []string{"credit-analysis"},
            },
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    for _, sherlock := range holmes {
        fmt.Printf("%+v", sherlock)
    }
}
  

Clojure

(def holmes
    (starkinfra/credit-holmes-create
        [{:tax-id "012.345.678-90"
          :competence "2022-06"
          :tags ["credit-analysis"]}]))

(dorun (map println holmes))
  

Curl

curl --location --request POST '{{baseUrl}}/v2/credit-holmes' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "holmes": [
        {
            "taxId": "012.345.678-90",
            "competence": "2022-06",
            "tags": ["credit-analysis"]
        }
    ]
}'
  
RESPONSE

Python

CreditHolmes(
    id=5719405850615809,
    tax_id=012.345.678-90,
    competence=2022-06,
    status=created,
    result=None,
    tags=['credit-analysis'],
    created=2022-06-01T00:00:00.000000+00:00,
    updated=2022-06-01T00:00:00.000000+00:00
)
  

Javascript

CreditHolmes {
    id: '5719405850615809',
    taxId: '012.345.678-90',
    competence: '2022-06',
    status: 'created',
    result: null,
    tags: [ 'credit-analysis' ],
    created: '2022-06-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\CreditHolmes Object
(
    [id] => 5719405850615809
    [taxId] => 012.345.678-90
    [competence] => 2022-06
    [status] => created
    [result] =>
    [tags] => Array ( [0] => credit-analysis )
    [created] => 2022-06-01T00:00:00.000000+00:00
    [updated] => 2022-06-01T00:00:00.000000+00:00
)
  

Java

CreditHolmes({
    "id": "5719405850615809",
    "taxId": "012.345.678-90",
    "competence": "2022-06",
    "status": "created",
    "result": null,
    "tags": ["credit-analysis"],
    "created": "2022-06-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00"
})
  

Ruby

credit_holmes(
    id: 5719405850615809,
    tax_id: 012.345.678-90,
    competence: 2022-06,
    status: created,
    result: nil,
    tags: ["credit-analysis"],
    created: 2022-06-01T00:00:00.000000+00:00,
    updated: 2022-06-01T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditHolmes{
    id: "5719405850615809",
    tax_id: "012.345.678-90",
    competence: "2022-06",
    status: "created",
    result: nil,
    tags: ["credit-analysis"],
    created: "2022-06-01T00:00:00.000000+00:00",
    updated: "2022-06-01T00:00:00.000000+00:00"
}
  

C#

CreditHolmes(
    Id: 5719405850615809,
    TaxId: 012.345.678-90,
    Competence: 2022-06,
    Status: created,
    Result: null,
    Tags: [ credit-analysis ],
    Created: 2022-06-01T00:00:00.000000+00:00,
    Updated: 2022-06-01T00:00:00.000000+00:00
)
  

Go

{
    Id:5719405850615809
    TaxId:012.345.678-90
    Competence:2022-06
    Status:created
    Result:map[]
    Tags:[credit-analysis]
    Created:2022-06-01T00:00:00.000000+00:00
    Updated:2022-06-01T00:00:00.000000+00:00
}
  

Clojure

{:id "5719405850615809",
 :tax-id "012.345.678-90",
 :competence "2022-06",
 :status "created",
 :result nil,
 :tags ["credit-analysis"],
 :created "2022-06-01T00:00:00.000000+00:00",
 :updated "2022-06-01T00:00:00.000000+00:00"}
  

Curl

{
    "holmes": [
        {
            "id": "5719405850615809",
            "taxId": "012.345.678-90",
            "competence": "2022-06",
            "status": "created",
            "result": null,
            "tags": ["credit-analysis"],
            "created": "2022-06-01T00:00:00.000000+00:00",
            "updated": "2022-06-01T00:00:00.000000+00:00"
        }
    ]
}
  

List Credit Holmes

List and filter all credit holmes requests in your workspace. Results are returned paged.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter credit holmes by the specified status.

tags OPTIONAL

Filter entities that contain the specified tags.

ids OPTIONAL

List of strings to get specific entities by ids.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/credit-holmes
REQUEST

Python

import starkinfra

holmes = starkinfra.creditholmes.query(limit=10)

for sherlock in holmes:
    print(sherlock)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let holmes = await starkinfra.creditHolmes.query({ limit: 10 });

    for await (let sherlock of holmes) {
        console.log(sherlock);
    }
})();
  

PHP

$holmes = StarkInfra\CreditHolmes::query(["limit" => 10]);

foreach ($holmes as $sherlock) {
    print_r($sherlock);
}
  

Java

import com.starkinfra.*;
import com.starkinfra.utils.Generator;
import java.util.HashMap;

HashMap<String, Object> params = new HashMap<>();
params.put("limit", 10);
Generator<CreditHolmes> holmes = CreditHolmes.query(params);

for (CreditHolmes sherlock : holmes) {
    System.out.println(sherlock);
}
  

Ruby

require('starkinfra')

holmes = StarkInfra::CreditHolmes.query(limit: 10)

holmes.each do |sherlock|
    puts sherlock
end
  

Elixir

holmes = StarkInfra.CreditHolmes.query!(limit: 10)

for sherlock <- holmes do
    sherlock |> IO.inspect
end
  

C#

using System;
using System.Collections.Generic;

IEnumerable<StarkInfra.CreditHolmes> holmes = StarkInfra.CreditHolmes.Query(limit: 10);

foreach (StarkInfra.CreditHolmes sherlock in holmes) {
    Console.WriteLine(sherlock);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/creditholmes"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10

    holmes, errorChannel := creditholmes.Query(params, nil)

    loop:
    for {
        select {
        case err := <-errorChannel:
            if err.Errors != nil {
                for _, e := range err.Errors {
                    fmt.Printf("code: %s, message: %s", e.Code, e.Message)
                }
            }
        case sherlock, ok := <-holmes:
            if !ok {
                break loop
            }
            fmt.Printf("%+v", sherlock)
        }
    }
}
  

Clojure

(def holmes (starkinfra.credit-holmes/query {:limit 10}))
(dorun (map println holmes))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/credit-holmes?limit=10' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

CreditHolmes(
    id=5719405850615809,
    tax_id=012.345.678-90,
    competence=2022-06,
    status=solved,
    result={...},
    tags=['credit-analysis'],
    created=2022-06-01T00:00:00.000000+00:00,
    updated=2022-06-01T00:00:00.000000+00:00
)
  

Javascript

CreditHolmes {
    id: '5719405850615809',
    taxId: '012.345.678-90',
    competence: '2022-06',
    status: 'solved',
    result: { ... },
    tags: [ 'credit-analysis' ],
    created: '2022-06-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\CreditHolmes Object
(
    [id] => 5719405850615809
    [taxId] => 012.345.678-90
    [competence] => 2022-06
    [status] => solved
    [result] => Array ( ... )
    [tags] => Array ( [0] => credit-analysis )
    [created] => 2022-06-01T00:00:00.000000+00:00
    [updated] => 2022-06-01T00:00:00.000000+00:00
)
  

Java

CreditHolmes({
    "id": "5719405850615809",
    "taxId": "012.345.678-90",
    "competence": "2022-06",
    "status": "solved",
    "result": {...},
    "tags": ["credit-analysis"],
    "created": "2022-06-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00"
})
  

Ruby

credit_holmes(
    id: 5719405850615809,
    tax_id: 012.345.678-90,
    competence: 2022-06,
    status: solved,
    result: {...},
    tags: ["credit-analysis"],
    created: 2022-06-01T00:00:00.000000+00:00,
    updated: 2022-06-01T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditHolmes{
    id: "5719405850615809",
    tax_id: "012.345.678-90",
    competence: "2022-06",
    status: "solved",
    result: %{...},
    tags: ["credit-analysis"],
    created: "2022-06-01T00:00:00.000000+00:00",
    updated: "2022-06-01T00:00:00.000000+00:00"
}
  

C#

CreditHolmes(
    Id: 5719405850615809,
    TaxId: 012.345.678-90,
    Competence: 2022-06,
    Status: solved,
    Result: {...},
    Tags: [ credit-analysis ],
    Created: 2022-06-01T00:00:00.000000+00:00,
    Updated: 2022-06-01T00:00:00.000000+00:00
)
  

Go

{
    Id:5719405850615809
    TaxId:012.345.678-90
    Competence:2022-06
    Status:solved
    Result:map[...]
    Tags:[credit-analysis]
    Created:2022-06-01T00:00:00.000000+00:00
    Updated:2022-06-01T00:00:00.000000+00:00
}
  

Clojure

{:id "5719405850615809",
 :tax-id "012.345.678-90",
 :competence "2022-06",
 :status "solved",
 :result {...},
 :tags ["credit-analysis"],
 :created "2022-06-01T00:00:00.000000+00:00",
 :updated "2022-06-01T00:00:00.000000+00:00"}
  

Curl

{
    "cursor": null,
    "holmes": [
        {
            "id": "5719405850615809",
            "taxId": "012.345.678-90",
            "competence": "2022-06",
            "status": "solved",
            "result": {},
            "tags": ["credit-analysis"],
            "created": "2022-06-01T00:00:00.000000+00:00",
            "updated": "2022-06-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get a Credit Holmes

Get a single credit holmes by its id.

Parameters

id REQUIRED

Id of the credit holmes entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/credit-holmes/:id
REQUEST

Python

import starkinfra

sherlock = starkinfra.creditholmes.get("5719405850615809")

print(sherlock)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let sherlock = await starkinfra.creditHolmes.get('5719405850615809');
    console.log(sherlock);
})();
  

PHP

$sherlock = StarkInfra\CreditHolmes::get("5719405850615809");

print_r($sherlock);
  

Java

import com.starkinfra.*;

CreditHolmes sherlock = CreditHolmes.get("5719405850615809");

System.out.println(sherlock);
  

Ruby

require('starkinfra')

sherlock = StarkInfra::CreditHolmes.get('5719405850615809')

puts sherlock
  

Elixir

sherlock = StarkInfra.CreditHolmes.get!("5719405850615809")

sherlock |> IO.inspect
  

C#

using System;

StarkInfra.CreditHolmes sherlock = StarkInfra.CreditHolmes.Get("5719405850615809");

Console.WriteLine(sherlock);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/creditholmes"
)

func main() {

    sherlock, err := creditholmes.Get("5719405850615809", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", sherlock)
}
  

Clojure

(def sherlock (starkinfra.credit-holmes/get "5719405850615809"))
(println sherlock)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/credit-holmes/5719405850615809' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

CreditHolmes(
    id=5719405850615809,
    tax_id=012.345.678-90,
    competence=2022-06,
    status=solved,
    result={...},
    tags=['credit-analysis'],
    created=2022-06-01T00:00:00.000000+00:00,
    updated=2022-06-01T00:00:00.000000+00:00
)
  

Javascript

CreditHolmes {
    id: '5719405850615809',
    taxId: '012.345.678-90',
    competence: '2022-06',
    status: 'solved',
    result: { ... },
    tags: [ 'credit-analysis' ],
    created: '2022-06-01T00:00:00.000000+00:00',
    updated: '2022-06-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\CreditHolmes Object
(
    [id] => 5719405850615809
    [taxId] => 012.345.678-90
    [competence] => 2022-06
    [status] => solved
    [result] => Array ( ... )
    [tags] => Array ( [0] => credit-analysis )
    [created] => 2022-06-01T00:00:00.000000+00:00
    [updated] => 2022-06-01T00:00:00.000000+00:00
)
  

Java

CreditHolmes({
    "id": "5719405850615809",
    "taxId": "012.345.678-90",
    "competence": "2022-06",
    "status": "solved",
    "result": {...},
    "tags": ["credit-analysis"],
    "created": "2022-06-01T00:00:00.000000+00:00",
    "updated": "2022-06-01T00:00:00.000000+00:00"
})
  

Ruby

credit_holmes(
    id: 5719405850615809,
    tax_id: 012.345.678-90,
    competence: 2022-06,
    status: solved,
    result: {...},
    tags: ["credit-analysis"],
    created: 2022-06-01T00:00:00.000000+00:00,
    updated: 2022-06-01T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditHolmes{
    id: "5719405850615809",
    tax_id: "012.345.678-90",
    competence: "2022-06",
    status: "solved",
    result: %{...},
    tags: ["credit-analysis"],
    created: "2022-06-01T00:00:00.000000+00:00",
    updated: "2022-06-01T00:00:00.000000+00:00"
}
  

C#

CreditHolmes(
    Id: 5719405850615809,
    TaxId: 012.345.678-90,
    Competence: 2022-06,
    Status: solved,
    Result: {...},
    Tags: [ credit-analysis ],
    Created: 2022-06-01T00:00:00.000000+00:00,
    Updated: 2022-06-01T00:00:00.000000+00:00
)
  

Go

{
    Id:5719405850615809
    TaxId:012.345.678-90
    Competence:2022-06
    Status:solved
    Result:map[...]
    Tags:[credit-analysis]
    Created:2022-06-01T00:00:00.000000+00:00
    Updated:2022-06-01T00:00:00.000000+00:00
}
  

Clojure

{:id "5719405850615809",
 :tax-id "012.345.678-90",
 :competence "2022-06",
 :status "solved",
 :result {...},
 :tags ["credit-analysis"],
 :created "2022-06-01T00:00:00.000000+00:00",
 :updated "2022-06-01T00:00:00.000000+00:00"}
  

Curl

{
    "holmes": {
        "id": "5719405850615809",
        "taxId": "012.345.678-90",
        "competence": "2022-06",
        "status": "solved",
        "result": {},
        "tags": ["credit-analysis"],
        "created": "2022-06-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00"
    }
}
  

List Credit Holmes Logs

Get a paged list of all credit holmes logs. A log tracks a change in the credit holmes entity according to its life cycle.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Number of results per cursor. Max = 100.

ids OPTIONAL

List of credit holmes ids linked to the desired logs.

types OPTIONAL

Filter logs by log type.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/credit-holmes/log
REQUEST

Python

import starkinfra

logs = starkinfra.creditholmes.log.query(limit=10)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let logs = await starkinfra.creditHolmes.log.query({ limit: 10 });

    for await (let log of logs) {
        console.log(log);
    }
})();
  

PHP

$logs = StarkInfra\CreditHolmes\Log::query(["limit" => 10]);

foreach ($logs as $log) {
    print_r($log);
}
  

Java

import com.starkinfra.*;
import com.starkinfra.utils.Generator;
import java.util.HashMap;

HashMap<String, Object> params = new HashMap<>();
params.put("limit", 10);
Generator<CreditHolmes.Log> logs = CreditHolmes.Log.query(params);

for (CreditHolmes.Log log : logs) {
    System.out.println(log);
}
  

Ruby

require('starkinfra')

logs = StarkInfra::CreditHolmes::Log.query(limit: 10)

logs.each do |log|
    puts log
end
  

Elixir

logs = StarkInfra.CreditHolmes.Log.query!(limit: 10)

for log <- logs do
    log |> IO.inspect
end
  

C#

using System;
using System.Collections.Generic;

IEnumerable<StarkInfra.CreditHolmes.Log> logs = StarkInfra.CreditHolmes.Log.Query(limit: 10);

foreach (StarkInfra.CreditHolmes.Log log in logs) {
    Console.WriteLine(log);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/creditholmes/log"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10

    logs, errorChannel := log.Query(params, nil)

    loop:
    for {
        select {
        case err := <-errorChannel:
            if err.Errors != nil {
                for _, e := range err.Errors {
                    fmt.Printf("code: %s, message: %s", e.Code, e.Message)
                }
            }
        case log, ok := <-logs:
            if !ok {
                break loop
            }
            fmt.Printf("%+v", log)
        }
    }
}
  

Clojure

(def logs (starkinfra.credit-holmes.log/query {:limit 10}))
(dorun (map println logs))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/credit-holmes/log?limit=10' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=5155165527080961,
    type=created,
    created=2022-06-01T00:00:00.000000+00:00,
    holmes=CreditHolmes(id=5719405850615809, status=created, ...)
)
  

Javascript

Log {
    id: '5155165527080961',
    type: 'created',
    created: '2022-06-01T00:00:00.000000+00:00',
    holmes: CreditHolmes { id: '5719405850615809', status: 'created' }
}
  

PHP

StarkInfra\CreditHolmes\Log Object
(
    [id] => 5155165527080961
    [type] => created
    [created] => 2022-06-01T00:00:00.000000+00:00
)
  

Java

Log({
    "id": "5155165527080961",
    "type": "created",
    "created": "2022-06-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 5155165527080961,
    type: created,
    created: 2022-06-01T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditHolmes.Log{
    id: "5155165527080961",
    type: "created",
    created: "2022-06-01T00:00:00.000000+00:00"
}
  

C#

Log(
    Id: 5155165527080961,
    Type: created,
    Created: 2022-06-01T00:00:00.000000+00:00
)
  

Go

{
    Id:5155165527080961
    Type:created
    Created:2022-06-01T00:00:00.000000+00:00
}
  

Clojure

{:id "5155165527080961",
 :type "created",
 :created "2022-06-01T00:00:00.000000+00:00"}
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "5155165527080961",
            "type": "created",
            "created": "2022-06-01T00:00:00.000000+00:00",
            "holmes": {
                "id": "5719405850615809",
                "status": "created"
            }
        }
    ]
}
  

Get a Credit Holmes Log

Get a single credit holmes log by its id.

Parameters

id REQUIRED

Id of the credit holmes log entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/credit-holmes/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.creditholmes.log.get("5155165527080961")

print(log)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let log = await starkinfra.creditHolmes.log.get('5155165527080961');
    console.log(log);
})();
  

PHP

$log = StarkInfra\CreditHolmes\Log::get("5155165527080961");

print_r($log);
  

Java

import com.starkinfra.*;

CreditHolmes.Log log = CreditHolmes.Log.get("5155165527080961");

System.out.println(log);
  

Ruby

require('starkinfra')

log = StarkInfra::CreditHolmes::Log.get('5155165527080961')

puts log
  

Elixir

log = StarkInfra.CreditHolmes.Log.get!("5155165527080961")

log |> IO.inspect
  

C#

using System;

StarkInfra.CreditHolmes.Log log = StarkInfra.CreditHolmes.Log.Get("5155165527080961");

Console.WriteLine(log);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/creditholmes/log"
)

func main() {

    creditHolmesLog, err := log.Get("5155165527080961", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", creditHolmesLog)
}
  

Clojure

(def log (starkinfra.credit-holmes.log/get "5155165527080961"))
(println log)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/credit-holmes/log/5155165527080961' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=5155165527080961,
    type=created,
    created=2022-06-01T00:00:00.000000+00:00,
    holmes=CreditHolmes(id=5719405850615809, status=created, ...)
)
  

Javascript

Log {
    id: '5155165527080961',
    type: 'created',
    created: '2022-06-01T00:00:00.000000+00:00',
    holmes: CreditHolmes { id: '5719405850615809', status: 'created' }
}
  

PHP

StarkInfra\CreditHolmes\Log Object
(
    [id] => 5155165527080961
    [type] => created
    [created] => 2022-06-01T00:00:00.000000+00:00
)
  

Java

Log({
    "id": "5155165527080961",
    "type": "created",
    "created": "2022-06-01T00:00:00.000000+00:00"
})
  

Ruby

log(
    id: 5155165527080961,
    type: created,
    created: 2022-06-01T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.CreditHolmes.Log{
    id: "5155165527080961",
    type: "created",
    created: "2022-06-01T00:00:00.000000+00:00"
}
  

C#

Log(
    Id: 5155165527080961,
    Type: created,
    Created: 2022-06-01T00:00:00.000000+00:00
)
  

Go

{
    Id:5155165527080961
    Type:created
    Created:2022-06-01T00:00:00.000000+00:00
}
  

Clojure

{:id "5155165527080961",
 :type "created",
 :created "2022-06-01T00:00:00.000000+00:00"}
  

Curl

{
    "log": {
        "id": "5155165527080961",
        "type": "created",
        "created": "2022-06-01T00:00:00.000000+00:00",
        "holmes": {
            "id": "5719405850615809",
            "status": "created"
        }
    }
}
  

Ledger

The Ledger resource is used to track the balance of a given amount by inserting LedgerTransactions to it.

A Ledger can represent a bank account, a digital wallet, an inventory product, or any other entity whose balance you need to keep track of.

You can attach rules to a Ledger to limit its balance, such as a minimum or maximum balance, which are validated whenever a LedgerTransaction is created.

Ledger Log

Every time you or Stark Infra makes a change to a Ledger, we create a Ledger Log. Logs are useful for understanding the life cycle of each Ledger and can only be retrieved, never created by the user.

The log type describes the event that generated it. Options: "created", "updated". Each log also carries a snapshot of the ledger it refers to.

The Ledger object

Attributes

id STRING

Unique id for the Ledger.

externalId STRING

Unique external id to prevent duplicates.

rules LIST OF OBJECTS

List of rule objects applied to the Ledger.

tags LIST OF STRINGS

Tags associated with the Ledger.

metadata OBJECT

Dictionary of additional information about the Ledger.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create Ledgers

Use this route to create up to 100 new ledgers at a time.

Parameters

externalId REQUIRED

Unique string to prevent duplicates. Repeated externalIds will cause failures.

rules OPTIONAL

List of rule objects to apply to the Ledger.

tags OPTIONAL

Array of strings to tag the entity for future queries.

metadata OPTIONAL

Dictionary of additional information about the Ledger.

ENDPOINT
POST /v2/ledger
REQUEST

Python

import starkinfra

ledgers = starkinfra.ledger.create([
    starkinfra.Ledger(
        external_id="my-internal-id-123456",
        rules=[
            starkinfra.ledger.Rule(
                key="minimumBalance",
                value=0
            )
        ],
        tags=["account/123", "savings"],
        metadata={"accountId": "123", "accountType": "savings"}
    )
])

for ledger in ledgers:
    print(ledger)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request POST '{{baseUrl}}/v2/ledger' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ledgers": [
        {
            "externalId": "my-internal-id-123456",
            "rules": [
                {
                    "key": "minimumBalance",
                    "value": 0
                }
            ],
            "tags": ["account/123", "savings"],
            "metadata": {
                "accountId": "123",
                "accountType": "savings"
            }
        }
    ]
}'
  
RESPONSE

Python

[
    Ledger(
        id=5656565656565656,
        external_id=my-internal-id-123456,
        rules=[
            Rule(
                key=minimumBalance,
                value=0
            )
        ],
        tags=['account/123', 'savings'],
        metadata={'accountId': '123', 'accountType': 'savings'},
        created=2022-01-01 00:00:00,
        updated=2022-01-01 00:00:00
    )
]
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "message": "Ledger(s) successfully created",
    "ledgers": [
        {
            "id": "5656565656565656",
            "externalId": "my-internal-id-123456",
            "rules": [
                {
                    "key": "minimumBalance",
                    "value": 0
                }
            ],
            "tags": ["account/123", "savings"],
            "metadata": {
                "accountId": "123",
                "accountType": "savings"
            },
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

List Ledgers

Get a list of ledgers in chunks of at most 100.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

ids OPTIONAL

List of strings to get specific entities by ids.

externalIds OPTIONAL

Filter by external IDs.

tags OPTIONAL

Filter entities that contain the specified tags.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/ledger
REQUEST

Python

import starkinfra

ledgers = starkinfra.ledger.query(
    limit=10,
    tags=["savings"]
)

for ledger in ledgers:
    print(ledger)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/ledger?limit=10&tags=savings' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Ledger(
    id=5656565656565656,
    external_id=my-internal-id-123456,
    rules=[
        Rule(
            key=minimumBalance,
            value=0
        )
    ],
    tags=['account/123', 'savings'],
    metadata={'accountId': '123', 'accountType': 'savings'},
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "ledgers": [
        {
            "id": "5656565656565656",
            "externalId": "my-internal-id-123456",
            "rules": [
                {
                    "key": "minimumBalance",
                    "value": 0
                }
            ],
            "tags": ["account/123", "savings"],
            "metadata": {
                "accountId": "123",
                "accountType": "savings"
            },
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get a Ledger

Get a single ledger by its id.

Parameters

id REQUIRED

Id of the ledger entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/ledger/:id
REQUEST

Python

import starkinfra

ledger = starkinfra.ledger.get("5656565656565656")

print(ledger)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/ledger/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Ledger(
    id=5656565656565656,
    external_id=my-internal-id-123456,
    rules=[
        Rule(
            key=minimumBalance,
            value=0
        )
    ],
    tags=['account/123', 'savings'],
    metadata={'accountId': '123', 'accountType': 'savings'},
    created=2022-01-01 00:00:00,
    updated=2022-01-01 00:00:00
)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "ledger": {
        "id": "5656565656565656",
        "externalId": "my-internal-id-123456",
        "rules": [
            {
                "key": "minimumBalance",
                "value": 0
            }
        ],
        "tags": ["account/123", "savings"],
        "metadata": {
            "accountId": "123",
            "accountType": "savings"
        },
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Update a Ledger

Update the rules, tags or metadata of an existing ledger.

Parameters

id REQUIRED

Id of the ledger entity.

rules OPTIONAL

New list of rule objects to apply to the Ledger.

tags OPTIONAL

New array of strings to tag the Ledger.

metadata OPTIONAL

New dictionary of additional information about the Ledger.

ENDPOINT
PATCH /v2/ledger/:id
REQUEST

Python

import starkinfra

ledger = starkinfra.ledger.update(
    "5656565656565656",
    tags=["account/123", "closed"]
)

print(ledger)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/ledger/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tags": ["account/123", "closed"]
}'
  
RESPONSE

Python

Ledger(
    id=5656565656565656,
    external_id=my-internal-id-123456,
    rules=[
        Rule(
            key=minimumBalance,
            value=0
        )
    ],
    tags=['account/123', 'closed'],
    metadata={'accountId': '123', 'accountType': 'savings'},
    created=2022-01-01 00:00:00,
    updated=2022-06-01 00:00:00
)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "ledger": {
        "id": "5656565656565656",
        "externalId": "my-internal-id-123456",
        "rules": [
            {
                "key": "minimumBalance",
                "value": 0
            }
        ],
        "tags": ["account/123", "closed"],
        "metadata": {
            "accountId": "123",
            "accountType": "savings"
        },
        "created": "2022-01-01T00:00:00.000000+00:00",
        "updated": "2022-06-01T00:00:00.000000+00:00"
    }
}
  

List Ledger Logs

Get a paged list of ledger logs.

Parameters

limit OPTIONAL

Number of results per cursor. Max = 100.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

ids OPTIONAL

List of strings to get specific entities by ids.

ledgerId OPTIONAL

Filter logs by ledger id. Only a single ledger id can be informed per query.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/ledger/log
REQUEST

Python

import starkinfra

logs = starkinfra.ledger.log.query(
    limit=10,
    ledger_id="5656565656565656"
)

for log in logs:
    print(log)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/ledger/log?limit=10&ledgerId=5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=5656565656565656,
    type=created,
    ledger=Ledger(id=5656565656565656, external_id=my-internal-id-123456),
    created=2022-01-01 00:00:00
)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "logs": [
        {
            "id": "5656565656565656",
            "type": "created",
            "ledger": {
                "id": "5656565656565656",
                "externalId": "my-internal-id-123456",
                "rules": [
                    {
                        "key": "minimumBalance",
                        "value": 0
                    }
                ],
                "tags": ["account/123", "savings"],
                "metadata": {
                    "accountId": "123",
                    "accountType": "savings"
                },
                "created": "2022-01-01T00:00:00.000000+00:00",
                "updated": "2022-01-01T00:00:00.000000+00:00"
            },
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get a Ledger Log

Get a single ledger log by its id.

Parameters

id REQUIRED

Id of the log entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/ledger/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.ledger.log.get("5656565656565656")

print(log)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/ledger/log/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Log(
    id=5656565656565656,
    type=created,
    ledger=Ledger(id=5656565656565656, external_id=my-internal-id-123456),
    created=2022-01-01 00:00:00
)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "log": {
        "id": "5656565656565656",
        "type": "created",
        "ledger": {
            "id": "5656565656565656",
            "externalId": "my-internal-id-123456",
            "rules": [
                {
                    "key": "minimumBalance",
                    "value": 0
                }
            ],
            "tags": ["account/123", "savings"],
            "metadata": {
                "accountId": "123",
                "accountType": "savings"
            },
            "created": "2022-01-01T00:00:00.000000+00:00",
            "updated": "2022-01-01T00:00:00.000000+00:00"
        },
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Ledger Transaction

The LedgerTransaction resource is used to move balance in or out of a Ledger.

Each transaction carries an amount that is added to (or subtracted from) the Ledger balance, producing a new running balance that is returned in the response.

Transactions are validated against the rules of their Ledger, so a transaction that would push the balance beyond a configured minimum or maximum balance is rejected.

The LedgerTransaction object

Attributes

id STRING

Unique id for the Ledger Transaction.

ledgerId STRING

Id of the Ledger associated with this transaction.

externalId STRING

Unique external id to prevent duplicates.

source STRING

Source of the Ledger Transaction. Example: "bank-transfer/123".

amount INTEGER

Amount in cents of the Ledger Transaction. Example: 100 (R$1.00).

fee INTEGER

Fee charged in cents for this Ledger Transaction.

balance INTEGER

Balance in cents of the Ledger after this transaction. Example: 100 (R$1.00).

rules LIST OF OBJECTS

List of rule objects applied to the Ledger Transaction.

tags LIST OF STRINGS

Tags associated with the Ledger Transaction.

metadata OBJECT

Dictionary of additional information about the Ledger Transaction.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

Create Ledger Transactions

Use this route to create up to 500 new ledger transactions at a time.

A single request may contain transactions targeting different ledgers. Each transaction is applied to its Ledger in the order it is sent and the resulting balance is returned for each one.

Parameters

amount REQUIRED

Amount in cents of the Ledger Transaction. Example: 100 (R$1.00).

ledgerId REQUIRED

Id of the Ledger associated with this transaction.

externalId REQUIRED

Unique string to prevent duplicates. Repeated externalIds within the same ledger will cause failures.

source REQUIRED

Source of the Ledger Transaction. Example: "bank-transfer/123".

fee OPTIONAL

Fee charged in cents for this Ledger Transaction.

created OPTIONAL

Datetime of the Ledger Transaction, used to import an existing transaction history. Must be in ISO format (Example: "2022-01-01T00:00:00.000000+00:00") and cannot be in the future. When creating multiple transactions in a single request, their created datetimes must be informed in chronological order. If omitted, the current datetime is used.

rules OPTIONAL

List of rule objects that momentarily overwrite the Ledger's rules for this transaction.

tags OPTIONAL

Array of strings to tag the entity for future queries.

metadata OPTIONAL

Dictionary of additional information about the Ledger Transaction.

ENDPOINT
POST /v2/ledger-transaction
REQUEST

Python

import starkinfra

transactions = starkinfra.ledgertransaction.create([
    starkinfra.LedgerTransaction(
        amount=11234,
        ledger_id="5656565656565656",
        external_id="my-internal-id-123456",
        source="bank-transfer/123",
        fee=100,
        created="2022-01-01T00:00:00.000000+00:00",
        tags=["transfer/123", "savings"],
        metadata={"orderId": "123", "orderType": "purchase"}
    )
])

for transaction in transactions:
    print(transaction)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request POST '{{baseUrl}}/v2/ledger-transaction' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "transactions": [
        {
            "amount": 11234,
            "ledgerId": "5656565656565656",
            "externalId": "my-internal-id-123456",
            "source": "bank-transfer/123",
            "fee": 100,
            "created": "2022-01-01T00:00:00.000000+00:00",
            "tags": ["transfer/123", "savings"],
            "metadata": {
                "orderId": "123",
                "orderType": "purchase"
            }
        }
    ]
}'
  
RESPONSE

Python

[
    LedgerTransaction(
        id=5656565656565656,
        ledger_id=5656565656565656,
        external_id=my-internal-id-123456,
        source=bank-transfer/123,
        amount=11234,
        fee=100,
        balance=11134,
        tags=['transfer/123', 'savings'],
        metadata={'orderId': '123', 'orderType': 'purchase'},
        created=2022-01-01 00:00:00
    )
]
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "message": "Transaction(s) successfully created",
    "transactions": [
        {
            "id": "5656565656565656",
            "ledgerId": "5656565656565656",
            "source": "bank-transfer/123",
            "externalId": "my-internal-id-123456",
            "amount": 11234,
            "balance": 11134,
            "fee": 100,
            "tags": ["transfer/123", "savings"],
            "metadata": {
                "orderId": "123",
                "orderType": "purchase"
            },
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

List Ledger Transactions

Get a list of ledger transactions in chunks of at most 1000.

Either "ledgerId" or "ids" must be provided. If both are sent, results are filtered by both. When filtering by "ids", the informed ids may reference transactions across different ledgers.

Parameters

ledgerId CONDITIONALLY REQUIRED

Id of the Ledger associated with the transactions. Either "ledgerId" or "ids" must be provided.

ids CONDITIONALLY REQUIRED

List of strings to get specific entities by ids. The informed ids may belong to transactions in different ledgers. Either "ledgerId" or "ids" must be provided.

flow OPTIONAL

Direction of the Ledger Transaction. Options: "in" (credit), "out" (debit).

externalIds OPTIONAL

Filter by external IDs.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

tags OPTIONAL

Filter entities that contain the specified tags.

limit OPTIONAL

Number of results per cursor. Max = 1000.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/ledger-transaction
REQUEST

Python

import starkinfra

transactions = starkinfra.ledgertransaction.query(
    ledger_id="5656565656565656",
    limit=10
)

for transaction in transactions:
    print(transaction)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/ledger-transaction?ledgerId=5656565656565656&limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

LedgerTransaction(
    id=5656565656565656,
    ledger_id=5656565656565656,
    external_id=my-internal-id-123456,
    source=bank-transfer/123,
    amount=11234,
    fee=100,
    balance=11134,
    tags=['transfer/123', 'savings'],
    metadata={'orderId': '123', 'orderType': 'purchase'},
    created=2022-01-01 00:00:00
)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "cursor": null,
    "transactions": [
        {
            "id": "5656565656565656",
            "ledgerId": "5656565656565656",
            "source": "bank-transfer/123",
            "externalId": "my-internal-id-123456",
            "amount": 11234,
            "balance": 11134,
            "fee": 100,
            "tags": ["transfer/123", "savings"],
            "metadata": {
                "orderId": "123",
                "orderType": "purchase"
            },
            "created": "2022-01-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get a Ledger Transaction

Get a single ledger transaction by its id.

Parameters

id REQUIRED

Id of the ledger transaction entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/ledger-transaction/:id
REQUEST

Python

import starkinfra

transaction = starkinfra.ledgertransaction.get("5656565656565656")

print(transaction)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

curl --location --request GET '{{baseUrl}}/v2/ledger-transaction/5656565656565656' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

LedgerTransaction(
    id=5656565656565656,
    ledger_id=5656565656565656,
    external_id=my-internal-id-123456,
    source=bank-transfer/123,
    amount=11234,
    fee=100,
    balance=11134,
    tags=['transfer/123', 'savings'],
    metadata={'orderId': '123', 'orderType': 'purchase'},
    created=2022-01-01 00:00:00
)
  

Javascript

Not yet available. Please contact us if you need this SDK.
  

PHP

Not yet available. Please contact us if you need this SDK.
  

Java

Not yet available. Please contact us if you need this SDK.
  

Ruby

Not yet available. Please contact us if you need this SDK.
  

Elixir

Not yet available. Please contact us if you need this SDK.
  

C#

Not yet available. Please contact us if you need this SDK.
  

Go

Not yet available. Please contact us if you need this SDK.
  

Clojure

Not yet available. Please contact us if you need this SDK.
  

Curl

{
    "transaction": {
        "id": "5656565656565656",
        "ledgerId": "5656565656565656",
        "source": "bank-transfer/123",
        "externalId": "my-internal-id-123456",
        "amount": 11234,
        "balance": 11134,
        "fee": 100,
        "tags": ["transfer/123", "savings"],
        "metadata": {
            "orderId": "123",
            "orderType": "purchase"
        },
        "created": "2022-01-01T00:00:00.000000+00:00"
    }
}
  

Business Identity

BusinessIdentities validate the identity of a legal entity (CNPJ) and feed its corporate documents into the Contract AI model.

After creating an identity, upload one or more Business Attachments referencing the returned id and PATCH the identity to processing. The structured signing rules extracted by the AI Model are delivered through the business-identity webhook when the identity reaches success.

The BusinessIdentity object

Attributes

id STRING

Unique id for the business identity.

taxId STRING

CNPJ of the legal entity. Example: "20.018.183/0001-80".

name STRING

Legal name of the company, fetched from the official bureau on creation.

taxIdStatus STRING

Bureau status of the CNPJ, normalized from the Receita Federal value. Mapping: "active" = "ATIVA", "blocked" = "SUSPENSA", "pending" = "INAPTA", "canceled" = "BAIXADA", "voided" = "NULA".

insightTaxId STRING

CNPJ extracted from the corporate documents by the AI Model. Empty until the analysis completes.

insightDocumentType STRING

Document type detected by the AI Model. Empty until the analysis completes.

representatives LIST OF OBJECTS

List of representative objects (sócios) fetched from the bureau. Each entry has name, qualification and taxId.

attachments LIST OF STRINGS

List of attachment/<id> strings referencing the Business Attachments uploaded for this identity.

rules LIST OF OBJECTS

List of signing rule objects extracted by the AI Model. Each entry carries reference, content, signaturesRequired and eligibles[] with name, taxId, role, isSignatureRequired and isRepresentative. Empty list until the analysis completes.

tags LIST OF STRINGS

Tags associated with the business identity.

status STRING

Current status of the business identity. Options: "created", "pending", "processing", "canceled", "success", "failed".

created STRING

Creation datetime. Example: "2026-06-12T12:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2026-06-12T12:00:00.000000+00:00".

Create Business Identities

Create one or more BusinessIdentities to start the Contract AI flow.

Each entry is created in pending status. Save the returned id — you'll use it as identityId when uploading the Business Attachments and as the path parameter on subsequent calls.

Validations: the CNPJ must be valid, must be active in the official bureau and must return non-empty representatives (sócios).

Parameters

taxId REQUIRED

CNPJ of the legal entity, with or without punctuation. Example: "20.018.183/0001-80".

tags OPTIONAL

List of strings to tag the entity for future queries.

ENDPOINT
POST /v2/business-identity
REQUEST

Python

import starkinfra

identities = starkinfra.businessidentity.create([
    starkinfra.BusinessIdentity(
        tax_id="20.018.183/0001-80",
        tags=["onboarding-123"]
    )
])

for identity in identities:
    print(identity)
  

Javascript

const starkinfra = require('starkinfra')

const identities = await starkinfra.businessIdentity.create([
    {
        taxId: "20.018.183/0001-80",
        tags: ["onboarding-123"]
    }
])

for (const identity of identities) {
    console.log(identity)
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request POST '{{baseUrl}}/v2/business-identity' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "identities": [
        {
            "taxId": "20.018.183/0001-80",
            "tags": ["onboarding-123"]
        }
    ]
}'
  
RESPONSE

Python

[
    BusinessIdentity(
        id="5740539971076096",
        tax_id="20.018.183/0001-80",
        name="STARK BANK S.A.",
        tax_id_status="active",
        insight_tax_id="",
        insight_document_type="",
        representatives=[{"name": "Daenerys Targaryen Stormborn", "qualification": "Diretor", "taxId": "012.345.678-90"}],
        attachments=[],
        rules=[],
        tags=["onboarding-123"],
        status="pending",
        created="2026-06-12T12:00:00+00:00",
        updated="2026-06-12T12:00:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5740539971076096",
        taxId: "20.018.183/0001-80",
        name: "STARK BANK S.A.",
        taxIdStatus: "active",
        insightTaxId: "",
        insightDocumentType: "",
        representatives: [{name: "Daenerys Targaryen Stormborn", qualification: "Diretor", taxId: "012.345.678-90"}],
        attachments: [],
        rules: [],
        tags: ["onboarding-123"],
        status: "pending",
        created: "2026-06-12T12:00:00+00:00",
        updated: "2026-06-12T12:00:00+00:00"
    }
]
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Business Identity(ies) successfully created",
    "identities": [
        {
            "id": "5740539971076096",
            "taxId": "20.018.183/0001-80",
            "name": "STARK BANK S.A.",
            "taxIdStatus": "active",
            "insightTaxId": "",
            "insightDocumentType": "",
            "representatives": [{"name": "Daenerys Targaryen Stormborn", "qualification": "Diretor", "taxId": "012.345.678-90"}],
            "attachments": [],
            "rules": [],
            "tags": ["onboarding-123"],
            "status": "pending",
            "created": "2026-06-12T12:00:00+00:00",
            "updated": "2026-06-12T12:00:00+00:00"
        }
    ]
}
  

List Business Identities

List and filter all business identities in your workspace. Results are returned paged via cursor.

Parameters

after OPTIONAL

Filter entities created after this date. Format: ISO 8601 or YYYY-MM-DD.

before OPTIONAL

Filter entities created before this date. Format: ISO 8601 or YYYY-MM-DD.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter identities by the specified status.

tags OPTIONAL

Filter entities that contain the specified tags.

ids OPTIONAL

List of strings to get specific entities by ids.

taxIds OPTIONAL

List of CNPJs to filter the response by.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/business-identity
REQUEST

Python

import starkinfra

identities = starkinfra.businessidentity.query(
    after="2026-06-01",
    before="2026-06-30",
    status="success",
    tags=["onboarding-123"],
    limit=10
)

for identity in identities:
    print(identity)
  

Javascript

const starkinfra = require('starkinfra')

const identities = await starkinfra.businessIdentity.query({
    after: "2026-06-01",
    before: "2026-06-30",
    status: "success",
    tags: ["onboarding-123"],
    limit: 10
})

for await (const identity of identities) {
    console.log(identity)
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/business-identity?after=2026-06-01&before=2026-06-30&status=success&tags=onboarding-123&limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

[
    BusinessIdentity(
        id="5740539971076096",
        tax_id="20.018.183/0001-80",
        name="STARK BANK S.A.",
        tax_id_status="active",
        insight_tax_id="20.018.183/0001-80",
        insight_document_type="articles-of-incorporation",
        representatives=[{"name": "Daenerys Targaryen Stormborn", "qualification": "Diretor", "taxId": "012.345.678-90"}],
        attachments=["attachment/5104320788332544"],
        rules=[{"reference": "Artigo 16, item (a)", "content": "pela assinatura isolada do Diretor Presidente", "signaturesRequired": 1, "eligibles": [{"name": "Daenerys Targaryen Stormborn", "taxId": "012.345.678-90", "role": "Diretor Presidente", "isSignatureRequired": True, "isRepresentative": True}]}],
        tags=["onboarding-123"],
        status="success",
        created="2026-06-12T12:00:00+00:00",
        updated="2026-06-12T12:10:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5740539971076096",
        taxId: "20.018.183/0001-80",
        name: "STARK BANK S.A.",
        taxIdStatus: "active",
        insightTaxId: "20.018.183/0001-80",
        insightDocumentType: "articles-of-incorporation",
        representatives: [{name: "Daenerys Targaryen Stormborn", qualification: "Diretor", taxId: "012.345.678-90"}],
        attachments: ["attachment/5104320788332544"],
        rules: [{reference: "Artigo 16, item (a)", content: "pela assinatura isolada do Diretor Presidente", signaturesRequired: 1, eligibles: [{name: "Daenerys Targaryen Stormborn", taxId: "012.345.678-90", role: "Diretor Presidente", isSignatureRequired: true, isRepresentative: true}]}],
        tags: ["onboarding-123"],
        status: "success",
        created: "2026-06-12T12:00:00+00:00",
        updated: "2026-06-12T12:10:00+00:00"
    }
]
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": "ChsSFWoNZX5zdGFyay1iYW5rcgwLEgZJbnNpZ2h0GAEM",
    "identities": [
        {
            "id": "5740539971076096",
            "taxId": "20.018.183/0001-80",
            "name": "STARK BANK S.A.",
            "taxIdStatus": "active",
            "insightTaxId": "20.018.183/0001-80",
            "insightDocumentType": "articles-of-incorporation",
            "representatives": [{"name": "Daenerys Targaryen Stormborn", "qualification": "Diretor", "taxId": "012.345.678-90"}],
            "attachments": ["attachment/5104320788332544"],
            "rules": [{"reference": "Artigo 16, item (a)", "content": "pela assinatura isolada do Diretor Presidente", "signaturesRequired": 1, "eligibles": [{"name": "Daenerys Targaryen Stormborn", "taxId": "012.345.678-90", "role": "Diretor Presidente", "isSignatureRequired": true, "isRepresentative": true}]}],
            "tags": ["onboarding-123"],
            "status": "success",
            "created": "2026-06-12T12:00:00+00:00",
            "updated": "2026-06-12T12:10:00+00:00"
        }
    ]
}
  

Get a Business Identity

Get a single business identity by its id. When status=success, the response includes the populated rules string with the signing combinations extracted by the AI Model.

Parameters

id REQUIRED

Id of the business identity entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/business-identity/:id
REQUEST

Python

import starkinfra

identity = starkinfra.businessidentity.get("5740539971076096")
print(identity)
  

Javascript

const starkinfra = require('starkinfra')

const identity = await starkinfra.businessIdentity.get("5740539971076096")
console.log(identity)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/business-identity/5740539971076096' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

BusinessIdentity(
    id="5740539971076096",
    tax_id="20.018.183/0001-80",
    name="STARK BANK S.A.",
    tax_id_status="active",
    insight_tax_id="20.018.183/0001-80",
    insight_document_type="articles-of-incorporation",
    representatives=[{"name": "Daenerys Targaryen Stormborn", "qualification": "Diretor", "taxId": "012.345.678-90"}],
    attachments=["attachment/5104320788332544"],
    rules=[{"reference": "Artigo 16, item (a)", "content": "pela assinatura isolada do Diretor Presidente", "signaturesRequired": 1, "eligibles": [{"name": "Daenerys Targaryen Stormborn", "taxId": "012.345.678-90", "role": "Diretor Presidente", "isSignatureRequired": True, "isRepresentative": True}]}, {"reference": "Artigo 16, item (b)", "content": "pela assinatura de quaisquer 2 (dois) diretores em conjunto", "signaturesRequired": 2, "eligibles": [{"name": "Daenerys Targaryen Stormborn", "taxId": "012.345.678-90", "role": "Diretor Presidente", "isSignatureRequired": False, "isRepresentative": True}, {"name": "Jon Snow", "taxId": "098.765.432-10", "role": "Diretor de Riscos e Compliance", "isSignatureRequired": False, "isRepresentative": True}]}],
    tags=["onboarding-123"],
    status="success",
    created="2026-06-12T12:00:00+00:00",
    updated="2026-06-12T12:10:00+00:00"
)
  

Javascript

{
    id: "5740539971076096",
    taxId: "20.018.183/0001-80",
    name: "STARK BANK S.A.",
    taxIdStatus: "active",
    insightTaxId: "20.018.183/0001-80",
    insightDocumentType: "articles-of-incorporation",
    representatives: [{name: "Daenerys Targaryen Stormborn", qualification: "Diretor", taxId: "012.345.678-90"}],
    attachments: ["attachment/5104320788332544"],
    rules: [{reference: "Artigo 16, item (a)", content: "pela assinatura isolada do Diretor Presidente", signaturesRequired: 1, eligibles: [{name: "Daenerys Targaryen Stormborn", taxId: "012.345.678-90", role: "Diretor Presidente", isSignatureRequired: true, isRepresentative: true}]}, {reference: "Artigo 16, item (b)", content: "pela assinatura de quaisquer 2 (dois) diretores em conjunto", signaturesRequired: 2, eligibles: [{name: "Daenerys Targaryen Stormborn", taxId: "012.345.678-90", role: "Diretor Presidente", isSignatureRequired: false, isRepresentative: true}, {name: "Jon Snow", taxId: "098.765.432-10", role: "Diretor de Riscos e Compliance", isSignatureRequired: false, isRepresentative: true}]}],
    tags: ["onboarding-123"],
    status: "success",
    created: "2026-06-12T12:00:00+00:00",
    updated: "2026-06-12T12:10:00+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "identity": {
        "id": "5740539971076096",
        "taxId": "20.018.183/0001-80",
        "name": "STARK BANK S.A.",
        "taxIdStatus": "active",
        "insightTaxId": "20.018.183/0001-80",
        "insightDocumentType": "articles-of-incorporation",
        "representatives": [{"name": "Daenerys Targaryen Stormborn", "qualification": "Diretor", "taxId": "012.345.678-90"}],
        "attachments": ["attachment/5104320788332544"],
        "rules": [{"reference": "Artigo 16, item (a)", "content": "pela assinatura isolada do Diretor Presidente", "signaturesRequired": 1, "eligibles": [{"name": "Daenerys Targaryen Stormborn", "taxId": "012.345.678-90", "role": "Diretor Presidente", "isSignatureRequired": true, "isRepresentative": true}]}, {"reference": "Artigo 16, item (b)", "content": "pela assinatura de quaisquer 2 (dois) diretores em conjunto", "signaturesRequired": 2, "eligibles": [{"name": "Daenerys Targaryen Stormborn", "taxId": "012.345.678-90", "role": "Diretor Presidente", "isSignatureRequired": false, "isRepresentative": true}, {"name": "Jon Snow", "taxId": "098.765.432-10", "role": "Diretor de Riscos e Compliance", "isSignatureRequired": false, "isRepresentative": true}]}],
        "tags": ["onboarding-123"],
        "status": "success",
        "created": "2026-06-12T12:00:00+00:00",
        "updated": "2026-06-12T12:10:00+00:00"
    }
}
  

Update a Business Identity

Send a business identity to processing or replace its tags.

To trigger the AI Model analysis, set status=processing. The identity must be in created/pending status and must already have at least one Business Attachment associated with it.

Parameters

id REQUIRED

Id of the business identity entity.

status OPTIONAL

Only processing is accepted. Triggers the AI Model analysis.

tags OPTIONAL

Replace the current list of tags.

ENDPOINT
PATCH /v2/business-identity/:id
REQUEST

Python

import starkinfra

identity = starkinfra.businessidentity.update(
    id="5740539971076096",
    status="processing"
)

print(identity)
  

Javascript

const starkinfra = require('starkinfra')

const identity = await starkinfra.businessIdentity.update(
    "5740539971076096",
    { status: "processing" }
)

console.log(identity)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request PATCH '{{baseUrl}}/v2/business-identity/5740539971076096' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "status": "processing"
}'
  
RESPONSE

Python

BusinessIdentity(
    id="5740539971076096",
    tax_id="20.018.183/0001-80",
    name="STARK BANK S.A.",
    tax_id_status="active",
    insight_tax_id="",
    insight_document_type="",
    representatives=[{"name": "Daenerys Targaryen Stormborn", "qualification": "Diretor", "taxId": "012.345.678-90"}],
    attachments=["attachment/5104320788332544"],
    rules=[],
    tags=["onboarding-123"],
    status="processing",
    created="2026-06-12T12:00:00+00:00",
    updated="2026-06-12T12:05:00+00:00"
)
  

Javascript

{
    id: "5740539971076096",
    taxId: "20.018.183/0001-80",
    name: "STARK BANK S.A.",
    taxIdStatus: "active",
    insightTaxId: "",
    insightDocumentType: "",
    representatives: [{name: "Daenerys Targaryen Stormborn", qualification: "Diretor", taxId: "012.345.678-90"}],
    attachments: ["attachment/5104320788332544"],
    rules: [],
    tags: ["onboarding-123"],
    status: "processing",
    created: "2026-06-12T12:00:00+00:00",
    updated: "2026-06-12T12:05:00+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "identity": {
        "id": "5740539971076096",
        "taxId": "20.018.183/0001-80",
        "name": "STARK BANK S.A.",
        "taxIdStatus": "active",
        "insightTaxId": "",
        "insightDocumentType": "",
        "representatives": [{"name": "Daenerys Targaryen Stormborn", "qualification": "Diretor", "taxId": "012.345.678-90"}],
        "attachments": ["attachment/5104320788332544"],
        "rules": [],
        "tags": ["onboarding-123"],
        "status": "processing",
        "created": "2026-06-12T12:00:00+00:00",
        "updated": "2026-06-12T12:05:00+00:00"
    }
}
  

Cancel a Business Identity

Cancel a business identity. Only identities in created or pending status can be canceled.

Parameters

id REQUIRED

Id of the business identity entity.

ENDPOINT
DELETE /v2/business-identity/:id
REQUEST

Python

import starkinfra

identity = starkinfra.businessidentity.cancel("5740539971076096")
print(identity)
  

Javascript

const starkinfra = require('starkinfra')

const identity = await starkinfra.businessIdentity.cancel("5740539971076096")
console.log(identity)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request DELETE '{{baseUrl}}/v2/business-identity/5740539971076096' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

BusinessIdentity(
    id="5740539971076096",
    tax_id="20.018.183/0001-80",
    name="STARK BANK S.A.",
    tax_id_status="active",
    insight_tax_id="",
    insight_document_type="",
    representatives=[{"name": "Daenerys Targaryen Stormborn", "qualification": "Diretor", "taxId": "012.345.678-90"}],
    attachments=[],
    rules=[],
    tags=["onboarding-123"],
    status="canceled",
    created="2026-06-12T12:00:00+00:00",
    updated="2026-06-12T12:03:00+00:00"
)
  

Javascript

{
    id: "5740539971076096",
    taxId: "20.018.183/0001-80",
    name: "STARK BANK S.A.",
    taxIdStatus: "active",
    insightTaxId: "",
    insightDocumentType: "",
    representatives: [{name: "Daenerys Targaryen Stormborn", qualification: "Diretor", taxId: "012.345.678-90"}],
    attachments: [],
    rules: [],
    tags: ["onboarding-123"],
    status: "canceled",
    created: "2026-06-12T12:00:00+00:00",
    updated: "2026-06-12T12:03:00+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "identity": {
        "id": "5740539971076096",
        "taxId": "20.018.183/0001-80",
        "name": "STARK BANK S.A.",
        "taxIdStatus": "active",
        "insightTaxId": "",
        "insightDocumentType": "",
        "representatives": [{"name": "Daenerys Targaryen Stormborn", "qualification": "Diretor", "taxId": "012.345.678-90"}],
        "attachments": [],
        "rules": [],
        "tags": ["onboarding-123"],
        "status": "canceled",
        "created": "2026-06-12T12:00:00+00:00",
        "updated": "2026-06-12T12:03:00+00:00"
    }
}
  

List Business Identity Logs

Get a paged list of all business identity logs. A log tracks a change in the business identity entity according to its lifecycle.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Number of results per cursor. Max = 100.

identityIds OPTIONAL

List of business identity ids linked to the desired logs. Max = 100.

types OPTIONAL

Filter logs by log type. Options: "created", "updated", "processing", "canceled", "success", "failed".

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/business-identity/log
REQUEST

Python

import starkinfra

logs = starkinfra.businessidentity.log.query(
    types=["success", "failed"],
    identity_ids=["5740539971076096"],
    limit=10
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.businessIdentity.log.query({
    types: ["success", "failed"],
    identityIds: ["5740539971076096"],
    limit: 10
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/business-identity/log?types=success,failed&identityIds=5740539971076096&limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

[
    BusinessIdentityLog(
        id="6248173092645824",
        type="success",
        identity=BusinessIdentity(id="5740539971076096", status="success"),
        errors=[],
        created="2026-06-12T12:10:00+00:00"
    )
]
  

Javascript

[
    {
        id: "6248173092645824",
        type: "success",
        identity: { id: "5740539971076096", status: "success" },
        errors: [],
        created: "2026-06-12T12:10:00+00:00"
    }
]
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": "ChsSFWoNZX5zdGFyay1iYW5rcgwLEgZMb2dHGAEM",
    "logs": [
        {
            "id": "6248173092645824",
            "type": "success",
            "identity": {
                "id": "5740539971076096",
                "status": "success"
            },
            "errors": [],
            "created": "2026-06-12T12:10:00+00:00"
        }
    ]
}
  

Get a Business Identity Log

Get a single business identity log by its id.

Parameters

id REQUIRED

Id of the business identity log entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/business-identity/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.businessidentity.log.get("6248173092645824")
print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.businessIdentity.log.get("6248173092645824")
console.log(log)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/business-identity/log/6248173092645824' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

BusinessIdentityLog(
    id="6248173092645824",
    type="success",
    identity=BusinessIdentity(id="5740539971076096", status="success"),
    errors=[],
    created="2026-06-12T12:10:00+00:00"
)
  

Javascript

{
    id: "6248173092645824",
    type: "success",
    identity: { id: "5740539971076096", status: "success" },
    errors: [],
    created: "2026-06-12T12:10:00+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "log": {
        "id": "6248173092645824",
        "type": "success",
        "identity": {
            "id": "5740539971076096",
            "status": "success"
        },
        "errors": [],
        "created": "2026-06-12T12:10:00+00:00"
    }
}
  

Business Attachment

BusinessAttachments are corporate documents (articles of incorporation, amendments, board minutes) uploaded against a Business Identity.

Each Business Identity accepts up to two attachments. The attachment goes through OCR and document validation; once both attachments are approved, the parent identity can be sent to processing to run the AI Model analysis.

The BusinessAttachment object

Attributes

id STRING

Unique id for the business attachment.

name STRING

File name as provided on upload. Unique among the identity's other created attachments.

businessIdentityId STRING

Id of the Business Identity that owns this attachment.

attachmentId STRING

External attachment id in the document repository. Used internally to track approval.

tags LIST OF STRINGS

Tags associated with the business attachment.

status STRING

Current status of the attachment. Options: "created", "canceled", "approved", "denied".

content STRING

Base64-encoded file content. Returned only when the GET request includes expand=content.

created STRING

Creation datetime. Example: "2026-06-12T12:02:00.000000+00:00".

updated STRING

Last update datetime. Example: "2026-06-12T12:02:00.000000+00:00".

Upload a Business Attachment

Upload a single corporate document tied to a previously created Business Identity. Limit of 1 attachment per request and 2 attachments per identity.

Validations: only PDF, JPG and PNG are accepted, ≤ 8 MB per attachment; the name must be unique among the identity's other created attachments; the identity must be in created/pending status and have fewer than 2 attachments.

Parameters

name REQUIRED

File name. Must be unique among the identity's other created attachments.

content REQUIRED

File payload encoded as a base64 string (e.g., data:application/pdf;base64,...).

identityId REQUIRED

Id of the Business Identity that owns the attachment.

tags OPTIONAL

List of strings to tag the entity for future queries.

ENDPOINT
POST /v2/business-attachment
REQUEST

Python

import starkinfra

attachments = starkinfra.businessattachment.create([
    starkinfra.BusinessAttachment(
        name="contrato-social.pdf",
        content="data:application/pdf;base64,JVBERi0xLjQK...",
        identity_id="5740539971076096",
        tags=["doc-principal"]
    )
])

for attachment in attachments:
    print(attachment)
  

Javascript

const starkinfra = require('starkinfra')

const attachments = await starkinfra.businessAttachment.create([
    {
        name: "contrato-social.pdf",
        content: "data:application/pdf;base64,JVBERi0xLjQK...",
        identityId: "5740539971076096",
        tags: ["doc-principal"]
    }
])

for (const attachment of attachments) {
    console.log(attachment)
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request POST '{{baseUrl}}/v2/business-attachment' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "attachments": [
        {
            "name": "contrato-social.pdf",
            "content": "data:application/pdf;base64,JVBERi0xLjQK...",
            "identityId": "5740539971076096",
            "tags": ["doc-principal"]
        }
    ]
}'
  
RESPONSE

Python

[
    BusinessAttachment(
        id="6710539971076096",
        name="contrato-social.pdf",
        business_identity_id="5740539971076096",
        attachment_id="5104320788332544",
        tags=["doc-principal"],
        status="created",
        created="2026-06-12T12:02:00+00:00",
        updated="2026-06-12T12:02:00+00:00"
    )
]
  

Javascript

[
    {
        id: "6710539971076096",
        name: "contrato-social.pdf",
        businessIdentityId: "5740539971076096",
        attachmentId: "5104320788332544",
        tags: ["doc-principal"],
        status: "created",
        created: "2026-06-12T12:02:00+00:00",
        updated: "2026-06-12T12:02:00+00:00"
    }
]
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Business Attachment(s) successfully created",
    "attachments": [
        {
            "id": "6710539971076096",
            "name": "contrato-social.pdf",
            "businessIdentityId": "5740539971076096",
            "attachmentId": "5104320788332544",
            "tags": ["doc-principal"],
            "status": "created",
            "created": "2026-06-12T12:02:00+00:00",
            "updated": "2026-06-12T12:02:00+00:00"
        }
    ]
}
  

List Business Attachments

List and filter all business attachments in your workspace. Results are returned paged via cursor.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter attachments by status.

tags OPTIONAL

Filter entities that contain the specified tags.

ids OPTIONAL

List of strings to get specific entities by ids.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/business-attachment
REQUEST

Python

import starkinfra

attachments = starkinfra.businessattachment.query(
    after="2026-06-01",
    before="2026-06-30",
    status="approved",
    tags=["doc-principal"],
    limit=10
)

for attachment in attachments:
    print(attachment)
  

Javascript

const starkinfra = require('starkinfra')

const attachments = await starkinfra.businessAttachment.query({
    after: "2026-06-01",
    before: "2026-06-30",
    status: "approved",
    tags: ["doc-principal"],
    limit: 10
})

for await (const attachment of attachments) {
    console.log(attachment)
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/business-attachment?after=2026-06-01&before=2026-06-30&status=approved&tags=doc-principal&limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

[
    BusinessAttachment(
        id="6710539971076096",
        name="contrato-social.pdf",
        business_identity_id="5740539971076096",
        attachment_id="5104320788332544",
        tags=["doc-principal"],
        status="approved",
        created="2026-06-12T12:02:00+00:00",
        updated="2026-06-12T12:08:00+00:00"
    )
]
  

Javascript

[
    {
        id: "6710539971076096",
        name: "contrato-social.pdf",
        businessIdentityId: "5740539971076096",
        attachmentId: "5104320788332544",
        tags: ["doc-principal"],
        status: "approved",
        created: "2026-06-12T12:02:00+00:00",
        updated: "2026-06-12T12:08:00+00:00"
    }
]
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": "ChsSFWoNZX5zdGFyay1iYW5rcgwLEgZBdHRhY2htZW50GAEM",
    "attachments": [
        {
            "id": "6710539971076096",
            "name": "contrato-social.pdf",
            "businessIdentityId": "5740539971076096",
            "attachmentId": "5104320788332544",
            "tags": ["doc-principal"],
            "status": "approved",
            "created": "2026-06-12T12:02:00+00:00",
            "updated": "2026-06-12T12:08:00+00:00"
        }
    ]
}
  

Get a Business Attachment

Get a single business attachment by its id. Pass expand=content to include the base64 file payload in the response.

Parameters

id REQUIRED

Id of the business attachment entity.

expand OPTIONAL

List of fields to expand. Currently only content is supported — when present, the response includes the base64-encoded file payload.

ENDPOINT
GET /v2/business-attachment/:id
REQUEST

Python

import starkinfra

attachment = starkinfra.businessattachment.get(
    "6710539971076096",
    expand=["content"]
)

print(attachment)
  

Javascript

const starkinfra = require('starkinfra')

const attachment = await starkinfra.businessAttachment.get(
    "6710539971076096",
    { expand: ["content"] }
)

console.log(attachment)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/business-attachment/6710539971076096?expand=content' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

BusinessAttachment(
    id="6710539971076096",
    name="contrato-social.pdf",
    business_identity_id="5740539971076096",
    attachment_id="5104320788332544",
    tags=["doc-principal"],
    status="approved",
    content="data:application/pdf;base64,JVBERi0xLjQK...",
    created="2026-06-12T12:02:00+00:00",
    updated="2026-06-12T12:08:00+00:00"
)
  

Javascript

{
    id: "6710539971076096",
    name: "contrato-social.pdf",
    businessIdentityId: "5740539971076096",
    attachmentId: "5104320788332544",
    tags: ["doc-principal"],
    status: "approved",
    content: "data:application/pdf;base64,JVBERi0xLjQK...",
    created: "2026-06-12T12:02:00+00:00",
    updated: "2026-06-12T12:08:00+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "attachment": {
        "id": "6710539971076096",
        "name": "contrato-social.pdf",
        "businessIdentityId": "5740539971076096",
        "attachmentId": "5104320788332544",
        "tags": ["doc-principal"],
        "status": "approved",
        "content": "data:application/pdf;base64,JVBERi0xLjQK...",
        "created": "2026-06-12T12:02:00+00:00",
        "updated": "2026-06-12T12:08:00+00:00"
    }
}
  

Cancel a Business Attachment

Cancel a business attachment. Only attachments in created status can be canceled.

Parameters

id REQUIRED

Id of the business attachment entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
DELETE /v2/business-attachment/:id
REQUEST

Python

import starkinfra

attachment = starkinfra.businessattachment.cancel("6710539971076096")
print(attachment)
  

Javascript

const starkinfra = require('starkinfra')

const attachment = await starkinfra.businessAttachment.cancel("6710539971076096")
console.log(attachment)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request DELETE '{{baseUrl}}/v2/business-attachment/6710539971076096' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

BusinessAttachment(
    id="6710539971076096",
    name="contrato-social.pdf",
    business_identity_id="5740539971076096",
    attachment_id="5104320788332544",
    tags=["doc-principal"],
    status="canceled",
    created="2026-06-12T12:02:00+00:00",
    updated="2026-06-12T12:03:30+00:00"
)
  

Javascript

{
    id: "6710539971076096",
    name: "contrato-social.pdf",
    businessIdentityId: "5740539971076096",
    attachmentId: "5104320788332544",
    tags: ["doc-principal"],
    status: "canceled",
    created: "2026-06-12T12:02:00+00:00",
    updated: "2026-06-12T12:03:30+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "attachment": {
        "id": "6710539971076096",
        "name": "contrato-social.pdf",
        "businessIdentityId": "5740539971076096",
        "attachmentId": "5104320788332544",
        "tags": ["doc-principal"],
        "status": "canceled",
        "created": "2026-06-12T12:02:00+00:00",
        "updated": "2026-06-12T12:03:30+00:00"
    }
}
  

List Business Attachment Logs

Get a paged list of all business attachment logs. A log tracks a change in the business attachment entity according to its lifecycle.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Number of results per cursor. Max = 100.

attachmentIds OPTIONAL

List of business attachment ids linked to the desired logs. Max = 100.

types OPTIONAL

Filter logs by log type. Options: "created", "canceled", "approved", "denied".

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/business-attachment/log
REQUEST

Python

import starkinfra

logs = starkinfra.businessattachment.log.query(
    types=["approved", "denied"],
    attachment_ids=["6710539971076096"],
    limit=10
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.businessAttachment.log.query({
    types: ["approved", "denied"],
    attachmentIds: ["6710539971076096"],
    limit: 10
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/business-attachment/log?types=approved,denied&attachmentIds=6710539971076096&limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

[
    BusinessAttachmentLog(
        id="5719045286731328",
        type="approved",
        attachment=BusinessAttachment(id="6710539971076096", status="approved"),
        errors=[],
        created="2026-06-12T12:08:00+00:00"
    )
]
  

Javascript

[
    {
        id: "5719045286731328",
        type: "approved",
        attachment: { id: "6710539971076096", status: "approved" },
        errors: [],
        created: "2026-06-12T12:08:00+00:00"
    }
]
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": "ChsSFWoNZX5zdGFyay1iYW5rcgwLEgZMb2dHGAEM",
    "logs": [
        {
            "id": "5719045286731328",
            "type": "approved",
            "attachment": {
                "id": "6710539971076096",
                "status": "approved"
            },
            "errors": [],
            "created": "2026-06-12T12:08:00+00:00"
        }
    ]
}
  

Get a Business Attachment Log

Get a single business attachment log by its id.

Parameters

id REQUIRED

Id of the business attachment log entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/business-attachment/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.businessattachment.log.get("5719045286731328")
print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.businessAttachment.log.get("5719045286731328")
console.log(log)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/business-attachment/log/5719045286731328' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

BusinessAttachmentLog(
    id="5719045286731328",
    type="approved",
    attachment=BusinessAttachment(id="6710539971076096", status="approved"),
    errors=[],
    created="2026-06-12T12:08:00+00:00"
)
  

Javascript

{
    id: "5719045286731328",
    type: "approved",
    attachment: { id: "6710539971076096", status: "approved" },
    errors: [],
    created: "2026-06-12T12:08:00+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "log": {
        "id": "5719045286731328",
        "type": "approved",
        "attachment": {
            "id": "6710539971076096",
            "status": "approved"
        },
        "errors": [],
        "created": "2026-06-12T12:08:00+00:00"
    }
}
  

Individual Identity

Individual Identities run an end-to-end identity verification on a Brazilian individual. Each entry wraps the proofs (document and/or facial biometrics) the holder must submit; Stark Infra orchestrates the collection, validates each proof and delivers the result through the individual-identity webhook subscription.

Identities are created in created status and are walked through processing, pending and finally success or failed by private workers. Every transition produces an Individual Identity Log.

The IndividualIdentity object

Attributes

id STRING

Unique id for the individual identity.

name STRING

Full name of the holder being verified.

taxId STRING

CPF of the holder. Optional at creation; can be patched later. Example: "012.345.678-90".

email STRING

E-mail used to deliver the validatorLink when deliveryMethod = automatic.

phone STRING

Holder's phone in international format. Optional.

tags LIST OF STRINGS

Tags associated with the individual identity.

proofs LIST OF STRINGS

List of proof types required by the identity. Options: identity, biometric.

deliveryMethod STRING

How the validatorLink reaches the holder. Options: automatic, manual.

validatorLink STRING

URL the holder opens to submit each proof. Carries the identityId encoded in the info query parameter.

sourceId STRING

Id of the entity that triggered this verification. Filled automatically with the workspace id for external callers.

sourceType STRING

Origin of the verification. Options: onboarding, reboarding, external.

workspaceId STRING

Id of the workspace that owns this identity.

status STRING

Current status of the individual identity. Options: "created", "processing", "pending", "success", "failed".

created STRING

Creation datetime. Example: "2026-06-23T12:00:00.000000+00:00".

updated STRING

Last update datetime. Example: "2026-06-23T12:05:30.000000+00:00".

Create Individual Identities

Create one or more Individual Identities. Each entry is returned in created status and already carries the validatorLink the holder will use to submit each proof.

Validations: the workspace must have an Identity Profile; every value in proofs must be enabled on that profile.

Parameters

name REQUIRED

Full name of the holder being verified.

email REQUIRED

E-mail used to deliver the validatorLink when deliveryMethod = automatic.

deliveryMethod REQUIRED

How the validatorLink reaches the holder. Options: automatic, manual.

proofs REQUIRED

List of proof types to collect. Each item must be one of identity, biometric and must be enabled on your workspace's Identity Profile.

taxId OPTIONAL

CPF of the holder, with or without punctuation. Example: "012.345.678-90".

phone OPTIONAL

Holder's phone in international format. Example: "+5511987654321".

tags OPTIONAL

List of strings to tag the entity for future queries.

ENDPOINT
POST /v2/individual-identity
REQUEST

Python

import starkinfra

identities = starkinfra.individualidentity.create([
    starkinfra.IndividualIdentity(
        name="Daenerys Targaryen Stormborn",
        email="daenerys@example.com",
        delivery_method="automatic",
        proofs=["identity", "biometric"],
        tax_id="012.345.678-90",
        phone="+5511987654321",
        tags=["onboarding-123"]
    )
])

for identity in identities:
    print(identity)
  

Javascript

const starkinfra = require('starkinfra')

const identities = await starkinfra.individualIdentity.create([
    {
        name: "Daenerys Targaryen Stormborn",
        email: "daenerys@example.com",
        deliveryMethod: "automatic",
        proofs: ["identity", "biometric"],
        taxId: "012.345.678-90",
        phone: "+5511987654321",
        tags: ["onboarding-123"]
    }
])

for (const identity of identities) {
    console.log(identity)
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request POST '{{baseUrl}}/v2/individual-identity' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "identities": [
        {
            "name": "Daenerys Targaryen Stormborn",
            "email": "daenerys@example.com",
            "deliveryMethod": "automatic",
            "proofs": ["identity", "biometric"],
            "taxId": "012.345.678-90",
            "phone": "+5511987654321",
            "tags": ["onboarding-123"]
        }
    ]
}'
  
RESPONSE

Python

[
    IndividualIdentity(
        id="5740977003561984",
        name="Daenerys Targaryen Stormborn",
        tax_id="012.345.678-90",
        email="daenerys@example.com",
        phone="+5511987654321",
        tags=["onboarding-123"],
        proofs=["identity", "biometric"],
        delivery_method="automatic",
        validator_link="https://starkbank.com/validator-link?info=eyJpZGVudGl0eUlkIjoiNTc0MDk3NzAwMzU2MTk4NCJ9",
        source_id="6480539068923904",
        source_type="external",
        workspace_id="6480539068923904",
        status="created",
        created="2026-06-23T12:00:00.000000+00:00",
        updated="2026-06-23T12:00:00.000000+00:00"
    )
]
  

Javascript

[
    {
        id: "5740977003561984",
        name: "Daenerys Targaryen Stormborn",
        taxId: "012.345.678-90",
        email: "daenerys@example.com",
        phone: "+5511987654321",
        tags: ["onboarding-123"],
        proofs: ["identity", "biometric"],
        deliveryMethod: "automatic",
        validatorLink: "https://starkbank.com/validator-link?info=eyJpZGVudGl0eUlkIjoiNTc0MDk3NzAwMzU2MTk4NCJ9",
        sourceId: "6480539068923904",
        sourceType: "external",
        workspaceId: "6480539068923904",
        status: "created",
        created: "2026-06-23T12:00:00.000000+00:00",
        updated: "2026-06-23T12:00:00.000000+00:00"
    }
]
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "message": "Individual Identity(ies) successfully created",
    "identities": [
        {
            "id": "5740977003561984",
            "name": "Daenerys Targaryen Stormborn",
            "taxId": "012.345.678-90",
            "email": "daenerys@example.com",
            "phone": "+5511987654321",
            "tags": ["onboarding-123"],
            "proofs": ["identity", "biometric"],
            "deliveryMethod": "automatic",
            "validatorLink": "https://starkbank.com/validator-link?info=eyJpZGVudGl0eUlkIjoiNTc0MDk3NzAwMzU2MTk4NCJ9",
            "sourceId": "6480539068923904",
            "sourceType": "external",
            "workspaceId": "6480539068923904",
            "status": "created",
            "created": "2026-06-23T12:00:00.000000+00:00",
            "updated": "2026-06-23T12:00:00.000000+00:00"
        }
    ]
}
  

List Individual Identities

List and filter all individual identities in your workspace. Results are returned paged via cursor.

Parameters

after OPTIONAL

Filter entities created after this date. Format: ISO 8601 or YYYY-MM-DD.

before OPTIONAL

Filter entities created before this date. Format: ISO 8601 or YYYY-MM-DD.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Number of results per cursor. Max = 100.

status OPTIONAL

Filter identities by the specified status.

ids OPTIONAL

List of strings to get specific entities by ids.

taxIds OPTIONAL

List of CPFs to filter the response by.

email OPTIONAL

Filter identities by holder e-mail.

tags OPTIONAL

Filter entities that contain the specified tags.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/individual-identity
REQUEST

Python

import starkinfra

identities = starkinfra.individualidentity.query(
    status=["pending", "success"],
    tags=["onboarding-123"],
    limit=10
)

for identity in identities:
    print(identity)
  

Javascript

const starkinfra = require('starkinfra')

const identities = await starkinfra.individualIdentity.query({
    status: ["pending", "success"],
    tags: ["onboarding-123"],
    limit: 10
})

for await (const identity of identities) {
    console.log(identity)
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/individual-identity?status=pending,success&tags=onboarding-123&limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

[
    IndividualIdentity(
        id="5740977003561984",
        name="Daenerys Targaryen Stormborn",
        tax_id="012.345.678-90",
        status="pending",
        proofs=["identity", "biometric"],
        delivery_method="automatic",
        created="2026-06-23T12:00:00.000000+00:00",
        updated="2026-06-23T12:00:10.000000+00:00"
    )
]
  

Javascript

[
    {
        id: "5740977003561984",
        name: "Daenerys Targaryen Stormborn",
        taxId: "012.345.678-90",
        status: "pending",
        proofs: ["identity", "biometric"],
        deliveryMethod: "automatic",
        created: "2026-06-23T12:00:00.000000+00:00",
        updated: "2026-06-23T12:00:10.000000+00:00"
    }
]
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": "ClsKFQoHY3JlYXRlZBIJCMWGnoWVoukCEipqE2l-c3RhcmstaW5mcmFyEwsSBkxvZ0lkGAEM",
    "identities": [
        {
            "id": "5740977003561984",
            "name": "Daenerys Targaryen Stormborn",
            "taxId": "012.345.678-90",
            "status": "pending",
            "proofs": ["identity", "biometric"],
            "deliveryMethod": "automatic",
            "created": "2026-06-23T12:00:00.000000+00:00",
            "updated": "2026-06-23T12:00:10.000000+00:00"
        }
    ]
}
  

Get an Individual Identity

Get a single individual identity by its id.

Parameters

id REQUIRED

Id of the individual identity entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/individual-identity/:id
REQUEST

Python

import starkinfra

identity = starkinfra.individualidentity.get("5740977003561984")
print(identity)
  

Javascript

const starkinfra = require('starkinfra')

const identity = await starkinfra.individualIdentity.get("5740977003561984")
console.log(identity)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/individual-identity/5740977003561984' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IndividualIdentity(
    id="5740977003561984",
    name="Daenerys Targaryen Stormborn",
    tax_id="012.345.678-90",
    email="daenerys@example.com",
    phone="+5511987654321",
    tags=["onboarding-123"],
    proofs=["identity", "biometric"],
    delivery_method="automatic",
    validator_link="https://starkbank.com/validator-link?info=eyJpZGVudGl0eUlkIjoiNTc0MDk3NzAwMzU2MTk4NCJ9",
    source_id="6480539068923904",
    source_type="external",
    workspace_id="6480539068923904",
    status="success",
    created="2026-06-23T12:00:00.000000+00:00",
    updated="2026-06-23T12:05:30.000000+00:00"
)
  

Javascript

{
    id: "5740977003561984",
    name: "Daenerys Targaryen Stormborn",
    taxId: "012.345.678-90",
    email: "daenerys@example.com",
    phone: "+5511987654321",
    tags: ["onboarding-123"],
    proofs: ["identity", "biometric"],
    deliveryMethod: "automatic",
    validatorLink: "https://starkbank.com/validator-link?info=eyJpZGVudGl0eUlkIjoiNTc0MDk3NzAwMzU2MTk4NCJ9",
    sourceId: "6480539068923904",
    sourceType: "external",
    workspaceId: "6480539068923904",
    status: "success",
    created: "2026-06-23T12:00:00.000000+00:00",
    updated: "2026-06-23T12:05:30.000000+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "identity": {
        "id": "5740977003561984",
        "name": "Daenerys Targaryen Stormborn",
        "taxId": "012.345.678-90",
        "email": "daenerys@example.com",
        "phone": "+5511987654321",
        "tags": ["onboarding-123"],
        "proofs": ["identity", "biometric"],
        "deliveryMethod": "automatic",
        "validatorLink": "https://starkbank.com/validator-link?info=eyJpZGVudGl0eUlkIjoiNTc0MDk3NzAwMzU2MTk4NCJ9",
        "sourceId": "6480539068923904",
        "sourceType": "external",
        "workspaceId": "6480539068923904",
        "status": "success",
        "created": "2026-06-23T12:00:00.000000+00:00",
        "updated": "2026-06-23T12:05:30.000000+00:00"
    }
}
  

Update an Individual Identity

Update the taxId of an individual identity after it has been created. Useful when the CPF is unknown at creation time and is only collected during the proof submission flow.

Parameters

id REQUIRED

Id of the individual identity entity.

taxId OPTIONAL

CPF to assign to the identity, with or without punctuation.

ENDPOINT
PATCH /v2/individual-identity/:id
REQUEST

Python

import starkinfra

identity = starkinfra.individualidentity.update(
    id="5740977003561984",
    tax_id="012.345.678-90"
)

print(identity)
  

Javascript

const starkinfra = require('starkinfra')

const identity = await starkinfra.individualIdentity.update(
    "5740977003561984",
    { taxId: "012.345.678-90" }
)

console.log(identity)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request PATCH '{{baseUrl}}/v2/individual-identity/5740977003561984' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "taxId": "012.345.678-90"
}'
  
RESPONSE

Python

IndividualIdentity(
    id="5740977003561984",
    name="Daenerys Targaryen Stormborn",
    tax_id="012.345.678-90",
    status="pending",
    proofs=["identity", "biometric"],
    delivery_method="automatic",
    created="2026-06-23T12:00:00.000000+00:00",
    updated="2026-06-23T12:02:00.000000+00:00"
)
  

Javascript

{
    id: "5740977003561984",
    name: "Daenerys Targaryen Stormborn",
    taxId: "012.345.678-90",
    status: "pending",
    proofs: ["identity", "biometric"],
    deliveryMethod: "automatic",
    created: "2026-06-23T12:00:00.000000+00:00",
    updated: "2026-06-23T12:02:00.000000+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "identity": {
        "id": "5740977003561984",
        "name": "Daenerys Targaryen Stormborn",
        "taxId": "012.345.678-90",
        "status": "pending",
        "proofs": ["identity", "biometric"],
        "deliveryMethod": "automatic",
        "created": "2026-06-23T12:00:00.000000+00:00",
        "updated": "2026-06-23T12:02:00.000000+00:00"
    }
}
  

Cancel an Individual Identity

Cancel an individual identity (soft delete). The identity transitions to failed, every pending proof is canceled and a canceled log is delivered through the webhook. Only identities in created or pending status can be canceled.

Parameters

id REQUIRED

Id of the individual identity entity.

ENDPOINT
DELETE /v2/individual-identity/:id
REQUEST

Python

import starkinfra

identity = starkinfra.individualidentity.cancel("5740977003561984")
print(identity)
  

Javascript

const starkinfra = require('starkinfra')

const identity = await starkinfra.individualIdentity.cancel("5740977003561984")
console.log(identity)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request DELETE '{{baseUrl}}/v2/individual-identity/5740977003561984' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IndividualIdentity(
    id="5740977003561984",
    name="Daenerys Targaryen Stormborn",
    status="failed",
    proofs=["identity", "biometric"],
    delivery_method="automatic",
    created="2026-06-23T12:00:00.000000+00:00",
    updated="2026-06-23T12:03:00.000000+00:00"
)
  

Javascript

{
    id: "5740977003561984",
    name: "Daenerys Targaryen Stormborn",
    status: "failed",
    proofs: ["identity", "biometric"],
    deliveryMethod: "automatic",
    created: "2026-06-23T12:00:00.000000+00:00",
    updated: "2026-06-23T12:03:00.000000+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "identity": {
        "id": "5740977003561984",
        "name": "Daenerys Targaryen Stormborn",
        "status": "failed",
        "proofs": ["identity", "biometric"],
        "deliveryMethod": "automatic",
        "created": "2026-06-23T12:00:00.000000+00:00",
        "updated": "2026-06-23T12:03:00.000000+00:00"
    }
}
  

List Individual Identity Logs

Get a paged list of all individual identity logs. A log tracks a change in the individual identity entity according to its lifecycle.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Number of results per cursor. Max = 100.

identityIds OPTIONAL

List of individual identity ids linked to the desired logs. Max = 100.

types OPTIONAL

Filter logs by log type. Options: "created", "processing", "pending", "updated", "success", "failed", "canceled", "expired".

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/individual-identity/log
REQUEST

Python

import starkinfra

logs = starkinfra.individualidentity.log.query(
    types=["success", "failed"],
    identity_ids=["5740977003561984"],
    limit=10
)

for log in logs:
    print(log)
  

Javascript

const starkinfra = require('starkinfra')

const logs = await starkinfra.individualIdentity.log.query({
    types: ["success", "failed"],
    identityIds: ["5740977003561984"],
    limit: 10
})

for await (const log of logs) {
    console.log(log)
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/individual-identity/log?types=success,failed&identityIds=5740977003561984&limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

[
    IndividualIdentityLog(
        id="6661702144623308",
        type="success",
        identity=IndividualIdentity(id="5740977003561984", status="success"),
        errors=[],
        created="2026-06-23T12:05:30.000000+00:00"
    )
]
  

Javascript

[
    {
        id: "6661702144623308",
        type: "success",
        identity: { id: "5740977003561984", status: "success" },
        errors: [],
        created: "2026-06-23T12:05:30.000000+00:00"
    }
]
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": "ChsSFWoNZX5zdGFyay1pbmZyYXIMCxIGTG9nSWQYAQw=",
    "logs": [
        {
            "id": "6661702144623308",
            "type": "success",
            "identity": {
                "id": "5740977003561984",
                "status": "success"
            },
            "errors": [],
            "created": "2026-06-23T12:05:30.000000+00:00"
        }
    ]
}
  

Get an Individual Identity Log

Get a single individual identity log by its id.

Parameters

id REQUIRED

Id of the individual identity log entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/individual-identity/log/:id
REQUEST

Python

import starkinfra

log = starkinfra.individualidentity.log.get("6661702144623308")
print(log)
  

Javascript

const starkinfra = require('starkinfra')

const log = await starkinfra.individualIdentity.log.get("6661702144623308")
console.log(log)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/individual-identity/log/6661702144623308' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IndividualIdentityLog(
    id="6661702144623308",
    type="success",
    identity=IndividualIdentity(id="5740977003561984", status="success"),
    errors=[],
    created="2026-06-23T12:05:30.000000+00:00"
)
  

Javascript

{
    id: "6661702144623308",
    type: "success",
    identity: { id: "5740977003561984", status: "success" },
    errors: [],
    created: "2026-06-23T12:05:30.000000+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "log": {
        "id": "6661702144623308",
        "type": "success",
        "identity": {
            "id": "5740977003561984",
            "status": "success"
        },
        "errors": [],
        "created": "2026-06-23T12:05:30.000000+00:00"
    }
}
  

Individual Identity Proof

Each Individual Identity Proof represents one piece of evidence required by the parent Individual Identity. One proof is generated per proofType requested at creation; the holder submits the content via PATCH /v2/individual-identity-proof/:id.

Proofs go through their own lifecycle (pendingprocessingsuccess / failed / canceled / expired). The parent identity transitions to success only when every proof reaches success.

The IndividualIdentityProof object

Attributes

id STRING

Unique id for the individual identity proof.

proofType STRING

Type of evidence required. Options: identity, biometric.

metadata DICTIONARY

Raw payload returned by the provider after the proof is validated. Empty until the proof reaches processing.

status STRING

Current status of the proof. Options: "pending", "processing", "success", "failed", "canceled", "expired".

individualIdentityId STRING

Id of the parent individual identity.

created STRING

Creation datetime. Example: "2026-06-23T12:00:10.000000+00:00".

updated STRING

Last update datetime. Example: "2026-06-23T12:03:00.000000+00:00".

List Individual Identity Proofs

List the proofs tied to an Individual Identity. The identityId query parameter is required.

Parameters

identityId REQUIRED

Id of the parent individual identity whose proofs you want to list.

status OPTIONAL

Filter proofs by status.

proofType OPTIONAL

Filter proofs by proofType. Options: identity, biometric.

ids OPTIONAL

List of strings to get specific proofs by ids.

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results.

limit OPTIONAL

Number of results per cursor. Max = 100.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/individual-identity-proof
REQUEST

Python

import starkinfra

proofs = starkinfra.individualidentityproof.query(
    identity_id="5740977003561984",
    status=["pending", "processing"],
    limit=10
)

for proof in proofs:
    print(proof)
  

Javascript

const starkinfra = require('starkinfra')

const proofs = await starkinfra.individualIdentityProof.query({
    identityId: "5740977003561984",
    status: ["pending", "processing"],
    limit: 10
})

for await (const proof of proofs) {
    console.log(proof)
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/individual-identity-proof?identityId=5740977003561984&status=pending,processing&limit=10' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

[
    IndividualIdentityProof(
        id="4512334302912512",
        proof_type="biometric",
        metadata={},
        status="pending",
        individual_identity_id="5740977003561984",
        created="2026-06-23T12:00:10.000000+00:00",
        updated="2026-06-23T12:00:10.000000+00:00"
    )
]
  

Javascript

[
    {
        id: "4512334302912512",
        proofType: "biometric",
        metadata: {},
        status: "pending",
        individualIdentityId: "5740977003561984",
        created: "2026-06-23T12:00:10.000000+00:00",
        updated: "2026-06-23T12:00:10.000000+00:00"
    }
]
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "cursor": null,
    "proofs": [
        {
            "id": "4512334302912512",
            "proofType": "biometric",
            "metadata": {},
            "status": "pending",
            "individualIdentityId": "5740977003561984",
            "created": "2026-06-23T12:00:10.000000+00:00",
            "updated": "2026-06-23T12:00:10.000000+00:00"
        }
    ]
}
  

Get an Individual Identity Proof

Get a single individual identity proof by its id.

Parameters

id REQUIRED

Id of the individual identity proof entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/individual-identity-proof/:id
REQUEST

Python

import starkinfra

proof = starkinfra.individualidentityproof.get("4512334302912512")
print(proof)
  

Javascript

const starkinfra = require('starkinfra')

const proof = await starkinfra.individualIdentityProof.get("4512334302912512")
console.log(proof)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/v2/individual-identity-proof/4512334302912512' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

IndividualIdentityProof(
    id="4512334302912512",
    proof_type="identity",
    metadata={"documentId": "doc-abc-123", "documentType": "RG"},
    status="success",
    individual_identity_id="5740977003561984",
    created="2026-06-23T12:00:10.000000+00:00",
    updated="2026-06-23T12:03:00.000000+00:00"
)
  

Javascript

{
    id: "4512334302912512",
    proofType: "identity",
    metadata: { documentId: "doc-abc-123", documentType: "RG" },
    status: "success",
    individualIdentityId: "5740977003561984",
    created: "2026-06-23T12:00:10.000000+00:00",
    updated: "2026-06-23T12:03:00.000000+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "proof": {
        "id": "4512334302912512",
        "proofType": "identity",
        "metadata": {
            "documentId": "doc-abc-123",
            "documentType": "RG"
        },
        "status": "success",
        "individualIdentityId": "5740977003561984",
        "created": "2026-06-23T12:00:10.000000+00:00",
        "updated": "2026-06-23T12:03:00.000000+00:00"
    }
}
  

Submit an Individual Identity Proof

Submit the content of a proof. This is the step in which the holder's document or biometric is uploaded for validation.

biometriccontent is a base64 image string with the facial selfie.

identitycontent is a JSON-serialised string carrying the provider's documentId and/or the document file (base64 image).

After a successful PATCH the proof transitions from pending to processing and the provider validates it asynchronously.

Parameters

id REQUIRED

Id of the individual identity proof being submitted.

content REQUIRED

Content of the proof, encoded according to the proofType.

ENDPOINT
PATCH /v2/individual-identity-proof/:id
REQUEST

Python

import starkinfra

proof = starkinfra.individualidentityproof.update(
    id="4512334302912512",
    content="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."
)

print(proof)
  

Javascript

const starkinfra = require('starkinfra')

const proof = await starkinfra.individualIdentityProof.update(
    "4512334302912512",
    { content: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..." }
)

console.log(proof)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request PATCH '{{baseUrl}}/v2/individual-identity-proof/4512334302912512' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "content": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."
}'
  
RESPONSE

Python

IndividualIdentityProof(
    id="4512334302912512",
    proof_type="biometric",
    metadata={},
    status="processing",
    individual_identity_id="5740977003561984",
    created="2026-06-23T12:00:10.000000+00:00",
    updated="2026-06-23T12:02:00.000000+00:00"
)
  

Javascript

{
    id: "4512334302912512",
    proofType: "biometric",
    metadata: {},
    status: "processing",
    individualIdentityId: "5740977003561984",
    created: "2026-06-23T12:00:10.000000+00:00",
    updated: "2026-06-23T12:02:00.000000+00:00"
}
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

{
    "proof": {
        "id": "4512334302912512",
        "proofType": "biometric",
        "metadata": {},
        "status": "processing",
        "individualIdentityId": "5740977003561984",
        "created": "2026-06-23T12:00:10.000000+00:00",
        "updated": "2026-06-23T12:02:00.000000+00:00"
    }
}
  

Individual Holmes

Individual Holmes queries an external bureau or one of Stark Infra's internal datasets to investigate an individual (CPF). Each request targets a single bureau through the type path parameter and returns that bureau's payload under a key named after the type queried.

Use Individual Holmes to run KYC, anti-fraud, judicial, sanctions and federal-revenue checks on a person before onboarding, granting credit or releasing a high-risk operation. Every call is synchronous, scoped to your workspace and logged on Stark Infra's side — there is no resource lifecycle to track.

Query an Individual Bureau

Path params identify what to look up. The searchKey is a CPF (11 digits, masked or unmasked) for every bureau except internationalPep, where it is the person's full name. The type selects the bureau and the shape of the response.

Query params control paging. Only civil and criminal (JusBrasil) honour cursor — repeat the request with the returned cursor to fetch the next page.

Parameters

searchKey REQUIRED

CPF of the individual being investigated, masked or unmasked. Example: 012.345.678-90. For the internationalPep bureau, send the person's full name instead.

type REQUIRED

Bureau to query. Options: civil, criminal, frauds, data, dict, kyc, nationalPep, internationalPep, jointResolution6, csnu, federalRevenueRegistry, deceased, negativeMedia.

limit OPTIONAL

Maximum number of items per page for paginated bureaus. Integer in the 1..100 range. Defaults to 100.

cursor OPTIONAL

Opaque page token returned by the previous call. Only meaningful for civil and criminal; ignored by every other bureau.

ENDPOINT
GET /individual-holmes/:searchKey/:type
REQUEST

Python

import starkinfra

result = starkinfra.individualholmes.get(
    search_key="01234567890",
    type="kyc",
)

print(result)
  

Javascript

const starkinfra = require('starkinfra')

const result = await starkinfra.individualHolmes.get({
    searchKey: "01234567890",
    type: "kyc"
})

console.log(result)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/individual-holmes/01234567890/kyc' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

The payload key and its inner shape depend on the bureau "type" queried. For each type (civil, criminal, frauds, data, dict, kyc, nationalPep, internationalPep, jointResolution6, csnu, federalRevenueRegistry, deceased, negativeMedia) the response is documented in the corresponding section of the get-started.
  

Javascript

The payload key and its inner shape depend on the bureau "type" queried. For each type (civil, criminal, frauds, data, dict, kyc, nationalPep, internationalPep, jointResolution6, csnu, federalRevenueRegistry, deceased, negativeMedia) the response is documented in the corresponding section of the get-started.
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

The payload key and its inner shape depend on the bureau "type" queried. For each type (civil, criminal, frauds, data, dict, kyc, nationalPep, internationalPep, jointResolution6, csnu, federalRevenueRegistry, deceased, negativeMedia) the response is documented in the corresponding section of the get-started.
  

Business Holmes

Business Holmes queries an external bureau or one of Stark Infra's internal datasets to investigate a legal entity (CNPJ). Each request targets a single bureau through the type path parameter and returns that bureau's payload under a key named after the type queried.

Use Business Holmes to run KYB, judicial, anti-fraud, sanctions, QSA (corporate structure) and federal-revenue checks on a company before onboarding it, granting credit or releasing a high-risk operation. Every call is synchronous, scoped to your workspace and logged on Stark Infra's side — there is no resource lifecycle to track.

Query a Business Bureau

Path params identify what to look up. The taxId is the company's CNPJ (14 digits, masked or unmasked); the type selects the bureau and the shape of the response.

Query params control paging. Only civil and criminal (JusBrasil) honour cursor — repeat the request with the returned cursor to fetch the next page.

Parameters

taxId REQUIRED

CNPJ of the company being investigated, masked or unmasked. Example: 20.018.183/0001-80.

type REQUIRED

Bureau to query. Options: civil, criminal, kyc, frauds, data, dict, jointResolution6, federalRevenueRegistry, negativeMedia, qsa.

limit OPTIONAL

Maximum number of items per page for paginated bureaus. Integer in the 1..100 range. Defaults to 100.

cursor OPTIONAL

Opaque page token returned by the previous call. Only meaningful for civil and criminal; ignored by every other bureau.

ENDPOINT
GET /business-holmes/:taxId/:type
REQUEST

Python

import starkinfra

result = starkinfra.businessholmes.get(
    tax_id="20018183000180",
    type="kyc",
)

print(result)
  

Javascript

const starkinfra = require('starkinfra')

const result = await starkinfra.businessHolmes.get({
    taxId: "20018183000180",
    type: "kyc"
})

console.log(result)
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

curl --location --request GET '{{baseUrl}}/business-holmes/20018183000180/kyc' \
--header 'Access-Id: {{accessId}}' \
--header 'Access-Time: {{accessTime}}' \
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

The payload key and its inner shape depend on the bureau "type" queried. For each type (civil, criminal, kyc, frauds, data, dict, jointResolution6, federalRevenueRegistry, negativeMedia, qsa) the response is documented in the corresponding section of the get-started.
  

Javascript

The payload key and its inner shape depend on the bureau "type" queried. For each type (civil, criminal, kyc, frauds, data, dict, jointResolution6, federalRevenueRegistry, negativeMedia, qsa) the response is documented in the corresponding section of the get-started.
  

PHP

Java

Ruby

Elixir

C#

Go

Clojure

Curl

The payload key and its inner shape depend on the bureau "type" queried. For each type (civil, criminal, kyc, frauds, data, dict, jointResolution6, federalRevenueRegistry, negativeMedia, qsa) the response is documented in the corresponding section of the get-started.
  

Webhook

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 Infra public key.

If your endpoint URL does not return a 200 status, the webhook service will try again at most three times. The interval between each attempt is 5 min, 30 min and finally 120 min.

NOTE 1: Registered webhooks will only work for services used in that same version.

NOTE 2: Even if you use Webhook, we strongly recommend that you create a daily task to get all undelivered events and set them as delivered. It's important to add redundancy and resilience to your system.

The Webhook Object

Attributes

id STRING

Unique id for the webhook subscription.

url STRING

Endpoint URL that receives webhook events.

subscriptions LIST OF STRINGS

List of subscribed event types.

Create a Webhook

Register a new webhook URL. The subscriptions refer to which kinds of logs will be sent to the webhook URL being registered.

Available subscriptions: pix-request, pix-reversal, pix-pull-subscription, pix-pull-request, pix-internal-transaction-report, pix-key, pix-key-holmes, pix-claim, pix-infraction, pix-chargeback, pix-dispute, issuing-card, issuing-holder, issuing-purchase, issuing-invoice, credit-note or credit-holmes

Parameters

url REQUIRED

The server URL that will receive the Webhook Events.

subscriptions REQUIRED

Array of subscriptions. Possible values: "pix-request", "pix-reversal", "pix-pull-subscription", "pix-pull-request", "pix-internal-transaction-report", "pix-key", "pix-key-holmes", "pix-claim", "pix-infraction", "pix-chargeback", "pix-dispute", "issuing-card", "issuing-holder", "issuing-purchase", "issuing-invoice", "credit-note" or "credit-holmes"

ENDPOINT
POST /v2/webhook
REQUEST

Python

import starkinfra

webhook = starkinfra.webhook.create(
    url="https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    subscriptions=[
        "pix-request",
        "pix-reversal",
        "pix-key",
        "credit-note",
        "credit-holmes"
    ]
)

print(webhook)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let webhook = await starkinfra.webhook.create({
        url: 'https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec',
        subscriptions: [
            'pix-request',
            'pix-reversal',
            'pix-key',
            'credit-note',
            'credit-holmes'
        ]
    });

    console.log(webhook);
})();
  

PHP

$webhook = StarkInfra\Webhook::create([
    "url" => "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    "subscriptions" => [
        "pix-request",
        "pix-reversal",
        "pix-key",
        "credit-note",
        "credit-holmes"
    ]
]);

print_r($webhook);
  

Java

import com.starkinfra.*;
import java.util.Arrays;

Webhook webhook = Webhook.create(new Webhook.Builder()
    .url("https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec")
    .subscriptions(Arrays.asList(
        "pix-request",
        "pix-reversal",
        "pix-key",
        "credit-note",
        "credit-holmes"
    ))
    .build()
);

System.out.println(webhook);
  

Ruby

require('starkinfra')

webhook = StarkInfra::Webhook.create(
    url: "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    subscriptions: [
        "pix-request",
        "pix-reversal",
        "pix-key",
        "credit-note",
        "credit-holmes"
    ]
)

puts webhook
  

Elixir

webhook = StarkInfra.Webhook.create!(
    url: "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    subscriptions: [
        "pix-request",
        "pix-reversal",
        "pix-key",
        "credit-note",
        "credit-holmes"
    ]
)

webhook |> IO.inspect
  

C#

using System;
using System.Collections.Generic;

StarkInfra.Webhook webhook = StarkInfra.Webhook.Create(
    url: "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    subscriptions: new List<string> {
        "pix-request",
        "pix-reversal",
        "pix-key",
        "credit-note",
        "credit-holmes"
    }
);

Console.WriteLine(webhook);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/webhook"
)

func main() {

    hook, err := webhook.Create(
        webhook.Webhook{
            Url: "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
            Subscriptions: []string{
                "pix-request",
                "pix-reversal",
                "pix-key",
                "credit-note",
                "credit-holmes",
            },
        },
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", hook)
}
  

Clojure

(def webhook
    (starkinfra/webhook-create
        {:url "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec"
         :subscriptions ["pix-request"
                         "pix-reversal"
                         "pix-key"
                         "credit-note"
                         "credit-holmes"]}))

(println webhook)
  

Curl

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 '{
    "webhook": {
        "url": "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
        "subscriptions": [
            "pix-request",
            "pix-reversal",
            "pix-key",
            "credit-note",
            "credit-holmes"
        ]
    }
}'
  
RESPONSE

Python

Webhook(
    id=5601079539523584,
    url=https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    subscriptions=['pix-request', 'pix-reversal', 'pix-key', 'credit-note', 'credit-holmes']
)
  

Javascript

Webhook {
    id: '5601079539523584',
    url: 'https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec',
    subscriptions: [ 'pix-request', 'pix-reversal', 'pix-key', 'credit-note', 'credit-holmes' ]
}
  

PHP

StarkInfra\Webhook Object
(
    [id] => 5601079539523584
    [url] => https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec
    [subscriptions] => Array
        (
            [0] => pix-request
            [1] => pix-reversal
            [2] => pix-key
            [3] => credit-note
            [4] => credit-holmes
        )
)
  

Java

Webhook({
    "id": "5601079539523584",
    "url": "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    "subscriptions": ["pix-request", "pix-reversal", "pix-key", "credit-note", "credit-holmes"]
})
  

Ruby

webhook(
    id: 5601079539523584,
    url: https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    subscriptions: ["pix-request", "pix-reversal", "pix-key", "credit-note", "credit-holmes"]
)
  

Elixir

%StarkInfra.Webhook{
    id: "5601079539523584",
    url: "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    subscriptions: ["pix-request", "pix-reversal", "pix-key", "credit-note", "credit-holmes"]
}
  

C#

Webhook(
    Id: 5601079539523584,
    Url: https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    Subscriptions: [ pix-request, pix-reversal, pix-key, credit-note, credit-holmes ]
)
  

Go

{
    Id:5601079539523584
    Url:https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec
    Subscriptions:[pix-request pix-reversal pix-key credit-note credit-holmes]
}
  

Clojure

{:id "5601079539523584",
 :url "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
 :subscriptions ["pix-request" "pix-reversal" "pix-key" "credit-note" "credit-holmes"]}
  

Curl

{
    "webhook": {
        "id": "5601079539523584",
        "url": "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
        "subscriptions": [
            "pix-request",
            "pix-reversal",
            "pix-key",
            "credit-note",
            "credit-holmes"
        ]
    }
}
  

List Webhooks

Get a list of non-deleted webhooks in chunks of at most 100. If you need smaller chunks, use the limit parameter.

Parameters

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

limit OPTIONAL

Maximum number of Webhooks to be retrieved. Max = 100.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/webhook
REQUEST

Python

import starkinfra

webhooks = starkinfra.webhook.query(limit=10)

for webhook in webhooks:
    print(webhook)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let webhooks = await starkinfra.webhook.query({ limit: 10 });

    for await (let webhook of webhooks) {
        console.log(webhook);
    }
})();
  

PHP

$webhooks = StarkInfra\Webhook::query(["limit" => 10]);

foreach ($webhooks as $webhook) {
    print_r($webhook);
}
  

Java

import com.starkinfra.*;
import com.starkinfra.utils.Generator;
import java.util.HashMap;

HashMap<String, Object> params = new HashMap<>();
params.put("limit", 10);
Generator<Webhook> webhooks = Webhook.query(params);

for (Webhook webhook : webhooks) {
    System.out.println(webhook);
}
  

Ruby

require('starkinfra')

webhooks = StarkInfra::Webhook.query(limit: 10)

webhooks.each do |webhook|
    puts webhook
end
  

Elixir

webhooks = StarkInfra.Webhook.query!(limit: 10)

for webhook <- webhooks do
    webhook |> IO.inspect
end
  

C#

using System;
using System.Collections.Generic;

IEnumerable<StarkInfra.Webhook> webhooks = StarkInfra.Webhook.Query(limit: 10);

foreach (StarkInfra.Webhook webhook in webhooks) {
    Console.WriteLine(webhook);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/webhook"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10

    webhooks, errorChannel := webhook.Query(params, nil)

    loop:
    for {
        select {
        case err := <-errorChannel:
            if err.Errors != nil {
                for _, e := range err.Errors {
                    fmt.Printf("code: %s, message: %s", e.Code, e.Message)
                }
            }
        case hook, ok := <-webhooks:
            if !ok {
                break loop
            }
            fmt.Printf("%+v", hook)
        }
    }
}
  

Clojure

(def webhooks (starkinfra.webhook/query {:limit 10}))
(dorun (map println webhooks))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/webhook?limit=10' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Webhook(
    id=5601079539523584,
    url=https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    subscriptions=['pix-request', 'credit-note']
)
  

Javascript

Webhook {
    id: '5601079539523584',
    url: 'https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec',
    subscriptions: [ 'pix-request', 'credit-note' ]
}
  

PHP

StarkInfra\Webhook Object
(
    [id] => 5601079539523584
    [url] => https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec
    [subscriptions] => Array
        (
            [0] => pix-request
            [1] => credit-note
        )
)
  

Java

Webhook({
    "id": "5601079539523584",
    "url": "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    "subscriptions": ["pix-request", "credit-note"]
})
  

Ruby

webhook(
    id: 5601079539523584,
    url: https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    subscriptions: ["pix-request", "credit-note"]
)
  

Elixir

%StarkInfra.Webhook{
    id: "5601079539523584",
    url: "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    subscriptions: ["pix-request", "credit-note"]
}
  

C#

Webhook(
    Id: 5601079539523584,
    Url: https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    Subscriptions: [ pix-request, credit-note ]
)
  

Go

{
    Id:5601079539523584
    Url:https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec
    Subscriptions:[pix-request credit-note]
}
  

Clojure

{:id "5601079539523584",
 :url "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
 :subscriptions ["pix-request" "credit-note"]}
  

Curl

{
    "cursor": null,
    "webhooks": [
        {
            "id": "5601079539523584",
            "url": "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
            "subscriptions": ["pix-request", "credit-note"]
        }
    ]
}
  

Get a Webhook

Get a single Webhook by its id.

Parameters

id REQUIRED

Id of the webhook entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/webhook/:id
REQUEST

Python

import starkinfra

webhook = starkinfra.webhook.get("5601079539523584")

print(webhook)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let webhook = await starkinfra.webhook.get('5601079539523584');
    console.log(webhook);
})();
  

PHP

$webhook = StarkInfra\Webhook::get("5601079539523584");

print_r($webhook);
  

Java

import com.starkinfra.*;

Webhook webhook = Webhook.get("5601079539523584");

System.out.println(webhook);
  

Ruby

require('starkinfra')

webhook = StarkInfra::Webhook.get('5601079539523584')

puts webhook
  

Elixir

webhook = StarkInfra.Webhook.get!("5601079539523584")

webhook |> IO.inspect
  

C#

using System;

StarkInfra.Webhook webhook = StarkInfra.Webhook.Get("5601079539523584");

Console.WriteLine(webhook);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/webhook"
)

func main() {

    hook, err := webhook.Get("5601079539523584", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", hook)
}
  

Clojure

(def webhook (starkinfra.webhook/get "5601079539523584"))
(println webhook)
  

Curl

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

Python

Webhook(
    id=5601079539523584,
    url=https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    subscriptions=['pix-request', 'credit-note']
)
  

Javascript

Webhook {
    id: '5601079539523584',
    url: 'https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec',
    subscriptions: [ 'pix-request', 'credit-note' ]
}
  

PHP

StarkInfra\Webhook Object
(
    [id] => 5601079539523584
    [url] => https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec
    [subscriptions] => Array
        (
            [0] => pix-request
            [1] => credit-note
        )
)
  

Java

Webhook({
    "id": "5601079539523584",
    "url": "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    "subscriptions": ["pix-request", "credit-note"]
})
  

Ruby

webhook(
    id: 5601079539523584,
    url: https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    subscriptions: ["pix-request", "credit-note"]
)
  

Elixir

%StarkInfra.Webhook{
    id: "5601079539523584",
    url: "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    subscriptions: ["pix-request", "credit-note"]
}
  

C#

Webhook(
    Id: 5601079539523584,
    Url: https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    Subscriptions: [ pix-request, credit-note ]
)
  

Go

{
    Id:5601079539523584
    Url:https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec
    Subscriptions:[pix-request credit-note]
}
  

Clojure

{:id "5601079539523584",
 :url "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
 :subscriptions ["pix-request" "credit-note"]}
  

Curl

{
    "webhook": {
        "id": "5601079539523584",
        "url": "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
        "subscriptions": ["pix-request", "credit-note"]
    }
}
  

Delete a Webhook

Delete a single Webhook subscription.

NOTE: This action cannot be undone.

Parameters

id REQUIRED

Id of the Webhook to be deleted.

ENDPOINT
DELETE /v2/webhook/:id
REQUEST

Python

import starkinfra

webhook = starkinfra.webhook.delete("5601079539523584")

print(webhook)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let webhook = await starkinfra.webhook.delete('5601079539523584');

    console.log(webhook);
})();
  

PHP

$webhook = StarkInfra\Webhook::delete("5601079539523584");

print_r($webhook);
  

Java

import com.starkinfra.*;

Webhook webhook = Webhook.delete("5601079539523584");

System.out.println(webhook);
  

Ruby

require('starkinfra')

webhook = StarkInfra::Webhook.delete("5601079539523584")

puts webhook
  

Elixir

webhook = StarkInfra.Webhook.delete!("5601079539523584")

webhook |> IO.inspect
  

C#

using System;

StarkInfra.Webhook webhook = StarkInfra.Webhook.Delete("5601079539523584");

Console.WriteLine(webhook);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/webhook"
)

func main() {

    hook, err := webhook.Delete("5601079539523584", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", hook)
}
  

Clojure

(def webhook (starkinfra.webhook/delete "5601079539523584"))

(println webhook)
  

Curl

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

Python

Webhook(
    id=5601079539523584,
    url=https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    subscriptions=['pix-request', 'credit-note']
)
  

Javascript

Webhook {
    id: '5601079539523584',
    url: 'https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec',
    subscriptions: [ 'pix-request', 'credit-note' ]
}
  

PHP

StarkInfra\Webhook Object
(
    [id] => 5601079539523584
    [url] => https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec
    [subscriptions] => Array
        (
            [0] => pix-request
            [1] => credit-note
        )
)
  

Java

Webhook({
    "id": "5601079539523584",
    "url": "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    "subscriptions": ["pix-request", "credit-note"]
})
  

Ruby

webhook(
    id: 5601079539523584,
    url: https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    subscriptions: ["pix-request", "credit-note"]
)
  

Elixir

%StarkInfra.Webhook{
    id: "5601079539523584",
    url: "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
    subscriptions: ["pix-request", "credit-note"]
}
  

C#

Webhook(
    Id: 5601079539523584,
    Url: https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec,
    Subscriptions: [ pix-request, credit-note ]
)
  

Go

{
    Id:5601079539523584
    Url:https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec
    Subscriptions:[pix-request credit-note]
}
  

Clojure

{:id "5601079539523584",
 :url "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
 :subscriptions ["pix-request" "credit-note"]}
  

Curl

{
    "webhook": {
        "id": "5601079539523584",
        "url": "https://webhook.site/dd784f26-1d6a-4ca6-81cb-fda0267761ec",
        "subscriptions": ["pix-request", "credit-note"]
    }
}
  

Event

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.

NOTE: All the events have a log property containing an entity log. The nature of the log, however, may change according to the subscription that triggered the event. For example, if the subscription is credit-note, the log in the event will be a CreditNoteLog.

The Event object

Attributes

id STRING

Unique id for the event.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

isDelivered STRING

Whether the event has been successfully delivered. Options: "true", "false".

subscription STRING

Subscription that triggered the event.

workspaceId STRING

ID of the workspace the event belongs to.

List Events

Get a list of non-deleted events in chunks of at most 100. If you need smaller chunks, use the limit parameter.

Parameters

after OPTIONAL

Date filter for Events created only after a specific date. Example: "2022-01-20"

before OPTIONAL

Date filter for Events created only before a specific date. Example: "2022-02-20"

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

isDelivered OPTIONAL

If false, only gets Events that haven't been delivered. If true, only gets Events that have already been delivered.

limit OPTIONAL

Maximum number of Events to be retrieved. Max = 100.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/event
REQUEST

Python

import starkinfra

events = starkinfra.event.query(limit=10, is_delivered=False)

for event in events:
    print(event)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let events = await starkinfra.event.query({ limit: 10, isDelivered: false });

    for await (let event of events) {
        console.log(event);
    }
})();
  

PHP

$events = StarkInfra\Event::query(["limit" => 10, "isDelivered" => false]);

foreach ($events as $event) {
    print_r($event);
}
  

Java

import com.starkinfra.*;
import com.starkinfra.utils.Generator;
import java.util.HashMap;

HashMap<String, Object> params = new HashMap<>();
params.put("limit", 10);
params.put("isDelivered", false);
Generator<Event> events = Event.query(params);

for (Event event : events) {
    System.out.println(event);
}
  

Ruby

require('starkinfra')

events = StarkInfra::Event.query(limit: 10, is_delivered: false)

events.each do |event|
    puts event
end
  

Elixir

events = StarkInfra.Event.query!(limit: 10, is_delivered: false)

for event <- events do
    event |> IO.inspect
end
  

C#

using System;
using System.Collections.Generic;

IEnumerable<StarkInfra.Event> events = StarkInfra.Event.Query(limit: 10, isDelivered: false);

foreach (StarkInfra.Event starkEvent in events) {
    Console.WriteLine(starkEvent);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/event"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10
    params["isDelivered"] = false

    events, errorChannel := event.Query(params, nil)

    loop:
    for {
        select {
        case err := <-errorChannel:
            if err.Errors != nil {
                for _, e := range err.Errors {
                    fmt.Printf("code: %s, message: %s", e.Code, e.Message)
                }
            }
        case starkEvent, ok := <-events:
            if !ok {
                break loop
            }
            fmt.Printf("%+v", starkEvent)
        }
    }
}
  

Clojure

(def events (starkinfra.event/query {:limit 10 :is-delivered false}))
(dorun (map println events))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/event?limit=10&isDelivered=false' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Event(
    id=5719405850615809,
    log=CreditNote.Log(id=5155165527080961, type=created),
    created=2022-06-01T00:00:00.000000+00:00,
    is_delivered=False,
    subscription=credit-note,
    workspace_id=4019167990849536
)
  

Javascript

Event {
    id: '5719405850615809',
    log: CreditNote.Log { id: '5155165527080961', type: 'created' },
    created: '2022-06-01T00:00:00.000000+00:00',
    isDelivered: false,
    subscription: 'credit-note',
    workspaceId: '4019167990849536'
}
  

PHP

StarkInfra\Event Object
(
    [id] => 5719405850615809
    [log] => StarkInfra\CreditNote\Log Object ( ... )
    [created] => 2022-06-01T00:00:00.000000+00:00
    [isDelivered] =>
    [subscription] => credit-note
    [workspaceId] => 4019167990849536
)
  

Java

Event({
    "id": "5719405850615809",
    "log": {"id": "5155165527080961", "type": "created"},
    "created": "2022-06-01T00:00:00.000000+00:00",
    "isDelivered": false,
    "subscription": "credit-note",
    "workspaceId": "4019167990849536"
})
  

Ruby

event(
    id: 5719405850615809,
    log: credit_note_log(id: 5155165527080961, type: created),
    created: 2022-06-01T00:00:00.000000+00:00,
    is_delivered: false,
    subscription: credit-note,
    workspace_id: 4019167990849536
)
  

Elixir

%StarkInfra.Event{
    id: "5719405850615809",
    log: %StarkInfra.CreditNote.Log{id: "5155165527080961", type: "created"},
    created: "2022-06-01T00:00:00.000000+00:00",
    is_delivered: false,
    subscription: "credit-note",
    workspace_id: "4019167990849536"
}
  

C#

Event(
    Id: 5719405850615809,
    Log: CreditNote.Log(Id: 5155165527080961, Type: created),
    Created: 2022-06-01T00:00:00.000000+00:00,
    IsDelivered: False,
    Subscription: credit-note,
    WorkspaceId: 4019167990849536
)
  

Go

{
    Id:5719405850615809
    Log:{Id:5155165527080961 Type:created}
    Created:2022-06-01T00:00:00.000000+00:00
    IsDelivered:false
    Subscription:credit-note
    WorkspaceId:4019167990849536
}
  

Clojure

{:id "5719405850615809",
 :log {:id "5155165527080961" :type "created"},
 :created "2022-06-01T00:00:00.000000+00:00",
 :is-delivered false,
 :subscription "credit-note",
 :workspace-id "4019167990849536"}
  

Curl

{
    "cursor": null,
    "events": [
        {
            "id": "5719405850615809",
            "log": {
                "id": "5155165527080961",
                "type": "created"
            },
            "created": "2022-06-01T00:00:00.000000+00:00",
            "isDelivered": false,
            "subscription": "credit-note",
            "workspaceId": "4019167990849536"
        }
    ]
}
  

Get an Event

Get a single Event by its id.

Parameters

id REQUIRED

Unique id of the event entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/event/:id
REQUEST

Python

import starkinfra

event = starkinfra.event.get("5719405850615809")

print(event)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let event = await starkinfra.event.get('5719405850615809');
    console.log(event);
})();
  

PHP

$event = StarkInfra\Event::get("5719405850615809");

print_r($event);
  

Java

import com.starkinfra.*;

Event event = Event.get("5719405850615809");

System.out.println(event);
  

Ruby

require('starkinfra')

event = StarkInfra::Event.get('5719405850615809')

puts event
  

Elixir

event = StarkInfra.Event.get!("5719405850615809")

event |> IO.inspect
  

C#

using System;

StarkInfra.Event starkEvent = StarkInfra.Event.Get("5719405850615809");

Console.WriteLine(starkEvent);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/event"
)

func main() {

    starkEvent, err := event.Get("5719405850615809", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", starkEvent)
}
  

Clojure

(def event (starkinfra.event/get "5719405850615809"))
(println event)
  

Curl

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

Python

Event(
    id=5719405850615809,
    log=CreditNote.Log(id=5155165527080961, type=created),
    created=2022-06-01T00:00:00.000000+00:00,
    is_delivered=False,
    subscription=credit-note,
    workspace_id=4019167990849536
)
  

Javascript

Event {
    id: '5719405850615809',
    log: CreditNote.Log { id: '5155165527080961', type: 'created' },
    created: '2022-06-01T00:00:00.000000+00:00',
    isDelivered: false,
    subscription: 'credit-note',
    workspaceId: '4019167990849536'
}
  

PHP

StarkInfra\Event Object
(
    [id] => 5719405850615809
    [log] => StarkInfra\CreditNote\Log Object ( ... )
    [created] => 2022-06-01T00:00:00.000000+00:00
    [isDelivered] =>
    [subscription] => credit-note
    [workspaceId] => 4019167990849536
)
  

Java

Event({
    "id": "5719405850615809",
    "log": {"id": "5155165527080961", "type": "created"},
    "created": "2022-06-01T00:00:00.000000+00:00",
    "isDelivered": false,
    "subscription": "credit-note",
    "workspaceId": "4019167990849536"
})
  

Ruby

event(
    id: 5719405850615809,
    log: credit_note_log(id: 5155165527080961, type: created),
    created: 2022-06-01T00:00:00.000000+00:00,
    is_delivered: false,
    subscription: credit-note,
    workspace_id: 4019167990849536
)
  

Elixir

%StarkInfra.Event{
    id: "5719405850615809",
    log: %StarkInfra.CreditNote.Log{id: "5155165527080961", type: "created"},
    created: "2022-06-01T00:00:00.000000+00:00",
    is_delivered: false,
    subscription: "credit-note",
    workspace_id: "4019167990849536"
}
  

C#

Event(
    Id: 5719405850615809,
    Log: CreditNote.Log(Id: 5155165527080961, Type: created),
    Created: 2022-06-01T00:00:00.000000+00:00,
    IsDelivered: False,
    Subscription: credit-note,
    WorkspaceId: 4019167990849536
)
  

Go

{
    Id:5719405850615809
    Log:{Id:5155165527080961 Type:created}
    Created:2022-06-01T00:00:00.000000+00:00
    IsDelivered:false
    Subscription:credit-note
    WorkspaceId:4019167990849536
}
  

Clojure

{:id "5719405850615809",
 :log {:id "5155165527080961" :type "created"},
 :created "2022-06-01T00:00:00.000000+00:00",
 :is-delivered false,
 :subscription "credit-note",
 :workspace-id "4019167990849536"}
  

Curl

{
    "event": {
        "id": "5719405850615809",
        "log": {
            "id": "5155165527080961",
            "type": "created"
        },
        "created": "2022-06-01T00:00:00.000000+00:00",
        "isDelivered": false,
        "subscription": "credit-note",
        "workspaceId": "4019167990849536"
    }
}
  

Delete an Event

Delete a single Event from the event list.

Note: This action cannot be undone.

Parameters

id REQUIRED

Id of the Event entity to be deleted.

ENDPOINT
DELETE /v2/event/:id
REQUEST

Python

import starkinfra

event = starkinfra.event.delete("5719405850615809")

print(event)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let event = await starkinfra.event.delete('5719405850615809');

    console.log(event);
})();
  

PHP

$event = StarkInfra\Event::delete("5719405850615809");

print_r($event);
  

Java

import com.starkinfra.*;

Event event = Event.delete("5719405850615809");

System.out.println(event);
  

Ruby

require('starkinfra')

event = StarkInfra::Event.delete("5719405850615809")

puts event
  

Elixir

event = StarkInfra.Event.delete!("5719405850615809")

event |> IO.inspect
  

C#

using System;

StarkInfra.Event starkEvent = StarkInfra.Event.Delete("5719405850615809");

Console.WriteLine(starkEvent);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/event"
)

func main() {

    starkEvent, err := event.Delete("5719405850615809", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", starkEvent)
}
  

Clojure

(def event (starkinfra.event/delete "5719405850615809"))

(println event)
  

Curl

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

Python

Event(
    id=5719405850615809,
    log=CreditNote.Log(id=5155165527080961, type=created),
    created=2022-06-01T00:00:00.000000+00:00,
    is_delivered=False,
    subscription=credit-note,
    workspace_id=4019167990849536
)
  

Javascript

Event {
    id: '5719405850615809',
    log: CreditNote.Log { id: '5155165527080961', type: 'created' },
    created: '2022-06-01T00:00:00.000000+00:00',
    isDelivered: false,
    subscription: 'credit-note',
    workspaceId: '4019167990849536'
}
  

PHP

StarkInfra\Event Object
(
    [id] => 5719405850615809
    [log] => StarkInfra\CreditNote\Log Object ( ... )
    [created] => 2022-06-01T00:00:00.000000+00:00
    [isDelivered] =>
    [subscription] => credit-note
    [workspaceId] => 4019167990849536
)
  

Java

Event({
    "id": "5719405850615809",
    "log": {"id": "5155165527080961", "type": "created"},
    "created": "2022-06-01T00:00:00.000000+00:00",
    "isDelivered": false,
    "subscription": "credit-note",
    "workspaceId": "4019167990849536"
})
  

Ruby

event(
    id: 5719405850615809,
    log: credit_note_log(id: 5155165527080961, type: created),
    created: 2022-06-01T00:00:00.000000+00:00,
    is_delivered: false,
    subscription: credit-note,
    workspace_id: 4019167990849536
)
  

Elixir

%StarkInfra.Event{
    id: "5719405850615809",
    log: %StarkInfra.CreditNote.Log{id: "5155165527080961", type: "created"},
    created: "2022-06-01T00:00:00.000000+00:00",
    is_delivered: false,
    subscription: "credit-note",
    workspace_id: "4019167990849536"
}
  

C#

Event(
    Id: 5719405850615809,
    Log: CreditNote.Log(Id: 5155165527080961, Type: created),
    Created: 2022-06-01T00:00:00.000000+00:00,
    IsDelivered: False,
    Subscription: credit-note,
    WorkspaceId: 4019167990849536
)
  

Go

{
    Id:5719405850615809
    Log:{Id:5155165527080961 Type:created}
    Created:2022-06-01T00:00:00.000000+00:00
    IsDelivered:false
    Subscription:credit-note
    WorkspaceId:4019167990849536
}
  

Clojure

{:id "5719405850615809",
 :log {:id "5155165527080961" :type "created"},
 :created "2022-06-01T00:00:00.000000+00:00",
 :is-delivered false,
 :subscription "credit-note",
 :workspace-id "4019167990849536"}
  

Curl

{
    "event": {
        "id": "5719405850615809",
        "log": {
            "id": "5155165527080961",
            "type": "created"
        },
        "created": "2022-06-01T00:00:00.000000+00:00",
        "isDelivered": false,
        "subscription": "credit-note",
        "workspaceId": "4019167990849536"
    }
}
  

Update an Event

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 stabilize your operations.

Parameters

id REQUIRED

Id of the event entity. Example: "5719405850615809"

isDelivered REQUIRED

Bool signaling if the Event has or hasn't been successfully delivered.

ENDPOINT
PATCH /v2/event/:id
REQUEST

Python

import starkinfra

event = starkinfra.event.update(
    "5719405850615809",
    is_delivered=True
)

print(event)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let event = await starkinfra.event.update(
        '5719405850615809',
        { isDelivered: true }
    );

    console.log(event);
})();
  

PHP

$event = StarkInfra\Event::update("5719405850615809", [
    "isDelivered" => true
]);

print_r($event);
  

Java

import com.starkinfra.*;
import java.util.HashMap;

HashMap<String, Object> data = new HashMap<>();
data.put("isDelivered", true);

Event event = Event.update("5719405850615809", data);

System.out.println(event);
  

Ruby

require('starkinfra')

event = StarkInfra::Event.update(
    "5719405850615809",
    is_delivered: true
)

puts event
  

Elixir

event = StarkInfra.Event.update!(
    "5719405850615809",
    is_delivered: true
)

event |> IO.inspect
  

C#

using System;

StarkInfra.Event starkEvent = StarkInfra.Event.Update(
    "5719405850615809",
    isDelivered: true
);

Console.WriteLine(starkEvent);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/event"
)

func main() {

    starkEvent, err := event.Update(
        "5719405850615809",
        event.Event{IsDelivered: true},
        nil,
    )
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", starkEvent)
}
  

Clojure

(def event
    (starkinfra.event/update
        "5719405850615809"
        {:is-delivered true}))

(println event)
  

Curl

curl --location --request PATCH '{{baseUrl}}/v2/event/5719405850615809' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "isDelivered": true
}'
  
RESPONSE

Python

Event(
    id=5719405850615809,
    log=CreditNote.Log(id=5155165527080961, type=created),
    created=2022-06-01T00:00:00.000000+00:00,
    is_delivered=True,
    subscription=credit-note,
    workspace_id=4019167990849536
)
  

Javascript

Event {
    id: '5719405850615809',
    log: CreditNote.Log { id: '5155165527080961', type: 'created' },
    created: '2022-06-01T00:00:00.000000+00:00',
    isDelivered: true,
    subscription: 'credit-note',
    workspaceId: '4019167990849536'
}
  

PHP

StarkInfra\Event Object
(
    [id] => 5719405850615809
    [log] => StarkInfra\CreditNote\Log Object ( ... )
    [created] => 2022-06-01T00:00:00.000000+00:00
    [isDelivered] => 1
    [subscription] => credit-note
    [workspaceId] => 4019167990849536
)
  

Java

Event({
    "id": "5719405850615809",
    "log": {"id": "5155165527080961", "type": "created"},
    "created": "2022-06-01T00:00:00.000000+00:00",
    "isDelivered": true,
    "subscription": "credit-note",
    "workspaceId": "4019167990849536"
})
  

Ruby

event(
    id: 5719405850615809,
    log: credit_note_log(id: 5155165527080961, type: created),
    created: 2022-06-01T00:00:00.000000+00:00,
    is_delivered: true,
    subscription: credit-note,
    workspace_id: 4019167990849536
)
  

Elixir

%StarkInfra.Event{
    id: "5719405850615809",
    log: %StarkInfra.CreditNote.Log{id: "5155165527080961", type: "created"},
    created: "2022-06-01T00:00:00.000000+00:00",
    is_delivered: true,
    subscription: "credit-note",
    workspace_id: "4019167990849536"
}
  

C#

Event(
    Id: 5719405850615809,
    Log: CreditNote.Log(Id: 5155165527080961, Type: created),
    Created: 2022-06-01T00:00:00.000000+00:00,
    IsDelivered: True,
    Subscription: credit-note,
    WorkspaceId: 4019167990849536
)
  

Go

{
    Id:5719405850615809
    Log:{Id:5155165527080961 Type:created}
    Created:2022-06-01T00:00:00.000000+00:00
    IsDelivered:true
    Subscription:credit-note
    WorkspaceId:4019167990849536
}
  

Clojure

{:id "5719405850615809",
 :log {:id "5155165527080961" :type "created"},
 :created "2022-06-01T00:00:00.000000+00:00",
 :is-delivered true,
 :subscription "credit-note",
 :workspace-id "4019167990849536"}
  

Curl

{
    "event": {
        "id": "5719405850615809",
        "log": {
            "id": "5155165527080961",
            "type": "created"
        },
        "created": "2022-06-01T00:00:00.000000+00:00",
        "isDelivered": true,
        "subscription": "credit-note",
        "workspaceId": "4019167990849536"
    }
}
  

Event Attempt

When an Event delivery fails, an event attempt will be registered. It carries information meant to help you debug event reception issues.

The Event Attempt object

Attributes

id STRING

Unique id for the event attempt.

code STRING

Delivery error code.

created STRING

Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00".

eventId STRING

ID of the associated Event.

message STRING

Delivery error description.

webhookId STRING

ID of the associated Webhook.

List failed Webhook Event delivery attempts

Get information on failed webhook event delivery attempts.

Parameters

after OPTIONAL

Filter entities created after this date.

before OPTIONAL

Filter entities created before this date.

cursor OPTIONAL

String used to get the next batch of results. Our SDKs handle this for you.

eventIds OPTIONAL

List of Event ids to filter attempts. Example: ["5656565656565656", "4545454545454545"]

limit OPTIONAL

Number of results per cursor. Max = 100.

webhookIds OPTIONAL

List of Webhook ids to filter attempts. Example: ["5656565656565656", "4545454545454545"]

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/event/attempt
REQUEST

Python

import starkinfra

attempts = starkinfra.event.attempt.query(limit=10)

for attempt in attempts:
    print(attempt)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let attempts = await starkinfra.event.attempt.query({ limit: 10 });

    for await (let attempt of attempts) {
        console.log(attempt);
    }
})();
  

PHP

$attempts = StarkInfra\Event\Attempt::query(["limit" => 10]);

foreach ($attempts as $attempt) {
    print_r($attempt);
}
  

Java

import com.starkinfra.*;
import com.starkinfra.utils.Generator;
import java.util.HashMap;

HashMap<String, Object> params = new HashMap<>();
params.put("limit", 10);
Generator<Event.Attempt> attempts = Event.Attempt.query(params);

for (Event.Attempt attempt : attempts) {
    System.out.println(attempt);
}
  

Ruby

require('starkinfra')

attempts = StarkInfra::Event::Attempt.query(limit: 10)

attempts.each do |attempt|
    puts attempt
end
  

Elixir

attempts = StarkInfra.Event.Attempt.query!(limit: 10)

for attempt <- attempts do
    attempt |> IO.inspect
end
  

C#

using System;
using System.Collections.Generic;

IEnumerable<StarkInfra.Event.Attempt> attempts = StarkInfra.Event.Attempt.Query(limit: 10);

foreach (StarkInfra.Event.Attempt attempt in attempts) {
    Console.WriteLine(attempt);
}
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/event/attempt"
)

func main() {

    var params = map[string]interface{}{}
    params["limit"] = 10

    attempts, errorChannel := attempt.Query(params, nil)

    loop:
    for {
        select {
        case err := <-errorChannel:
            if err.Errors != nil {
                for _, e := range err.Errors {
                    fmt.Printf("code: %s, message: %s", e.Code, e.Message)
                }
            }
        case eventAttempt, ok := <-attempts:
            if !ok {
                break loop
            }
            fmt.Printf("%+v", eventAttempt)
        }
    }
}
  

Clojure

(def attempts (starkinfra.event.attempt/query {:limit 10}))
(dorun (map println attempts))
  

Curl

curl --location --request GET '{{baseUrl}}/v2/event/attempt?limit=10' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Attempt(
    id=6891221774008321,
    code=CONNECTION_ERROR,
    message=Connection refused,
    event_id=5719405850615809,
    webhook_id=5601079539523584,
    created=2022-06-01T00:00:00.000000+00:00
)
  

Javascript

Attempt {
    id: '6891221774008321',
    code: 'CONNECTION_ERROR',
    message: 'Connection refused',
    eventId: '5719405850615809',
    webhookId: '5601079539523584',
    created: '2022-06-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\Event\Attempt Object
(
    [id] => 6891221774008321
    [code] => CONNECTION_ERROR
    [message] => Connection refused
    [eventId] => 5719405850615809
    [webhookId] => 5601079539523584
    [created] => 2022-06-01T00:00:00.000000+00:00
)
  

Java

Attempt({
    "id": "6891221774008321",
    "code": "CONNECTION_ERROR",
    "message": "Connection refused",
    "eventId": "5719405850615809",
    "webhookId": "5601079539523584",
    "created": "2022-06-01T00:00:00.000000+00:00"
})
  

Ruby

attempt(
    id: 6891221774008321,
    code: CONNECTION_ERROR,
    message: Connection refused,
    event_id: 5719405850615809,
    webhook_id: 5601079539523584,
    created: 2022-06-01T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.Event.Attempt{
    id: "6891221774008321",
    code: "CONNECTION_ERROR",
    message: "Connection refused",
    event_id: "5719405850615809",
    webhook_id: "5601079539523584",
    created: "2022-06-01T00:00:00.000000+00:00"
}
  

C#

Attempt(
    Id: 6891221774008321,
    Code: CONNECTION_ERROR,
    Message: Connection refused,
    EventId: 5719405850615809,
    WebhookId: 5601079539523584,
    Created: 2022-06-01T00:00:00.000000+00:00
)
  

Go

{
    Id:6891221774008321
    Code:CONNECTION_ERROR
    Message:Connection refused
    EventId:5719405850615809
    WebhookId:5601079539523584
    Created:2022-06-01T00:00:00.000000+00:00
}
  

Clojure

{:id "6891221774008321",
 :code "CONNECTION_ERROR",
 :message "Connection refused",
 :event-id "5719405850615809",
 :webhook-id "5601079539523584",
 :created "2022-06-01T00:00:00.000000+00:00"}
  

Curl

{
    "cursor": null,
    "attempts": [
        {
            "id": "6891221774008321",
            "code": "CONNECTION_ERROR",
            "message": "Connection refused",
            "eventId": "5719405850615809",
            "webhookId": "5601079539523584",
            "created": "2022-06-01T00:00:00.000000+00:00"
        }
    ]
}
  

Get an Event Attempt

Get a single event attempt by its id.

Parameters

id REQUIRED

Unique id of the event attempt entity.

fields OPTIONAL

List of strings to filter response JSON keys. Not available in the SDKs.

ENDPOINT
GET /v2/event/attempt/:id
REQUEST

Python

import starkinfra

attempt = starkinfra.event.attempt.get("6891221774008321")

print(attempt)
  

Javascript

const starkinfra = require('starkinfra');

(async() => {
    let attempt = await starkinfra.event.attempt.get('6891221774008321');
    console.log(attempt);
})();
  

PHP

$attempt = StarkInfra\Event\Attempt::get("6891221774008321");

print_r($attempt);
  

Java

import com.starkinfra.*;

Event.Attempt attempt = Event.Attempt.get("6891221774008321");

System.out.println(attempt);
  

Ruby

require('starkinfra')

attempt = StarkInfra::Event::Attempt.get('6891221774008321')

puts attempt
  

Elixir

attempt = StarkInfra.Event.Attempt.get!("6891221774008321")

attempt |> IO.inspect
  

C#

using System;

StarkInfra.Event.Attempt attempt = StarkInfra.Event.Attempt.Get("6891221774008321");

Console.WriteLine(attempt);
  

Go

package main

import (
    "fmt"
    "github.com/starkinfra/sdk-go/starkinfra/event/attempt"
)

func main() {

    eventAttempt, err := attempt.Get("6891221774008321", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Printf("%+v", eventAttempt)
}
  

Clojure

(def attempt (starkinfra.event.attempt/get "6891221774008321"))
(println attempt)
  

Curl

curl --location --request GET '{{baseUrl}}/v2/event/attempt/6891221774008321' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
RESPONSE

Python

Attempt(
    id=6891221774008321,
    code=CONNECTION_ERROR,
    message=Connection refused,
    event_id=5719405850615809,
    webhook_id=5601079539523584,
    created=2022-06-01T00:00:00.000000+00:00
)
  

Javascript

Attempt {
    id: '6891221774008321',
    code: 'CONNECTION_ERROR',
    message: 'Connection refused',
    eventId: '5719405850615809',
    webhookId: '5601079539523584',
    created: '2022-06-01T00:00:00.000000+00:00'
}
  

PHP

StarkInfra\Event\Attempt Object
(
    [id] => 6891221774008321
    [code] => CONNECTION_ERROR
    [message] => Connection refused
    [eventId] => 5719405850615809
    [webhookId] => 5601079539523584
    [created] => 2022-06-01T00:00:00.000000+00:00
)
  

Java

Attempt({
    "id": "6891221774008321",
    "code": "CONNECTION_ERROR",
    "message": "Connection refused",
    "eventId": "5719405850615809",
    "webhookId": "5601079539523584",
    "created": "2022-06-01T00:00:00.000000+00:00"
})
  

Ruby

attempt(
    id: 6891221774008321,
    code: CONNECTION_ERROR,
    message: Connection refused,
    event_id: 5719405850615809,
    webhook_id: 5601079539523584,
    created: 2022-06-01T00:00:00.000000+00:00
)
  

Elixir

%StarkInfra.Event.Attempt{
    id: "6891221774008321",
    code: "CONNECTION_ERROR",
    message: "Connection refused",
    event_id: "5719405850615809",
    webhook_id: "5601079539523584",
    created: "2022-06-01T00:00:00.000000+00:00"
}
  

C#

Attempt(
    Id: 6891221774008321,
    Code: CONNECTION_ERROR,
    Message: Connection refused,
    EventId: 5719405850615809,
    WebhookId: 5601079539523584,
    Created: 2022-06-01T00:00:00.000000+00:00
)
  

Go

{
    Id:6891221774008321
    Code:CONNECTION_ERROR
    Message:Connection refused
    EventId:5719405850615809
    WebhookId:5601079539523584
    Created:2022-06-01T00:00:00.000000+00:00
}
  

Clojure

{:id "6891221774008321",
 :code "CONNECTION_ERROR",
 :message "Connection refused",
 :event-id "5719405850615809",
 :webhook-id "5601079539523584",
 :created "2022-06-01T00:00:00.000000+00:00"}
  

Curl

{
    "attempt": {
        "id": "6891221774008321",
        "code": "CONNECTION_ERROR",
        "message": "Connection refused",
        "eventId": "5719405850615809",
        "webhookId": "5601079539523584",
        "created": "2022-06-01T00:00:00.000000+00:00"
    }
}