```php Payment API Documentation

Payment API Documentation

This documentation provides details about the payment initiation API endpoint.

Endpoint

POST https://manarecharge.in/api/api/v1/pg/pgapi/initiate_payment

Request Headers

Header Description Required
Authkey Authentication key for API access Required
Authtoken JWT authentication token Required
Cookie Session cookie for authentication Required

Form Parameters

Parameter Description Required
token Transaction token Required
amount Payment amount Required
mobile Customer mobile number Required
email Customer email address Required
name Customer name Required

Example cURL Request

curl --location 'https://manarecharge.in/api/api/v1/pg/pgapi/initiate_payment' \
--header 'Authkey: keyfsf=' \
--header 'Authtoken: eyJ0eXAiOiJtoken' \
--header 'Cookie: ci_session=g2ick786vrfbvgklkfe6fu7bqv8pj8t2' \
--form 'token="808B31E22610AF6077468B9E975521D6"' \
--form 'amount="102"' \
--form 'mobile="9502121334"' \
--form 'email="nsaiteja072@gmail.com"' \
--form 'name="Sai Teja"'

Response

{ "status": true, "statuscode": 200, "data": { "pg": "freecharge", "web_url": "https://secure-axispg.freecharge.in/payment/v1/checkout?callbackUrl=https%3A%2F%2Fmanarecharge.in%2Fapi%2Fapi%2Fv1%2Fpg%2Fpg%2Fcompletetxns%3Fpg%3Dfreecharge%26wtype%3Dmain%26is_mobile%3D¤cy=INR&customerEmailId=nsaiteja072%40gmail.com&customerMobileNo=9502121334&customerName=Sai+Teja&merchantId=MERMER280f21b&merchantTxnAmount=102&merchantTxnId=572038×tamp=1766858551694&utilityBiller=Airtel+Payments+Bank+FASTag&signature=ba7df0685accf6dab0c23d6e061d9e9082bf679ce428c6ab41334986b9e98a04" }, "message": "Transaction initiated" }

Status: Success (200)

Message: Transaction initiated

Response Details

Field Description
status Boolean indicating success/failure
statuscode HTTP status code
data.pg Payment gateway name
data.web_url URL to redirect customer for payment
message Response message

Usage Instructions

  1. Send a POST request to the endpoint with required headers and form parameters
  2. Redirect user to the web_url provided in the response
  3. Handle the callback URL for transaction completion
``` Manarecharge