Payment Locking Version 2
Feature Details
- Allows merchants to block/ allow specific payment instruments group/ payment instruments in the payment page.
- Also for Cards and UPI, getCardFilterList and getUPIFilterList functions are used which return CardFilterList and UPIFilterList. When a new card is being entered or a new vpa address there is a check in place using the filter lists.
- Payload locking payload is passed in orderDetails within the payload where all the fields are CASE SENSITIVE.
- When the instrument in transaction call has a mismatch with the instrument selected on payment page, Juspay declines the payment with order status = “JUSPAY_DECLINED” and error = “Payment instrument mismatch”
Payload Details
- The paymentMethodType needs to be passed as WALLET, CARD, UPI, NB, CONSUMER_FINANCE, CASH, REWARD etc.
- Two blocks with the same paymentMethodType should not be passed. If two blocks are passed, the first one will always be considered.
Structure
The Schema of PaymentFilterPayload :{ allowDefaultOptions :: Maybe Boolean
, options :: Array PaymentMethodFilter
}
{ enable :: Boolean
, paymentMethodType :: PaymentMethodType
, paymentMethods :: Maybe(Array String)
, cardFilters :: Maybe (Array CardFilter)
, upiFilters :: Maybe (Array UPIFilter)
}
{ upiType :: UPIType
, upiMethods :: Maybe (Array String)
, enable :: Boolean
}
{ cardBrands :: Maybe (Array String)
, cardBins :: Maybe (Array String)
, cardTypes :: Maybe (Array String)
, cardSubTypes :: Maybe (Array String)
, cardBanks :: Maybe (Array String)
, enable :: Boolean
}
Payload : PaymentFilterPayload:
Property | Type & Description | Possible Values |
---|---|---|
allowDefaultOptions | Type: Maybe Boolean; Use Case: After applying payment, ‘merge’ defines if we have to merge these payment method types with the default payment method types or not. |
Possible Values: true, false Default Value: true |
options | Type: Array PaymentMethodFilter; Use Case: Options define on which payment locking has to be applied on. |
Possible Values: Array (Payment MethodFilter) |
PaymentMethodFilter:
Property | Type & Description | Possible Values |
---|---|---|
enable | Type: Boolean; (*Required) Use Case: This is to decide whether to disable or enable the payment method. false will disable the payment method and true will enable the payment method. For CARD/UPI as paymentMethodType it should be true if upiFilters or cardFilters are passed. |
Possible Values: true, false |
paymentMethodType | Type: PaymentMethodType; (*Required) Use Case: This decides on which payment method type the payment locking should be applied on. | Possible Values: “CARD”, “UPI“, “WALLET“, “NB, “CONSUMER_FINANCE“, “REWARD“, “CASH“ All the values are case sensitive |
paymentMethods | Type: Array String; (*Optional) Use Case: This contains the payment methods on which payment locking have to be applied It won’t be considered if paymentMethodType is UPI / CARD. | Possible Values: [“PHONEPE”, ”PAYTM”],...
In case of mandate flows (NB, WALLET, CONSUMER_FINANCE) pass additional values with prefix JP_ For example, All the values are case sensitive |
cardFilters | Type: Array CardFilter; (*Optional) It won’t be considered unless paymentMethodType is CARD. | |
UPIFilters | Type: Array UPIFilter; (*Optional) It won’t be considered unless paymentMethodType is UPI. |
CardFilter
Property | Type & Description | Possible Values |
---|---|---|
cardBrand | Type: Array String; (*Optional) | Possible values: “VISA”, “RUPAY”,… All the values are case sensitive |
cardBin | Type: Array String; (*Optional) | Possible values: [“459000::460000“] |
cardType | Type: Array String; (*Optional) | Possible values: “DEBIT”, ”CREDIT” All the values are case sensitive |
cardSubType | Type: Array String; (*Optional) | Possible values: “BUSINESS”, ”EMPLOYEE_CARD” All the values are case sensitive |
cardBank | Type: Array String; (*Optional) | Possible values: “SBI”,”ICICI”,.... All the values are case sensitive |
enable | Type: Boolean | Possible values: true, false |
UPIFilter: collect/intent
Property | Type & Description | Possible Values |
---|---|---|
upiType | Type: UPIType; | Possible values: “COLLECT”, ”INTENT” All the values are case sensitive |
upiMethods | Type: Array String; (*Optional) | Possible values: If upiType is COLLECT then “@ybl, @okicici”... If upiType is INTENT then “phonepe, googlepay”... |
enable | Type: Boolean | Possible values: true, false |
Sample Payload:
{
"order_id": "R8205947560",
"first_name": "John",
"last_name": "Wick",
"mobile_number": "9592329220",
"email_address": "[email protected]",
"customer_id": "9592329220",
"timestamp": "1611559686153",
"merchant_id": "abcd",
"amount": "1.00",
"currency": "INR",
"payment_filter": {
"allowDefaultOptions": true,
"options": [
{
"paymentMethodType": "WALLET",
"paymentMethods": ["LAZYPAY","SIMPL"],
"enable": false
}
]
}
}
Structure for EMI Filter:
sdk_udf :: Maybe String
Use cases
Use case | Type & Description | sdk_udf : Possible Values |
---|---|---|
Show EMI | Type: Maybe String; Use Case: Need to show EMI on payment page | Value: “showEMI” |
No EMI | Type: Maybe String; Use Case: Need to hide EMI on payment page | Value: “hideEMI” |
EMI without Cards | Type: Maybe String; Use Case: Need to show EMI on payment page, but not CARD. | Value: “ShowEMIWithoutCards” |
Note : Please intimate your Juspay POC if you plan on using sdk_udf. They will enable a config required to use this feature.
Sample Payload for sdk_udf:
"sdk_udf": "showEMI"
"sdk_udf": "hideEMI"
"sdk_udf": "ShowEMIWithoutCards"
For further information on payload details please reach out to your Juspay POC.
Updated about 1 month ago