Authentication
The OneLinkFintech API uses API keys to authenticate requests. You can view and manage your API keys in the Dashboard.
API Keys
Include your API key in all API requests to the server in an Authorization
header:
Authorization: Bearer YOUR_API_KEY
Important: Keep your API keys secure. Do not share them in publicly accessible areas such as GitHub, client-side code, etc.
Testing with Sandbox
Use our sandbox environment for testing with test API keys and mock data:
https://api.sandbox.onelinkfintech.com/v1
Production Environment
https://api.onelinkfintech.com/v1
Quick Start
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"
}'
const fetch = require('node-fetch');
const response = await fetch('https://api.sandbox.onelinkfintech.com/v1/payments', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_SANDBOX_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 1000,
currency: 'EUR',
recipient: 'rec_test_123',
description: 'Test Payment'
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.sandbox.onelinkfintech.com/v1/payments"
headers = {
"Authorization": "Bearer YOUR_SANDBOX_API_KEY",
"Content-Type": "application/json"
}
data = {
"amount": 1000,
"currency": "EUR",
"recipient": "rec_test_123",
"description": "Test Payment"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Example Response
{
"id": "pay_123456789",
"object": "payment",
"amount": 1000,
"currency": "EUR",
"status": "pending",
"recipient": "rec_test_123",
"description": "Test Payment",
"created_at": "2025-01-01T12:00:00Z",
"updated_at": "2025-01-01T12:00:00Z"
}
Accounts
Create and manage financial accounts for your users.
Create a new account for a user.
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
currency | string | Required | 3-letter ISO currency code (e.g. "EUR") |
owner | object | Required | Owner information |
owner.name | string | Required | Full legal name |
owner.email | string | Required | Email address |
metadata | object | Additional metadata (key-value pairs) |
Example Request
POST /v1/accounts
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"currency": "EUR",
"owner": {
"name": "John Doe",
"email": "john@example.com"
},
"metadata": {
"internal_id": "12345"
}
}
Example Response
{
"id": "acc_123456789",
"object": "account",
"currency": "EUR",
"balance": 0,
"status": "active",
"owner": {
"name": "John Doe",
"email": "john@example.com"
},
"iban": "DE89370400440532013000",
"created_at": "2025-01-01T12:00:00Z",
"updated_at": "2025-01-01T12:00:00Z"
}
Retrieve an account by its ID.
Example Request
GET /v1/accounts/acc_123456789
Authorization: Bearer YOUR_API_KEY
Payments
Create and manage payments between accounts.
Create a new payment.
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
amount | integer | Required | Amount in smallest currency unit (e.g. cents) |
currency | string | Required | 3-letter ISO currency code |
recipient | string | Required | ID of recipient account |
description | string | Payment description | |
metadata | object | Additional metadata |
Example Response
{
"id": "pay_987654321",
"object": "payment",
"amount": 1000,
"currency": "EUR",
"status": "processing",
"sender": "acc_123456789",
"recipient": "rec_test_123",
"description": "Test Payment",
"created_at": "2025-01-01T12:05:00Z",
"updated_at": "2025-01-01T12:05:00Z"
}
Errors
The OneLinkFintech API uses conventional HTTP response codes to indicate success or failure of an API request.
HTTP Status Codes
Code | Description |
---|---|
200 | OK - Request succeeded |
201 | Created - Resource created |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Authentication failed |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn't exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Server Error - Internal server error |
Error Response Format
{
"error": {
"code": "invalid_request",
"message": "Amount must be a positive integer",
"param": "amount",
"type": "invalid_parameter"
}
}