Choose your integration method to see specific instructions.
REST API Quickstart
Make your first API request to create a test payment in the sandbox environment:
curl -X POST https://api.sandbox.onelinkfintech.com/v1/payments \
-H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 1000,
"currency": "EUR",
"recipient": "rec_test_123",
"description": "Test Payment"
}'
Example response:
{
"id": "pay_123456789",
"amount": 1000,
"currency": "EUR",
"status": "pending",
"created_at": "2025-01-01T12:00:00Z"
}
Full API Reference
JavaScript SDK Quickstart
Install the SDK and make your first API call:
npm install @onelinkfintech/sdk
import OneLink from '@onelinkfintech/sdk';
const client = new OneLink({
apiKey: 'YOUR_SANDBOX_API_KEY',
environment: 'sandbox'
});
const payment = await client.payments.create({
amount: 1000,
currency: 'EUR',
recipient: 'rec_test_123'
});
JavaScript SDK Docs
Mobile SDKs Quickstart
Add the SDK to your mobile project:
// iOS (Swift Package Manager)
dependencies: [
.package(url: "https://github.com/onelinkfintech/ios-sdk.git", from: "2.0.0")
]
// Android (Gradle)
implementation("com.onelinkfintech:android-sdk:2.0.0")
Mobile SDK Docs
Webhooks Quickstart
Set up a webhook endpoint to receive real-time events:
// Example Node.js webhook handler
app.post('/webhooks', async (req, res) => {
const sig = req.headers['onelink-signature'];
const payload = req.body;
try {
const event = OneLink.Webhooks.constructEvent(payload, sig, 'your_webhook_secret');
// Handle event
res.status(200).end();
} catch (err) {
res.status(400).send(`Webhook Error: ${err.message}`);
}
});
Webhooks Guide