Pay1 stores, now cash collection points

Quick integration of Cash collection API in your ecosystem will facilitate Pay1 to provide services for cash drop and collection for your agents and end customers. Improved cash flow will make it easier for you to reach varied segments of the market. Thus, reach out to a large number of distant locations with Pay1 merchants as your cash management points. Your agents or customers will be able to locate the nearby Pay1 stores on your application and can choose to drop the cash in any of the stores. They can walk-in and deposit cash against their company with their unique ID. Thus, the required amount will be transferred directly to your bank account easily.

Key Benefits

No waiting hours and long queues at the bank
Functional even on non-banking days
Faster settlement, as the system negates the need of third parties
Real time updates on cash settlements

API Docs

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":[]}
                                    
URL: <DOMAIN>/api/sdk/request/generateMETHOD: POSTREQUEST PARAMETERS:partner_txn_id=(transaction id of partner)customer_mobile=(mobile number of agent)product_id=(product_id of platform)amount=(amount of transfer)unique_ref_id=(agents unique identification number|string)agent_id=(agent id of pay1 merchant)customer_name=(name of customer)(optional)RESPONSE:{	"status": "success",	"message": "request generated.",	"errorCode": 0,	"data":	{		"transaction":		{			"txn_id": 2,			"txn_status": "pending",			"partner_txn_id": "10010002",			"amount": "100",			"remarks": "Request generated.",			"txn_ref_num": null		}	}}
                                    
URL: <DOMAIN>/api/sdk/request/statusMETHOD: POSTREQUEST PARAMETERS:partner_txn_id=(transaction id of partner)product_id=(product_id at platform)RESPONSE:Txn_status : failure{	"status": "success",	"message": "transaction found.",	"errorCode": 0,	"data": {		"transaction": {			"txn_id": 1,			"txn_status": "failure",			"partner_txn_id": "10010001",			"amount": 100,			"remarks": "Request Expired",			"txn_ref_num": null		}	}}Txn_status : success {	"status": "success",	"message": "transaction found.",	"errorCode": 0,	"data": {		"transaction": {			"txn_id": 50001,			"txn_status": "success",			"partner_txn_id": "12345680",			"amount": 150,			"remarks": "Success",			"txn_ref_num": 1900353		}	}}No Transaction{	"status": "failure",	"message": "transaction not found",	"errorCode": integercode,	"data": []}Vendor Callback For runtime Transaction Status (vendor :- Gully Pro URL)URL: <VENDOR-DOMAIN>/<VENDOR-URL>METHOD: POSTREQUEST PARAMETERS:params=json string (e.g {"txn_id":50001,"txn_status":"success","partner_txn_id":"12345680","txn_ref_num":""})RESPONSE:{	"status": "success",	"message": "<success msg>."}{	"status": "failure",	"message": "<failure msg>."}
                                    
Authorization params in Headers or in request params :-key and secret will be generated for each Merchant.Add following headers in each and every request,Authorization:Basic <key>Token:<encrypted string created using json string of request params and shared secret>To generate Token value, datastring will be generated by converting all input params in thejson string as follows,e.g. jsonstring = {"key1":"value1","key2":"value2"}# 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 params 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 params 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 CryptoJSfunction encryption(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;}
                                    
Vendor Config API DESCRIPTION : Vendor Config api will provide details like fields required in Customer verification api/Transaction api, products list and customer verification flag to decide whether to call Vendors verification API or not.URL: <VENDOR-DOMAIN>/<VENDOR-CONFIG-URL>Method: POSTParameters: product_id=service_id=Expected Response:1) Success without product list and customer verification{   	"status": "success",	"errorCode": 0,	"message": "Config Data",	"data": {		"fields": [			{				"label": "Customer Mobile",				"validation": {					"regex": "^[0][1-9]{1}[0-9]{9}$"				},				"postKey": "unique_ref_id",				"isUniqueRef": "true"			}		],		"productList": [],		"customerVerification": 0	}}2)Success with product list and customer verification{	"status": "success",	"errorCode": 0,	"message": "Config Data",	"data": {		"fields": [			{				"label": "Customer Mobile",				"validation": {					"regex": "^[0][1-9]{1}[0-9]{9}$"				},				"postKey": "unique_ref_id",				"isUniqueRef": "true"			}		],		"productList": [			{				"description": "100 Topup",				"value": "100"			},			{				"description": "200 Topup",				"value": "200"			},			{				"description": "500 Topup",				"value": "500"			},			{				"description": "1000 Topup",				"value": "1000"			}		],		"customerVerification": 1	}}4) Failure case{	"status": "failure",	"message": "<failure msg>."}
                                    
Customer Verification APIDESCRIPTION : It is an optional API, whether to call this API or not, is decided with the flag given in Vendor’s Config API and fields. If the flag is true, then fields which are returned in config api will be passed to Vendors customer verification API to verify the customer.URL: <VENDOR-DOMAIN>/<VENDOR-CUSTOMER-VERIFICATION-URL>Method: POSTParameters: product_id=service_id=postkey_1=postkey_2=postkey_n=Expected Response:Success{	"status": "success",	"errorCode": 0,	"message": "Verification Data",	"data": {		"fields": [			{				"label": "Name",				"value": "John Doe",				"postKey": "name"			},			{				"label": "Company",				"value": "Internet",				"postKey": "company"			}		]	}}failure{	"status": "failure",	"message": "<message>"}
                                    
Payment APIDESCRIPTION : This vendor API is called to update the vendor regarding payment confirmation for customers.URL: <VENDOR-DOMAIN>/<VENDOR-PAYMENT-CONFIRMATION-URL>Method: POSTParameters: product_id=service_id=client_ref_id=amount=postkey_1=postkey_2=postkey_n=Expected Response:success{	"status": "success",	"errorCode": 0,	"message": "Transaction Response",	"data": {		"txnId": "1595838571",		"amount": "100",		"remarks": "Success Txn",		"txnStatus": "1",		"clientRefId": "1212"	}}failure{	"status": "failure",	"message": "<message>"}
                                    

Enter Your Details Below:    x








Apply for access

All developers must apply to access Pay1 APIs.

Wish to know more about our imminent use cases? Then mail us at: alliances@pay1.in