Skip to main content

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​

HeaderValueRequired
AuthorizationBearer <your_api_key>✅
Content-Typeapplication/json✅

📥 Request Body​

{
"amount": 0,
"currency": "string",
"customer": "string",
"product": "string",
"redirect_url": "string"
}

📌 Request Parameters​

FieldTypeDescriptionRequired
amountnumberPayment amount✅
currencystringCurrency code (e.g., USD).✅
customerstringThe customer ID should be your customer's email. This email should be unique for each customer.✅
productstringThe product information you display to users❌
redirect_urlstringRedirect URL after successful payment.❌

📦 Response Fields​

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"
}'