All requests to the AT MOON DPS Private Limited API are sent via the HTTP POST method to one of our API endpoint URLs.
Register as a merchant in our system. In your merchant dashboard you will find the option for API Access key.
Example Access key : 51a4bd18-5bc1-4eaa-97b0-c09323398883
Register as a merchant in our system. In your merchant dashboard you will find the option for API Merchant Key.
Example Merchant Key : 41d9eda4b67538fc8ad27e564ddde1bb7b20ad08
Register as a merchant in our system. In your merchant dashboard you will find the option for API Client ID.
Example Client UserID : 172
Register as a merchant in our system. In your merchant dashboard you will find the option for API Password key.
Example API Password : a90db387a3e3b8a22d923966326327c17e9a6ed6
The following example code enables you to get a token,depending on how you structure it. The perameter details are also below.
Param Name | Param Type | Description |
---|---|---|
access_key | string | Access key Required |
merchant_key | string | Merchant Key Required |
client_id | decimal | Client ID Required |
api_password | string | API Password Required |
AUTHORIZATION
HEADERS
user_id - XXX
utoken - 53XXXX48188XXXX
METHOD:- POST
Body raw (JSON)
{
"method":"PAYIN",
"merchantTransactionId": "Atmoontest", //Uniquer request id to identify transction at your side.
"amount": 1, //Amount must be integer or doubled value.
"payment_for": "test", //Payment reason in string.
"payment_mode": "INTENT", //COLLECT|QR|INTENT
"callback_url": "https://example.com/upi/callback", //Please share this URL with ATMOON to whitelist the domain.
"payer_vpa": "9851200852@ybl", //This VPA is required for payment mode COLLECT
"customer_details": {
"customer_email": "xyz@gmail.com",
"customer_phone": "9999999999"
}
}
//Success Response.
{
"status": "S",
"message": "success",
"response": {
"success": true,
"message": "success",
"data": {
"payment_method": "upi",
"merchantId": "D7916FEC-XXXX-XXXX-XXXX-9E4C83CCD49E",
"order_id": "ZYRO_861469",
"merchantTransactionId": "Atmoontest",
"transactionId": "UF20240108395353301152421",
"intent_url": "upi://pay?pa=fpay.moonven@finobank&pn=AT MOON VENTURES PRIVATE LIMITED&tr=UF20240108395353301152421&am=10&cu=INR&mode=00&purpose=00&mc=5816&tn=Payment"
}
}
}
The following example code enables you to initiate a payment,depending on how you structure it. The perameter details are also below.
Param Name | Param Type | Description |
---|---|---|
beneficiary_name | string | Beneficiary Name Required |
beneficiary_account_numb | decimal | Beneficiary Account Number Required |
beneficiary_ifsc_code | string | Bank Beneficiary Ifsc Code Required |
amount | decimal | Payment Transaction Amount Required |
payment_mode | string | Payment Transaction Mode Required |
api_token | string | Api Token Required |
<
API :- https://atmoondps.com/api/AtMoonPayout
METHOD:- POST [ To Check Status Of Pay-Out ]
CONTEN-TYPE: application/json
REQUEST HEADERS:
x-client-id
x-client-secret
user_id - XXX
utoken - 53XXXX48188XXXX
BODY raw (json)
{
"method": "PAYOUTSTATUS",
"payout_id": "HOAD650297148300"
}
//Success Response.
{
"message": "SUCCESS",
"status": 1,
"customer_name": "Jhon Doe",
"account_no": "39628544321"
"Ifsc_code": "SBIN0011243"
}
//Error Response.
{
"code": 401,
"status": "error",
"message": "Invalid API credentials."
}
You can check verify the payment transaction whether it is valid or not. After successful & pending & failure payment transaction you will have the response where you find the payment Reference No. With this payment id and your API Access credentials Key you need make a request to our server for verify the payment transaction.
<Payment verify end point : https://api.atmoondps.com/payout/status/:reference_id
Param Name | Param Type | Description |
---|---|---|
access_key | string | Access key Required |
merchant_key | string | Merchant Key Required |
client_id | decimal | Client ID Required |
api_password | string | API Password Required |
paymentReferNo | string | Payment Refer No Required |
<
API :- https://atmoondps.com/api/payoutapi
METHOD:- POST
Form-Data :-
[amount]:- Enter amount to take settlement .
[user_id]:- Use your login user id .
[utoken]:- Use token from API token .
[Name]:- Your registred name at the bank .
[accountNumber]:- Enter your account number .
[bankIfsc]:- Enter your bank ifsc-code .
[payeeListId]:- Payee List ID .
[transferMode]:- Enter Transfer mode (NEFT / IMPS / RTGS) .
[remarks]:- Enter remarks of transaction.
[externalRef]:- Enter external Refrence (Eg. 123456).
[latitude]:- Enter latitude (Eg. 15.05) .
[longitude]:- Enter longitude (Eg. 10.05) .
?>
//Success Response.
{ "message": "Success",
"status": 1,
"Transaction": [
{
"customer_name": "Jhon Doe",
"account_no": "69659120888",
"Order-Id": "123456",
}
]
}
//Error Response.
{
"code": 401,
"status": "error",
"message": "Invalid API credentials."
}
Scenario | Status | Status Code | Remark/Reason Description |
---|---|---|---|
Request Successfully and Validation Successful | OK | 200 | Token successfully generated |
Invalid Username & Password | ERROR | 601 | Merchant authentication failed |
Invalid User Parameters or Null Values | ERROR | 602 | Token Generation request cannot be parsed |
Internal Exception | ERROR | 603 | Error in Token Generation Process |
JSON Parsing Error | ERROR | 604 | Could not parse web service request |
Scenario | Status | Status Code | Remark/Reason Description |
---|---|---|---|
Payment Posted Successfully | Success | SU0000 | Completed Successfully |
JSON Parsing Error, Data in wrong format | Failure | TE0003 | Invalid Request Format |
Duplicate Payment Reference Number. | Failure | TE0005 | Duplicate Payment Request |
Null check for all field | Failure | TE0007 | Mandatory field missing |
payment mode missing if not opted for auto derivation | Failure | TE0008 | payment mode cannot be null |
Any other failure not mentioned in list | Failure | TE0020 | Technical failure. Please contact support team |
Invalid token | Failure | TE0012 | Invalid Token |
Unable to connect | Pending | ENQ001 | Please inquire status after some time |
Scenario | Status | Status Code | Remark/Reason Description |
---|---|---|---|
Payment Posted Successfully | Success | SU0000 | Completed Successfully |
Wrong or Null payment reference number | Failure | TE0011 | Invalid Payment reference number |
Unable to connect to Bank | Pending | ENQ001 | Please inquire status after some time |
Posting Failure @ Bank | Failure | BE+ <4 digit Bank Error code> | Failure message as received from Bank |
Response not received from Bank | Pending | TE0009 | Please inquire status after some time |
All requests to the AT MOON DPS Private Limited API are sent via the HTTP POST method to one of our API endpoint URLs.
Register as a merchant in our system. In your merchant dashboard you will find the option for API Access key.
Example Access key : 51a4bd18-5bc1-4eaa-97b0-c09323398883
Register as a merchant in our system. In your merchant dashboard you will find the option for API Merchant Key.
Example Merchant Key : 41d9eda4b67538fc8ad27e564ddde1bb7b20ad08
Register as a merchant in our system. In your merchant dashboard you will find the option for API Client ID.
Example Client ID : 61662
Register as a merchant in our system. In your merchant dashboard you will find the option for API Password key.
Example API Password : a90db387a3e3b8a22d923966326327c17e9a6ed6
The following example code enables you to get a token,depending on how you structure it. The perameter details are also below.
Param Name | Param Type | Description |
---|---|---|
access_key | string | Access key Required |
merchant_key | string | Merchant Key Required |
client_id | decimal | Client ID Required |
api_password | string | API Password Required |
<
$url = 'https://AtMoonDPS.in/api/uat/merchant/getToken';
$headers = [
"content_type : application/json",
"Authorization : access_key",
"Authorization : merchant_key",
"Authorization : client_id",
"Authorization : api_password",
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
?>
//Success Response.
{
"status": true,
"data": {
"token": "bc783ce060410c9add9a6a862bda8ce02444c294"
},
"message": "Token generated sucessfully.!"
}
//Error Response.
{
"code": 401,
"status": "error",
"message": "Invalid API credentials."
}
{
"code": 400,
"status": false,
"message": "Client Id headers is required."
}
{
"code": 400,
"status": false,
"message": "Access key headers is required."
}
The following example code enables you to initiate a PG payment,depending on how you structure it. The perameter details are also below.
Param Name | Param Type | Description |
---|---|---|
name | string | Customer Name Required |
phone | decimal | Customer Phone Number Required |
string | Customer Email ID Required | |
amount | decimal | PG Payment Initiate Amount Required | redirect_url | string | Merchant Redirect Url Required |
api_token | string | Api Token Required |
<
$url = 'https://AtMoonDPS.in/api/uat/merchant/pg/payment/initiate';
$headers = [
"content_type : application/json",
"Authorization: access_key",
"Authorization: merchant_key",
"Authorization: client_id",
"Authorization: api_password",
];
<?php
$parameters = [
'name' => 'Tets Customer',
'phone' => '9193979193',
'email' => 'test@gmail.com',
'amount' => '10',
'redirect_url' => 'https://testapi.com/',
'api_token' => 'bc783ce060410c9add9a6a862bda8ce02444c294',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
?>
//Success Response.
{
"status": true,
"transaction_id": "SRRJFUQ2GJPU",
"pg_reference_no": "PG202401300608275978",
"url": "https://AtMoonDPS.in/pg/payment/5bce5bf4239e288b947c451242e1030d88839dd6",
"message": "Payment Initiate URL Successfuly.!"
}
//Error Response.
{
"code": 401,
"status": "error",
"message": "Invalid API credentials."
}
You can check verify the PG payment transaction whether it is valid or not. After successful & pending & failure PG payment transaction you will have the response where you find the payment Refer No. With this payment id and your API Access credentials Key you need make a request to our server for verify the PG payment transaction. Example code is below.
PG Payment verify end point : https://AtMoonDPS.in/pg/payment/{token}/response
Param Name | Param Type | Description |
---|---|---|
access_key | string | Access key Required |
merchant_key | string | Merchant Key Required |
client_id | decimal | Client ID Required |
api_password | string | API Password Required |
transaction_id | string | Transaction ID Required |
pg_reference_no | string | PG Reference No. Required |
<
$url = 'https://AtMoonDPS.in/pg/payment/{token}/response';
$headers = [
"Accept: application/json",
"Authorization: access_key",
"Authorization: merchant_key",
"Authorization: client_id",
"Authorization: api_password",
];
<?php
$parameters = [
"transaction_id": "5LJOFI5QQB00",
"pg_reference_no": "PG202401291047016345",
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
?>
//Success Response.
{
"status": true,
"data": {
"status": true,
"code": "PAYMENT_SUCCESS",
"data": {
"transaction_id": "5LJOFI5QQBCJ",
"pg_reference_no": "PG202401291047016127",
"amount": "10.0000000000",
"state": "COMPLETED",
"type": "UPI",
"utr_no": "402961777989"
}
},
"message": "Details Fetched Successfuly.!"
}
//Error Response.
{
"code": 401,
"status": "error",
"message": "Invalid API credentials."
}
Scenario | Status | Status Code | Remark/Reason Description |
---|---|---|---|
Request Successfully and Validation Successful | OK | 200 | Token successfully generated |
Invalid Username & Password | ERROR | 601 | Merchant authentication failed |
Invalid User Parameters or Null Values | ERROR | 602 | Token Generation request cannot be parsed |
Internal Exception | ERROR | 603 | Error in Token Generation Process |
JSON Parsing Error | ERROR | 604 | Could not parse web service request |
Scenario | Status | Status Code | Remark/Reason Description |
---|---|---|---|
Payment Posted Successfully | Success | SU0000 | Completed Successfully |
JSON Parsing Error, Data in wrong format | Failure | TE0003 | Invalid Request Format |
Duplicate Payment Reference Number. | Failure | TE0005 | Duplicate Payment Request |
Null check for all field | Failure | TE0007 | Mandatory field missing |
payment mode missing if not opted for auto derivation | Failure | TE0008 | payment mode cannot be null |
Any other failure not mentioned in list | Failure | TE0020 | Technical failure. Please contact support team |
Invalid token | Failure | TE0012 | Invalid Token |
Unable to connect | Pending | ENQ001 | Please inquire status after some time |
Scenario | Status | Status Code | Remark/Reason Description |
---|---|---|---|
Payment Posted Successfully | Success | SU0000 | Completed Successfully |
Wrong or Null payment reference number | Failure | TE0011 | Invalid Payment reference number |
Unable to connect to Bank | Pending | ENQ001 | Please inquire status after some time |
Posting Failure @ Bank | Failure | BE+ <4 digit Bank Error code> | Failure message as received from Bank |
Response not received from Bank | Pending | TE0009 | Please inquire status after some time |