POST
Payments/payments/initiateInitiate payment
Creates a payment through the payment orchestrator. business_id is derived from authentication context and must not be sent.
Access tierauthenticatedRate limitpay_apiIdempotencyheader:Idempotency-KeyAuthenticationBearerAuth
Source
LuxApi/Modules/PayAPI/Controllers/PaymentController.php::initiateLuxPayProjects @ 146e98baa44eParameters
X-Request-IDheaderClient correlation identifier. LuxPay may generate one when omitted.
Example:req_01J...Idempotency-KeyheaderUnique key for safely retrying this mutation. Reuse only for the same logical request.
Example:pay_01JABC...Request body
InitiatePaymentRequestRequired
amountnumber
Example:
1250.5currencystring
Example:
YERpayment_methodstring
Example:
walletpayment_channelstring
Example:
posproviderstring | null
metadataobject | null
JSON example
{
"amount": 1250.5,
"currency": "YER",
"payment_method": "wallet",
"payment_channel": "pos",
"provider": "string",
"metadata": {}
}Code examples
The displayed sandbox host is a placeholder until an official host is provisioned. Never paste a production token into a public browser.
curl --request POST \
--url 'https://sandbox-api.luxpay.example/v1/payments/initiate' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: pay_01JABC...' \
--header 'Content-Type: application/json' \
--data '{
"amount": 1250.5,
"currency": "YER",
"payment_method": "wallet",
"payment_channel": "pos",
"provider": "string",
"metadata": {}
}'Responses
200Duplicate replay of a previously successful request.
successboolean
Example:
truedataPaymentResult
{
"success": true,
"data": {
"success": false,
"transaction_id": "string",
"status": "string",
"provider": "string",
"provider_ref": "string",
"amount": 1,
"currency": "string",
"fee_amount": 1,
"net_amount": 1,
"message": "string",
"error_code": "string",
"is_duplicate": false,
"metadata": {}
}
}201Successful response.
successboolean
Example:
truedataPaymentResult
{
"success": true,
"data": {
"success": false,
"transaction_id": "string",
"status": "string",
"provider": "string",
"provider_ref": "string",
"amount": 1,
"currency": "string",
"fee_amount": 1,
"net_amount": 1,
"message": "string",
"error_code": "string",
"is_duplicate": false,
"metadata": {}
}
}