Build better, expand further.
Leverage India's fastest growing unorganised retail network
Pay1's Reach
4 lac +
Merchants
20 Million +
Customers
2000 +
Cities
Use Cases
Promote your brand to our merchants using our Pay1 app
Grow your brand/company by creating offers to be redeemed online for a huge network of merchants across the country by making Pay1 as your promotion Engine.
COMING SOON
Top Endpoints
Below are a few examples of our Pay1 Developer Portal APIs. These examples can be integrated in your application using the URL specified for each API along with the Method to be used and the Required Parameters to be passed in order to obtain the exact response specified with each API.
Payment API METHOD : GETURL : https://<url>/api/payment/pay?amount=<AMOUNT>&service_id=<SERVICE_ID>&txn_id=<MERCHANT_TXN_ID>&product_id=<PRODUCT_ID>&redirect_url=urlencoded(<REDIECT_URL>)&auth=<KEY>&token=urlencoded(<ENCRIPTED_STRING>) PARAMS :-amount : mandatorytxn_id : mandatory, its merchant txn idservice_id: mandatory (will be given by Pay1)product_id: mandatory (will be given by Pay1)redirect_url: mandatoryauth: mandatory (will be given as key by Pay1)token: mandatory (will be created using shared secret and input params as per logic mentioned in Authorization Headers section)Above URL will open our Pay1 Platform pay interface, which would open a payment confirmation box. After successful or failed payment, respective details will be sent to the redirect_url.RESPONSE :-successPay API response posted on redirect_url as follows,{"status":"success","closing":"<CLOSING_AMOUNT>","amt_settled":"<AMOUNT_SETTLED_IN_WALLET>","type":"<TXN_TYPE>","pay1_txn_id":"<PAY1_TXN_ID>","partner_txn_id":"<YOUR_TXN_ID>","amount":"<AMOUNT_PASSED>"}failure{"status":"failure","errCode":"<ERROR_CODE>","description":"<REASON_OF_FAILURE>"}
URL: <DOMAIN>/api/store-locatorkey and secret will be generated for each Vendor.Add following headers in each requestAuthorization : Basic <key>Token : <encrypted request params json string with following encryption and shared secret># PHP encryption code<?php $encryption_key = "secret string"; $encryption_key = substr(hash("sha256", $encryption_key, true), 0, 32); // json string data of request parameters $data = "json string"; // fixed iv string $iv = "0000000000000000"; $encrypted = openssl_encrypt($data, "aes-256-cbc", $encryption_key, 0, $iv);?># Python encryption codefrom Crypto.Cipher import AESfrom Crypto import Randomfrom Crypto.Hash import SHA256# key : "secret key"# plaintext : "json string"def encryptAES(key, plaintext): try: key = key.encode("utf8") key = SHA256.new(key).digest() iv = "0000000000000000".encode("utf8") plaintext = plaintext.encode("utf8") padding = AES.block_size - len(plaintext) % AES.block_size plaintext += bytes([padding]) * padding cipher = AES.new(key, AES.MODE_CBC, iv) data = cipher.encrypt(plaintext) return base64.b64encode(data) except Exception as e: # handel exception# Javascript encryption code with CryptoJSencryption(msg){ let iv = CryptoJS.enc.Utf8.parse("0000000000000000"); let key = CryptoJS.SHA256(`<secret key>`); var obj = JSON.stringify(msg); var encrypted = CryptoJS.AES.encrypt(obj, key, { iv: iv, padding: CryptoJS.pad.Pkcs7, mode: CryptoJS.mode.CBC }); var enc_text = encrypted.toString(); return enc_text;}Config Parametersservice_id and product_id will be provided at time of integrationMETHOD: POSTREQUEST PARAMETERS:lat=(latitude i.e 19.2467)long=(longitude i.e. 72.9760)service_id=33 (required if provided at config) (optional)RESPONSE:{ "status": "success", "message": "Store Details", "errorCode": 0, "data": [ { "agent_id": 11470265, "latitude": 19.18367, "longitude": 72.83153, "shop_pincode": "400064", "shop_area": "Malad west", "shop_city": "Mumbai", "shop_state": "Maharashtra", "shop_country": "India", "distance": 16.71, "name": "Anand Bhatt", "address": "makar wrsy", "shop_est_name": "test shop anand ki" } ]}{ "status": "success", "message": "Store Details", "errorCode": 0, "data": []}
URL: <DOMAIN>/api/agent-detailsMETHOD: POSTREQUEST PARAMETERS: (one of the param is compulsary)agent_id: (agent id)agent_mobile: (agent mobile)agent_qr: (agent UPI qr code data e.g. upi://pay?pa=trupay@icici&pn=ajinkya&tr=PILDY7x3Zf7yn9445&cu=INR&mc=5411&mam=5)RESPONSE:Success with data{ "status": "success", "message": "Agent Detail", "errorCode": 0, "data": { "name": "shop test", "address": "Rao kuhb", "shop_est_name": "Rao.archana hvub", "shop_area": "", "shop_city": "", "shop_pincode": "400064", "shop_state": "Maharashtra", "agent_id": 47007845 }}Success with no data{ "status": "success", "message": "Agent Detail", "errorCode": 0, "data":[]}