Get Payment by Reference
curl --request GET \
--url https://api.creptapay.com/v1/payment/reference/{reference} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.creptapay.com/v1/payment/reference/{reference}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.creptapay.com/v1/payment/reference/{reference}', 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.creptapay.com/v1/payment/reference/{reference}",
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-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.creptapay.com/v1/payment/reference/{reference}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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.creptapay.com/v1/payment/reference/{reference}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creptapay.com/v1/payment/reference/{reference}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Successfully fetched payment",
"data": {
"id": "60d0fe4f5311236168a109ca",
"reference": "CP-A1B2C3D4E5",
"customer": {
"id": "60d0fe4f5311236168a109c9",
"first_name": "Chidera",
"last_name": "Okonkwo",
"company_name": "Okonkwo Stores",
"email": "chidera@example.com",
"phone": "+2348012345678",
"business": "60d0fe4f5311236168a109c8",
"environment": "production",
"createdAt": "2026-07-24T14:08:52.000Z",
"updatedAt": "2026-07-24T14:08:52.000Z"
},
"currency": "USD",
"crypto_currency": "USDC",
"network": "BASE",
"rate": 1,
"crypto_amount": 21.21,
"amount_paid": 21.21,
"amount": 21,
"address": "0x1234567890123456789012345678901234567890",
"fees": 0.21,
"total": 21.21,
"description": "Order #1042",
"line_items": [
{
"name": "Ankara shirt",
"amount": 10.5,
"quantity": 2
}
],
"status": "paid",
"type": "api",
"subscription": null,
"billing_period_start": null,
"billing_period_end": null,
"business": "60d0fe4f5311236168a109c8",
"allowed_currencies": [
"USDC"
],
"checkout_url": "https://pay.creptapay.com/CP-A1B2C3D4E5",
"redirect_url": "https://yourshop.com/thanks",
"metadata": {
"order_id": "1042"
},
"tx_hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"confirmations": 12,
"required_confirmations": 12,
"expires_at": "2026-07-24T14:23:52.000Z",
"createdAt": "2026-07-24T14:08:52.000Z",
"updatedAt": "2026-07-24T14:10:15.000Z"
}
}{
"message": "A grace period can't be longer than 30 days",
"data": null
}{
"message": "Invalid API key",
"data": null
}{
"message": "Plan not found",
"data": null
}Payments
Get Payment by Reference
Retrieve payment status and information by transaction reference. Requires public key starting with pk_.
GET
/
payment
/
reference
/
{reference}
Get Payment by Reference
curl --request GET \
--url https://api.creptapay.com/v1/payment/reference/{reference} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.creptapay.com/v1/payment/reference/{reference}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.creptapay.com/v1/payment/reference/{reference}', 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.creptapay.com/v1/payment/reference/{reference}",
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-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.creptapay.com/v1/payment/reference/{reference}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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.creptapay.com/v1/payment/reference/{reference}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creptapay.com/v1/payment/reference/{reference}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Successfully fetched payment",
"data": {
"id": "60d0fe4f5311236168a109ca",
"reference": "CP-A1B2C3D4E5",
"customer": {
"id": "60d0fe4f5311236168a109c9",
"first_name": "Chidera",
"last_name": "Okonkwo",
"company_name": "Okonkwo Stores",
"email": "chidera@example.com",
"phone": "+2348012345678",
"business": "60d0fe4f5311236168a109c8",
"environment": "production",
"createdAt": "2026-07-24T14:08:52.000Z",
"updatedAt": "2026-07-24T14:08:52.000Z"
},
"currency": "USD",
"crypto_currency": "USDC",
"network": "BASE",
"rate": 1,
"crypto_amount": 21.21,
"amount_paid": 21.21,
"amount": 21,
"address": "0x1234567890123456789012345678901234567890",
"fees": 0.21,
"total": 21.21,
"description": "Order #1042",
"line_items": [
{
"name": "Ankara shirt",
"amount": 10.5,
"quantity": 2
}
],
"status": "paid",
"type": "api",
"subscription": null,
"billing_period_start": null,
"billing_period_end": null,
"business": "60d0fe4f5311236168a109c8",
"allowed_currencies": [
"USDC"
],
"checkout_url": "https://pay.creptapay.com/CP-A1B2C3D4E5",
"redirect_url": "https://yourshop.com/thanks",
"metadata": {
"order_id": "1042"
},
"tx_hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"confirmations": 12,
"required_confirmations": 12,
"expires_at": "2026-07-24T14:23:52.000Z",
"createdAt": "2026-07-24T14:08:52.000Z",
"updatedAt": "2026-07-24T14:10:15.000Z"
}
}{
"message": "A grace period can't be longer than 30 days",
"data": null
}{
"message": "Invalid API key",
"data": null
}{
"message": "Plan not found",
"data": null
}Retrieve payment status and details using a transaction reference. This is a public endpoint that does not require an API key.
Request authentication
This endpoint requires a Public Key (pk_...) passed in either the x-api-key header or as a Bearer token in the Authorization header.
Path parameters
string
required
The unique transaction reference of the payment.