curl --request GET \
--url https://api.example.com/v2/payments/{payment_id} \
--header 'X-Morphosis-Key-Id: <x-morphosis-key-id>' \
--header 'X-Morphosis-Nonce: <x-morphosis-nonce>' \
--header 'X-Morphosis-Signature: <api-key>' \
--header 'X-Morphosis-Signature-Version: <x-morphosis-signature-version>' \
--header 'X-Morphosis-Timestamp: <x-morphosis-timestamp>'import requests
url = "https://api.example.com/v2/payments/{payment_id}"
headers = {
"X-Morphosis-Signature-Version": "<x-morphosis-signature-version>",
"X-Morphosis-Key-Id": "<x-morphosis-key-id>",
"X-Morphosis-Timestamp": "<x-morphosis-timestamp>",
"X-Morphosis-Nonce": "<x-morphosis-nonce>",
"X-Morphosis-Signature": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Morphosis-Signature-Version': '<x-morphosis-signature-version>',
'X-Morphosis-Key-Id': '<x-morphosis-key-id>',
'X-Morphosis-Timestamp': '<x-morphosis-timestamp>',
'X-Morphosis-Nonce': '<x-morphosis-nonce>',
'X-Morphosis-Signature': '<api-key>'
}
};
fetch('https://api.example.com/v2/payments/{payment_id}', 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.example.com/v2/payments/{payment_id}",
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-Morphosis-Key-Id: <x-morphosis-key-id>",
"X-Morphosis-Nonce: <x-morphosis-nonce>",
"X-Morphosis-Signature: <api-key>",
"X-Morphosis-Signature-Version: <x-morphosis-signature-version>",
"X-Morphosis-Timestamp: <x-morphosis-timestamp>"
],
]);
$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.example.com/v2/payments/{payment_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Morphosis-Signature-Version", "<x-morphosis-signature-version>")
req.Header.Add("X-Morphosis-Key-Id", "<x-morphosis-key-id>")
req.Header.Add("X-Morphosis-Timestamp", "<x-morphosis-timestamp>")
req.Header.Add("X-Morphosis-Nonce", "<x-morphosis-nonce>")
req.Header.Add("X-Morphosis-Signature", "<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.example.com/v2/payments/{payment_id}")
.header("X-Morphosis-Signature-Version", "<x-morphosis-signature-version>")
.header("X-Morphosis-Key-Id", "<x-morphosis-key-id>")
.header("X-Morphosis-Timestamp", "<x-morphosis-timestamp>")
.header("X-Morphosis-Nonce", "<x-morphosis-nonce>")
.header("X-Morphosis-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/payments/{payment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Morphosis-Signature-Version"] = '<x-morphosis-signature-version>'
request["X-Morphosis-Key-Id"] = '<x-morphosis-key-id>'
request["X-Morphosis-Timestamp"] = '<x-morphosis-timestamp>'
request["X-Morphosis-Nonce"] = '<x-morphosis-nonce>'
request["X-Morphosis-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"payment_id": "pay_01K1DRAFT8F7Z6K5Q4N3M2P1A0",
"requested_amount": {
"currency": "USD",
"decimal": "1.00",
"minor_units": "100"
},
"environment": "sandbox",
"created_at": "2026-07-30T15:10:00Z",
"updated_at": "2026-07-30T15:12:30Z",
"external_reference": "merchant-order-20260730-001",
"payment_instructions": {
"network": "tron_shasta",
"asset": "TRX",
"destination": "TDocs0nlyAddressNotForPayments0000",
"amount": {
"currency": "USD",
"decimal": "1.00",
"minor_units": "100"
},
"expires_at": "2026-07-30T15:40:00Z"
},
"metadata": {
"checkout_session": "checkout-001"
}
}{
"type": "urn:morphosisblock:payment:error:invalid-request",
"title": "Invalid request",
"status": 400,
"code": "invalid_request",
"detail": "One or more request fields are invalid.",
"request_id": "req_01K1DRAFT8F7Z6K5Q4N3M2P1A0"
}{
"type": "urn:morphosisblock:payment:error:authentication-failed",
"title": "Authentication failed",
"status": 401,
"code": "authentication_failed",
"detail": "The request signature could not be verified.",
"request_id": "req_01K1DRAFT8F7Z6K5Q4N3M2P1A0"
}{
"type": "urn:morphosisblock:payment:error:payment-not-found",
"title": "Payment not found",
"status": 404,
"code": "payment_not_found",
"detail": "The payment is not visible to this merchant.",
"request_id": "req_01K1DRAFT8F7Z6K5Q4N3M2P1A0"
}Retrieve a payment
Draft API Preview for GET /v2/payments/.
curl --request GET \
--url https://api.example.com/v2/payments/{payment_id} \
--header 'X-Morphosis-Key-Id: <x-morphosis-key-id>' \
--header 'X-Morphosis-Nonce: <x-morphosis-nonce>' \
--header 'X-Morphosis-Signature: <api-key>' \
--header 'X-Morphosis-Signature-Version: <x-morphosis-signature-version>' \
--header 'X-Morphosis-Timestamp: <x-morphosis-timestamp>'import requests
url = "https://api.example.com/v2/payments/{payment_id}"
headers = {
"X-Morphosis-Signature-Version": "<x-morphosis-signature-version>",
"X-Morphosis-Key-Id": "<x-morphosis-key-id>",
"X-Morphosis-Timestamp": "<x-morphosis-timestamp>",
"X-Morphosis-Nonce": "<x-morphosis-nonce>",
"X-Morphosis-Signature": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Morphosis-Signature-Version': '<x-morphosis-signature-version>',
'X-Morphosis-Key-Id': '<x-morphosis-key-id>',
'X-Morphosis-Timestamp': '<x-morphosis-timestamp>',
'X-Morphosis-Nonce': '<x-morphosis-nonce>',
'X-Morphosis-Signature': '<api-key>'
}
};
fetch('https://api.example.com/v2/payments/{payment_id}', 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.example.com/v2/payments/{payment_id}",
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-Morphosis-Key-Id: <x-morphosis-key-id>",
"X-Morphosis-Nonce: <x-morphosis-nonce>",
"X-Morphosis-Signature: <api-key>",
"X-Morphosis-Signature-Version: <x-morphosis-signature-version>",
"X-Morphosis-Timestamp: <x-morphosis-timestamp>"
],
]);
$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.example.com/v2/payments/{payment_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Morphosis-Signature-Version", "<x-morphosis-signature-version>")
req.Header.Add("X-Morphosis-Key-Id", "<x-morphosis-key-id>")
req.Header.Add("X-Morphosis-Timestamp", "<x-morphosis-timestamp>")
req.Header.Add("X-Morphosis-Nonce", "<x-morphosis-nonce>")
req.Header.Add("X-Morphosis-Signature", "<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.example.com/v2/payments/{payment_id}")
.header("X-Morphosis-Signature-Version", "<x-morphosis-signature-version>")
.header("X-Morphosis-Key-Id", "<x-morphosis-key-id>")
.header("X-Morphosis-Timestamp", "<x-morphosis-timestamp>")
.header("X-Morphosis-Nonce", "<x-morphosis-nonce>")
.header("X-Morphosis-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/payments/{payment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Morphosis-Signature-Version"] = '<x-morphosis-signature-version>'
request["X-Morphosis-Key-Id"] = '<x-morphosis-key-id>'
request["X-Morphosis-Timestamp"] = '<x-morphosis-timestamp>'
request["X-Morphosis-Nonce"] = '<x-morphosis-nonce>'
request["X-Morphosis-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"payment_id": "pay_01K1DRAFT8F7Z6K5Q4N3M2P1A0",
"requested_amount": {
"currency": "USD",
"decimal": "1.00",
"minor_units": "100"
},
"environment": "sandbox",
"created_at": "2026-07-30T15:10:00Z",
"updated_at": "2026-07-30T15:12:30Z",
"external_reference": "merchant-order-20260730-001",
"payment_instructions": {
"network": "tron_shasta",
"asset": "TRX",
"destination": "TDocs0nlyAddressNotForPayments0000",
"amount": {
"currency": "USD",
"decimal": "1.00",
"minor_units": "100"
},
"expires_at": "2026-07-30T15:40:00Z"
},
"metadata": {
"checkout_session": "checkout-001"
}
}{
"type": "urn:morphosisblock:payment:error:invalid-request",
"title": "Invalid request",
"status": 400,
"code": "invalid_request",
"detail": "One or more request fields are invalid.",
"request_id": "req_01K1DRAFT8F7Z6K5Q4N3M2P1A0"
}{
"type": "urn:morphosisblock:payment:error:authentication-failed",
"title": "Authentication failed",
"status": 401,
"code": "authentication_failed",
"detail": "The request signature could not be verified.",
"request_id": "req_01K1DRAFT8F7Z6K5Q4N3M2P1A0"
}{
"type": "urn:morphosisblock:payment:error:payment-not-found",
"title": "Payment not found",
"status": 404,
"code": "payment_not_found",
"detail": "The payment is not visible to this merchant.",
"request_id": "req_01K1DRAFT8F7Z6K5Q4N3M2P1A0"
}Authorizations
Morphosis HMAC v1 request authentication. Every API request includes
the five X-Morphosis-* headers documented on each operation.
Build the canonical string by joining these values with newline characters:
v1- Uppercase HTTP method
- Request path and query string
- Unix timestamp in seconds
- Unique nonce
- Base64url-encoded SHA-256 digest of the exact request body bytes
Sign the UTF-8 canonical string with HMAC-SHA-256 and encode the result using unpadded base64url.
Headers
Signature contract version.
"v1"Public identifier for the merchant signing key.
1 - 128^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$Unix timestamp in whole seconds.
^[0-9]{10}$Unique, single-use request nonce.
16 - 128^[A-Za-z0-9._~-]+$Unpadded base64url HMAC-SHA-256 signature.
^[A-Za-z0-9_-]{43}$Path Parameters
MorphosisBlock payment identifier.
^pay_[A-Za-z0-9]{20,40}$Response
Current payment resource.
^pay_[A-Za-z0-9]{20,40}$"pay_01K1DRAFT8F7Z6K5Q4N3M2P1A0"
Current payment lifecycle state.
pending: Awaiting a definitive payment outcome.submission_unknown: Creation outcome requires retrieval; do not create a replacement payment.paid: The exact expected payment has been confirmed.denied: The payment was rejected.cancelled: The payment was cancelled before completion.review_required: The payment requires manual review.
pending, submission_unknown, paid, denied, cancelled, review_required An exact monetary amount represented without floating-point numbers.
decimal and minor_units must identify the same value at the
currency's defined precision.
Show child attributes
Show child attributes
Sandbox / TRON Shasta preview environment.
"sandbox""sandbox"
"2026-07-30T15:10:00Z"
"2026-07-30T15:12:30Z"
1 - 128"merchant-order-20260730-001"
Instructions shown to the payer when available.
Show child attributes
Show child attributes
Merchant-defined string values returned unchanged.
Show child attributes
Show child attributes
{ "checkout_session": "checkout-001" }