POST
/deposit/payd

Create Payment

Initiate a new payment deposit request to generate payment details or an upload slip reference.

Overview

The Create Payment API allows a merchant to initialize a deposit using the PayD gateway. You must provide the customer's personal details and banking information to receive a transaction reference for processing the deposit.

Authentication

Authorization: Bearer <YOUR_SECRET_KEY>

Headers

Request Headers
Authorization
required

Bearer <YOUR_SECRET_KEY> (your merchant API secret key)

Content-Type
required

application/json

Request Body

Body Parameters
application/json
amount
required
Number

Deposit amount (e.g. 50).

userName
required
String

Customer's username or full name string.

firstName
required
String

Customer's first name.

lastName
required
String

Customer's last name.

bankName
required
String

Name of the customer's bank (e.g. "kasikorn bank").

accountNumber
required
String

Customer's bank account number.

Code Examples

curl -X POST "https://api.luxkgate.com/deposit/payd" \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": 1500,
  "userName": "janedoe99",
  "firstName": "Jane",
  "lastName": "Doe",
  "bankName": "SCB",
  "accountNumber": "09876543213423"
}'

Response

Status Codes

201
Payment deposit created successfully.
400
Invalid request data or missing parameters.
401
Authentication failed (missing or invalid Bearer secret).
403
Merchant is disabled.
Success Response
Example response for a successful request
{
  "status": 1001,
  "message": "success",
  "data": {
    "orderId": "d52b3b72-fa3c-4545-81f5-99dd59b0fd80",
    "url": "https://airzpay.info/view-bank-details/wL6iwSWPX52hGboO"
  }
}

Next Steps: Completing the Payment

The response includes a data.url (e.g. https://airzpay.info/view-bank-details/...). You must redirect your customer to this URL, where they will see the bank details and a QR Code to complete the payment. After paying, they may need to upload their payment slip using the Upload Payment Slip endpoint below.

POST
/deposit/payd/upload-slip

Upload Payment Slip

Submit a payment receipt or slip image to verify and confirm a deposit transaction.

Overview

The Upload Slip API is used to submit a proof of payment (such as a bank receipt image) associated with a specific transaction order ID. The image must be base64-encoded.

Request Body

Body Parameters
application/json
orderId
required
String

The unique transaction ID for this deposit.

ref
required
String

The reference code obtained from the Create Payment response.

base64Image
required
String

The base64 encoded string of the receipt/slip image (e.g. data:image/jpeg;base64,...).

Code Examples

curl -X POST "https://api.luxkgate.com/deposit/payd/upload-slip" \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "orderId": "order_id",
  "ref": "reference",
  "base64Image": "iVBORw0KGgoAAAANSUhEUgAABQAAAAR+CAIAAAAA2Q..."
}'

Response

Status Codes

201
Slip uploaded and transaction updated.
400
Invalid request data or missing parameters.
401
Authentication failed (missing or invalid Bearer secret).
404
Transaction orderId not found.
Success Response
Example response for a successful request
{
  "status": 1001,
  "message": "Slip uploaded successfully",
  "data": {}
}
POST
/deposit/payd/webhook

Provider Webhook

Asynchronous callback endpoint called by the payment provider (PayD) to update transaction status.

Overview

The webhook endpoint receives real-time updates regarding deposit transactions directly from the PayD gateway. Once the transaction is successfully processed or declined, the provider will send a POST request here to update the transaction status and update the merchant's balance automatically.

Request Body

Body Parameters
application/json (From Provider)
orderId
required
String

The unique transaction order ID that was passed during payment creation.

status
required
String

The new status of the transaction (e.g. "success", "1001", "failed", "declined").

Code Examples

curl -X POST "https://api.luxkgate.com//deposit/payd/webhook" \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "orderId": "order_id",
  "status": "success"
}'

Response

Status Codes

201
Webhook received and processed.
400
Missing orderId in callback payload.
Success Response
Example response for a successful request
{
  "status": true,
  "message": "Callback processed successfully"
}
POST
/withdraw/payd

Create Withdrawal

Initiate a new withdrawal payout request to transfer funds to a customer's bank account.

Overview

The Create Withdrawal API allows a merchant to initialize a payout using the PayD gateway. You must provide the customer's personal details and banking information to process the withdrawal.

Request Body

Body Parameters
application/json
amount
required
Number

Withdrawal amount (e.g. 51).

username
required
String

Customer's username.

bankName
required
String

Name of the customer's bank (e.g. "kasikorn bank").

accountNumber
required
String

Customer's bank account number.

firstNameTH
required
String

Customer's first name in Thai.

lastNameTH
required
String

Customer's last name in Thai.

Code Examples

curl -X POST "https://api.luxkgate.com/withdraw/payd" \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": 51,
  "username": "username",
  "bankName": "bank_name",
  "accountNumber": "account_number",
  "firstNameTH": "first_name_th",
  "lastNameTH": "last_name_th"
}'

Response

Status Codes

201
Withdrawal request created successfully.
400
Invalid request data or missing parameters.
401
Authentication failed (missing or invalid Bearer secret).
403
Merchant is disabled or has insufficient balance.
Success Response
Example response for a successful request
{
  "status": 1001,
  "message": "success",
  "orderId": "order_id"
}
POST
/withdraw/payd/webhook

Withdrawal Webhook

Asynchronous callback endpoint called by the payment provider (PayD) to update withdrawal transaction status.

Overview

The withdrawal webhook endpoint receives real-time updates regarding withdrawal transactions directly from the PayD gateway. Once the withdrawal is successfully processed or declined, the provider will send a POST request here to notify the merchant.

Request Body

Body Parameters
application/json (From Provider)
orderId
required
String

The unique transaction order ID that was generated during withdrawal creation.

status
required
String

The new status of the withdrawal transaction (e.g. "success", "failed").

Code Examples

curl -X POST "https://api.luxkgate.com/withdraw/payd/webhook" \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "orderId": "order_id",
  "status": "success"
}'

Response

Status Codes

201
Webhook received and processed.
400
Missing orderId or status in callback payload.
Success Response
Example response for a successful request
{
  "status": true,
  "message": "Callback processed successfully"
}