How to Make Your Payment Accepts Certain Cards?
This parameter ONLY working with those integration types (Hosted Payment Page, Invoices(Payment Endpoint)).
This article provides an in-depth look at the card_filter
feature, a valuable tool for merchants looking to enhance their payment processing capabilities. With this feature, merchants can specify particular BIN (Bank Identification Number) ranges, allowing them to accept payments exclusively from cards that begin with designated identifiers.
By implementing the card_filter
, merchants gain greater control over their transactions, ensuring that only authorized cards are processed. This not only helps in reducing fraudulent activities but also streamlines the payment process by filtering out unwanted transactions. Additionally, the flexibility to add multiple BIN ranges means that merchants can tailor their acceptance criteria to meet specific business needs, enhancing security and operational efficiency.
How this parameter could benefit you?​
Here are some scenarios to help you understand when to use the hide shipping parameter/feature:
- Enhanced Security: By allowing merchants to specify which card types are accepted, the card_filter parameter helps reduce the risk of fraudulent transactions. This ensures a safer transaction environment for both the merchant and the customer.
- Improved Customer Experience: By filtering out unsupported or less preferred card types, merchants can streamline the payment process, making it more efficient and user-friendly. This can lead to higher customer satisfaction and potentially increased conversion rates.
- Operational Efficiency: The ability to filter card types simplifies transaction management and reconciliation processes. This can save time and resources, allowing businesses to focus on other critical aspects of their operations.
- Customized Bank/Offers Deals: Merchants can leverage the
card_filter
parameter to offer products or promotions specific to certain banks. By accepting only the card types associated with these banks, merchants can create exclusive deals and partnerships, enhancing customer loyalty and potentially driving more sales.
Name but a few different Businesses/Industries that can benefit from this API parameter:
- E-commerce Platforms: Online retailers can use the
card_filter
parameter to accept only specific card types, enhancing security and streamlining the payment process for their customers. - Subscription Services: Businesses offering subscription-based services can leverage this parameter to ensure that recurring payments are processed using preferred card types, reducing the risk of payment failures.
- Educational Institutions: Schools and universities can benefit from this parameter by accepting tuition payments through preferred card types, ensuring smoother transaction processing.
- Hospitality Industry: Hotels and travel agencies can use the
card_filter
parameter to accept payments from specific card types, often linked to loyalty programs or special deals with certain banks. - Non-Profit Organizations: Charities and non-profits can utilize this parameter to accept donations through preferred card types, ensuring secure and efficient processing of contributions.
How to Use?​
In order for you to start use the card_filter
feature, you kindly need to follow the below simple steps:
- Within the initiation of the request payload of the payment page/link in Step 3 via any of the supported integration types by this feature, you will use the optional parameter
card_filter
within the main request payload itself as shown below:{
.
.
"card_filter":true
.
.
} - Once you post your request, you will receive a response that includes redirect URL like the following:
"redirect_url": "https://secure.paytabs.com/payment/page/599458B182E5B6B********************B4818688",
- Next, you should redirect your customer to this URL so that he can fulfill the payment successfully. You may need to check his customer experience after in the coming Expected Payment Flow Behavior.
Parameter Specifications​
-
card_filter
Parameter card_filter
Description card_filter
is one of the optional parameters that the request may have, which will allow you to accept only cards that start with a specific number/identifier/BIN code you want.Data Type STRING Required ✘ Min N/A Max 255 character Validation Rules - Accepts only digits spread by commas.
- Each card filter prefix can be one digit or more.
- If an empty value is presented, the filter will not be applied.
Sample {
"card_filter": "41111,400000,5200000,549838"
} -
card_filter
Parameter card_filter_title
Description To display Title/Message for the customer regarding the cards that is accepted acording to number/identifier/BIN code mentioned in card_filter
.Data Type STRING Required ✘ Min N/A Max 255 Character Validation Rules Can't be empty. Sample {
"card_filter_title": "Only accept cards start with 41111,400000"
}
Request & Response Payloads Samples​
- Hosted Payment Page
- Invoices
- PayLinks
The below sample request payload will show you how you can pass the above-mentioned required parameter/s, which are needed to be passed with valid values to perform a request. Along with the response payload received after using this request payload.
- Request Sample Payload
- Response Sample Payload
{
"profile_id": 9*****4,
"tran_type": "sale",
"tran_class": "ecom",
"cart_description": "Description of the items/services",
"cart_id": "CART#1001",
"cart_amount": 500.00,
"cart_currency": "SAR",
"card_filter": "41111,400000,5200000,549838",
"card_filter_title": "Only accept cards start with 41111,400000"
}
{
"tran_ref": "TST22********159",
"tran_type": "Sale",
"cart_id": "CART#1001",
"cart_description": "Description of the items/services",
"cart_currency": "SAR",
"cart_amount": "500.00",
"return": "none",
"redirect_url": "https://secure.paytabs.com/payment/page/599458B182E5B6B********************B4817FD44318539688688",
"serviceId": 2,
"profileId": 9*****4,
"merchantId": 1*****7,
"trace": "PMN****4.63****A8.00****C4"
}
The below sample request payload will show you how you can pass the above-mentioned required parameter/s, which are needed to be passed with valid values to perform a request. Along with the response payload received after using this request payload.
- Request Sample Payload
- Response Sample Payload
{
"profile_id": 9*****4,
"tran_type": "sale",
"tran_class": "ecom",
"cart_currency": SAR,
"cart_amount": "9.5",
"cart_id": "CART#1001",
"cart_description": "Test Description",
"card_filter": true,
"card_filter": "41111,400000,5200000,549838",
"card_filter_title": "Only accept cards start with 41111,400000",
"invoice": {
"line_items": [
{
"unit_cost": 9.5,
"quantity": 1
}
]
}
}
{
"tran_ref": "TST22********159",
"tran_type": "Sale",
"cart_id": "CART#1001",
"cart_description": "Description of the items/services",
"cart_currency": "SAR",
"cart_amount": "9.5",
"return": "none",
"redirect_url": "https://secure.paytabs.com/payment/page/599458B182E5B6B********************B4817FD44318539688688",
"serviceId": 2,
"profileId": 9*****4,
"merchantId": 1*****7,
"trace": "PMN****4.63****A8.00****C4"
}
You need to set the set the parameter card_filter
to true
- Request Sample Payload
- Response Sample Payload
{
"profile_id": 9*****4,
"tran_type": "sale",
"tran_class": "ecom",
"cart_currency": SAR,
"cart_amount": "9.5",
"cart_id": "CART#1001",
"cart_description": "Test Description",
"card_filter": true,
"card_filter": "41111,400000,5200000,549838",
"card_filter_title": "Only accept cards start with 41111,400000",
"invoice": {
"line_items": [
{
"unit_cost": 9.5,
"quantity": 1
}
]
}
}
{
"tran_ref": "TST22********159",
"tran_type": "Sale",
"cart_id": "CART#1001",
"cart_description": "Description of the items/services",
"cart_currency": "SAR",
"cart_amount": "9.5",
"return": "none",
"redirect_url": "https://secure.paytabs.com/payment/page/599458B182E5B6B********************B4817FD44318539688688",
"serviceId": 2,
"profileId": 9*****4,
"merchantId": 1*****7,
"trace": "PMN****4.63****A8.00****C4"
}
Expected Payment Flow Behavior​
- Hosted Payment Page
- Invoices
- PayLinks
- As mentioned above in the How to use? section, As a merchant you would initiate a payment request per the above Specifications, same as the sample codes mentioned in the samples section above.
- Then, you will receive a response that includes redirect URL. This means you have initiated a correct payment request/page successfully.
"redirect_url": "https://secure.paytabs.com/payment/page/599458B182E5B6B********************B4818688",
- Next, you should embed this url inside your checkout page directly using the needed mark up tags
- After this, your customer would proceed normally with payment by providing his card information only cards that start with the filtered list can proceed with the payment process.
- Then, he will be redirected to his issuer bank 3DS/OTP page to authenticate the used card
- Finally, he would be redirect to a success/error page accordingly. By this time, you will be able to see his transaction on your merchant dashboard, whether it's accepted/authorized or not.
- As mentioned above in the How to use? section, As a merchant you would initiate a payment request per the above Specifications, same as the sample codes mentioned in the samples section above.
- Then, you will receive a response that includes redirect URL. This means you have initiated a correct payment request/page successfully.
"redirect_url": "https://secure.paytabs.com/payment/page/599458B182E5B6B********************B4818688",
- Next, you should embed this url inside your checkout page directly using the needed mark up tags
- After this, your customer would proceed normally with payment by providing his card information only cards that start with the filtered list can proceed with the payment process.
- Then, he will be redirected to his issuer bank 3DS/OTP page to authenticate the used card
- Finally, he would be redirect to a success/error page accordingly. By this time, you will be able to see his transaction on your merchant dashboard, whether it's accepted/authorized or not.
- As mentioned above in the How to use? section, As a merchant you would initiate a payment request per the above Specifications, same as the sample codes mentioned in the samples section above.
- Then, you will receive a response that includes Link URL. This means you have initiated a correct payment PayLink successfully.
"link_url": "https://secure.paytabs.com/payment/link/109430/1474XX7",
- Next, you should embed this url inside your checkout page directly using the needed mark up tags
- After this, your customer would proceed normally with payment by providing his card information only cards that start with the filtered list can proceed with the payment process.
- Then, he will be redirected to his issuer bank 3DS/OTP page to authenticate the used card
- Finally, he would be redirect to a success/error page accordingly. By this time, you will be able to see his transaction on your merchant dashboard, whether it's accepted/authorized or not.