MED
MED is Bacen's Special Return Mechanism (Mecanismo Especial de Devolução), the framework Pix participants use to dispute, return and report problematic transactions.
Through MED, participants open and answer infractions against suspicious Pix transactions, request and respond to chargebacks to refund disputed payments, and report or consult fraud markers registered against payers in Bacen's systems.
This guide walks you through every MED resource: opening and answering infractions, requesting chargebacks, reporting and consulting fraud markers, and handling disputes via MED 2.0.
Pix Infraction Overview
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:
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:
| Status | Description |
|---|---|
| Created | The Pix Infraction was successfully created at Stark Infra. |
| Failed | The Pix Infraction could not be processed. |
| Delivered | The Pix Infraction was delivered to the other party. |
| Closed | The Pix Infraction was answered and the other party accepted or rejected it. |
| Canceled | The 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:
For inbound Pix Infractions:
| Log type | Status | Description |
|---|---|---|
| Created | Created | The Pix Infraction was successfully created at Stark Infra. |
| Failed | Failed | The Pix Infraction could not be processed. |
| Delivered | Delivered | The Pix Infraction was delivered to the other party. |
| Closed | Closed | The Pix Infraction was answered and the other party accepted or rejected it. |
| Canceled | Canceled | The Pix Infraction was canceled. |
Sending a Pix Infraction
Create a Pix Infraction to report a Pix transaction suspected of fraud. The Central Bank keeps track of the number of closed infractions for each Pix Key so participants can monitor possible fraudulent accounts.

Parameters
Receiving a Pix Infraction
When another participant reports an infraction against one of your transactions, an inbound Pix Infraction is created for you to analyze and answer within 7 days of delivery.

Parameters
The Pix Infraction Object
Attributes
id
Unique id for the Pix infraction.
referenceId
End-to-end id of the transaction the infraction refers to.
type
Type of infraction. Options: "fraud", "reversal", "reversalChargeback".
method
Fraud method. Options: "scam", "invasion", "other", "unauthorized", "coercion", "unknown".
operatorEmail
Contact email of the operator responsible for the Pix infraction.
operatorPhone
Contact phone number of the operator responsible for the Pix infraction.
fraudId
Id of the Pix fraud marking associated with the infraction.
fraudType
Type of fraud associated with the infraction. Options: "identity", "mule", "scam", "other", "unknown".
description
Description of the infraction.
analysis
Analysis text that justifies the result of the infraction report.
tags
Tags associated with the Pix infraction.
bacenId
Id of the infraction at the Brazilian Central Bank.
disputeId
Id of the Pix dispute associated with the infraction.
amount
Amount in cents related to the infraction. Example: 1234 (= R$ 12.34).
flow
Direction of the infraction report. Options: "out" (reported by you), "in" (reported against you).
status
Current status. Options: "created", "failed", "delivered", "closed", "canceled".
creditedBankCode
Bank ISPB code of the credited party.
debitedBankCode
Bank ISPB code of the debited party.
reportedBy
Institution that reported the infraction. Options: "debited", "credited".
result
Result of the infraction analysis. Options: "agreed", "disagreed".
created
Creation datetime. Example: "2020-04-23T23:00:00.000000+00:00".
updated
Last update datetime. Example: "2020-04-23T23:00:00.000000+00:00".
Listing Pix Infractions
List and filter all Pix infractions. Results are paged.
Parameters
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; HashMapparams = 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; IEnumerableinfractions = 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}}'
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"
}
]
}
Getting a Pix Infraction
Get a single Pix infraction by its id.
Parameters
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}}'
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"
}
}
Updating 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
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; HashMapdata = 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; Dictionarydata = 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."
}'
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"
}
}
Canceling a Pix Infraction
Cancel a Pix infraction you reported.
Parameters
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}}'
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"
}
}
Pix Chargeback Overview
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 Chargebacks you receive (inbound) follow this life cycle:
| Status | Description |
|---|---|
| Created | The Pix Chargeback was successfully created at Stark Infra. |
| Failed | The Pix Chargeback could not be processed. |
| Delivered | The Pix Chargeback was delivered to the other participant for analysis. |
| Closed | The Pix Chargeback was answered and resolved by the other participant. |
| Canceled | The 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:
For inbound Pix Chargebacks:
| Log type | Status | Description |
|---|---|---|
| Created | Created | The Pix Chargeback was successfully created at Stark Infra. |
| Failed | Failed | The Pix Chargeback could not be processed. |
| Delivered | Delivered | The Pix Chargeback was delivered to the other participant for analysis. |
| Closed | Closed | The Pix Chargeback was answered and resolved by the other participant. |
| Canceled | Canceled | The Pix Chargeback was canceled before being closed. |
Receiving a Pix Chargeback
When another participant requests a chargeback against one of your transactions, an inbound Pix Chargeback is created, which you must analyze and answer within 24 hours.

Parameters
The Pix Chargeback Object
Attributes
id
Unique id for the Pix chargeback.
amount
Amount in cents to be charged back.
referenceId
End-to-end ID of the original Pix transaction.
reason
Reason for the chargeback. Options: "fraud", "flaw", "reversalChargeback".
result
Result of the chargeback. Options: "rejected", "accepted", "partiallyAccepted".
analysis
Analysis text from the responding party.
description
Description of the chargeback request.
senderBankCode
Bank ISPB code of the sender in the original transaction.
receiverBankCode
Bank ISPB code of the receiver in the original transaction.
rejectionReason
Reason for rejection if the chargeback was not agreed. Options: "other", "noBalance", "accountClosed", "invalidRequest".
bacenId
Central Bank ID for this Pix chargeback.
disputeId
Unique id of the Pix dispute associated with the chargeback.
isMonitoringRequired
Indicates whether monitoring is required for this chargeback.
reversalBankCode
Bank ISPB code of the account that received the reversal.
reversalBranchCode
Branch code of the account that received the reversal.
reversalAccountNumber
Number of the account that received the reversal.
reversalAccountType
Type of the account that received the reversal. Options: "checking", "savings", "salary", "payment", "other".
reversalTaxId
Tax ID (CPF/CNPJ) of the account that received the reversal.
status
Current status. Options: "created", "failed", "delivered", "closed", "canceled".
tags
Tags associated with the Pix chargeback.
flow
Direction of the chargeback. Options: "out" (you requested), "in" (requested against you).
created
Creation datetime. Example: "2020-04-23T23:00:00.000000+00:00".
updated
Last update datetime. Example: "2020-04-23T23:00:00.000000+00:00".
Creating 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
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; Listchargebacks = 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; Listchargebacks = 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"]
}
]
}'
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"
}
]
}
Listing Pix Chargebacks
List and filter all Pix chargebacks. Results are paged.
Parameters
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; HashMapparams = 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; IEnumerablechargebacks = 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}}'
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"
}
]
}
Getting a Pix Chargeback
Get a single Pix chargeback by its id.
Parameters
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}}'
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"
}
}
Updating a Pix Chargeback
Respond to an incoming Pix chargeback request.
Parameters
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; HashMapdata = 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."
}'
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"
}
}
Canceling a Pix Chargeback
Cancel a Pix chargeback you requested.
Parameters
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}}'
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"
}
}
Pix Fraud Overview
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
Unique id for the Pix fraud report.
externalId
Unique external ID to prevent duplicates.
type
Type of fraud. Options: "identity", "mule", "scam", "other", "unknown".
taxId
CPF or CNPJ of the fraudster.
keyId
Pix key associated with the fraud.
bacenId
Central Bank ID for this fraud report.
status
Current status. Options: "created", "failed", "registered", "canceled".
tags
Tags associated with the Pix fraud report.
created
Creation datetime. Example: "2020-04-23T23:00:00.000000+00:00".
updated
Last update datetime. Example: "2020-04-23T23:00:00.000000+00:00".
Creating Pix Fraud Reports
Report a fraudulent user or Pix key to DICT.
Parameters
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; Listfrauds = 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; Listfrauds = 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"]
}
]
}'
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"
}
]
}
Listing Pix Fraud Reports
List and filter all Pix fraud reports. Results are paged.
Parameters
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; HashMapparams = 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; IEnumerablefrauds = 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}}'
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"
}
]
}
Getting a Pix Fraud Report
Get a single Pix fraud report by its id.
Parameters
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}}'
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"
}
}
Canceling a Pix Fraud Report
Cancel a Pix fraud report you submitted.
Parameters
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}}'
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"
}
}
Pix Dispute Overview
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
Unique id for the Pix dispute.
referenceId
End-to-end ID of the original Pix transaction.
bacenId
Central Bank's unique ID for the Pix dispute.
method
Method of the dispute. Options: "scam", "unauthorized", "coercion", "invasion", "other", "unknown".
description
Description of the Pix dispute.
operatorEmail
Contact email of the operator responsible for the Pix dispute.
operatorPhone
Contact phone number of the operator responsible for the Pix dispute.
status
Current status. Options: "created", "failed", "delivered", "analysed", "processing", "closed", "canceled".
tags
Tags associated with the Pix dispute.
flow
Direction of the dispute. Options: "out" (you initiated), "in" (raised against you).
minTransactionAmount
Minimum amount in cents of the transactions to be tracked in the dispute.
maxTransactionCount
Maximum number of transactions to be tracked in the dispute.
maxHopCount
Maximum number of hops to be tracked in the dispute.
maxHopInterval
Maximum interval in seconds between hops to be tracked in the dispute.
transactions
List of transaction objects tracked in the dispute.
transactions.endToEndId
End-to-end ID of the tracked Pix transaction.
transactions.amount
Transaction amount in cents.
transactions.nominalAmount
Refundable amount in cents of the transaction.
transactions.senderId
Bacen-generated pseudo ID for the sender, used only for transaction-tracking context (not a real account identifier).
transactions.senderType
Type of the sender entity. Options: "individual", "business".
transactions.senderTaxIdCreated
Returned only for CNPJ tax IDs: the date the sender company was opened. Example: "2020-04-23T23:00:00.000000+00:00".
transactions.senderAccountCreated
Datetime when the sender's account was opened. Example: "2020-04-23T23:00:00.000000+00:00".
transactions.senderBankCode
Bank code of the sender's institution.
transactions.receiverId
Bacen-generated pseudo ID for the receiver, used only for transaction-tracking context (not a real account identifier).
transactions.receiverType
Type of the receiver entity. Options: "individual", "business".
transactions.receiverTaxIdCreated
Returned only for CNPJ tax IDs: the date the receiver company was opened. Example: "2020-04-23T23:00:00.000000+00:00".
transactions.receiverAccountCreated
Datetime when the receiver's account was opened. Example: "2020-04-23T23:00:00.000000+00:00".
transactions.receiverBankCode
Bank code of the receiver's institution.
transactions.settled
Datetime when the transaction was settled. Example: "2020-04-23T23:00:00.000000+00:00".
created
Creation datetime. Example: "2020-04-23T23:00:00.000000+00:00".
updated
Last update datetime. Example: "2020-04-23T23:00:00.000000+00:00".
Creating Pix Disputes
Initiate a Pix dispute for a transaction.
Parameters
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; Listdisputes = 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; Listdisputes = 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"]
}
]
}'
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"
}
]
}
Listing Pix Disputes
List and filter all Pix disputes. Results are paged.
Parameters
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; HashMapparams = 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; IEnumerabledisputes = 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}}'
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"
}
]
}
Getting a Pix Dispute
Get a single Pix dispute by its id.
Parameters
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}}'
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"
}
}
Canceling a Pix Dispute
Cancel a Pix dispute you initiated.
Parameters
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}}'
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"
}
}