Onchain Payments
Introduction
The Stablecoin Services allow users to convert between fiat currency and stablecoins (onramp), withdraw stablecoins to fiat (offramp), and check stablecoin balances on the Lisk and CELO network.
Authentication Requirements
API Keys and Basic Authentication
All endpoints require both API keys and Basic Authentication. You must include:
Basic Authentication Header
Authorization: Basic Auth
Username <username>
Password <password>
Supported Stablecoins
On the CELO network, we currently support:
USDt
(Tether USD On Lisk)LSK
(Lsk token on Lisk)cUSD
(Celo USD)cEUR
(Celo Euro)cKES
(Celo Kenyan Shilling)
Onramp Service
The onramp service allows users to convert fiat currency to stablecoins through supported payment channels.
Endpoint
https://api.mypayd.app/api/v2/withdrawal
Request Body
The request body allows us to initiate a transaction to fund an address.
{
"currency": "USDt",
"phone_number": "07000000",
"channel": "MPESA",
"to_address": "0xc880f1b3E16d9EB674f0fD40a8B06CC6F6bd17B9",
"amount": 2,
"provider": "Lisk"
}
Disclaimer:
We support USDt and LSK on the Lisk network, as well as cUSD, cEUR, and cKES on the Celo network.
Ensure that you input the correct currency and provider when using the APIs.
Response
{
"reference": "0xe7aeea6ffbc6a9218d29cbd8ea061e197b5909dbed8b30ae0b8ff3b728eee4c1",
"success": true,
"message": "Transaction request sent successfully"
}
Offramp Service
The offramp service enables users to convert stablecoins back to fiat currency through supported payment channels.
Endpoint
https://api.mypayd.app/api/v1/web3/payouts
Request Body
The request body allows us to Transfer funds from an address to an external destination.
{
"currency": "USDt",
"phone_number": "0700000000",
"channel": "MPESA",
"to_address": "0xc880f1b3E16d9EB674f0fD40a8B06CC6F6bd17B9",
"amount": 1,
"provider": "Lisk"
}
Response
{
"reference": "0x1bac0873da8a20e34fa9eeba599331e1575a9cc1778c153ccfe93609a25dceea",
"success": true
}
Balance Check
The balance check endpoint allows users to query their stablecoin balance.
Endpoint
https://api.mypayd.app/api/v1/web3/balance/celo?token=USDt
Request Body
The request allows you to Retrieve the balance for a specific token.
{
"currency": "USDt",
"provider": "Lisk" // or other supported provider
}
Response
{
"balance": "100.50"
}