Accept One-Time Crypto Payments
One-time payments let customers pay using crypto, similar to a standard checkout experience.
How it Works:
Create a Checkout Session using the API.
Redirect the customer to the hosted checkout page (
url
from API response).Copperx handles on-chain payment tracking.
Copperx redirects the customer to
successUrl
orcancelUrl
based on payment completion.Optionally, receive payment status updates through webhooks.
Example API Call:
curl --request POST \
--url https://api.copperx.dev/api/v1/checkout/sessions \
--header 'Authorization: Bearer {API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
"successUrl": "https://example.com/success",
"cancelUrl": "https://example.com/cancel",
"lineItems": {
"data": [
{
"priceData": {
"currency": "usdc",
"unitAmount": "100000000",
"productData": {
"name": "Pro Plan",
"description": "One-time access"
}
}
}
]
}
}'
Best Practices:
Validate the session’s status using API or webhooks.
Use test mode and Copperx’s faucet for testing.
Last updated