OnLink
API reference

Simulate a payment into a collection (sandbox only)

Sandbox only. Behaves as if a payer paid this collection, so you can test your integration end to end without sending real money. The collection must be open. Answers 200 once the collection has been marked as received, or 202 when the payment was accepted and the collection has not caught up yet: read it with GET /v1/collections/{id} a little later. No real money moves. While sandbox crediting is enabled, a collection created in sandbox is then credited at the bank simulator: read it until its status is credited. Otherwise it stays received. Not available in production: the route answers 404 there.

POST
/v1/simulations/collections/{id}/deposits

Authorization

partner-key
X-OnLink-Key<token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/simulations/collections/string/deposits" \  -H "Content-Type: application/json" \  -d '{    "amount": "25.00"  }'
{  "collectionId": "a1b2c3d4-0000-4000-8000-000000000001",  "reference": "DEMO-7K3Q2M",  "route": "memo",  "deposit": {    "id": "SIM-DEP-6f1c2d9e-3b7a-4c51-9d0e-2a8b7c6d5e4f",    "amount": "25.00",    "currency": "USD",    "status": "received"  },  "collectionStatus": "received",  "crediting": "pending",  "message": "Deposit received. The collection is credited to your account shortly; poll GET /v1/collections/{id} until it reads credited."}

Move money between your account and your customers POST

Moves money in one currency from your own account to a customer, from a customer to you, or from one customer to another. Both customers must be verified and hold an account in the currency. The amount, and your fee if you attach one, are reserved on the sending account until the transfer ends. Nothing moves until the code sent to your confirmation contact (or your webhook, as confirmation.code_issued) is verified with POST /v1/confirmations/:id, unless OnLink has enabled confirmation waiving for your account and the API key has an IP allowlist, in which case the transfer is returned already confirmed and runs at once. A partnerFee is paid from the sending customer account to your own account after the transfer completes: at most the lower of a share and a ceiling set for your account; with no terms set only "0.00" is accepted. OnLink charges nothing on a transfer between accounts of your own book.

Simulate a payment into a customer account (sandbox only) POST

Sandbox only. Behaves as if a payer sent USD to this customer’s own US bank details, so you can test your integration end to end without sending real money. The customer needs an active USD account with its own bank details, and must have been created in the sandbox. The deposit then takes the same path a real one does: it is held for review if the customer is suspended or closed, and otherwise credited to the account, and you are told by customer.deposit.received or customer.deposit.held. Answers 202 with a simulationId: the deposit is requested, not made yet, and usually appears within two minutes. Each request is a new payer, so do not retry a 202. No real money moves. Not available in production: the route answers 404 there.