cURL
curl --request GET \
--url http://127.0.0.1:8080/v1/c/invoice \
--header 'wb-key: <api-key>'import requests
url = "http://127.0.0.1:8080/v1/c/invoice"
headers = {"wb-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'wb-key': '<api-key>'}};
fetch('http://127.0.0.1:8080/v1/c/invoice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://127.0.0.1:8080/v1/c/invoice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"wb-key: <api-key>"
],
]);
$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 := "http://127.0.0.1:8080/v1/c/invoice"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("wb-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://127.0.0.1:8080/v1/c/invoice")
.header("wb-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/invoice")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["wb-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"current_page": 123,
"hits": [
{
"detailed_invoice_status": "pending_validation",
"invoice": {
"currency": "usd",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"date": "2023-11-07T05:31:56Z",
"deposit_transaction_status": "not_processed",
"due_date": "2023-11-07T05:31:56Z",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"invoice_number": {
"number": "<string>"
},
"status": "pending_validation",
"total": "<string>",
"deposit_transaction_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"external_reference": "<string>"
},
"payment_execution_provider": "stripe",
"payment_execution_status": "pending"
}
],
"total": 123,
"total_pages": 123,
"backward": "<string>",
"first": "<string>",
"forward": "<string>",
"last": "<string>"
}Invoices
List Invoices
Retrieve a list of all your invoices filtered by various parameters and their payment status.
GET
/
v1
/
c
/
invoice
cURL
curl --request GET \
--url http://127.0.0.1:8080/v1/c/invoice \
--header 'wb-key: <api-key>'import requests
url = "http://127.0.0.1:8080/v1/c/invoice"
headers = {"wb-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'wb-key': '<api-key>'}};
fetch('http://127.0.0.1:8080/v1/c/invoice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://127.0.0.1:8080/v1/c/invoice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"wb-key: <api-key>"
],
]);
$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 := "http://127.0.0.1:8080/v1/c/invoice"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("wb-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://127.0.0.1:8080/v1/c/invoice")
.header("wb-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/invoice")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["wb-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"current_page": 123,
"hits": [
{
"detailed_invoice_status": "pending_validation",
"invoice": {
"currency": "usd",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"date": "2023-11-07T05:31:56Z",
"deposit_transaction_status": "not_processed",
"due_date": "2023-11-07T05:31:56Z",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"invoice_number": {
"number": "<string>"
},
"status": "pending_validation",
"total": "<string>",
"deposit_transaction_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"external_reference": "<string>"
},
"payment_execution_provider": "stripe",
"payment_execution_status": "pending"
}
],
"total": 123,
"total_pages": 123,
"backward": "<string>",
"first": "<string>",
"forward": "<string>",
"last": "<string>"
}Query Parameters
Response
200 - application/json
List of invoices
A paginated result of the requested resource This is based on Keyset Pagination https://vladmihalcea.com/sql-seek-keyset-pagination/