Get the receipt (JSON)
curl --request GET \
--url https://api.beta.suby.fi/v3/payments/{id}/receipt \
--header 'X-Suby-Api-Key: <api-key>'import requests
url = "https://api.beta.suby.fi/v3/payments/{id}/receipt"
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.beta.suby.fi/v3/payments/{id}/receipt', 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.beta.suby.fi/v3/payments/{id}/receipt",
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.beta.suby.fi/v3/payments/{id}/receipt"
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.beta.suby.fi/v3/payments/{id}/receipt")
.header("X-Suby-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beta.suby.fi/v3/payments/{id}/receipt")
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": {
"id": "<string>",
"status": "<string>",
"currency": "<string>",
"priceCents": "<string>",
"displayName": "<string>",
"displayDescription": "<string>",
"displayImageUrl": "<string>",
"grossAmountCents": 123,
"vatAmountCents": 123,
"vatRateBps": 123,
"taxInclusive": true,
"discountAmountCents": 123,
"discountCode": "<string>",
"refundedAmountCents": 123,
"paymentProvider": "<string>",
"invoiceNumber": "<string>",
"depositAddress": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"sandbox": true,
"merchant": {
"name": "<string>",
"imageUrl": "<string>",
"legalName": "<string>",
"operatingAs": "<string>",
"websiteUrl": "<string>",
"country": "<string>",
"vatNumber": "<string>",
"registrationNumber": "<string>",
"legalAddressLine1": "<string>",
"legalAddressLine2": "<string>",
"legalCity": "<string>",
"legalState": "<string>",
"legalPostalCode": "<string>",
"legalCountry": "<string>"
},
"customer": {
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"billingLine1": "<string>",
"billingLine2": "<string>",
"billingCity": "<string>",
"billingState": "<string>",
"billingPostalCode": "<string>",
"billingCountry": "<string>"
},
"lineItems": [
{
"name": "<string>",
"priceCents": "<string>",
"quantity": 123
}
],
"recurring": {
"recurringIntervalCount": 123
}
},
"message": "<string>"
}{
"success": false,
"error": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}{
"success": false,
"error": "NOT_FOUND",
"message": "Resource not found"
}Payments
Get the receipt (JSON)
GET
/
v3
/
payments
/
{id}
/
receipt
Get the receipt (JSON)
curl --request GET \
--url https://api.beta.suby.fi/v3/payments/{id}/receipt \
--header 'X-Suby-Api-Key: <api-key>'import requests
url = "https://api.beta.suby.fi/v3/payments/{id}/receipt"
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.beta.suby.fi/v3/payments/{id}/receipt', 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.beta.suby.fi/v3/payments/{id}/receipt",
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.beta.suby.fi/v3/payments/{id}/receipt"
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.beta.suby.fi/v3/payments/{id}/receipt")
.header("X-Suby-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beta.suby.fi/v3/payments/{id}/receipt")
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": {
"id": "<string>",
"status": "<string>",
"currency": "<string>",
"priceCents": "<string>",
"displayName": "<string>",
"displayDescription": "<string>",
"displayImageUrl": "<string>",
"grossAmountCents": 123,
"vatAmountCents": 123,
"vatRateBps": 123,
"taxInclusive": true,
"discountAmountCents": 123,
"discountCode": "<string>",
"refundedAmountCents": 123,
"paymentProvider": "<string>",
"invoiceNumber": "<string>",
"depositAddress": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"sandbox": true,
"merchant": {
"name": "<string>",
"imageUrl": "<string>",
"legalName": "<string>",
"operatingAs": "<string>",
"websiteUrl": "<string>",
"country": "<string>",
"vatNumber": "<string>",
"registrationNumber": "<string>",
"legalAddressLine1": "<string>",
"legalAddressLine2": "<string>",
"legalCity": "<string>",
"legalState": "<string>",
"legalPostalCode": "<string>",
"legalCountry": "<string>"
},
"customer": {
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"billingLine1": "<string>",
"billingLine2": "<string>",
"billingCity": "<string>",
"billingState": "<string>",
"billingPostalCode": "<string>",
"billingCountry": "<string>"
},
"lineItems": [
{
"name": "<string>",
"priceCents": "<string>",
"quantity": 123
}
],
"recurring": {
"recurringIntervalCount": 123
}
},
"message": "<string>"
}{
"success": false,
"error": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}{
"success": false,
"error": "NOT_FOUND",
"message": "Resource not found"
}Authorizations
Secret API key. sk_live_… (production) or sk_sandbox_… (sandbox).
Path Parameters
Example:
"pay_abc123"
Was this page helpful?
⌘I

