Getting a Payment URL
Initiate a payment request via the Luxfin API. The following uses PayPal as an example.
For more APIs, please refer to the API docs.
🔧 Method
POST
🚀 URL
/payment/paypal
🔐 Authentication
All requests must include the following HTTP header:
Authorization: Bearer <YOUR_API_key>
📤 Request Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer <your_api_key> | ✅ |
| Content-Type | application/json | ✅ |
📥 Request Body
{
"amount": 0,
"currency": "string",
"customer": "string",
"product": "string",
"redirect_url": "string"
}
📌 Request Parameters
| Field | Type | Description | Required |
|---|---|---|---|
amount | number | Payment amount | ✅ |
currency | string | Currency code (e.g., USD). | ✅ |
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
- Request(cURL)
- Response 200(JSON)
curl -X POST https://luxfin.org/payment/order \
-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"
}'
{
"order_url": "string",
"order_id": 0,
"amount": "string"
}