Benefit
Benefit is a domestic debit payment option, widely used in Bahrain.
Two ways to integrate benefit in your system.
1. Directly to use benefit cards through the card SDK
The flow:
Once the customer add the benefit card details it will generate a token in the backend and then you need to pass the token id created through the charge api in the source object.
Once the above is done, you will get a url in the transection object to add the PIN code to proceed as shown below.
Benefit payment method accepts the BHD currency only.
Benefit card can be saved for the upcoming transections.
2. Redirection on the Benefit payment page, to enter the card information and complete the processing.
Benefit doesn't support authorization.
API call for Benefit
Sample to control the source object in the charge API: "src_bh.benefit" with currency 'BHD' only.
{
...
"currency": "BHD",
"source": {
"id": "src_bh.benefit"
}
"post": {
"url": "https://webhook.site/fd8b0712-d70a-4280-8d6f-9f14407b3bbd"
},
"redirect": {
"url": "https://customer.redirection_url"
}
...
}
API Response
A transaction URL is expected in the API response details. This will redirect the customer to the Benefit Payment Page
{
...
"id": "chg_TS05A1320231018Hy56070XXXX",
"status": "INITIATED",
"transaction": {
"timezone": "UTC+03:00",
"created": "1671563769240",
"url": "<https://sandbox.payments.tap.company/test_gosell/v2/payment/tap_process.aspx?chg=d6aPjTalvIV03hWrGnROvO3i8B2ED7hkBbPL8PY%2fzEY%3d">,
"expiry": {
"period": 30,
"type": "MINUTE"
},
...
}
Benefit Payment Page Sample
Customer experience journey
Post payment details
Sample webhook response (post payment details)
{
"id": "chg_TS05A1320231018Hy56070XXXX",
"object": "charge",
"live_mode": false,
"customer_initiated": true,
"api_version": "V2",
"method": "POST",
"status": "CAPTURED",
"amount": 100.0,
"currency": "BHD",
"threeDSecure": true,
"card_threeDSecure": false,
"save_card": false,
"merchant_id": "",
"product": "",
"statement_descriptor": "Sample",
"description": "Test Description",
"metadata": {
"udf1": "test 1",
"udf2": "test 2"
},
"transaction": {
"authorization_id": "123456",
"timezone": "UTC+03:00",
"created": "1686133093034",
"expiry": {
"period": 30,
"type": "MINUTE"
},
"asynchronous": false,
"amount": 100.0,
"currency": "BHD"
},
"reference": {
"track": "tck_TS03A1320231018e5D80706659",
"payment": "1307231018066595165",
"gateway": "202315888830649",
"acquirer": "315810000083",
"transaction": "txn_0001",
"order": "iphoe_13"
},
"response": {
"code": "000",
"message": "Captured"
},
"gateway": {
"response": {
"code": "00",
"message": "CAPTURED"
}
},
"receipt": {
"id": "201307231018065637",
"email": true,
"sms": false
},
"customer": {
"id": "cus_TS020920221916q8YJ2012896",
"first_name": "Waleed",
"last_name": "Asghar",
"email": "[email protected]",
"phone": {
"country_code": "971",
"number": "586275033"
}
},
"merchant": {
"country": "BH",
"currency": "BHD",
"id": "18695485"
},
"source": {
"object": "source",
"type": "CARD_NOT_PRESENT",
"payment_type": "DEBIT",
"payment_method": "BENEFIT",
"channel": "INTERNET",
"id": "src_bh.benefit"
},
"redirect": {
"status": "PENDING",
"url": "checkout.com/website"
},
"post": {
"attempt": 1,
"status": "PENDING",
"url": "<https://webhook.site/fd8b0712-d70a-4280-8d6f-9f14407b3bbd>"
},
"activities": [
{
"id": "activity_TS02A1320231018Xe560706737",
"object": "activity",
"created": 1686133093034,
"status": "INITIATED",
"currency": "BHD",
"amount": 100.0,
"remarks": "charge - created"
},
{
"id": "activity_TS06A0620231019Jw150706351",
"object": "activity",
"created": 1686133146351,
"status": "CAPTURED",
"currency": "BHD",
"amount": 100.0,
"remarks": "charge - captured"
}
],
"auto_reversed": false
}
hash 13a541064cd5da7bb309132acf4a7b9913c26baa64f3de2bfd064fXXXXXXXXXX
hashstring 66f72458a90ce13bda69da99cf2124a8384a2b99e812fcb2431995XXXXXXXXXX
content-typeapplication/json
accept text/plain, application/json, application/cbor, application/*+json, */*
Benefit Card Tokenization and Saving
Tap now supports Benefit Card tokenization and saving, which enhances the payment experience and improves the acceptance rate. This means you can now collect Benefit Card details directly from our Card SDK, eliminating the need for a separate benefit payment page and redirecting URL.
Benefits of Tokenization
Improved User Experience: Reduces the number of steps for the user.
Better Acceptance Rates: Streamlined process increases the likelihood of successful transactions.
Changes Required for Tokenization
To enable Benefit Card tokenization, follow these steps:
Integrate Card SDK: Ensure that you are using the latest version of Tap’s Card SDK (v2).
Change Source ID Parameter:
Update the source.id parameter value from src_bh.benefit to the token created from the Card SDK v2.
PIN Entry: After tokenization, the generated page will prompt the customer to enter their PIN, completing the process.
Benefit Card Saving
In addition to tokenization, Tap now supports saving Benefit Cards, similar to how you save VISA and MasterCard details. This feature allows users to save their Benefit Card information for future transactions, enhancing the user experience by speeding up the checkout process.
Implementation Steps for Saving Benefit Cards:
Token Creation: Use the Card SDK to create a token for the Benefit Card as demonstrated above.
Saving Card Details: Store the token securely for future use, similar to how you save other card types.
With the new Benefit Card tokenization and saving features, you can provide a more streamlined and efficient payment process for your customers. Ensure that you update your integration to use the latest Card SDK and change the source.id parameter as outlined above.
For further guidance, please contact the Developer Experience team at Tap
Updated 2 months ago