Request: Hide Shipping (hide_shipping)
This parameter ONLY working with those integration types (Hosted Payment Page, Invoices(Payment Endpoint), PayLinks).
In online shopping, itβs important to handle customer information carefully. While you might not always need a shipping address, the billing address is required by law and banks to help prevent fraud. Collecting the correct billing information is crucial because it helps avoid problems with payment declines.
As a merchant, you must ensure that the genuine customer address is provided, not just pre-set values, as this could lead to higher declines and failed transactions due to anti-fraud screening.
With PayTabs, merchants can improve the shopping experience by hiding the billing information on the payment page, as long as valid details have already been entered. This way, you can meet legal requirements while making it easier for customers to complete their purchases.
For now you are applicable to hide shipping information ( will explain it in the next steps) but the billing is mandatory except in the digital product mode
How this parameter could benefit you?β
Here are some scenarios to help you understand when to use the hide shipping parameter/feature:
- Digital Products: If youβre selling items like software, e-books, or online courses that donβt require physical shipping, this feature is ideal.
- Service-Based Businesses: For businesses offering services (like consulting or online classes) where no physical goods are delivered, hiding shipping information simplifies the process.
- Subscription Services: If your business model involves subscriptions (e.g., streaming services), where shipping is irrelevant, this feature can streamline the checkout.
- Event Tickets: When selling tickets for virtual events or webinars, thereβs no need for shipping details, making this feature useful
How to Use?β
In order for you to start use the hide_shipping
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
hide_shipping
within the main request payload itself as shown below:{
.
.
"hide_shipping":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β
-
hide_shipping
Parameter hide_shipping
Description Indicates whether to hide shipping and billing information or not from the payment page.
Note: The customer details are still required and must be passed in case any of the details are missing or passed with invalid values; the hide_shipping option will be ignored, and the cardholder will be required to enter any of the missing details on the payment page.
To know more about this parameter please click here.Data Type BOOLEAN Required β Sample {
"hide_shipping": true
}
Request & Response Payloads Samplesβ
- Hosted Payment Page
- Invoices
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": "Unique order reference00",
"cart_amount": 25000.2,
"cart_currency": "SAR",
"hide_shipping":true,
}
{
"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_12345_2",
"cart_description": "Test Description",
"hide_shipping": true,
"hide_shipping":true,
"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
- 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": "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 without the need to fill out the shipping details:
- 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/request/invoice/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 without the need to fill out the shipping details:
- 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.