Franchise
Learn more about franchise APIs and their usage.
Guidelines
Below are some of the points you must be aware of while calling Payouts APIs:
All API requests and responses are in JSON format.
POST requests should include
ContentType: application/json
All API response have status, message, and data.
Swipez uses API keys to allow access to the API. Once you have signed up at our merchant site, you will be able to see your AccessKey and SecretKey.
Quick Reference
URL
HTTP Verb
Functionality
POST
To get auth token.
POST
To save franchise details.
POST
To update franchise details.
POST
To delete franchise.
Authentication
Calling the Authentication APIs allows you to get and verify bearer tokens returned by Swipez. Swipez require these token for all further communication.
Swipez libraries automatically call the Authorize API and internally store the token.
Do not store the token in an insecure manner. Regenerating a new token does not invalidate the already generated token. Token generated from one IP address cannot be used from a different IP address.
Token generated is valid for 60 Min . Please ensure that you get a new token by calling the authorize API once the token has expired.
Rate limiting
The API is rate limited per user. You will receive a 429 HTTP status code if you exceed the rate limit. The rate limit is 30 requests per minute per user and is subject to change.
Get token
POST
/api/token
This endpoint allows you to get API token.
Request Body
access_key_id
string
Your access key.
secret_access_key
string
Your secret key.
Sample code
Save franchise
POST
/api/v1/franchise/save
This endpoint allows you to add franchise.
Headers
Authorization
string
Bearer auth token
Content-Type
string
application/json
Request Body
franchise_code
string
Unique identifier
franchise_name
string
Name of franchise.
contact_person_name
string
Contact person name.
email_id
string
Email id of franchise.
mobile
string
10 digit mobile number of franchise
pan_number
string
10 Char Pan number
aadhar_number
string
12 digit Aadhar num
gst_number
string
15 char GST number.
address
string
Franchise address.
city
string
Franchise city.
state
string
Franchise state.
zipcode
string
Franchise zipcode
enable_online_settlement
number
If you want transfer franchise commission online. Values 1 for yes 0 for no.
commission_type
string
Values: Percentage or Fixed
commission
number
Commission value either amount or percentage
settlement_type
string
"Auto" for automatic transfer commission amount. "Manual" for manual transfer.
bank_holder_name
string
Bank account holder name
account_number
string
Bank account number
bank_name
string
Bank name
account_type
string
Account type "Saving" or "Current"
ifsc
string
IFSC code
enable_franchise_login
string
To enable franchise login 1 for yes 0 for no.
login_email
string
Franchise login email id
password
string
Franchise login password
role_name
string
Role name you can find in Setting->Roles menu on web dashboard
string
Sample code
Update franchise
POST
/api/v1/franchise/update
This endpoint allows you to update franchise.
Headers
Authorization
string
Bearer auth token
Content-Type
string
application/json
Request Body
franchise_id
string
Franchise id
franchise_name
string
Name of franchise.
contact_person_name
string
Contact person name.
email_id
string
Email id of franchise.
mobile
string
10 digit mobile number of franchise
pan_number
string
10 Char Pan number
aadhar_number
string
12 digit Aadhar num
gst_number
string
15 char GST number.
address
string
Franchise address.
city
string
Franchise city.
state
string
Franchise state.
zipcode
string
Franchise zipcode
string
Sample code
Delete franchise
POST
/api/v1/franchise/delete
This endpoint allows you to delete franchise.
Headers
Authorization
string
Bearer auth token
Content-Type
string
application/json
Request Body
franchise_id
integer
Franchise id
Sample code
Last updated
Was this helpful?