search

Proxy Solution for accessing URLs on M2M SIM Cards

Merchant applications running on Paytm POS terminals can route their HTTPS API calls to their own backend through the Paytm proxy server instead of calling the backend directly. The proxy supports GET, PUT, POST and DELETE requests and forwards each request to the merchant server mapped to it.

This is required because, as per DOT guidelines, not more than 100 URLs/IPs can be whitelisted on M2M SIM cards. Merchants therefore need to use the Paytm proxy solution to reach their servers over M2M SIM cards.

Integration needs two changes in the merchant app: the base URL of the API call is replaced with the Paytm proxy URL, and one extra request header identifies the merchant backend. Paths, query parameters, other headers and the request body stay as they are.

Onboarding

Before integrating, share the base URL of your backend API with Paytm. Paytm maps that base URL on the proxy server and returns a merchant identifier value for it.

Item

Description

Merchant base URL

The HTTPS base URL of your backend, for example https://abc.merchant.com. Shared with Paytm during onboarding.

muid

The identifier value Paytm issues for that base URL. Sent as a request header on every proxied call.

Note: If your application calls more than one base URL, Paytm issues a separate muid value for each base URL. Send the value that matches the backend the request is meant for.

Request Changes

Existing request

Request via Paytm proxy

Base URL

https://abc.merchant.com

Production: https://edc-device-merchant.paytm.com
Staging: https://edc-device-merchant-staging.paytm.com

Header muid

Not sent

Mandatory. Value issued by Paytm for the base URL.

Path, method, query, body, other headers

Unchanged

Unchanged

The Paytm proxy server reads the muid header, resolves the mapped merchant base URL, and forwards the request there. The response from the merchant server is returned to the application as is. Use the staging host while testing the integration and switch to the production host for live traffic.

Sample GET Request

Values used in the samples: merchant base URL https://abc.merchant.com, muid value merchanttest.

Existing request

curl --location --request GET 'https://abc.merchant.com/getData' \
--data-raw ''

Request via Paytm proxy

curl --location --request GET 'https://edc-device-merchant.paytm.com/getData' \
--header 'muid: merchanttest' \
--data-raw ''

Sample POST Request

Existing request

curl --location --request POST 'https://abc.merchant.com/sendData' \
--header 'Content-Type: application/json' \
--data-raw '{
  "key1": "value1",
  "key2": "value2"
}'

Request via Paytm proxy

curl --location --request POST 'https://edc-device-merchant.paytm.com/sendData' \
--header 'muid: merchanttest' \
--header 'Content-Type: application/json' \
--data-raw '{
  "key1": "value1",
  "key2": "value2"
}'