VibeFox Xendit for PrestaShop — Help
Requirements
PrestaShop: 8.0 to 9.x.
PHP: 8.0 or later. The module refuses to install on older PHP versions.
Shop currency: IDR, PHP, VND, THB, MYR, USD or SGD. For other cart currencies the payment method is not shown. Which payment channels and currencies are really available depends on your Xendit account.
Xendit account: you need a secret API key with write permission for Money-in (invoices) for test mode and another one for live mode, and the webhook verification token of each mode (see Configuration). Only the secret keys and the verification tokens are used. No public key is needed, because the customer pays on the Xendit hosted invoice page.
VibeFox license key: bought on vibefox.net. One key works on one domain.
Installation
1. In the back office go to Modules > Module Manager and click Upload a module. Choose the module ZIP file.
2. When the upload finishes, click Configure, or find VibeFox Xendit Payment Gateway in the module list later and click Configure.
3. Paste your VibeFox license key into License key in the license block at the top of the Configure page and click Activate (see License key).
4. Paste your Xendit secret keys, set the webhook URL in the Xendit Dashboard and paste the verification tokens (see Configuration).
5. Turn on Enable/Disable and click Save. Place a test order in test mode, then turn off Test Mode to take real payments.
On install the module creates the order status Xendit payment on hold. PrestaShop offers a new payment module for all currencies, countries and customer groups. You can limit them in Payment > Preferences.
Configuration
All settings are on the module page: Modules > Module Manager > VibeFox Xendit Payment Gateway > Configure. Each section has its own Save button, which saves the whole page. Above the fields a box shows the active mode: TEST MODE (invoices are created with the Test secret key and no real money is charged) or LIVE MODE (invoices are created with the Live secret key and customers are charged). The box warns you when the secret key of the active mode is missing or has the wrong prefix (the payment method is then hidden at checkout), and when the webhook verification token of the active mode is empty (Xendit notifications are rejected, so orders are only created when the customer returns to your shop).
Xendit
Enable/Disable: Enable Xendit turns the payment method on or off. Default: off.
Title: the payment method name customers see at checkout. It is also the payment method name stored in the order. Default: Xendit. Required.
Description: the text shown under the payment method at checkout. Default: Pay with virtual accounts, e-wallets, QR codes, retail outlets or cards via Xendit.
API keys
Create a secret API key with write permission for Money-in (invoices) in Xendit Dashboard > Settings > Developers > API keys, once in Test mode and once in Live mode. The key decides where the invoice is created. When you save, a key that does not start with the prefix of its field is not saved, and the page shows, for example, Test secret key was not saved: it must start with xnd_development_. The other settings are saved.
Test Mode: creates invoices with the Test secret key, so no real money is charged. Default: on. Turn it off to accept real payments with the Live secret key. While it is on, customers see Test mode: no real money is charged. under the payment method.
Test Secret Key: the secret key of the Xendit Test mode. It starts with xnd_development_.
Live Secret Key: the secret key of the Xendit Live mode. It starts with xnd_production_.
Saved keys and tokens are never shown again. The field stays empty and shows Saved — leave empty to keep it. Type a new value only to change it.
Webhooks
The webhook tells your shop that an invoice has been paid. In Xendit Dashboard > Settings > Developers > Webhooks set the URL shown in Webhook URL in this section for Invoices > Invoice paid, in Test mode and in Live mode. Optionally set it for Invoice expired too. With friendly URLs it looks like https://your-shop/module/wcp_xendit_payment_gateway/webhook, possibly with a language code such as /en/. Copy it exactly as the settings show it.
Then copy the Webhook verification token of each mode from the Xendit Dashboard into the matching field. Xendit sends it in the x-callback-token header. Notifications without the token of the mode the invoice was created in are rejected. The token only proves that the notification comes from Xendit: the invoice status, amount and currency are always read again from the Xendit API with the secret key of that mode. Without the webhook, an order is created only when the customer comes back to the shop after paying.
Test Webhook Verification Token: the webhook verification token of the Xendit Test mode.
Live Webhook Verification Token: the webhook verification token of the Xendit Live mode.
Clear saved secrets: tick a key or token and click Save to remove it. An empty field keeps the saved value.
Payment
Invoice Description: the description shown on the Xendit invoice. You can use the placeholders {order_id}, {order_number} and {site_name}. Because the order is created after the payment, {order_id} and {order_number} are the cart number. HTML is removed and the text is cut to 255 characters. Default: Order #{order_id}.
Order Status After Payment: the order status set after Xendit confirms the payment.
Advanced
Debug Log: writes API requests and webhooks to logs/xendit_p_debug.log.php in the module folder. The file cannot be opened from the web. Errors and warnings are always logged, even when this is off. API keys, tokens and customer data are not logged. Default: off.
Log: shows the size and the latest entries of the log. Click Clear log to empty it.
Delete Data on Uninstall: when on, uninstalling the module removes the module settings and the log. Order data (invoice IDs of orders) and the order status Xendit payment on hold are always kept. Default: off.
Checkout
The payment method is shown when the cart currency is IDR, PHP, VND, THB, MYR, USD or SGD. The customer chooses it at the payment step (by default Xendit) and confirms. The module creates a Xendit invoice for the cart total in the cart currency and sends the customer to the Xendit invoice page. IDR and VND amounts are rounded to whole numbers, because Xendit does not accept decimals for them. The customer's e-mail is passed to Xendit. On the invoice page the customer pays with one of the payment channels activated in your Xendit account for this currency, for example a virtual account, an e-wallet, a QR code, a retail outlet or a card. No order exists yet at this point.
After paying, the customer returns to your shop. The order is marked paid only after Xendit confirms it: by the webhook, or by a server-side request to the Xendit API when the customer comes back. The order is then created and the customer sees the standard order confirmation page. If Xendit has not confirmed the payment yet, a Payment confirmation page shows Your payment has not been confirmed by Xendit yet. Your order will be created as soon as Xendit confirms it — please do not pay again. with the buttons Check again and Back to checkout. The webhook creates the order as soon as it arrives.
If the invoice fails or expires, Xendit sends the customer back. The module first checks the invoice (it may have been paid in another tab), then expires it, so it can no longer be paid. The customer is back at checkout with The Xendit payment was not completed. You can try again or choose another payment method. The cart is kept.
A customer can pay the same cart again. If the cart total, currency and mode are unchanged and the open invoice is still valid for at least five more minutes, the customer is sent to the same invoice. Otherwise the old invoice is expired first and a new one is created, so there are never two open invoices for one cart. If the old invoice was already paid, the order is created instead of a new payment.
If Xendit cannot start the payment, the customer stays at checkout with a short message, for example Xendit is temporarily unavailable. Please try again in a few minutes or choose another payment method., a message that the currency is not accepted for your account or that the order total is outside the Xendit amount limits. The technical reason is written to the log. A cart with a zero total cannot be paid with Xendit.
The webhook works while the shop is in maintenance mode and is not blocked by the country restriction of your shop.
The payment always happens on the Xendit page. The module has no refunds from the back office, no saved cards, subscriptions or recurring payments, no card or e-wallet fields on the checkout page, no separate authorize and capture, and no xenPlatform sub-accounts.
Orders
Order statuses
No order yet: the customer was sent to Xendit and has not paid, or Xendit has not confirmed the payment yet. Only the cart exists.
Payment accepted or Delivered: the payment was confirmed. The status follows Order Status After Payment. The payment is recorded with the Xendit invoice ID as the transaction ID, and a note shows the invoice ID, the paid amount, the payment channel and the mode.
Xendit payment on hold: the paid invoice did not match the cart total or currency, or less than the total was paid (for example, the cart was changed after the invoice was created). The note explains it. Check the payment in the Xendit Dashboard, then fulfil the order or refund the payment. If another invoice of the same cart is later paid with the right amount, the payment is recorded and the order moves to the paid status.
If an invoice is paid for an order that is already cancelled or refunded, the order status is not changed. A note asks you to refund the payment in the Xendit Dashboard or restore the order manually. If a second invoice is paid for an order that is already paid, the order is not changed and a note asks you to refund the duplicate payment in the Xendit Dashboard.
Xendit payment block
The order page shows a Xendit payment block with the invoice ID, the mode (with a Test mode badge for test payments), the payment status, a list of all invoices of the order (date, invoice, external ID, amount and paid amount, status, payment channel) and the Payment notes of the order.
Refunds
Refunds are not sent to Xendit from the shop. Refund the payment in the Xendit Dashboard (search for the invoice ID shown in the Xendit payment block) and record the refund in the order manually. The standard PrestaShop refund buttons of the order page do not send money back through Xendit.
License key
The module works with a VibeFox license key from vibefox.net. The license block License — VibeFox Xendit Payment Gateway is the first block on Modules > Module Manager > VibeFox Xendit Payment Gateway > Configure, above the settings. Paste the key into License key and click Activate. After that the block shows the key masked, the status (for example the date the license is active until and your domain) and the buttons Check now to check the status again, Change key to enter another key and Remove key to remove the key from this shop. Below them are the line Product: presta-payment-xendit and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only employees with the Configure permission for the module can change the key. The texts of the block follow the back office language (English and Russian are included).
If the key is not accepted, the block says why, for example Key not found, This key belongs to another product, Domain limit reached or License expired on a date. After the shop address changes, or after you free a domain slot in your account, click Check now. If the license server cannot be reached, the module keeps working on the last known status.
One key works on one domain: the domain of the main shop, also in a multistore setup. Removing the key from the shop does not free its domain slot. Free the slot in your vibefox.net account.
Without an active key, Xendit is not shown to customers at checkout. If a payment is started anyway, the customer sees This payment method is not available. Please choose another one. The PrestaShop storefront does not know that you are logged in to the back office, so the payment method is hidden for you too: you can set up the module before you buy a key, but not test it at checkout. A reminder appears in Modules > Module Manager on the Alerts tab. Existing orders are not affected: payments already started are still confirmed.
When a license expires, the module keeps working, but updates and support need a renewal. The status is checked again automatically while you work in the back office: once a day for the first 14 days after the key is entered, then once a week. No cron job is needed. Uninstalling or resetting the module always removes the license key and license status.
Troubleshooting
Xendit does not appear at checkout: check that the license is active, Enable/Disable is on, the active mode has a secret key with the right prefix (Test Secret Key with xnd_development_ in test mode, Live Secret Key with xnd_production_ in live mode) and the cart currency is IDR, PHP, VND, THB, MYR, USD or SGD. The settings page shows a warning when the key is missing or wrong. In Payment > Preferences check that the module is allowed for the cart currency, the customer's country and the customer's group.
The payment went through, but no order was created: the webhook is not working. In the Xendit Dashboard of the mode you use (test or live) check that the URL shown in Webhook URL is set for Invoice paid, and that the verification token of that mode is saved in the matching field. The Xendit Dashboard shows the answer of your shop for each webhook. The order is also created when the customer returns to the shop after paying.
Webhook answers Webhook verification token is not configured: neither verification token is set. Paste the token into the settings.
Webhook answers Unauthorized: the token sent by Xendit does not match any token in the settings. Copy the token of the right mode again.
Webhook answers Token does not match the mode of this invoice: the invoice was created in the other mode. A test notification never confirms a live payment and the other way round. Set up the webhook and token in the mode the cart was paid in.
Webhook answers Ignored: not an invoice of this store: the invoice was not created by this shop, for example by another integration on the same Xendit account. The Test button of the Xendit Dashboard also gets this answer, which confirms that the URL and the token work. Ignored: unknown order and Ignored: unknown invoice mean that the cart or the invoice is not known to this shop.
Webhook answers Temporary error: the Xendit API could not be reached to check the invoice, the secret key of the invoice's mode is missing, the cart was being updated by another request at the same moment, or the order could not be created (for example, the module is disabled). Xendit retries the webhook. Check that both secret keys are set if payments were started in both modes, and turn on Debug Log to see the reason.
The webhook URL shows Method not allowed in the browser: this is normal. The URL accepts only requests from Xendit.
A key is not saved: the value does not start with the prefix of its field. Test keys start with xnd_development_, live keys with xnd_production_.
The customer sees This payment method is temporarily unavailable: Xendit rejected the request, for example because the secret key is wrong or lacks write permission for Money-in (invoices). Look at the Log field on the module page. A message about the billing details means that Xendit did not accept the request data, for example the e-mail.
The customer sees A payment for this order was already received by Xendit and is being reviewed: an earlier invoice of this cart was paid, but the order could not be confirmed yet. Check the payment in the Xendit Dashboard and the log.
The customer sees We could not match this payment to an order: the return link from Xendit does not belong to a cart of this shop, or no invoice of the cart could be matched. Check the payment in the Xendit Dashboard and the log.
Order is Xendit payment on hold after payment: read the notes in the Xendit payment block. The paid amount or currency differed from the cart. Fulfil the order or refund the payment in the Xendit Dashboard.
For developers, the module provides the hooks actionWcpXenditInvoiceRequest, actionWcpXenditSupportedCurrencies and actionWcpXenditCurrencyDecimals to change the invoice request, the list of currencies and the number of decimals per currency.
Uninstall
Go to Modules > Module Manager, open the menu next to VibeFox Xendit Payment Gateway and choose Uninstall. The license key and license status of this module are always removed. If Delete Data on Uninstall is on, the module settings and the log are removed. If it is off, all settings are kept for a later re-install. The Xendit invoice data of orders and the order status Xendit payment on hold are always kept. Existing orders keep their payment notes and transaction IDs.
Xendit is a trademark of its respective owner. This module is not affiliated with or endorsed by Xendit.
