VIP-SHOP
(v21.09+)
VIP-SHOP is an add-on that allows you to sell VIP codes in real time using Stripe as a processor of credit cards, GooglePay and ApplePay. VIP-SHOP is NOT included in BlaB! WS/AX Pro and must be purchased separately. VIP-SHOP settings are fully integrated in the Admin CP of the chat.
VIP-SHOP is NOT a required part of BlaB! WS/AX Pro - you can sell VIP codes by installing and using any online store software that is familiar to you or popular in your region. Alternatively, you can generate VIP codes en masse and sell them via online services such as MyCommerce, e-Junkie, Simple Goods.
How VIP-SHOP works
Below is a simplified diagram and a simplified explanation of the internals of VIP-SHOP.
- The user is on
page-A
(vipshop/index.php) and clicks BUY VIP CODE. page-A
fires in backgroundrequest-X
to Stripe API:page-A
receives in return payment-page-URL and generates payment-intent-token.page-A
saves payment-intent-token in the database with status UNPAID.page-A
redirects the user to payment-page-URL:page-B
.
- The user enters their credit card details on
page-B
and submits the form to Stripe API withrequest-Y
.- on-cancel/failure:
- Stripe API returns cancel-url and redirects the user to cancel-url: (vipshop/page_cancel.php).
- on-success:
- Stripe API fires
request-Z
which changes the record payment-intent-token in the database from UNPAID to PAID. - Stripe API returns success-url and redirects the user to success-url -
page-C
: (vipshop/page_success.php).
- Stripe API fires
- on-cancel/failure:
page-C
checks whether payment-intent-token has status PAID, generates and displays the VIP code.

HOW TO SETUP VIP-SHOP
- You need BlaB! AX Pro or BlaB! WS Pro version 21.09 or above, up and running.
- You need a fully functional Stripe account.
- Purchase VIP-SHOP.
Initial chat settings
- Create new VIP slots - AdminCP » VIP, and optionally create and link new user groups to the VIP slots - AdminCP » Groups.
- Generate VIP codes and test thoroughly if everything works as expected.
- Download, unzip and upload VIP-SHOP in a folder under the chat named vipshop:
/chat/vipshop
- Create new VIP-SHOP products from AdminCP » VIP » VIP-SHOP by selecting a VIP slot from the drop-down menu and length in hours.
Initial Stripe settings
- Go to Stripe dashboard and activate test mode (if inactive) with the button view test data.
- Go to Products.
- Add a new product with ADD PRODUCT.
- Provide a name, description and optionally an image - copy from AdminCP » VIP » VIP-SHOP » {Product}.
- Select price, activate ONE TIME and save with SAVE PRODUCT.
- Repeat step 2 to add more products.
- Go to Developers » Webhooks.
- Add a new endpoint with ADD ENDPOINT.
- Copy from AdminCP » VIP » VIP-SHOP » SETTINGS:
STRIPE-WEBHOOK-SECRET & URL
and paste it as Endpoint URL. - If VIP-SHOP 22.09 with STRIPE API 2022 Events to send:
checkout.session.completed
- If VIP-SHOP 21.09 with STRIPE API 2020 Events to send:
charge.succeeded
- Save with the button ADD ENDPOINT
Additional settings
- Copy your test secret API KEY from Stripe » Developers » API keys to AdminCP » VIP » VIP-SHOP » SETTINGS » STRIPE-API-KEY (mind secret key NOT publishable key) and save with OKAY.
- Copy and paste PriceIDs from each Stripe » Products » {product} to AdminCP » VIP » VIP-SHOP » {product} and save with OKAY.
- Go to
/chat/vipshop/
and make test purchases using as a test credit card number: 424242424242, card expiration - any date in the future, CVV - any 3 digits and a random email address.
Debugging
- Error messages on clicking BUY VIP CODE: AdminCP » VIP-SHOP - missing/incorrect API KEY or incorrect priceID.
- payment-intent-token not marked as PAID on-success: Stripe » Developers » Webhooks - missing/incorrect webhook endpoint URL or
checkout.session.completed
API22 /charge.succeeded
API20 not selected.
From TEST to LIVE mode
- Stripe: Copy each product from TEST mode to LIVE mode with the button Copy to live mode.
- Stripe: Turn off TEST mode with the button Viewing test data.
- Stripe: Add a LIVE endpoint by repeating step #4 from Initial Stripe settings in LIVE mode. Go to Developers » Webhooks.
- Add a new endpoint with ADD ENDPOINT.
- Copy from AdminCP » VIP » VIP-SHOP » SETTINGS:
STRIPE-WEBHOOK-SECRET & URL
and paste it as Endpoint URL. - Events to send:
checkout.session.completed
API22 /charge.succeeded
API20 - Save with the button ADD ENDPOINT
- Copy your LIVE secret API KEY from Stripe » Developers » API keys to AdminCP » VIP » VIP-SHOP » SETTINGS (mind secret key NOT publishable key) and save with OKAY.
- Copy and paste PriceIDs from each Stripe » Products » {product} to AdminCP » VIP » VIP-SHOP » {product} and save with OKAY - PriceIDs in LIVE mode are different from PriceIDs in TEST mode!
How to display a link to VIP-SHOP
You can put a link to VIP-SHOP on your website and you can display similar links in chat.
AdminCP » Additions » Panel Top
<div style="margin:10px 0 10px 0;font-size:120%">
<b class="x_accent_fg pointer" onclick="window.open('./vipshop/','vipshop')">Become a VIP user!</b>
</div>
TheGodFather would return a link to VIP-SHOP when users send in chat vip
or shop
.
AdminCP » Machines » TheGodFather » New subset {IMPORT}
TheGodFather:eyIwIjpbIm5hbWUiLCJWSVAiXSwiMSI6WyJlbmFibGVkIiwiMiJdLCIyIjpbInJvb21pZCIsIjAiXSwiMyI6WyJ1Z3JvdXAiLCIwIl0sIjQiOlsicG0iLCIwIl0sIjUiOlsia2V5d29yZHMiLCJ2aXAsc2hvcCJdLCI2IjpbImFuc3dlcnMiLCJXYW5uYSBiZSBWSVA/IEhlcmU6IGh0dHBzOi8vWU9VUi1XRUJTSVRFLkNPTS9jaGF0L3ZpcHNob3AvIl19
Time Machine with information and a link to VIP-SHOP 60 seconds after loading the chat.
AdminCP » Machines » Time MAchine » New sequence {IMPORT}
TimeMachine:eyIwIjpbIm5hbWUiLCJ2aXBzaG9wIl0sIjEiOlsiZW5hYmxlZCIsIjIiXSwiMiI6WyJyb29taWQiLCIwIl0sIjMiOlsiaHJlbWVtYmVyIiwiMSJdLCI0IjpbInVncm91cCIsIjAiXSwiNSI6WyJpbmZpbml0ZSIsIjAiXSwiNiI6WyJzaHVmZmxlIiwiMCJdLCI3IjpbImdhcCIsIjYwIl0sIjgiOlsiZGVsYXkiLCIwIl0sIjkiOlsiY29va2llbGVuZ3RoIiwiMCJdLCIxMCI6WyJ0ZW1wbGF0ZSIsIjxkaXYgY2xhc3M9XCJtc2dcIj48aW1nIGNsYXNzPVwiYXZ0IHhfY2lyY2xlXCIgc3JjPVwiYXZhdGFyLnBocD9xPTgwMDAxXCIgYWx0PVwiXCIgLz48ZGl2IHN0eWxlPVwidGV4dC1hbGlnbjpsZWZ0XCI+PHNwYW4gY2xhc3M9XCJjaGF0X2FyZWFfdXNlciBnMVwiPlRoZUdvZEZhdGhlcjwvc3Bhbj4gPHNwYW4gY2xhc3M9XCJjaGF0X2FyZWFfdGltZVwiPntUSU1FfTwvc3Bhbj48YnIgLz48c3Bhbj57VEVYVH08L3NwYW4+PC9kaXY+PC9kaXY+Il0sIjExIjpbImVsZW1lbnRzIiwiV2FubmEgYmUgVklQPyA8YiBjbGFzcz1cInhfYWNjZW50X2ZnIHBvaW50ZXJcIiBvbmNsaWNrPVwid2luZG93Lm9wZW4oJy4vdmlwc2hvcCcsJ3ZpcHNob3AnKVwiPkJ1eSBhIFZJUCBjb2RlIGhlcmUhPC9iPiJdfQ==
MISC NOTES
- Only SuperAdmin (id:1) is allowed to save settings in AdminCP » VIP » VIP-SHOP and view PAID/UNPAID orders.
- A canceled/unpaid payment-intent-token is deleted from the database in one week. A successfully paid payment-intent-token is deleted from the database in one year.
- On receiving payment-intent-token after hitting BUY VIP CODE, the browser of the user saves a special token as a cookie for one year. As long as this cookie token exists, and is not overwritten by a next cookie token, vipshop/page_success.php will respect it and will provide a new or the previously generated VIP CODE in case the corresponding payment-intent-token has status PAID.
- VIP-SHOP reads the required DB credentials from chat/config.php - that's why it is placed in /chat/vipshop/. If you desperately need to move VIP-SHOP outside the chat folder copy/paste the
$dbss
array from chat/config.php to vipshop/config.php first. Remember to set the proper Stripe endpoint URL (see 3) - you cannot copy/paste the URL from AdminCP » VIP » VIP-SHOP. - VIP-SHOP only supports credit/debit cards, GooglePay and ApplePay. It might take a week to confirm a SEPA payment and there are several complications regarding currencies and currency conversions with non-credit card payments. If you are willing to test other payment methods on your own, please submit a support ticket.