POSTSend Payment Request API
Use Case
To create the payment link for an order and send it to the customer's mobile over SMS.
Request Attributes
Head
Attribute | Description |
---|---|
clientId string(3) mandatory | Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key. Example: C11 |
version string(4) mandatory | Version of the API. Example: v1 |
requestTimestamp string(15) optional | EPOCH timestamp of the time at which request is being sent. |
channelId string(3) mandatory | The parameter value identifies the Channel for which API call is initiated. Possible values:
WEB
,
For websites, the value to be passed should be "WEB"
WAP
For Mobile websites/App, the value to be passed should be "WAP"
|
signature string(108) mandatory | Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request. For creating the checksum (signature) refer to the steps given in Checksum Logic. |
Body
Attribute | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mid string mandatory | Paytm provides MID as a unique identifier to each merchant. Example: INTEGR7769XXXXXX93833 | ||||||||||||||||||||||||
merchantOrderId string mandatory | Order Id for payment Example: OREDRID98765 | ||||||||||||||||||||||||
amount string mandatory | This parameter contains the amount to be charged to the customer and can have two places of decimal.
Example: 1303.00 | ||||||||||||||||||||||||
posId string(50) mandatory | Point of sale ID. Example: S12_123 | ||||||||||||||||||||||||
userPhoneNo string mandatory | Phone number of the user to whom payment request has to be sent on SMS Example: 7777777777 | ||||||||||||||||||||||||
expiry string mandatory | Time after which the link will expire and payment cannot be done on the same.
Example: 2020-01-30 12:30:30 | ||||||||||||||||||||||||
displayName string(50) optional | Display name for the payment request Example: Merchant Brand Name | ||||||||||||||||||||||||
orderDetails string optional | Details of the Order Example: Grocery Items | ||||||||||||||||||||||||
invoiceDetails string optional | Details of the Invoice/Bill Data associated with the transaction Example: #INV_ORDERID_98765 | ||||||||||||||||||||||||
comment string optional | Transaction Note that customer will see while making the payment | ||||||||||||||||||||||||
subwalletAmount object optional | Cap amount for different user subwallets Example: {"FOOD": "2"} | ||||||||||||||||||||||||
gstInformation object optional | |||||||||||||||||||||||||
GSTInformation +
| |||||||||||||||||||||||||
splitSettlementInfo object optional | Split payment details Note: Send only in case split settlement required | ||||||||||||||||||||||||
splitSettlementInfo(1) +
|
Note: The possible values for the User SubWalletType Enum are:
- FOOD
- GIFT
- MULTI_PURPOSE_GIFT
- TOLL
- CLOSED_LOOP_WALLET
- CLOSED_LOOP_SUB_WALLET
- FUEL
- INTERNATIONAL_FUNDS_TRANSFER
- CASHBACK
- GIFT_VOUCHER
- COMMUNICATION
Response Attributes
Head
Attribute | Description |
---|---|
clientId string(3) | Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key. Example: C11 |
version string(2) | Version of the API. Example: v1 |
responseTimestamp string(15) | EPOCH timestamp of the time at which response is being sent. |
signature string(108) | Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request. For creating the checksum (signature) refer to the steps given in Checksum Logic. |
Body
Attribute | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
resultInfo object | This parameter gives the information about the result of the API response | ||||||||
ResultInfo +
| |||||||||
paymentUrl string | Paytm generated payment URL which is sent to the customers over an SMS, and can be used to complete the payment from Paytm or any UPI app. |
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
SPR_001 | SUCCESS | Payment request sent successfully |
SPR_002 | FAILURE | merchantOrderid cannot be blank |
SPR_002 | FAILURE | MID cannot be blank |
SPR_002 | FAILURE | Invalid amount |
SPR_002 | FAILURE | Invalid expiry date |
SPR_002 | FAILURE | Invalid userPhoneNo |
SPR_003 | FAILURE | UPI paymode not enabled on merchant |
WM_1011 | FAILURE | Duplicate Order ID |
GE_0003 | FAILURE | We could not get the requested details. Please try again. |
DQR_0004 | FAILURE | Merchant's VPA-address not found |
RSPR_005 | FAILURE | Preference not enabled on Merchant |
SPRO_005 | FAILURE | Could not notify user. Either resend notification or try with new orderId |
SPRO_006 | FAILURE | Payment has been completed on this order |
SPRO_007 | FAILURE | OrderId contains restricted special characters |
curl -X POST 'https://securegw-stage.paytm.in/order/sendpaymentrequest' \
--header 'Content-Type: application/json' \
--data '{"body":{"mid":"{mid}","merchantOrderId":"BEKJBJK123","amount":"1303.00","userPhoneNo":"7777777777","posId":"S1234_P1235"}},
"head":{"clientId":"C11","version":"v1","signature":"{signature}"}}'