Skip to main content
Step-by-step guide to integrate Ralio using the sandbox environment — users, KYC, funding, transfers, and webhooks. This guide walks you through a complete Ralio integration from scratch using the sandbox environment. No real money, no real KYC — fully simulated.

Sandbox Portal

Manage API keys, simulate KYC approvals, and monitor operations
https://portal.sandbox.raliopay.com

Integration flow

1

Setup — API Keys & Webhooks

Every Ralio integration follows the same sequence. Each step depends on the previous one.
2

Create a user

Generate your API credentials and configure your webhook endpoint from the Portal.
3

Verify the user (KYC / KYB)

Launch an identity verification session. In sandbox you approve it manually.
4

Create an account (Wallet)

Once the user is verified, create one or more accounts in any supported currency.
5

Fund the account (Payin)

Add funds via bank transfer, crypto deposit, or card. Simulate instantly in sandbox.
6

Move money — Transfer or Payout

Send funds internally between accounts (Transfer) or externally (Payout).
7

Track Orders & Ledger

Every operation creates an Order. Completed orders appear as entries in the Ledger.

Setup — API Keys & Webhooks

Generate your API credentials and configure webhooks before making any API call.

Step 1 — Generate API Keys

API Keys are managed exclusively from the Ralio Management Portal. You’ll need them to authenticate every API request.
1
2

Create a new API Key

Click Generate and save both values — you won’t be able to see the api_key again.
FieldDescription
api_codeYour merchant identifier
api_keyYour secret key — treat it like a password

Step 2 — Authenticate (get a Bearer Token)

All API endpoints require a Bearer Token. Exchange your API Key for a token:
POST /api/v1/auth/login
{
  "api_code": "your-api-code",
  "api_key":  "your-api-key"
}
Response 200:
{
  "token": "eyJhbGciOiJIUzI1NiIs..."
}
Include this token in every subsequent request:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Step 3 — Configure Webhooks

Webhooks let your system react in real time to events without polling.
1

Register your endpoint

Go to portal.sandbox.raliopay.com/account/webhooks
  • Must be a valid https:// URL
  • Must accept POST requests
  • Must respond with 2xx within 60 seconds
2

Select events

Subscribe only to the events you need.
3

Save your Webhook Secret

Ralio signs every delivery with HMAC-SHA256. Store this secret to verify requests.

Available events

CategoryEvents
Accountsaccount.activated
Payinspayin.processing · payin.completed · payin.failed
Payoutspayout.processing · payout.completed
Transferstransfer.processing · transfer.completed
KYC / KYBkyc.state_updated · kyc.session_verified · kyc.session_failed · kyc.session_expired

Create a user

Create individual (KYC) or business (KYB) users before issuing accounts or processing transactions.

User types

Individual User

A natural person. Goes through KYC (Know Your Customer) verification.

POST /api/v1/account/individual-users

Business User

A legal entity / company. Goes through KYB (Know Your Business) verification.

POST /api/v1/account/business-users
Save the id returned in the response — you’ll need it for every subsequent operation (KYC sessions, account creation, transfers, etc.).

Verify the user (KYC / KYB)

Launch identity verification sessions for users. In sandbox, approve or reject them instantly from the Portal.

How it works

1

Create an IDV session

Your backend creates a session for the user and receives a hostedUrl.
2

User completes verification

In production, the user follows the URL to submit documents.
In sandbox: skip this — approve directly from the Portal.
3

Receive webhook notification

Ralio notifies your endpoint when the session state changes.
4

User is verified

Once approved, the user can have accounts and operate.

Create an account (Wallet)

Create wallets for verified users. Required before any funding or payment operation.
A user must be verified (KYC or KYB REGULAR) before you can create accounts for them.

Create a user account

POST /api/v1/account/users/{uid}/accounts
Authorization: Bearer <token>
Content-Type: application/json
{
  "currency": "EUR",
  "label":    "Main Account"
}
Response 201:
{
  "id":       "acc-uuid-1234",
  "currency": "EUR",
  "balance":  0,
  "state":    "ACTIVE",
  "label":    "Main Account",
  "userId":   "user-uuid-5678"
}
Save the id (Account ID). You’ll need it for funding, transfers, payouts, and querying orders.

Fund the account (Payin)

Add funds via bank transfer, crypto, or card. In sandbox, simulate funding instantly from the Portal.

Payin methods

Bank Payin

User sends a bank transfer to an assigned IBAN. Ralio credits the account once the transfer settles.

Crypto Payin

User sends stablecoins to a generated wallet address. Auto-converted to account currency.

Card Payin

Payment via credit or debit card through an integrated payment gateway.

Simulate Bank Payin and Crypto Payin

1

Open the Sandbox Portal

2

Open the Funds Simulator

In the sidebar Developers > Funds Simulator
3

Select the account

Find it by account ID.
4

Simulate Funding

Enter the amount and currency, select the funding type and click Simulate Funding

Check payin details

GET /api/v1/account/bank-payins/{oid}

Webhooks

EventWhen
payin.processingPayin detected, waiting for settlement
payin.completedFunds credited to the account
payin.failedCould not be processed

Move money — Transfer or Payout

Move money internally between Ralio accounts (Transfer) or externally to a bank or crypto wallet (Payout).

Transfer

Internal. Between two accounts inside Ralio. Instant, no external intermediaries.

Payout

External. To a bank account (IBAN) or crypto wallet address.

Transfers

Create a transfer

POST /api/v1/account/users/{uid}/accounts/{aid}/transfers

Webhooks

EventWhen
transfer.processingBeing processed
transfer.completedSettled successfully

Payouts

Bank PayoutCrypto Payout
POST /api/v1/account/users/{uid}/accounts/{aid}/bank-payouts

{
  "origin":    { "currency": "EUR", "amount": 250 },
  "recipient": {
    "iban":          "ES9121000418450200051332",
    "accountHolder": "Jane Doe",
    "bankName":      "Banco Santander"
  },
  "reference": "Invoice #1042",
  "code2fa":   "123456"
}

Webhooks

EventWhen
payout.processingSubmitted to network
payout.completedFunds delivered

Orders

Every operation in Ralio (payin, payout, transfer) generates an Order. Orders are the central record of all operation attempts along with their statuses.

Order States

StateMeaning
PENDINGAwaiting processing
PROCESSINGBeing processed
COMPLETEDSettled → entry created in Ledger
FAILEDOperation failed
CANCELLEDCancelled before completion
GET /api/v1/account/orders
GET /api/v1/account/users/{uid}/accounts/{aid}/orders
GET /api/v1/account/orders/{order-id}

Ledger

The Ledger is the system’s accounting ledger. It contains the immutable record of all transactions that have been successfully completed. Each Order in COMPLETED status generates an entry in the Ledger

Difference between Orders and Ledger

OrdersLedger
What it recordsAll operation attemptsOnly completed operations
StatusesPENDING, PROCESSING, COMPLETED, FAILED, CANCELLEDOnly successful transactions
Main useReal-time status trackingAuditing and accounting
GET /api/v1/account/users/{uid}/accounts/{aid}/transactions
GET /api/v1/account/transactions/{transaction-id}