Reference
API reference
REST, JSON, ISO 4217 currencies, amounts in minor units. Base URL: https://aspipay.com.
Machine-readable spec: /api/public/openapi/json
Endpoints
POST
/api/public/v1/payment_sessionsCreate a payment session
Creates a hosted payment session and returns a checkout URL. Redirect the customer to `checkout_url` to complete payment.
Request body
amount_minorMoneyrequiredAmount in minor units (cents)e.g. 4999
currencyCurrencyrequired—e.g. "USD"
success_urlstring—
cancel_urlstring—
customer_emailstring—
descriptionstring—
metadataobject—
Responses
200
400
401
idstringrequired—
amount_minorMoneyrequiredAmount in minor units (cents)e.g. 4999
currencyCurrencyrequired—e.g. "USD"
status"created" | "pending" | "succeeded" | "failed" | "expired"required—
checkout_urlstringrequired—
success_urlstring—
cancel_urlstring—
customer_emailstring—
metadataobject—
created_atTimestamprequired—e.g. "2026-07-12T17:00:00Z"
expires_atTimestamp—e.g. "2026-07-12T17:00:00Z"
curl -X POST https://aspipay.com/api/public/v1/payment_sessions \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{"amount_minor":4999,"currency":"USD","success_url":"https://example.com","cancel_url":"https://example.com","customer_email":"customer@example.com","description":"string","metadata":{}}'Response
{
"id": "string",
"amount_minor": 4999,
"currency": "USD",
"status": "created",
"checkout_url": "https://example.com",
"success_url": "https://example.com",
"cancel_url": "https://example.com",
"customer_email": "customer@example.com",
"metadata": {},
"created_at": "2026-07-12T17:00:00Z",
"expires_at": "2026-07-12T17:00:00Z"
}GET
/api/public/v1/payment_sessions/{id}Retrieve a payment session
Path parameters
idstringrequiredin path
Responses
200
401
404
idstringrequired—
amount_minorMoneyrequiredAmount in minor units (cents)e.g. 4999
currencyCurrencyrequired—e.g. "USD"
status"created" | "pending" | "succeeded" | "failed" | "expired"required—
checkout_urlstringrequired—
success_urlstring—
cancel_urlstring—
customer_emailstring—
metadataobject—
created_atTimestamprequired—e.g. "2026-07-12T17:00:00Z"
expires_atTimestamp—e.g. "2026-07-12T17:00:00Z"
curl -X GET https://aspipay.com/api/public/v1/payment_sessions/:id \
-H "Authorization: Bearer sk_test_..." \Response
{
"id": "string",
"amount_minor": 4999,
"currency": "USD",
"status": "created",
"checkout_url": "https://example.com",
"success_url": "https://example.com",
"cancel_url": "https://example.com",
"customer_email": "customer@example.com",
"metadata": {},
"created_at": "2026-07-12T17:00:00Z",
"expires_at": "2026-07-12T17:00:00Z"
}GET
/api/public/v1/transactions/{id}Retrieve a transaction
Path parameters
idstringrequiredin path
Responses
200
401
404
idstring—
status"pending" | "authorized" | "succeeded" | "failed" | "refunded" | "partially_refunded"—
amount_minorMoneyAmount in minor units (cents)e.g. 4999
currencyCurrency—e.g. "USD"
refunded_amount_minorMoneyAmount in minor units (cents)e.g. 4999
payment_method_keystring—
country_codestring—
customer_emailstring—
created_atTimestamp—e.g. "2026-07-12T17:00:00Z"
curl -X GET https://aspipay.com/api/public/v1/transactions/:id \
-H "Authorization: Bearer sk_test_..." \Response
{
"id": "string",
"status": "pending",
"amount_minor": 4999,
"currency": "USD",
"refunded_amount_minor": 4999,
"payment_method_key": "string",
"country_code": "string",
"customer_email": "customer@example.com",
"created_at": "2026-07-12T17:00:00Z"
}Schemas
Money
Amount in minor units (cents)
integer · int64 · e.g. 4999
Currency
string · e.g. "USD"
Timestamp
string · date-time · e.g. "2026-07-12T17:00:00Z"
Error
errorstringrequired—e.g. "invalid_amount"
messagestring—e.g. "Amount must be a positive integer"
PaymentSession
idstringrequired—
amount_minorMoneyrequiredAmount in minor units (cents)e.g. 4999
currencyCurrencyrequired—e.g. "USD"
status"created" | "pending" | "succeeded" | "failed" | "expired"required—
checkout_urlstringrequired—
success_urlstring—
cancel_urlstring—
customer_emailstring—
metadataobject—
created_atTimestamprequired—e.g. "2026-07-12T17:00:00Z"
expires_atTimestamp—e.g. "2026-07-12T17:00:00Z"
CreatePaymentSessionRequest
amount_minorMoneyrequiredAmount in minor units (cents)e.g. 4999
currencyCurrencyrequired—e.g. "USD"
success_urlstring—
cancel_urlstring—
customer_emailstring—
descriptionstring—
metadataobject—
Transaction
idstring—
status"pending" | "authorized" | "succeeded" | "failed" | "refunded" | "partially_refunded"—
amount_minorMoneyAmount in minor units (cents)e.g. 4999
currencyCurrency—e.g. "USD"
refunded_amount_minorMoneyAmount in minor units (cents)e.g. 4999
payment_method_keystring—
country_codestring—
customer_emailstring—
created_atTimestamp—e.g. "2026-07-12T17:00:00Z"