API Reference

Complete API documentation for integrating MakaPay into your application.


Base URL

Production: https://app.makapay.com/api

Authentication

All API requests require authentication via API key.

Obtaining an API Key

  1. Log in to the MakaPay Dashboard

  2. Navigate to API Keys

  3. Click Create New Key

  4. Copy and securely store your API key

Using the API Key

Include the API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Important: Never expose your API key in client-side code.


Endpoints

Create Payment

Create a new payment link.

Request Body

Field
Type
Required
Description

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

Field
Type
Description

url

string

Payment page URL to share with customer

Error Responses

Status
Error
Description

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

Field
Type
Description

balance

string

Current Gas Tank balance in USDT (6 decimals)


Supported Networks & Tokens

Mainnet

Ethereum (Chain ID: 1)

Token
Contract Address
Decimals

USDT

0xdAC17F958D2ee523a2206206994597C13D831ec7

6

USDC

0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

6

Polygon (Chain ID: 137)

Token
Contract Address
Decimals

USDT

0xc2132D05D31c914a87C6611C10748AEb04B58e8F

6

USDC

0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359

6

BNB Smart Chain (Chain ID: 56)

Token
Contract Address
Decimals

USDT

0x55d398326f99059ff775485246999027b3197955

18

USDC

0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d

18

XRP

0x1d2f0da169ceb9fc7b3144628db156f3f6c60dbe

18

TRX

0xce7de646e7208a4ef112cb6ed5038fa6cc6b12e3

6

MakaChain (Chain ID: 777178)

Token
Contract Address
Decimals

USDT

0x30C28E393E0732335235685B345c95E6465Ad8A5

6

Testnet

Sepolia (Chain ID: 11155111)

Token
Contract Address
Decimals

USDT

0x3B62e45fB977773c2eF0404d80e0C59de22A97ec

6

USDC

0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238

6

MakaChain Testnet (Chain ID: 777177)

Token
Contract Address
Decimals

USDT

0x309F410f92A98e43E1EEF623015a2e784F80ed72

6

USDC

0x1C978Ed2de920eA6c5844d011Ab9f574979F82A6

6


Webhooks

Configure webhooks to receive real-time payment notifications.

Setup

  1. Go to Dashboard > Webhooks

  2. Enter your webhook URL (HTTPS required)

  3. Save configuration

Webhook Payload

Event Types

Event
Description

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

Endpoint
Rate Limit

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

Status
Error
Solution

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/sdk

  • Python: pip install makapay

  • PHP: composer require makapay/sdk

  • Go: go get github.com/makapay/go-sdk


Changelog

v1.0.0 (Current)

  • Initial API release

  • Payment creation endpoint

  • Balance endpoint

  • Webhook support

Last updated