POSTPay API
Use Case
It is used to process the transaction with respect to paymentMode provided by the merchant in the request. We either return bank form for paymentMode like NET_BANKING, CREDIT_CARD, DEBIT_CARD or provide the result of payment in case of paymentMode like BALANCE.This API is called to initiate the payment for any order created in the AI router system.
Request Attributes
Head
Attribute | Description |
---|---|
requestTimeStamp string optional | EPOCH timestamp of the time at which request is being sent. |
channelId Enum optional | DeviceName from which request is sent. Possible values: APP , WEB , WAP |
tokenType Enum mandatory | Token Type Possible Values: TXN_TOKEN |
token string mandatory | Transaction Token |
Body
Attribute | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mid string mandatory | AI router provides MID as a unique identifier to each merchant. Example: 216820000002516036253 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
orderId string mandatory | It is unique reference ID for a transaction passed in Create Order API | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
paymentMode Enum mandatory | The payment mode used by the customer for the transaction.
Possible values that can be selected: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
requestType Enum mandatory | Request Type values that can be selected: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channelCode string conditional | BankCodes which are supported by AI router ( list )
Possible Values: AXIS, HDFC | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cardInfo object conditional | It contains the details of the saved and new card for payment transaction
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CardInfo +
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
payerAccount string conditional | VPA is needed for a UPI transaction. Example: 7777777777@paytm | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
coftConsent object optional | Consent to tokenize the instrument or not. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
coftConsent +
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
integrationType Enum optional | Values that can be selected: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mpin string conditional | passcode of PPBL Account.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
gatewayInfo Map optional | Information related to gateway | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
txnNote string optional | Transaction note providing a short description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
osType string optional | Possible values are "IOS/ANDROID/KAIOS" Default value is "ANDROID" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
walletInfo object conditional | It contains the wallet Information when PaymentMode is WALLET
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WalletInfo +
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
emiInfo object conditional | It contains the EMI information when PaymentMode is EMI
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
EMIinfo +
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
txnRoutingParams Map<String,Object> optional | Routing Configuration Input entered for the Enforced routing rule creation must be passed here for the Routing rule adherence.
|
Response Attributes
Head
Attribute | Description |
---|---|
responseTimestamp string | EPOCH timestamp of the time at which response is being sent. |
Body
Attribute | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
txnInfo object | It contain the transaction Information in case of WALLET PAY or PAYMENT_DIGITAL_CREDIT | ||||||||||||||||||||||||||||||||||||||||||||||||
TransactionInfo +
| |||||||||||||||||||||||||||||||||||||||||||||||||
callBackUrl string | Call back URL | ||||||||||||||||||||||||||||||||||||||||||||||||
bankForm object | BankForm Details returned in case of following paymentModes: | ||||||||||||||||||||||||||||||||||||||||||||||||
BankForm +
| |||||||||||||||||||||||||||||||||||||||||||||||||
deepLinkInfo object | It contain deep link in case UPI_INTENT | ||||||||||||||||||||||||||||||||||||||||||||||||
DeepLinkInfo +
| |||||||||||||||||||||||||||||||||||||||||||||||||
resultInfo object | This parameter gives the information about the result of the API response | ||||||||||||||||||||||||||||||||||||||||||||||||
resultInfo +
| |||||||||||||||||||||||||||||||||||||||||||||||||
gatewayrespcode string | Result code from payment gateways / aggregators | ||||||||||||||||||||||||||||||||||||||||||||||||
gatewayrespmsg string | Result message from payment gateways / aggregators |
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
0000 | S | Success |
501 | F | System Error |
2013 | F | Mid in the query param doesn’t match with the Mid sent in the request |
2014 | F | OrderId in the query param doesn't match with the orderId sent in the request |
1001 | F | Request parameters are not valid Note: If the value is not valid in the request parameter then the result message should be in the format of "Invalid {field name}" For example: Invalid requestType, Invalid tokenType, etc |
1010 | F | Merchant is inactive. Please ask Merchant to contact Paytm Helpdesk |
1006 | F | Your Session has expired |
1007 | F | Missing mandatory element |
2006 | F | Mid is invalid |
1011 | F | Parameter illegal Note: If the value is not allowed in request parameters then the result message should be in the format of "Parameter '[field name]' has invalid value '[value]'" For example: If we will send PAYMENT1(invalid value) in requestType in create order request then the result message should be "Parameter '[body->requestType]' has invalid value '[PAYMENT1]'" |
2222 | F | Invalid request body |
1012 | F | param missing |
312 | F | Invalid card details |
9999 | F | Something went wrong |
324 | F | Duplicate Order Id |
317 | F | Invalid payment mode. |
410 | F | order status is closed |
201 | F | order is paid |
New card
curl --location --request POST 'https://stage-router.paytm.in/aoa-acquiring-biz/v2/payment?mid=YOUR_MID_HERE&orderId=Ravi1367' \
--header 'Content-Type: application/json' \
--header 'Postman-Token: a7787b37-ae19-4bdd-8690-aee47a3e7934,e057b2ec-9707-4460-b705-dac48a701f78' \
--header 'cache-control: no-cache,no-cache' \
--data-raw '{"head": {"version": "v1","channelId":"WEB","token": "63241c05-f461-4993-bb17-4b08672788d2","tokenType":"TXN_TOKEN"},"body": {"mid": "YOUR_MID_HERE","orderId": "Ravi1382","paymentMode": "CREDIT_CARD","requestType": "PAYMENT","cardInfo": {"cardUniqueId": "4718650100010336","cvv": "233","expiryMonth":"01","expiryYear":"2024","cardFlowType": "NEW_CARD"},"integrationType":"CUSTOM_CHECKOUT"}}'