Skip to main content

Payments API Reference

Complete reference for the Payments API endpoints (payment links, transactions, networks, and tokens).

Base URL

https://api.orcarail.com/api/v1

Create a new payment link.

POST /payments/links

Authentication

  • Bearer Token (JWT) - Required

Request Body

ParameterTypeRequiredDescription
titlestringYesTitle for the payment link
amountstringYesAmount (e.g., "0.1")
tokenIdstringYesToken ID (UUID)
networkIdstringYesNetwork ID (UUID)
expiresAtstringNoISO 8601 expiration timestamp
metadataobjectNoCustom metadata

Response

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Payment for services",
"slug": "pl_abc123",
"amount": "0.1",
"tokenId": "550e8400-e29b-41d4-a716-446655440001",
"networkId": "550e8400-e29b-41d4-a716-446655440002",
"status": "active",
"expiresAt": "2024-12-31T23:59:59.000Z",
"metadata": {},
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z"
}

List all payment links for the authenticated user.

GET /payments/links

Authentication

  • Bearer Token (JWT) - Required

Response

[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Payment for services",
"slug": "pl_abc123",
"amount": "0.1",
"tokenId": "550e8400-e29b-41d4-a716-446655440001",
"networkId": "550e8400-e29b-41d4-a716-446655440002",
"status": "active",
"createdAt": "2024-01-01T00:00:00.000Z"
}
]

Get a payment link by its slug (public, no auth required).

GET /payments/links/:slug

Path Parameters

ParameterTypeRequiredDescription
slugstringYesPayment link slug (e.g., pl_abc123)

Response

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Payment for services",
"slug": "pl_abc123",
"amount": "0.1",
"tokenId": "550e8400-e29b-41d4-a716-446655440001",
"networkId": "550e8400-e29b-41d4-a716-446655440002",
"status": "active",
"expiresAt": "2024-12-31T23:59:59.000Z",
"metadata": {},
"createdAt": "2024-01-01T00:00:00.000Z"
}

Update an existing payment link.

PATCH /payments/links/:id

Authentication

  • Bearer Token (JWT) - Required

Path Parameters

ParameterTypeRequiredDescription
idstringYesPayment link ID (UUID)

Request Body

All fields are optional.

ParameterTypeRequiredDescription
titlestringNoUpdated title
amountstringNoUpdated amount
tokenIdstringNoUpdated token ID (UUID)
networkIdstringNoUpdated network ID (UUID)
statusstringNoStatus: active, inactive, etc.
expiresAtstringNoUpdated expiration (ISO 8601)
metadataobjectNoUpdated metadata

Response

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Updated title",
"slug": "pl_abc123",
"amount": "0.2",
"tokenId": "550e8400-e29b-41d4-a716-446655440001",
"networkId": "550e8400-e29b-41d4-a716-446655440002",
"status": "active",
"updatedAt": "2024-01-01T12:00:00.000Z"
}

Delete a payment link.

DELETE /payments/links/:id

Authentication

  • Bearer Token (JWT) - Required

Path Parameters

ParameterTypeRequiredDescription
idstringYesPayment link ID (UUID)

Response

204 No Content

Quote

Get Quote

Get a quote for a payment link with optional payer token/network and support fee. For hosted platform pricing (per transaction and free tier), see Fees & limits overview. For how quote line items (support, commission, bridge) and minimums are applied and returned, see Fees & limits.

POST /payments/links/:slug/quote

Path Parameters

ParameterTypeRequiredDescription
slugstringYesPayment link slug

Request Body

All fields are optional.

ParameterTypeRequiredDescription
payerTokenIdstringNoToken ID (UUID) payer wants to pay with
payerNetworkIdstringNoNetwork ID (UUID) payer wants to pay on
supportPercentnumberNoSupport fee percent (e.g., 0.1 for 0.1%)

Response

{
"originalAmount": "100.00",
"supportPercent": "0.1",
"supportAmount": "0.1",
"originalTokenSymbol": "USDC",
"payerTokenSymbol": "USDT",
"bridgeFee": "0.001",
"bridgeFeeUsd": "0.25",
"bridgeFeeInPayerToken": "0.0001",
"originalAmountInPayerToken": "1.0",
"totalAmount": "100.0001",
"requiresBridge": true,
"payerTokenId": "550e8400-e29b-41d4-a716-446655440001",
"payerNetworkId": "550e8400-e29b-41d4-a716-446655440002",
"payerNetworkName": "Ethereum",
"payerNetwork": {
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "Ethereum",
"chainId": 1,
"blockExplorerUrl": "https://etherscan.io",
"publicRpcUrls": ["https://eth.llamarpc.com"],
"isActive": true,
"isTestnet": false,
"listenerConfig": null,
"requiredConfirmations": 12,
"image": null,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"deletedAt": null
},
"payerToken": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"networkId": "550e8400-e29b-41d4-a716-446655440002",
"symbol": "USDT",
"name": "Tether USD",
"contractAddress": "0x...",
"decimals": 6,
"isNative": false,
"isStablecoin": true,
"isActive": true,
"image": null,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"deletedAt": null
}
}

payerNetwork and payerToken are full objects (see List Networks and List Tokens by Network for field descriptions).

Transactions

Create Transaction

Create a new transaction for a payment link.

POST /payments/links/:slug/transactions

Path Parameters

ParameterTypeRequiredDescription
slugstringYesPayment link slug

Request Body

All fields are optional.

ParameterTypeRequiredDescription
payerTokenIdstringNoToken ID (UUID) payer wants to pay with
payerNetworkIdstringNoNetwork ID (UUID) payer wants to pay on
supportPercentnumberNoSupport fee percent (e.g., 0.1)

Response

{
"id": "550e8400-e29b-41d4-a716-446655440003",
"paymentLinkId": "550e8400-e29b-41d4-a716-446655440000",
"amount": "0.1",
"status": "pending",
"payerTokenId": "550e8400-e29b-41d4-a716-446655440001",
"payerNetworkId": "550e8400-e29b-41d4-a716-446655440002",
"supportPercent": 0.1,
"createdAt": "2024-01-01T00:00:00.000Z"
}

Get Transaction by ID

Get a transaction by ID.

GET /payments/transactions/:id

Path Parameters

ParameterTypeRequiredDescription
idstringYesTransaction ID (UUID)

Response

{
"id": "550e8400-e29b-41d4-a716-446655440003",
"paymentLinkId": "550e8400-e29b-41d4-a716-446655440000",
"amount": "0.1",
"status": "completed",
"payerTokenId": "550e8400-e29b-41d4-a716-446655440001",
"payerNetworkId": "550e8400-e29b-41d4-a716-446655440002",
"supportPercent": 0.1,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T01:00:00.000Z"
}

List User Transactions

List all transactions for the authenticated user.

GET /payments/transactions

Authentication

  • Bearer Token (JWT) - Required

Response

[
{
"id": "550e8400-e29b-41d4-a716-446655440003",
"paymentLinkId": "550e8400-e29b-41d4-a716-446655440000",
"amount": "0.1",
"status": "completed",
"createdAt": "2024-01-01T00:00:00.000Z"
}
]

Get Transaction with Full Payer Info

Get a transaction with full payer network and token details.

GET /payments/transactions/:id/full

Path Parameters

ParameterTypeRequiredDescription
idstringYesTransaction ID (UUID)

Response

{
"id": "550e8400-e29b-41d4-a716-446655440003",
"paymentLinkId": "550e8400-e29b-41d4-a716-446655440000",
"amount": "0.1",
"status": "completed",
"payerTokenId": "550e8400-e29b-41d4-a716-446655440001",
"payerNetworkId": "550e8400-e29b-41d4-a716-446655440002",
"payerToken": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"symbol": "USDC",
"decimals": 6,
"contractAddress": "0x..."
},
"payerNetwork": {
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "Ethereum",
"chainId": 1,
"publicRpcUrls": ["https://eth.llamarpc.com"]
},
"createdAt": "2024-01-01T00:00:00.000Z"
}

Update Transaction Payer

Update the payer token and network for a transaction.

PATCH /payments/transactions/:id/payer

Path Parameters

ParameterTypeRequiredDescription
idstringYesTransaction ID (UUID)

Request Body

ParameterTypeRequiredDescription
payerTokenIdstringYesToken ID (UUID) payer wants to pay with
payerNetworkIdstringYesNetwork ID (UUID) payer wants to pay on

Response

{
"id": "550e8400-e29b-41d4-a716-446655440003",
"paymentLinkId": "550e8400-e29b-41d4-a716-446655440000",
"amount": "0.1",
"status": "pending",
"payerTokenId": "550e8400-e29b-41d4-a716-446655440004",
"payerNetworkId": "550e8400-e29b-41d4-a716-446655440005",
"updatedAt": "2024-01-01T12:00:00.000Z"
}

Update Transaction Support

Update the support fee percent for a transaction.

PATCH /payments/transactions/:id/support

Path Parameters

ParameterTypeRequiredDescription
idstringYesTransaction ID (UUID)

Request Body

ParameterTypeRequiredDescription
supportPercentnumberYesSupport fee percent (e.g., 0.1 for 0.1%)

Response

{
"id": "550e8400-e29b-41d4-a716-446655440003",
"paymentLinkId": "550e8400-e29b-41d4-a716-446655440000",
"amount": "0.1",
"status": "pending",
"supportPercent": 0.2,
"updatedAt": "2024-01-01T12:00:00.000Z"
}

Networks and Tokens

List Networks

List all supported networks.

GET /payments/networks

Query Parameters

ParameterTypeRequiredDescription
activestringNoSet to true to return only active networks

Response

[
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "Ethereum",
"chainId": 1,
"blockExplorerUrl": "https://etherscan.io",
"publicRpcUrls": ["https://eth.llamarpc.com"],
"isActive": true,
"isTestnet": false,
"listenerConfig": null,
"requiredConfirmations": 12,
"image": null,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"deletedAt": null
}
]

List Tokens by Network

List tokens available for a specific network.

GET /payments/networks/:id/tokens

Path Parameters

ParameterTypeRequiredDescription
idstringYesNetwork ID (UUID)

Response

[
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"networkId": "550e8400-e29b-41d4-a716-446655440002",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"contractAddress": "0x...",
"isNative": false,
"isStablecoin": true,
"isActive": true,
"image": null,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"deletedAt": null
}
]

Status Codes

Status CodeDescription
200Success
201Created
204No Content
400Bad Request
401Unauthorized
404Not Found
500Internal Server Error

See Also