Card Pay
Create Card Payment and Retrieve Order ID
Cards are available to users in supported regions. The available currencies depend on your region.
POST
/cardAuthentication
Authorization: Bearer <YOUR_API_key>
Request Parameters
| Field | Type | Description | Required |
|---|---|---|---|
amount | number | Payment amount | ✅ |
currency | string | Currency code (e.g., USD). available currencies | ✅ |
customer | string | The customer ID should be your customer's email. This email should be unique for each customer. | ✅ |
product | string | The product information you display to users | ❌ |
redirect_url | string | Redirect URL after successful payment. | ❌ |
Response Fields
- 200
- 400
- 401
{
"order_url": "string",
"order_id": 0,
"amount": "string"
}
{
"detail": "Bad Request"
}
{
"detail": "Unauthorized Bearer token"
}
Behavior
When you receive a 200 OK response, you must redirect the user to the URL specified in the order_url field.
This URL points to the Card Pay checkout page where the customer can complete the payment.
Example:
window.location.href = response.order_url;
Request Samples
curl -X POST https://luxfin.org/card \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 100,
"currency": "USD",
"customer": "test@gmail.com",
"product": "test product",
"redirect_url": "https://your_domain.com/redirect_page"
}'