Create Charge
Creates a new payment charge.
POST /v1/chargesRequest
Headers
X-API-Key
Yes
Your API key
Content-Type
Yes
Must be application/json
Body Parameters
orderId
string
Yes
Your unique order identifier. Must be unique per merchant.
amount
string
Yes
Payment amount in USDC (e.g., "25.00")
description
string
No
Description of the payment
successUrl
string
No
URL to redirect the customer after successful payment
cancelUrl
string
No
URL to redirect the customer if they cancel the payment
metadata
object
No
Arbitrary key-value pairs for your use
Redirect URLs
When successUrl is provided, the customer will be automatically redirected after payment completion with the following query parameters:
chargeId- The charge IDorderId- Your order IDstatus- The payment status (e.g., "completed")
Example redirect: https://yourstore.com/success?chargeId=chrg_abc&orderId=order-123&status=completed
When cancelUrl is provided, a cancel button will appear on the payment page, redirecting customers with similar query parameters and status=cancelled.
Note: Always use webhooks as the source of truth for payment confirmation. Do not rely solely on the redirect for order fulfillment.
Example Request
Response
Success (201 Created)
Errors
400
invalid_amount
Amount must be a positive number
400
duplicate_order_id
Order ID already exists for this merchant
401
unauthorized
Invalid or missing API key
403
merchant_inactive
Merchant account is not active
Example Error Response
Notes
The
cloneAddressandchainIdwill benulluntil the customer selects a chain on the payment pageThe charge expires after 30 minutes if no chain is selected
Once a chain is selected, the charge expires after 5 minutes
Use the
orderIdto correlate payments with your orders
Last updated