Basic Integration
Create Swipelux OnRamp orders programmatically with the minimum required parameters. This guide covers the essential steps to get started with server-side order creation.
Quick Start
This guide features implementations in JavaScript, Python, PHP, Go, and Java, but these snippets can be translated to almost any other language by following the Reference section.
Get Your Secret API Key
If you don't have one, create it in the Merchant Panel. Read here for more information.
Install Dependencies if Needed
If you don't have a preferred language, we recommend using JavaScript. Most modern browsers and runtimes have Fetch API built-in, which is a modern way to make HTTP requests.
If you need to use a different language, you can use a package manager like pip
to install the requests
library for Python or curl
for PHP. Refer to your language's documentation for more information.
Handle the Response
The JSON response contains important information about the created order:
Using the response:
acsUrl
: Direct users to this URL to complete payment via Payment LinkorderToken
: Use with the widget for embedded integrationorderId
: Track this order in your system and match with webhook events
Reference
URL
POST https://api.swipelux.com/api/orders/createPrepared
Request Headers
Header | Value | Required |
---|---|---|
Authorization | Your secret API key | Yes |
Content-Type | application/json | Yes |
Required Parameters
Prop | Type | Default |
---|---|---|
targetAddress | string | - |
user | object | - |
amounts | object | - |
amounts
Object
Prop | Type | Default |
---|---|---|
to.currency | string | - |
from.amount | number | - |
from.currency | string | - |
user
Object
Prop | Type | Default |
---|---|---|
email? | string | - |
phone | string | - |
Next Steps
After creating your first order:
- Add payment customization: Restrict payment methods with Payment Method Customization
- Enable advanced features: Pre-fill user data and KYC with Advanced Features
- Widget integration: Use the
orderToken
with your client-side widget - Order tracking: Monitor order status with GET order API
- Event handling: Set up webhooks for real-time order updates