1. api/payment.php
Description
This endpoint processes withdrawal transactions by querying specific parameters.
Parameters
Parameter | Type | Description |
---|---|---|
pub_key | String | The public key of the account initiating the withdrawal. |
sec_key | String | The secret key for authenticating the withdrawal request. |
receiver | String | The identifier of the account or entity receiving the withdrawal using email(payer@example). |
amount | Decimal | The amount to withdraw. |
currency | String | The currency in which the amount is denominated. |
unique_id | String | A unique identifier for the transaction to prevent duplicates. |
Usage
HTTP Method: GET
POST /api/payment.php HTTP/1.1
Content-Type: application/json
{
"pub_key": "public_key_value",
"sec_key": "secret_key_value",
"receiver": "receiver_id",
"amount": 100.00,
"currency": "USD",
"unique_id": "txn12345"
}
2. api/payint.php
Description
This endpoint queries internal payment details using specific parameters.
Parameters
Parameter | Type | Description |
---|---|---|
public_key | String | The public key of the account making the query. |
unique_id | String | The unique identifier for the transaction. |
Usage
HTTP Method: GET
GET https://donebypay.com/api/payint.php?public_key=public_key_value&unique_id=txn12345 HTTP/1.1
3. payment.php
Description
This webpage interface allows users to initiate payments using specified parameters, with an optional comment for the transaction.
Parameters
Parameter | Type | Description |
---|---|---|
public_key | String | The public key of the payer's account. |
unique_ID | String | A unique identifier for the transaction. |
currency | String | The currency in which the payment is made. |
amount | Decimal | The amount to be paid. |
payer | String | The identifier of the payer's account using email(payer@example.com). |
comment | String | (Optional) A comment or note regarding the transaction. |
redirectURL | String | (Optional) A redirectURL forwards users to a specified web address. |
Usage
HTTP Method: GET
GET https://donebypay.com/payment.php?public_key=public_key_value&unique_ID=txn12345¤cy=USD&amount=50.00&payer=payer@example.com&comment=Payment+for+services&redirectURL=https://example.com HTTP/1.1
Error Handling
Common Error Responses
Error Code | Message | Description |
---|---|---|
400 | Invalid Parameters | One or more required parameters are missing or invalid. |
401 | Unauthorized | Authentication failed due to invalid keys. |
404 | Transaction Not Found | No transaction found for the given unique_id . |
500 | Internal Server Error | An unexpected error occurred on the server. |
Best Practices
- Always validate the parameters before making requests to the scripts.
- Use secure connections (e.g., HTTPS) to protect sensitive data such as
pub_key
andsec_key
. - Implement rate limiting to prevent abuse of the APIs.
- Ensure unique values for
unique_id
to avoid duplicate transactions.