Payments & Deposits
Get a payment
GET
/
v1
/
external
/
secretkey-auth
/
payments
/
{paymentId}
Get a payment
curl --request GET \
--url https://api.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId} \
--header 'x-spacepay-secret-key: <api-key>'import requests
url = "https://api.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}"
headers = {"x-spacepay-secret-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-spacepay-secret-key': '<api-key>'}};
fetch('https://api.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}', 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.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}",
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-spacepay-secret-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.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-spacepay-secret-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.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}")
.header("x-spacepay-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-spacepay-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantShortName": "<string>",
"merchantLogoUrl": "<string>",
"type": "payment",
"amountInCents": 123,
"amountDueCents": 123,
"convenienceFeeCents": 123,
"merchantFeeCents": 123,
"swapFeeCents": 123,
"currency": "USD",
"status": "pending",
"quotes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"coingeckoApiId": "ethereum",
"chain": {
"chainId": "eip155:1",
"name": "Ethereum",
"nativeSymbol": "ETH",
"nativeDecimals": 18,
"isEnabled": true,
"isTestnet": false
},
"symbol": "USDC",
"contractAddress": "0xa0b86a33e6441b8c4c8c0c0c0c0c0c0c0c0c0c0",
"decimals": 6,
"type": "stablecoin",
"assetType": "native",
"status": "active",
"tokenPriceUsd": 1
},
"chainId": "eip155:1",
"depositAddress": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "EVM",
"address": "0xa0b86a33e6441b8c4c8c0c0c0c0c0c0c0c0c0c0",
"createdAt": "2023-11-07T05:31:56Z",
"paymentId": "<string>"
},
"expectedAmountAsset": "<string>",
"rateUsdAsset": 123,
"amountDueCents": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"receipt": {
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"selectedQuote": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"coingeckoApiId": "ethereum",
"chain": {
"chainId": "eip155:1",
"name": "Ethereum",
"nativeSymbol": "ETH",
"nativeDecimals": 18,
"isEnabled": true,
"isTestnet": false
},
"symbol": "USDC",
"contractAddress": "0xa0b86a33e6441b8c4c8c0c0c0c0c0c0c0c0c0c0",
"decimals": 6,
"type": "stablecoin",
"assetType": "native",
"status": "active",
"tokenPriceUsd": 1
},
"chainId": "eip155:1",
"depositAddress": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "EVM",
"address": "0xa0b86a33e6441b8c4c8c0c0c0c0c0c0c0c0c0c0",
"createdAt": "2023-11-07T05:31:56Z",
"paymentId": "<string>"
},
"expectedAmountAsset": "<string>",
"rateUsdAsset": 123,
"amountDueCents": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z"
},
"settledToken": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"coingeckoApiId": "ethereum",
"chain": {
"chainId": "eip155:1",
"name": "Ethereum",
"nativeSymbol": "ETH",
"nativeDecimals": 18,
"isEnabled": true,
"isTestnet": false
},
"symbol": "USDC",
"contractAddress": "0xa0b86a33e6441b8c4c8c0c0c0c0c0c0c0c0c0c0",
"decimals": 6,
"type": "stablecoin",
"assetType": "native",
"status": "active",
"tokenPriceUsd": 1
},
"settledChain": {
"chainId": "eip155:1",
"name": "Ethereum",
"nativeSymbol": "ETH",
"nativeDecimals": 18,
"isEnabled": true,
"isTestnet": false
},
"settledAmountAsset": "100",
"settledAmountUsd": "100.00",
"txHash": "0xda3be87732110de6c1354c83770aae630ede9ac308d9f7b399ecfba23d923384",
"txBlockNumber": 123456,
"txTimestamp": "2021-01-01T00:00:00.000Z",
"txSenderAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"txGasUsed": 100000,
"txTotalCost": "1000000000000000000",
"txTotalCostUsdFractions": 1000000,
"txIsSponsored": true,
"processedBy": "webhook",
"txRiskScore": 85,
"txRiskSeverity": "LOW_RISK",
"txRiskProvider": "scorechain",
"createdAt": "2023-11-07T05:31:56Z"
},
"orderId": "<string>",
"redirectUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"amountMerchantNetCents": 123
}Authorizations
Secret key for authentication of external API.
Path Parameters
Response
Payment retrieved successfully
Payment ID
Merchant ID
Merchant short name
Merchant logo URL
Payment type
Available options:
payment, deposit Payment amount in cents
Amount due in cents. Provisional until a quote is paid, then finalized to the paid quote (chain-specific convenience fee).
Convenience fee in cents charged to the buyer. Null until the payment settles.
Merchant fee in cents deducted from the merchant. Null until the payment settles.
Swap fee in cents deducted from the merchant. Null until the payment settles.
Currency of the payment
Available options:
USD Payment status
Available options:
pending, processing, completed, failed, expired, cancelled Quotes
Show child attributes
Show child attributes
Receipt
Show child attributes
Show child attributes
Order ID
Redirect URL
Created at
Amount the merchant receives after fees, in cents
⌘I
Get a payment
curl --request GET \
--url https://api.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId} \
--header 'x-spacepay-secret-key: <api-key>'import requests
url = "https://api.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}"
headers = {"x-spacepay-secret-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-spacepay-secret-key': '<api-key>'}};
fetch('https://api.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}', 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.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}",
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-spacepay-secret-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.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-spacepay-secret-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.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}")
.header("x-spacepay-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spacepay.solutions/v1/external/secretkey-auth/payments/{paymentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-spacepay-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantShortName": "<string>",
"merchantLogoUrl": "<string>",
"type": "payment",
"amountInCents": 123,
"amountDueCents": 123,
"convenienceFeeCents": 123,
"merchantFeeCents": 123,
"swapFeeCents": 123,
"currency": "USD",
"status": "pending",
"quotes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"coingeckoApiId": "ethereum",
"chain": {
"chainId": "eip155:1",
"name": "Ethereum",
"nativeSymbol": "ETH",
"nativeDecimals": 18,
"isEnabled": true,
"isTestnet": false
},
"symbol": "USDC",
"contractAddress": "0xa0b86a33e6441b8c4c8c0c0c0c0c0c0c0c0c0c0",
"decimals": 6,
"type": "stablecoin",
"assetType": "native",
"status": "active",
"tokenPriceUsd": 1
},
"chainId": "eip155:1",
"depositAddress": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "EVM",
"address": "0xa0b86a33e6441b8c4c8c0c0c0c0c0c0c0c0c0c0",
"createdAt": "2023-11-07T05:31:56Z",
"paymentId": "<string>"
},
"expectedAmountAsset": "<string>",
"rateUsdAsset": 123,
"amountDueCents": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"receipt": {
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"selectedQuote": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"coingeckoApiId": "ethereum",
"chain": {
"chainId": "eip155:1",
"name": "Ethereum",
"nativeSymbol": "ETH",
"nativeDecimals": 18,
"isEnabled": true,
"isTestnet": false
},
"symbol": "USDC",
"contractAddress": "0xa0b86a33e6441b8c4c8c0c0c0c0c0c0c0c0c0c0",
"decimals": 6,
"type": "stablecoin",
"assetType": "native",
"status": "active",
"tokenPriceUsd": 1
},
"chainId": "eip155:1",
"depositAddress": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "EVM",
"address": "0xa0b86a33e6441b8c4c8c0c0c0c0c0c0c0c0c0c0",
"createdAt": "2023-11-07T05:31:56Z",
"paymentId": "<string>"
},
"expectedAmountAsset": "<string>",
"rateUsdAsset": 123,
"amountDueCents": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z"
},
"settledToken": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"coingeckoApiId": "ethereum",
"chain": {
"chainId": "eip155:1",
"name": "Ethereum",
"nativeSymbol": "ETH",
"nativeDecimals": 18,
"isEnabled": true,
"isTestnet": false
},
"symbol": "USDC",
"contractAddress": "0xa0b86a33e6441b8c4c8c0c0c0c0c0c0c0c0c0c0",
"decimals": 6,
"type": "stablecoin",
"assetType": "native",
"status": "active",
"tokenPriceUsd": 1
},
"settledChain": {
"chainId": "eip155:1",
"name": "Ethereum",
"nativeSymbol": "ETH",
"nativeDecimals": 18,
"isEnabled": true,
"isTestnet": false
},
"settledAmountAsset": "100",
"settledAmountUsd": "100.00",
"txHash": "0xda3be87732110de6c1354c83770aae630ede9ac308d9f7b399ecfba23d923384",
"txBlockNumber": 123456,
"txTimestamp": "2021-01-01T00:00:00.000Z",
"txSenderAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"txGasUsed": 100000,
"txTotalCost": "1000000000000000000",
"txTotalCostUsdFractions": 1000000,
"txIsSponsored": true,
"processedBy": "webhook",
"txRiskScore": 85,
"txRiskSeverity": "LOW_RISK",
"txRiskProvider": "scorechain",
"createdAt": "2023-11-07T05:31:56Z"
},
"orderId": "<string>",
"redirectUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"amountMerchantNetCents": 123
}