API Reference
Complete API documentation for integrating MakaPay into your application.
Base URL
Production: https://app.makapay.com/apiAuthentication
All API requests require authentication via API key.
Obtaining an API Key
Log in to the MakaPay Dashboard
Navigate to API Keys
Click Create New Key
Copy and securely store your API key
Using the API Key
Include the API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYImportant: Never expose your API key in client-side code.
Endpoints
Create Payment
Create a new payment link.
Request Body
merchant
string
Yes
Ethereum address to receive payment
chainId
string
Yes
Target blockchain chain ID
token
string
Yes
ERC20 token contract address
amount
string
Yes
Payment amount (human-readable, e.g., "100.00")
orderId
string
Yes
Your internal order reference (max 100 chars)
description
string
No
Payment description (max 200 chars)
blockConfirmations
number
No
Required confirmations (default: 1, max: 100)
gasless
boolean
No
Enable gasless mode (default: false)
payerCoversFee
boolean
No
Payer covers fees (default: false)
Example Request
Response
Response Fields
url
string
Payment page URL to share with customer
Error Responses
400
Invalid form data
Request validation failed
401
Unauthorized
Invalid or missing API key
500
Failed to create payment
Internal server error
Get Balance
Get your Gas Tank balance.
Example Request
Response
Response Fields
balance
string
Current Gas Tank balance in USDT (6 decimals)
Supported Networks & Tokens
Mainnet
Ethereum (Chain ID: 1)
USDT
0xdAC17F958D2ee523a2206206994597C13D831ec7
6
USDC
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
6
Polygon (Chain ID: 137)
USDT
0xc2132D05D31c914a87C6611C10748AEb04B58e8F
6
USDC
0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359
6
BNB Smart Chain (Chain ID: 56)
USDT
0x55d398326f99059ff775485246999027b3197955
18
USDC
0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d
18
XRP
0x1d2f0da169ceb9fc7b3144628db156f3f6c60dbe
18
TRX
0xce7de646e7208a4ef112cb6ed5038fa6cc6b12e3
6
MakaChain (Chain ID: 777178)
USDT
0x30C28E393E0732335235685B345c95E6465Ad8A5
6
Testnet
Sepolia (Chain ID: 11155111)
USDT
0x3B62e45fB977773c2eF0404d80e0C59de22A97ec
6
USDC
0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238
6
MakaChain Testnet (Chain ID: 777177)
USDT
0x309F410f92A98e43E1EEF623015a2e784F80ed72
6
USDC
0x1C978Ed2de920eA6c5844d011Ab9f574979F82A6
6
Webhooks
Configure webhooks to receive real-time payment notifications.
Setup
Go to Dashboard > Webhooks
Enter your webhook URL (HTTPS required)
Save configuration
Webhook Payload
Event Types
payment.completed
Payment successfully settled
payment.failed
Settlement failed
payment.expired
Payment link expired
Retry Policy
Failed deliveries are retried up to 3 times
Retry intervals: 1 minute, 5 minutes, 30 minutes
View delivery logs in the dashboard
Code Examples
Node.js
Python
PHP
Rate Limits
POST /payments
100 requests/minute
GET /balance
60 requests/minute
Exceeding rate limits returns HTTP 429 (Too Many Requests).
Error Handling
Error Response Format
Common Errors
400
Invalid Merchant address format
Verify the merchant address is a valid Ethereum address
400
Invalid Token address format
Verify the token contract address
400
Invalid network selected
Use a supported chain ID
400
Amount must be a positive number
Ensure amount is > 0
401
Unauthorized
Check your API key
503
Oracle price unavailable
Retry after a few seconds
SDK (Coming Soon)
Official SDKs for popular languages:
JavaScript/TypeScript:
npm install @makapay/sdkPython:
pip install makapayPHP:
composer require makapay/sdkGo:
go get github.com/makapay/go-sdk
Changelog
v1.0.0 (Current)
Initial API release
Payment creation endpoint
Balance endpoint
Webhook support
Last updated