Invoices
Update invoice
Developer API operation for PATCH /dev/v1/invoices/.
PATCH
/
dev
/
v1
/
invoices
/
{uniqid}
Update invoice
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/invoices/{uniqid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"gateway": "PANDABASE",
"apmMethod": "card",
"name": "Alex",
"surname": "Buyer",
"addressLine1": "Example Street 1",
"addressCity": "Berlin",
"addressCountry": "DE",
"addressPostalCode": "10115"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
gateway: 'PANDABASE',
apmMethod: 'card',
name: 'Alex',
surname: 'Buyer',
addressLine1: 'Example Street 1',
addressCity: 'Berlin',
addressCountry: 'DE',
addressPostalCode: '10115'
})
};
fetch('https://api.shoppex.io/dev/v1/invoices/{uniqid}', 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/{uniqid}"
payload = {
"gateway": "PANDABASE",
"apmMethod": "card",
"name": "Alex",
"surname": "Buyer",
"addressLine1": "Example Street 1",
"addressCity": "Berlin",
"addressCountry": "DE",
"addressPostalCode": "10115"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/invoices/{uniqid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'gateway' => 'PANDABASE',
'apmMethod' => 'card',
'name' => 'Alex',
'surname' => 'Buyer',
'addressLine1' => 'Example Street 1',
'addressCity' => 'Berlin',
'addressCountry' => 'DE',
'addressPostalCode' => '10115'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/invoices/{uniqid}"
payload := strings.NewReader("{\n \"gateway\": \"PANDABASE\",\n \"apmMethod\": \"card\",\n \"name\": \"Alex\",\n \"surname\": \"Buyer\",\n \"addressLine1\": \"Example Street 1\",\n \"addressCity\": \"Berlin\",\n \"addressCountry\": \"DE\",\n \"addressPostalCode\": \"10115\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"id": "inv_2",
"uniqid": "22222222-2222-4222-8222-222222222222",
"type": "PRODUCT",
"shop_id": "shop_1",
"customer_email": "[email protected]",
"currency": "USD",
"total": 19.99,
"total_display": 19.99,
"status": "PENDING",
"payment_status": "PENDING",
"gateway": "PANDABASE",
"items": [
{
"product_id": "prod_2",
"product_title": "Pro Pack",
"quantity": 1,
"unit_price": 19.99,
"total": 19.99,
"delivered_items": {
"service_text": "Join the private channel"
}
}
],
"created_at": 1711957200,
"updated_at": 1711957800
}
}Previous
Trigger server-side invoice completionCompletes or processes a `PENDING` or `PENDING_PAYMENT` invoice through the existing completion pipeline. This is the public Developer API equivalent of the Dashboard’s **Process Invoice** action. `Idempotency-Key` is required.
Next
⌘I
Update invoice
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/invoices/{uniqid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"gateway": "PANDABASE",
"apmMethod": "card",
"name": "Alex",
"surname": "Buyer",
"addressLine1": "Example Street 1",
"addressCity": "Berlin",
"addressCountry": "DE",
"addressPostalCode": "10115"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
gateway: 'PANDABASE',
apmMethod: 'card',
name: 'Alex',
surname: 'Buyer',
addressLine1: 'Example Street 1',
addressCity: 'Berlin',
addressCountry: 'DE',
addressPostalCode: '10115'
})
};
fetch('https://api.shoppex.io/dev/v1/invoices/{uniqid}', 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/{uniqid}"
payload = {
"gateway": "PANDABASE",
"apmMethod": "card",
"name": "Alex",
"surname": "Buyer",
"addressLine1": "Example Street 1",
"addressCity": "Berlin",
"addressCountry": "DE",
"addressPostalCode": "10115"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/invoices/{uniqid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'gateway' => 'PANDABASE',
'apmMethod' => 'card',
'name' => 'Alex',
'surname' => 'Buyer',
'addressLine1' => 'Example Street 1',
'addressCity' => 'Berlin',
'addressCountry' => 'DE',
'addressPostalCode' => '10115'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/invoices/{uniqid}"
payload := strings.NewReader("{\n \"gateway\": \"PANDABASE\",\n \"apmMethod\": \"card\",\n \"name\": \"Alex\",\n \"surname\": \"Buyer\",\n \"addressLine1\": \"Example Street 1\",\n \"addressCity\": \"Berlin\",\n \"addressCountry\": \"DE\",\n \"addressPostalCode\": \"10115\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"id": "inv_2",
"uniqid": "22222222-2222-4222-8222-222222222222",
"type": "PRODUCT",
"shop_id": "shop_1",
"customer_email": "[email protected]",
"currency": "USD",
"total": 19.99,
"total_display": 19.99,
"status": "PENDING",
"payment_status": "PENDING",
"gateway": "PANDABASE",
"items": [
{
"product_id": "prod_2",
"product_title": "Pro Pack",
"quantity": 1,
"unit_price": 19.99,
"total": 19.99,
"delivered_items": {
"service_text": "Join the private channel"
}
}
],
"created_at": 1711957200,
"updated_at": 1711957800
}
}