POSTFetch BIN API
Use Case
To check if the BIN entered by the user is a valid card BIN from which AI router can process a payment.To check if subscription payments are available on the BIN also to get the card details like card scheme and issuing bank of the BIN.
Note
- TxnToken URL (Mentioned as endpoints under the top-right section of this document)
- AccessToken URL:
- Staging URL
- https://stage-router.paytm.in/aoa-pay-option-service/v2/fetchBinDetail?mid={{mid}}&referenceId={{referenceId}}
- Prod URL
- https://router.paytm.in/aoa-pay-option-service/v2/fetchBinDetail?mid={{mid}}&referenceId={{referenceId}}
Request Attributes
Head
Attribute | Description |
---|---|
requestTimestamp string optional | Request time in mili-seconds. Example: 1588402269 |
token string mandatory | This is the unique transaction token Example: ede0b9a1-e30d-4fa0-89fb-68221c3e9ff6 |
tokenType TokenType mandatory | Token Type, Values that can be selected: TXN_TOKEN, ACCESS |
channelId EchannelId mandatory | The parameter value identifies the Channel for which API call is initiated. Possible values: WEB , WAP |
Body
Attribute | Description |
---|---|
bin string mandatory | Starting 9 digits of credit or debit card number |
mid string mandatory | Paytm provides MID as a unique identifier to each merchant |
txntype string conditional | This parameter is used to identify the payment flow. (Mandatory in case of ADDNPAY) |
Response Attributes
Head
Attribute | Description |
---|---|
responseTimestamp string | EPOCH timestamp of the time at which response is being sent. |
Body
Attribute | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resultInfo ResultInfo | This parameter gives the information about the result of the API response | ||||||||||||||||||||||||||||||||||||||||||||||||||
binDetail BinData | BIN details like issuing bank name and card scheme (Visa/Master..) are provided here | ||||||||||||||||||||||||||||||||||||||||||||||||||
BinData +
| |||||||||||||||||||||||||||||||||||||||||||||||||||
authModes List<String> | Auth mode available on the BIN Possible Value: OTP | ||||||||||||||||||||||||||||||||||||||||||||||||||
iconUrl string | Icon URL of issuing bank of saved card | ||||||||||||||||||||||||||||||||||||||||||||||||||
isEmiAvailable boolean | Depicts, if the EMI is available on the selected BIN or not | ||||||||||||||||||||||||||||||||||||||||||||||||||
isSubscriptionAvailable boolean | Depicts if subscription payments are available on this BIN or not. |
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
0000 | S | Success |
1003 | F | Bin number is not valid |
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 tokenType, etc |
1007 | F | Missing mandatory element |
501 | F | System Error |
2014 | F | ReferenceId in the query param doesn't match with the ReferenceId send in the request |
1006 | F | Your Session has expired |
2013 | F | Mid in the query param doesn't match with the Mid send in the request |
2014 | F | OrderId in the query param doesn't match with the OrderId send in the request |
2006 | F | Mid is invalid |
2006 | F | Reference Id is invalid |
2222 | F | Invalid request body |
1011 | F | Parameter illegal Note: If the value is not allowed in request parameters then the result message should be in the format of "Invalid {field name}" For example:Invalid tokenType, etc |
curl --location 'https://stage-router.paytm.in/aoa-pay-option-service/v2/fetchBinDetail?mid={{mid}}&orderId={{orderId}}' \
--header 'Content-Type: application/json' \
--data '{"head": {"channelId":"WEB","token": "a7bc0582-bbe2-4f63-893c-ea89efbc4b07","tokenType":"TXN_TOKEN"},"body": {"mid":"{{mid}}","bin":"411111"}}'