Get invoices
curl --request GET \
--url https://api.yume.cloud/v1/billing/invoices/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.yume.cloud/v1/billing/invoices/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.yume.cloud/v1/billing/invoices/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yume.cloud/v1/billing/invoices/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yume.cloud/v1/billing/invoices/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yume.cloud/v1/billing/invoices/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yume.cloud/v1/billing/invoices/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 123,
"results": [
{
"id": 123,
"tenant": 123,
"card": 123,
"card_detail": {
"id": 123,
"tenant": 123,
"status": "ok",
"card_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"bank_alias": "<string>",
"brand_alias": "<string>",
"expiry_year": "<string>",
"expiry_month": "<string>",
"active": true,
"recurring": true
},
"currency": "KZT",
"status": "waiting",
"variant": "freedom",
"total": "<string>",
"captured_amount": "<string>",
"refund_amount": "<string>",
"captured_at": "2023-11-07T05:31:56Z",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": 123,
"integration": {
"id": 123,
"code": "<string>",
"name": "<string>",
"slug": "<string>",
"comment": "<string>",
"slogan": "<string>",
"type": "integration",
"detail": "<string>",
"icon": "<string>",
"image": "<string>",
"image_alt": "<string>",
"disabled": true,
"extra": null,
"demo_duration": "<string>",
"tags": [
"free"
],
"modules": [
"finance"
],
"visable": true
},
"variant": {
"id": 123,
"name": "<string>",
"code": "<string>",
"limits": [
"<string>"
]
},
"period": {
"id": 123,
"variant": {
"id": 123,
"name": "<string>",
"code": "<string>",
"limits": [
"<string>"
]
},
"type": "period",
"integration": 123,
"currency": "KZT",
"months": 1,
"price": "<string>",
"amount": -1,
"tenant": 123
},
"label": "<string>",
"invoice": 123,
"type": "integration",
"start_at": "2023-12-25",
"end_at": "2023-12-25",
"count": 16383,
"price": "<string>",
"amount": "<string>",
"integration_period": 123
}
],
"errors": [
{
"id": 123,
"code": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"invoice": 123
}
],
"transaction_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"payment_details": "<string>",
"kaspi": {}
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}invoices
Get invoices
Turn a Kaspi outage into an honest status code instead of a 500.
A dead platform session is a 409 (the same shape the per-company integration answers with), Kaspi refusing the request is a 400, and the service being unreachable is a 502 — the payer can retry that one.
GET
/
v1
/
billing
/
invoices
/
Get invoices
curl --request GET \
--url https://api.yume.cloud/v1/billing/invoices/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.yume.cloud/v1/billing/invoices/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.yume.cloud/v1/billing/invoices/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yume.cloud/v1/billing/invoices/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yume.cloud/v1/billing/invoices/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yume.cloud/v1/billing/invoices/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yume.cloud/v1/billing/invoices/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 123,
"results": [
{
"id": 123,
"tenant": 123,
"card": 123,
"card_detail": {
"id": 123,
"tenant": 123,
"status": "ok",
"card_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"bank_alias": "<string>",
"brand_alias": "<string>",
"expiry_year": "<string>",
"expiry_month": "<string>",
"active": true,
"recurring": true
},
"currency": "KZT",
"status": "waiting",
"variant": "freedom",
"total": "<string>",
"captured_amount": "<string>",
"refund_amount": "<string>",
"captured_at": "2023-11-07T05:31:56Z",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": 123,
"integration": {
"id": 123,
"code": "<string>",
"name": "<string>",
"slug": "<string>",
"comment": "<string>",
"slogan": "<string>",
"type": "integration",
"detail": "<string>",
"icon": "<string>",
"image": "<string>",
"image_alt": "<string>",
"disabled": true,
"extra": null,
"demo_duration": "<string>",
"tags": [
"free"
],
"modules": [
"finance"
],
"visable": true
},
"variant": {
"id": 123,
"name": "<string>",
"code": "<string>",
"limits": [
"<string>"
]
},
"period": {
"id": 123,
"variant": {
"id": 123,
"name": "<string>",
"code": "<string>",
"limits": [
"<string>"
]
},
"type": "period",
"integration": 123,
"currency": "KZT",
"months": 1,
"price": "<string>",
"amount": -1,
"tenant": 123
},
"label": "<string>",
"invoice": 123,
"type": "integration",
"start_at": "2023-12-25",
"end_at": "2023-12-25",
"count": 16383,
"price": "<string>",
"amount": "<string>",
"integration_period": 123
}
],
"errors": [
{
"id": 123,
"code": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"invoice": 123
}
],
"transaction_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"payment_details": "<string>",
"kaspi": {}
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}Авторизации
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Заголовки
Компания, в контексте которой выполняется запрос — её id из GET /v1/tenant/. Пользователь должен состоять в этой компании: чужой id доступа к данным не даёт. Без заголовка компания определяется по домену запроса.
Параметры запроса
A page number within the paginated result set.
Number of results to return per page.