Payments
Get payment
Returns a single developer payment. Session-backed gateways can include checkout_url and session_id when Shoppex created the provider session.
GET
/
dev
/
v1
/
payments
/
{uniqid}
Get payment
curl --request GET \
--url https://api.shoppex.io/dev/v1/payments/{uniqid} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/payments/{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/payments/{uniqid}"
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/payments/{uniqid}",
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/payments/{uniqid}"
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_db_1",
"uniqid": "33333333-3333-4333-8333-333333333333",
"type": "PAYMENT",
"shop_id": "shop_1",
"customer_id": "cus_1",
"currency": "USD",
"gateway": "PANDABASE",
"flow_type": "PROVIDER_SESSION",
"provider_reference": "pb_session_3",
"provider_reference_type": "SESSION",
"blockchain": null,
"apm_method": "CARD",
"total": 24.99,
"total_display": 24.99,
"balance_paid_amount": 0,
"customer_email": "[email protected]",
"crypto_payment_txid": null,
"status": "PENDING",
"checkout_url": "https://secure.pandabase.io/pay/stores/store_1/sids/pb_session_3",
"session_id": "pb_session_3",
"items": [
{
"product_id": null,
"product_title": "Pandabase Payment",
"product_type": "CUSTOM",
"variant_title": null,
"quantity": 1,
"unit_price": 24.99,
"total": 24.99
}
],
"created_at": 1711510800,
"updated_at": 1711510860
}
}⌘I
Get payment
curl --request GET \
--url https://api.shoppex.io/dev/v1/payments/{uniqid} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/payments/{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/payments/{uniqid}"
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/payments/{uniqid}",
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/payments/{uniqid}"
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_db_1",
"uniqid": "33333333-3333-4333-8333-333333333333",
"type": "PAYMENT",
"shop_id": "shop_1",
"customer_id": "cus_1",
"currency": "USD",
"gateway": "PANDABASE",
"flow_type": "PROVIDER_SESSION",
"provider_reference": "pb_session_3",
"provider_reference_type": "SESSION",
"blockchain": null,
"apm_method": "CARD",
"total": 24.99,
"total_display": 24.99,
"balance_paid_amount": 0,
"customer_email": "[email protected]",
"crypto_payment_txid": null,
"status": "PENDING",
"checkout_url": "https://secure.pandabase.io/pay/stores/store_1/sids/pb_session_3",
"session_id": "pb_session_3",
"items": [
{
"product_id": null,
"product_title": "Pandabase Payment",
"product_type": "CUSTOM",
"variant_title": null,
"quantity": 1,
"unit_price": 24.99,
"total": 24.99
}
],
"created_at": 1711510800,
"updated_at": 1711510860
}
}