Payment API Documentation

1. Generate Payment

This method allows you to create a new payment and get its unique pay_id.

URL

POST /generate

Method

POST

Headers

Content-Type: application/json

Request Body Parameters

Parameter Type Required Description
public_key string Yes Merchant's public key
amount float Yes Payment amount
order_id string Yes Order ID in merchant system
redirect_url string Yes Redirect after payment
currency string Yes Currency code (e.g. USD, EUR)

Response

{
    "status": 0,
    "result": "https://example.com/link/UNIQUE_PAY_ID"
}

Status Codes

Code Description
0 Success. Payment created.
101 Validation error while saving payment.
102 Unexpected error during request processing.
103 Missing required parameter.
104 Public key not found.

Example Request

POST /generate
Content-Type: application/json

{
    "public_key": "abc123xyz",
    "amount": 150.00,
    "order_id": "ORD987654",
    "redirect_url": "https://example.com/",
    "currency": "USD"
}
        

2. Link Payment

This link to redirect payment page.

URL

GET /link/UNIQUE_PAY_ID

Method

GET

Parameters

Parameter Type Required Description
id string Yes Pay ID (UNIQUE_PAY_ID)

3. Check Payment Status

This method allows you to retrieve the status of a payment by pay_id and public_key.

URL

GET /check-status

Method

GET

Parameters

Parameter Type Required Description
id string Yes Payment ID (pay_id)
public_key string Yes Merchant's public key

Response

{
    "status": 0,
    "result": "Success. Payment found",
    "data": {
        "status": 1,
        "order_id": "123456",
        "currency": "USD",
        "reference_id": "TXN123456",
        "amount": 100.00,
        "error": ""
    }
}

Status Codes

Code Description
0 Success. Payment found.
101 Payment not found.
102 Error retrieving data.
103 Missing required parameter.
104 Public key not found.

3. Send Payment Status (Callback)

This request is sent several times until it receives code HTTP 200

URL

POST https://your-domain.com/callback-url

Method

POST

Callback Payload

{
    "status": 2,
    "order_id": "ORD123456",
    "currency": "USD",
    "reference_id": "TXN7890",
    "amount": 100.00,
    "error": ""
}

Transaction Status Codes

Code Status Description
0UNPAIDPayment created but not completed
1PAIDPayment was completed successfully
2DELIVEREDProduct or service has been delivered
3FAILEDPayment failed
4DELIVERINGDelivery is in progress
5CANCELEDPayment or order has been canceled
6AUTHORIZEDPayment is authorized but not captured
7UNKNOWNDELIVERYDelivery status could not be determined
8FROZENPayment or account is frozen
9REFUNDEDPayment was refunded
16PAYINGPayment is currently being processed