API Reference
Clients
Typescript / Javascript library
yarn add @repaya/client
Example project on GitHub
Endpoints
https://repaya.io/api/public/1
Ethereum Mainnet
https://goerli.repaya.io/api/public/1
Goerli Ethereum Testnet
Authorization
Authorization is done via Bearer HTTP Authentication.
Provide your API Token within the corresponding header to get access to all API methods:
Authorization: Bearer <API_TOKEN>
Method
Create a payment session to initiate the checkout flow
jAY7k
key_1432
Payment session created
POST /api/public/1/session HTTP/1.1
Host: repaya.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 194
{
"formLinkId": "jAY7k",
"customer": {
"id": "user_123141",
"data": "text"
},
"product": {
"id": "product_123141",
"name": "Awesome product",
"data": "text"
},
"price": {
"USD_MULTI_1": "15.0"
},
"clientId": "key_1432"
}
Payment session created
{
"checkoutUrl": "https://repaya.io/checkout/id_124124",
"id": "id_124124",
"formLinkId": "jAY7k",
"receiver": "0x0000000000000000000000000000000000000000",
"customer": {
"id": "user_123141"
},
"product": {
"id": "product_123141",
"name": "Awesome product"
},
"price": {
"USD_MULTI_1": "15.0"
},
"clientId": "key_1432"
}
Payment session ID
id_124124
A payment associated with a given session, null if missing
GET /api/public/1/payment HTTP/1.1
Host: repaya.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
A payment associated with a given session, null if missing
{
"id": "pid_3251",
"customer": {
"id": "user_123141",
"data": "text"
},
"product": {
"id": "product_123141",
"name": "Awesome product",
"data": "text"
},
"sender": "0x0000000000000000000000000000000000000000",
"receiver": "0x0000000000000000000000000000000000000000",
"amount": "15.0",
"paidAmount": "5.0",
"status": "pending",
"coin": {
"code": "USD_MULTI_1",
"name": "USD Stablecoins"
}
}
Payment form ID
jAY7k
Limit the number of results
100
Page number
3
Sort direction (by "created")
asc
Possible values: From timestamp in milliseconds
1669839216188
Till timestamp in milliseconds
1669839216188
List of payments filtered by the given parameters.
GET /api/public/1/payment/list HTTP/1.1
Host: repaya.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
List of payments filtered by the given parameters.
[
{
"id": "pid_3251",
"customer": {
"id": "user_123141",
"data": "text"
},
"product": {
"id": "product_123141",
"name": "Awesome product",
"data": "text"
},
"sender": "0x0000000000000000000000000000000000000000",
"receiver": "0x0000000000000000000000000000000000000000",
"amount": "15.0",
"paidAmount": "5.0",
"status": "pending",
"coin": {
"code": "USD_MULTI_1",
"name": "USD Stablecoins"
}
}
]
Payment form ID
jAY7k
Filter by customer, pass an empty string to get the total balance
user_123141
Filter by product, pass an empty string to get the total balance
product_123141
Filter by coin
USD_MULTI_1
List of customer balances
GET /api/public/1/balance HTTP/1.1
Host: repaya.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
List of customer balances
[
{
"customerId": "user_123141",
"productId": "product_123141",
"balance": "123.08",
"coin": {
"code": "USD_MULTI_1",
"name": "USD Stablecoins"
}
}
]
OpenAPI Spec
Last updated
Was this helpful?