Invoices
List invoices
Developer API operation for GET /dev/v1/invoices.
GET
/
dev
/
v1
/
invoices
List invoices
curl --request GET \
--url https://api.shoppex.io/dev/v1/invoices \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/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.shoppex.io/dev/v1/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))
}{
"data": [
{
"id": "inv_1",
"uniqid": "11111111-1111-4111-8111-111111111111",
"type": "PRODUCT",
"subtype": null,
"origin": "API",
"shop_id": "shop_1",
"customer_id": "cus_1",
"affiliate_link_id": "link_1",
"affiliate_customer_id": "cus_aff_1",
"affiliate_code": "creator123",
"affiliate_discount_amount": 3.5,
"currency": "USD",
"total": 29.99,
"total_display": 29.99,
"subtotal": 33.49,
"discount": 3.5,
"discount_display": 3.5,
"balance_paid_amount": 0,
"customer_email": "[email protected]",
"custom_fields": null,
"is_developer_invoice": false,
"developer_title": null,
"status": "COMPLETED",
"payment_status": "COMPLETED",
"gateway": "STRIPE",
"flow_type": "PROVIDER_SESSION",
"provider_reference": "pi_123",
"provider_reference_type": "PAYMENT_INTENT",
"items": [
{
"product_id": "prod_1",
"product_title": "Starter Pack",
"product_type": "DIGITAL",
"variant_title": "Gold",
"quantity": 1,
"unit_price": 29.99,
"total": 29.99,
"delivered_items": null
}
],
"created_at": 1711953600,
"updated_at": 1711953900
}
],
"pagination": {
"next_cursor": null,
"has_more": false
}
}Authorizations
Use your Shoppex API key in the Authorization header.
Query Parameters
⌘I
List invoices
curl --request GET \
--url https://api.shoppex.io/dev/v1/invoices \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/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.shoppex.io/dev/v1/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))
}{
"data": [
{
"id": "inv_1",
"uniqid": "11111111-1111-4111-8111-111111111111",
"type": "PRODUCT",
"subtype": null,
"origin": "API",
"shop_id": "shop_1",
"customer_id": "cus_1",
"affiliate_link_id": "link_1",
"affiliate_customer_id": "cus_aff_1",
"affiliate_code": "creator123",
"affiliate_discount_amount": 3.5,
"currency": "USD",
"total": 29.99,
"total_display": 29.99,
"subtotal": 33.49,
"discount": 3.5,
"discount_display": 3.5,
"balance_paid_amount": 0,
"customer_email": "[email protected]",
"custom_fields": null,
"is_developer_invoice": false,
"developer_title": null,
"status": "COMPLETED",
"payment_status": "COMPLETED",
"gateway": "STRIPE",
"flow_type": "PROVIDER_SESSION",
"provider_reference": "pi_123",
"provider_reference_type": "PAYMENT_INTENT",
"items": [
{
"product_id": "prod_1",
"product_title": "Starter Pack",
"product_type": "DIGITAL",
"variant_title": "Gold",
"quantity": 1,
"unit_price": 29.99,
"total": 29.99,
"delivered_items": null
}
],
"created_at": 1711953600,
"updated_at": 1711953900
}
],
"pagination": {
"next_cursor": null,
"has_more": false
}
}