List one-time payments
curl --request GET \
--url https://api.suby.fi/api/payment \
--header 'X-Suby-Api-Key: <api-key>'import requests
url = "https://api.suby.fi/api/payment"
headers = {"X-Suby-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Suby-Api-Key': '<api-key>'}};
fetch('https://api.suby.fi/api/payment', 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.suby.fi/api/payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Suby-Api-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 := "https://api.suby.fi/api/payment"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Suby-Api-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("https://api.suby.fi/api/payment")
.header("X-Suby-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.suby.fi/api/payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Suby-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": [
{
"id": "pay_abc123",
"txHash": "<string>",
"customerId": "usr_abc123",
"customerEmail": "jsmith@example.com",
"tokenAmount": "<string>",
"valueUsd": "<string>",
"priceCents": "999",
"subscriptionId": "<string>",
"asset": {
"symbol": "USDC",
"address": "<string>",
"decimals": 6,
"chainId": 8453
},
"productId": "<string>",
"isSandbox": true,
"metadata": {},
"externalRef": "<string>",
"successUrl": "<string>",
"cancelUrl": "<string>",
"grossAmountCents": 123,
"merchantNetCents": 123,
"vatAmountCents": 123,
"refundedAmountCents": 123,
"customFields": [
{
"key": "discord_username",
"label": "Discord username",
"required": false,
"placeholder": "e.g. test#1234",
"options": [
{
"value": "twitter",
"label": "Twitter / X"
}
],
"validation": {
"regex": "^.{2,32}$",
"errorMessage": "Please enter a valid Discord username"
}
}
],
"customFieldsResponse": {},
"createdAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 42,
"totalPages": 2
}
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}Payments - Checkout
List one-time payments
Paginated list of payments on your one-time products only.
GET
/
api
/
payment
List one-time payments
curl --request GET \
--url https://api.suby.fi/api/payment \
--header 'X-Suby-Api-Key: <api-key>'import requests
url = "https://api.suby.fi/api/payment"
headers = {"X-Suby-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Suby-Api-Key': '<api-key>'}};
fetch('https://api.suby.fi/api/payment', 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.suby.fi/api/payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Suby-Api-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 := "https://api.suby.fi/api/payment"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Suby-Api-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("https://api.suby.fi/api/payment")
.header("X-Suby-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.suby.fi/api/payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Suby-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": [
{
"id": "pay_abc123",
"txHash": "<string>",
"customerId": "usr_abc123",
"customerEmail": "jsmith@example.com",
"tokenAmount": "<string>",
"valueUsd": "<string>",
"priceCents": "999",
"subscriptionId": "<string>",
"asset": {
"symbol": "USDC",
"address": "<string>",
"decimals": 6,
"chainId": 8453
},
"productId": "<string>",
"isSandbox": true,
"metadata": {},
"externalRef": "<string>",
"successUrl": "<string>",
"cancelUrl": "<string>",
"grossAmountCents": 123,
"merchantNetCents": 123,
"vatAmountCents": 123,
"refundedAmountCents": 123,
"customFields": [
{
"key": "discord_username",
"label": "Discord username",
"required": false,
"placeholder": "e.g. test#1234",
"options": [
{
"value": "twitter",
"label": "Twitter / X"
}
],
"validation": {
"regex": "^.{2,32}$",
"errorMessage": "Please enter a valid Discord username"
}
}
],
"customFieldsResponse": {},
"createdAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 42,
"totalPages": 2
}
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}Authorizations
API key authentication
Query Parameters
Filter by asset symbol (e.g. USDC, ETH)
Available options:
INITIATED, PENDING, PROCESSING, CHECKOUT_SUCCESS, CHECKOUT_FAILED, PAYMENT_SUCCESS, TX_SUCCESS, TX_EXPIRED, FAILED, PARTIALLY_REFUNDED, REFUNDED, CHARGEBACK Page number (starts at 1)
Required range:
x >= 1Results per page (max 25)
Required range:
1 <= x <= 25Was this page helpful?
⌘I

