Payments Guide
This guide covers everything you need to know about creating and managing payments through the LuxCore API.Payment Types
LuxCore supports four payment types:| Type | Direction | Description |
|---|---|---|
deposit | Inbound | Customer pays to merchant (checkout) |
withdrawal | Outbound | Merchant pays to customer/vendor (payout) |
deposit_pp | Inbound | Deposit with hosted payment page |
withdrawal_pp | Outbound | Withdrawal with hosted payment page |
Payment Methods
| Method | Code | Deposit | Withdrawal | Processing Time |
|---|---|---|---|---|
| SPEI | spei | ✅ | ✅ | Up to 30 min |
| OXXO | oxxo | ✅ | ❌ | Up to 30 min |
| Card | card | ✅ | ❌ | Up to 30 min |
| Bank Transfer | bank_transfer | ✅ | ✅ | Up to 30 min |
| Cash | cash | ✅ | ❌ | Up to 30 min |
| Crypto | crypto | ✅ | ✅ | Up to 30 min |
Creating a Deposit (Customer Payment)
When a customer needs to pay you:- ARS (Argentina)
- MXN (Mexico)
- UYU (Uruguay)
Creating a Withdrawal (Payout)
To send money to a beneficiary:- ARS (Argentina)
- MXN (Mexico)
- UYU (Uruguay)
Hosted Payment Pages
For a simpler integration, use hosted payment pages (deposit_pp or withdrawal_pp):
The payment page URL is dynamically generated and may vary based on the selected currency, payment method, and region. Always use the exact URL returned in the API response.
Payment Statuses
Understanding payment statuses is crucial for proper integration. Each status represents a specific state in the payment lifecycle.Status Reference
| Status | Description | Terminal | Webhooks Sent |
|---|---|---|---|
pending | Payment created, awaiting processing or approval | ❌ | - |
processing | Payment is being processed, awaiting customer action | ❌ | - |
completed | Payment was successful, funds transferred | ✅ | payment.completed |
failed | Payment failed due to error or rejection | ✅ | payment.failed |
cancelled | Payment was cancelled by merchant or system | ✅ | payment.cancelled |
expired | Payment expired before completion | ✅ | payment.failed |
refunded | Payment was fully refunded | ✅ | payment.refunded |
partial_refund | Payment was partially refunded | ✅ | payment.refunded |
Terminal statuses (
completed, failed, cancelled, expired, refunded, partial_refund) are final states - the payment cannot transition to non-terminal status.Initial Status by Payment Type
| Payment Type | Initial Status | Description |
|---|---|---|
deposit | processing | Customer needs to complete the transfer |
withdrawal | pending | Awaiting approval and processing |
deposit_pp | processing | Customer redirected to payment page |
withdrawal_pp | pending | Awaiting approval |
Status Descriptions
pending
pending
The payment has been created and is waiting to be processed. For withdrawals, this means the payout is queued and awaiting approval or processing by the payment provider.Next possible statuses:
processing, cancelled, expiredprocessing
processing
The payment is actively being processed. For deposits, this means the customer has been given payment instructions (bank details, payment page URL) and we are waiting for them to complete the transfer.Next possible statuses:
completed, failed, cancelled, expiredcompleted
completed
The payment was successful. For deposits, the funds have been received and credited to your merchant balance. For withdrawals, the funds have been sent to the beneficiary.This is a terminal status. You will receive a
payment.completed webhook.failed
failed
The payment could not be completed. This can happen due to various reasons: bank rejection, invalid account details, insufficient funds (for withdrawals), or technical issues.This is a terminal status. You will receive a
payment.failed webhook with an error_code and error_message.cancelled
cancelled
The payment was cancelled before completion. This can be initiated by the merchant via API, by an admin, or automatically by the system.This is a terminal status. You will receive a
payment.cancelled webhook.expired
expired
The payment was not completed within the allowed time window. Deposits typically expire after 1-60 minutes (configurable per merchant).This is a terminal status. You will receive a
payment.failed webhook with error_code: EXPIRED.refunded
refunded
The payment was fully refunded after completion. The refunded amount has been deducted from your merchant balance.This is a terminal status. You will receive a
payment.refunded webhook.partial_refund
partial_refund
The payment was partially refunded. Part of the original amount has been returned to the customer.This is a terminal status. You will receive a
payment.refunded webhook with the refunded amount.Handling Status Changes
Retrieving Payment Status
Listing Payments
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status |
method | string | Filter by payment method |
created_at_from | ISO 8601 | Start date filter |
created_at_to | ISO 8601 | End date filter |
limit | integer | Results per page (max 100) |
offset | integer | Pagination offset |
Cancelling a Payment
Cancel a pending payment:Only payments in
pending or created status can be cancelled.Idempotency
Use uniquemerchant_reference values for idempotency. If you submit a payment with a reference that was already used, the API will return the existing payment instead of creating a duplicate.
Best Practices
Validate Amounts
Always validate amounts before submission. Amounts are in minor units (centavos).
Handle Webhooks
Don’t rely on polling. Set up webhooks for real-time status updates.
Store References
Save
transaction_id and merchant_reference for reconciliation.Check Balance
For withdrawals, verify sufficient balance before initiating.
