Get a payment initiation order
1 min
orders
Get a payment initiation order
GET
https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/orders/{Id}
Path Parameters
- appIdstringrequiredDescription
- idstringrequiredDescription
Header Parameters
- AuthorizationstringrequiredDescription
Response
- idstringDescription
- appIdstringDescription
- clientRequestIdstringDescription
- institutionIdstringDescription
- customerobjectDescription
- identifierTypestringDescription
- identifierstringDescription
- namestringDescription
- phonestringDescription
- emailstringDescription
- datestringDescription
- consentIdstringDescription
- endToEndIdstringDescription
- transactionIdentificationstringDescription
- loggedUserCPFstringDescription
- ibgeTownCodestringDescription
- proxystringDescription
- qrCodestringDescription
- initTypestringDescription
- amountstringDescription
- currencystringDescription
- remittanceInformationstringDescription
- debtorAccountobjectDescription
- ispbstringDescription
- issuerstringDescription
- numberstringDescription
- accountTypestringDescription
- creditorAccountobjectDescription
- ispbstringDescription
- issuerstringDescription
- numberstringDescription
- accountTypestringDescription
- holderobjectDescription
- identifierstringDescription
- namestringDescription
- identifierTypestringDescription
- externalInfoobjectDescription
- keystring
- cancellationobjectDescription
- cancelledFromstringDescription
- cancelledAtstringDescription
- cancelledByobjectDescription
- identifierstringDescription
- identifierTypestringDescription
- statusstringDescription
- statusReasonobjectDescription
- codestringDescription
- messagestringDescription
- createAtstringDescription
- statusUpdateAtstringDescription
- paymentMethodstringDescription
- paymentMethodConfigobjectDescription
- firstPaymentstringDescription
- originalPaymentIdstringDescription
- authorisationFlowstringDescription
- paymentReferencestringDescription
- retriesobjectDescription
- idstringDescription
- appIdstringDescription
- clientRequestIdstringDescription
- institutionIdstringDescription
- customerobjectDescription
- identifierTypestringDescription
- identifierstringDescription
- namestringDescription
- phone stringDescription
- emailstringDescription
- datestringDescription
- consentIdstringDescription
- endToEndIdstringDescription
- ibgeTownCodestringDescription
- amountstringDescription
- currencystringDescription
- remittanceInformationstringDescription
- debtorAccountobjectDescription
- ispbstringDescription
- issuerstringDescription
- numberstringDescription
- accountTypestringDescription
- creditorAccountobjectDescription
- ispbstringDescription
- issuerstringDescription
- numberstringDescription
- accountTypestringDescription
- holderobjectDescription
- identifierstringDescription
- identifierTypestringDescription
- namestringDescription
- externalInfoobjectDescription
- cancellationobject
- cancelledFromstring
- cancelledAtstringDescription
- cancelledByobject
- identifierstringDescription
- identifierTypestringDescription
- statusstringDescription
- statusReasonobjectDescription
- codestringDescription
- messagestringDescription
- createAtstringDescription
- statusUpdateAtstringDescription
- firstPaymentbooleanDescription
- originalPaymentIdstringDescription
curl
curl --location --globoff 'https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/orders/{id}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'nodejs
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/orders/{id}',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/orders/{id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/orders/{id}"
payload = {}
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/orders/{id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
response = https.request(request)
puts response.read_body
200
{
"id": "fcb72e3a-b346-4f71-b044-971dc23232c9", // Required
"appId": "0b59d801-08e0-4e84-9ecd-569f34e32279", // Required
"clientRequestId": "fcb72e3a-b346-4f71-b044-dsndsnmnkdsmk", // Required
"institutionId": "c8f0bf49-4744-4933-8960-7add6e590841", // Required
"customer": {
"identifierType": "CPF", // Required, CPF | CNPJ
"identifier": "76109277673", // Required
"name": "João Silva", // Optional
"phone": "12345", // Optional
"email": "[email protected]" // Optional
}, // Required
"date": "2023-01-23", // Required, utc -3
"consentId": "yyt72e3a-b846-i771-b044-971dc232ujd8", // Required
"endToEndId": "E9040088820210128000800123873170", // Required after the status CONSENT_AUTHORIZED
"transactionIdentification": "cxf0bf49-4744-4933-8960-7add6e5908cc", // Optional
"loggedUserCPF": "76109277673", // required if customer.identifierType = CNPJ
"ibgeTownCode": "5300108", // Optional
"proxy": "xxxxx", // Required if method = PIX_DICT
"qrCode": "xxxxx", // Required if method = PIX_QRCODE
"initType": "PIX_INIC", // Required
"amount": "1333.04", // Required
"currency": "BRL", // Required
"remittanceInformation": "Any description", // Optinal, payment description
"debtorAccount": {
"ispb": "00000000", // Required, ISPB (Brazilian Payment System Identifier) of the SPI (Instant Payment System)
"issuer": "0001", // Optional, Code of the issuing Agency of the account without digit.
"number": "324223", // Required, account number
"accountType": "CACC" // Required, CACC(Current Account)|SVGS(Savings Account)|TRAN(TransactingAccount)
}, // Optinal, payer's account
"creditorAccount": {
"ispb": "00000000", // Required
"issuer": "0001", // Optional
"number": "324223", // Required
"accountType": "CACC", // Required
"holder": {
"identifier": "76109277673", // Required
"name": "John Doe", // Required
"identifierType": "CPF" // Required
} // Required
}, // Required if mthod = PIX_MANU
"externalInfo": {
"key": "value"
}, // Optional
"cancellation": {
"cancelledFrom": "MERCHANT", // Required, the cancellation source, MERCHANT|INITIATOR|INSTITUTION
"cancelledAt": "2021-05-21T08:30:00Z", // Required
"cancelledBy": {
"identifier": "76109277673", // Required
"identifierType": "CPF" // Required
} // Required
}, // Required if the status is CANCELED
"status": "CANCELED", // Required
"statusReason": {
"code": "NAO_INFORMADO", // Required
"message": "Erro não informado na iniciadora ou detentora de conta." // Required
}, // Optional
"createAt": "2023-01-23T14:17:06.45Z", // Required
"statusUpdateAt": "2023-01-23T14:17:06.45Z", // Required
"paymentMethod": "AUTOMATIC_PIX",
"paymentMethodConfig": {
"firstPayment": false,
"originalPaymentId": "fcb72e3a-b346-4f71-b044-971dc23231b1",
},
"authorisationFlow": "JSR_FLOW",
"retries": [
{
"id": "36970380-8f6a-4303-b2a8-dbd0ef532664",
"appId": "ax2regress",
"clientRequestId": "retry1",
"institutionId": "c8f0bf49-4744-4933-8960-7add6e590841",
"customer": {
"identifierType": "CPF",
"identifier": "***.092.776-**",
"name": "Kbms 10086",
"phone": "12*******00",
"email": "q***@klavi.ai"
},
"date": "2025-09-08",
"consentId": "17d9d5be-073f-4706-86d4-8fdd36b90aed",
"endToEndId": "E4445979920250908132400000000000",
"ibgeTownCode": "",
"amount": "90.1200",
"currency": "BRL",
"remittanceInformation": "batata",
"debtorAccount": {
"ispb": "",
"issuer": "",
"number": "",
"accountType": ""
},
"creditorAccount": {
"ispb": "00000000",
"issuer": "****",
"number": "******",
"accountType": "CACC",
"holder": {
"identifier": "**.***.708/0001-**",
"identifierType": "CNPJ",
"name": "John Doe"
}
},
"externalInfo": {
"batata": "batata"
},
"cancellation": {
"cancelledFrom": "",
"cancelledAt": "",
"cancelledBy": {
"identifier": "",
"identifierType": ""
}
},
"status": "PAYMENT_REJECTED",
"statusReason": {
"code": "UNKNOWN",
"message": "unknown server error"
},
"createAt": "2025-09-07T21:25:00Z",
"statusUpdateAt": "2025-09-07T21:25:10Z",
"firstPayment": false,
"originalPaymentId": "6aef77ea-f4e1-44c2-92af-f5cda0413154"
}
]
}