List All Invoices
You can list all invoices, or list the invoices for a specific updated time. The invoices are returned sorted by created date, with the most recently created invoices appearing first.
Attributes
external_id
string
The external id used during generation of invoice. Given that external_id is non-unique, by including external_id, it will return all invoices with that specific external_id.
statuses
array of strings
Indicates the status of the invoices that will be available in the list. It contains PENDING, PAID, SETTLED, EXPIRED.
example : ["SETTLED","EXPIRED"]
limit
number
A limit on the number of invoice objects to be returned. Limit can range between 1 and 100.
created_after
string (ISO 8601)
Return invoices where the created field is greater than this value. Both created_after and created_before field should be used in the same time for the filter to take effect.
Example :
2016-02-24T23:48:36.697Zcreated_before
string (ISO 8601)
Return invoices where the created field is less than this value.
Both created_after and created_before field should be used in the same time for the filter to take effect.
Example :
2016-02-24T23:48:36.697Zpaid_after
string (ISO 8601)
Return invoices where the paid_at field is greater than this value.
Both paid_after and paid_before field should be used in the same time for the filter to take effect.
Example :
2016-02-24T23:48:36.697Zpaid_before
string (ISO 8601)
Return invoices where the paid_at field is less than this value.
Both paid_after and paid_before field should be used in the same time for the filter to take effect.
Example :
2016-02-24T23:48:36.697Zexpired_after
string (ISO 8601)
Return invoices where the expiry_date field is less than this value.
Both expired_after and expired_before field should be used in the same time for the filter to take effect.
Example :
2016-02-24T23:48:36.697Zlast_invoice_id
string
A cursor for use in pagination.
last_invoice_id is an invoice ID that defines your starting point for the list. For instance, if you make a list request and receive 10 objects, starting with obj_bar, your subsequent call can include last_invoice_id=obj_bar in order to fetch the previous page of the list.
client_types
array of strings
Indicates the method used to create the invoice. It contains:
API_GATEWAY Invoice created via create invoice API
DASHBOARD Invoice created via dashboard
INTEGRATION Invoice created via 3rd party integration such as Shopify and Woocommerce
ON_DEMAND Invoice created via On Demand
RECURRING Invoice created via Recurring Payment
MOBILE Invoice created via Mobile App.
example :
["DASHBOARD","API_GATEWAY"]payment_channels
array of strings
Indicates the channels used to pay the invoice.
on_demand_link
string
The link for the specific on demand. If you input on_demand_link, it will return invoices that created from that specific on demand link.
recurring_payment_id
string
The recurring payment id for specific recurring payment, it will return invoices that created from that specific recurring payment id.
GET https://us-central1-appgregator.cloudfunctions.net/xendit/invoices/
Headers
x-api-key*
String
U2Fsd...
[
{
"id": "62f094097098f7678f55fc3f",
"external_id": "INV0055/VIII/2022",
"user_id": "6279ce4495d10c9afc3171b8",
"payment_method": "BANK_TRANSFER",
"status": "SETTLED",
"merchant_name": "aplikasi keuangan",
"merchant_profile_picture_url": "https://du8nwjtfkinx.cloudfront.net/xendit.png",
"amount": 8500000,
"paid_amount": 8500000,
"bank_code": "MANDIRI",
"paid_at": "2022-08-08T04:42:11.099Z",
"description": "Invoice Demo #INV0055",
"expiry_date": "2022-08-09T04:41:45.227Z",
"invoice_url": "https://checkout-staging.xendit.co/web/62f094097098f7678f55fc3f",
"available_banks": [
{
"bank_code": "MANDIRI",
"collection_type": "POOL",
"bank_account_number": "8860874135163",
"transfer_amount": 8500000,
"bank_branch": "Virtual Account",
"account_holder_name": "APLIKASI KEUANGAN",
"identity_amount": 0
},
{
"bank_code": "BRI",
"collection_type": "POOL",
"transfer_amount": 8500000,
"bank_branch": "Virtual Account",
"account_holder_name": "APLIKASI KEUANGAN",
"identity_amount": 0
},
{
"bank_code": "BNI",
"collection_type": "POOL",
"transfer_amount": 8500000,
"bank_branch": "Virtual Account",
"account_holder_name": "APLIKASI KEUANGAN",
"identity_amount": 0
},
{
"bank_code": "PERMATA",
"collection_type": "POOL",
"transfer_amount": 8500000,
"bank_branch": "Virtual Account",
"account_holder_name": "APLIKASI KEUANGAN",
"identity_amount": 0
},
{
"bank_code": "BCA",
"collection_type": "POOL",
"transfer_amount": 8500000,
"bank_branch": "Virtual Account",
"account_holder_name": "APLIKASI KEUANGAN",
"identity_amount": 0
}
],
"available_retail_outlets": [
{
"retail_outlet_name": "ALFAMART"
},
{
"retail_outlet_name": "INDOMARET"
}
],
"available_ewallets": [
{
"ewallet_type": "OVO"
},
{
"ewallet_type": "DANA"
},
{
"ewallet_type": "SHOPEEPAY"
},
{
"ewallet_type": "LINKAJA"
}
],
"available_direct_debits": [
{
"direct_debit_type": "DD_BRI"
}
],
"available_paylaters": [],
"should_exclude_credit_card": false,
"adjusted_received_amount": 8495005,
"should_send_email": false,
"success_redirect_url": "https://projeq.id/?status=success&external_id=INV0035/VIII/2022",
"failure_redirect_url": "https://projeq.id/?status=failure&external_id=INV0035/VIII/2022",
"created": "2022-08-08T04:41:46.049Z",
"updated": "2022-08-08T04:42:11.411Z",
"currency": "IDR",
"initial_amount": 8500000,
"payment_channel": "MANDIRI",
"payment_destination": "8860874135163",
"customer": {
"given_names": "John",
"surname": "Doe",
"email": "johndoe@example.com",
"mobile_number": "+6287774441111",
"addresses": [
{
"city": "Jakarta Selatan",
"country": "Indonesia",
"postal_code": "12345",
"state": "Daerah Khusus Ibukota Jakarta",
"street_line1": "Jalan Makan",
"street_line2": "Kecamatan Kebayoran Baru"
}
]
}
}
]curl --location -g --request GET 'https://us-central1-appgregator.cloudfunctions.net/xendit/invoices?name=ft-4&connection_name=xendit-sanbox-1&limit=1&statuses=["SETTLED","EXPIRED"]' \
--header 'x-api-key: U2Fsd...'var axios = require('axios');
var config = {
method: 'get',
url: 'https://us-central1-appgregator.cloudfunctions.net/xendit/invoices?name=ft-4&connection_name=xendit-sanbox-1&limit=1&statuses=["SETTLED","EXPIRED"]',
headers: {
'x-api-key': 'U2Fsd...'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/xendit/invoices?name=ft-4&connection_name=xendit-sanbox-1&limit=1&statuses=%5B%22SETTLED%22,%22EXPIRED%22%5D',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-api-key: U2FsdG...'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Last updated