Get all payment initiation orders
1 min
orders
Get all payment initiation orders
GET
https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/orders
Path Parameters
- appIdstringrequiredDescription
Query Parameters
- pageSizestringDescription
- cursorstringDescription
- startDatestringDescription
- endDatestringDescription
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
- firstPaymentbooleanDescription
- originalPaymentIdstringDescription
- authorisationFlowstringDescription
curl
curl --location --globoff 'https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/orders/' \
--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/',
'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", 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"
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")
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
{
"data": [{
"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": "11111111111", // 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"
}
}],
"paging": {
"nextCursor": "eyJjcmVhdGVkX2F0IjnBheW1lbnRfaWQiOiJwYXlfMTIzIn0", // Optional
"prevCursor": "eyJjcmVhdGVkX2F0IjnBheW1lbnRfaWQiOiJwYXlfMTEwIn0", // Optional
"hasNext": true, // Required
"hasPrev": true // Required
}
}