API Integrations
Environment Endpoints
Test Environment:
https://burntpay-u44m.onrender.com
N.B: We are currently in a test environment as such, we can't process live payment at the moment
Initialize Payment
Initialize a payment and receive a reference and initiate URL for further processing.
Endpoint:
POST https://burntpayu44m.onrender.com/payments/combined
Authentication: API Key passed in the headers.
Request Body:
{
"amount": 2,
"currency": "USD",
"token_type": "XION",
"email": "user@example.com",
"fullname": "John Doe",
"phone_country_code": "+44",
"phone_number": "1234567890",
"address_line1": "123 High St",
"city": "London",
"country": "GB"
}
amount
(number, required): The amount to be paid.currency
(string, optional, default: "USD"): The currency for the payment.token_type
(string, required): The token to be received. Must be"USDC"
or"XION"
.
Sample Request:
curl -X POST https://burntpay-u44m.onrender.com/payments/combined/ \
-H "novypay-api-key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{"amount": 100, "currency": "USD", "token_type": "USDC"}'
Success Response:
{
"status": "success",
"reference": "3934665e-e2c7-48cd-8933-82eb950d1e02",
"redirect_url": "https://novypay.app/payments?status=success&payment_id=hpp_T6fEh_PwIy1_&amount=2.00¤cy=USD&token_type=XION&reference=3934665e-e2c7-48cd-8933-82eb950d1e02&holding_address=xion1styv0nwtgr8ay4hy4u2gzh9c0qxjxsz4gd8vlg&fiat_url=https%3A%2F%2Fpay.sandbox.checkout.com%2Fpage%2Fhpp_T6fEh_PwIy1_"
}
Error Responses:
Missing amount:
{ "error": "Amount is required" }
Invalid token type:
{ "error": "Invalid token_type. Must be USDC or XION" }
No registered Xion address:
{ "error": "User does not have a registered Xion address" }
Notes:
Use the
redirect_url
to proceed with payment (e.g., card details).The
reference
is unique for each payment attempt.
Fund Wallet Endpoint
This endpoint enables developers to initiate a hosted payment session to fund any specified wallet address with USDC or XION tokens.
Endpoint
POST https://burntpay-u44m.onrender.com/payments/fund-wallet
Authentication: API Key passed in the headers.
Request Body:
{
"amount": 10,
"currency": "USD",
"token_type": "XION",
"email": "user@example.com",
"fullname": "John Doe",
"phone_country_code": "+44",
"phone_number": "1234567890",
"address_line1": "123 High St",
"city": "London",
"country": "GB",
"xion_address":"xion15rdntqgppzvgvcngs3e592wt6fhwfmctqxppv2qrhv7s47zxy9ksfe5g9r"
}
amount
(number, required): The amount to be paid.currency
(string, optional, default: "USD"): The currency for the payment.token_type
(string, required): The token to be received. Must be"USDC"
or"XION"
.
Sample Request:
curl -X POST https://burntpay-u44m.onrender.com/payments/fund-wallet
-H "novypay-api-key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{"amount": 100, "currency": "USD", "token_type": "USDC", "xion_address":"xion15rdntqgppzvgvcngs3e592wt6fhwfmctqxppv2qrhv7s47zxy9ksfe5g9r"}'
Success Response:
{
"status": "success",
"reference": "3934665e-e2c7-48cd-8933-82eb950d1e02",
"redirect_url": "https://novypay.app/payments?status=success&payment_id=hpp_T6fEh_PwIy1_&amount=2.00¤cy=USD&token_type=XION&reference=3934665e-e2c7-48cd-8933-82eb950d1e02&holding_address=xion1styv0nwtgr8ay4hy4u2gzh9c0qxjxsz4gd8vlg&fiat_url=https%3A%2F%2Fpay.sandbox.checkout.com%2Fpage%2Fhpp_T6fEh_PwIy1_"
}
Error Responses:
Missing amount:
{ "error": "Amount is required" }
Invalid token type:
{ "error": "Invalid token_type. Must be USDC or XION" }
No registered Xion address:
{ "error": "User does not have a registered Xion address" }
Notes:
Use the
redirect_url
to proceed with payment (e.g., card details).The
reference
is unique for each payment attempt.
Check Payment Status
Status Check Endpoint
GET https://burntpay-u44m.onrender.com/payments/verify/{reference}
Replace {reference}
with the reference received from payment initiation after making use of the redirect_url
.
Request Headers
novypay-api-key
<your-api-key>
Sample Status Check
curl -X GET https://burntpay-u44m.onrender.com/payments/verify/pay_35ca5fa9-2848-47c1-ad78-44127751a24e \
-H "novypay-api-key: <your-api-key>"
Last updated