Integration Guide
You’ll find detailed instructions for setting up authentication, configuring payment settings, and establishing conditions for both installment and single payment options.
General Setup
To configure Bamboo as a payment provider in your VTEX store, follow these steps:
- Log in to your VTEX admin panel using your credentials.
- Navigate to ‘Store Configuration’ > ‘Providers’ > ‘New Provider’.
- Search for Bamboo-Payments in the list of providers and select it.
Bamboo Plugin Configuration
Authentication Setup
Enter your store credentials in the designated fields. For information on generating your store keys, refer to the VTEX Keys documentation
Payment Control
- Choose whether to operate in test mode.
- Select your preferred type of settlement.
Info
Test mode allows you to simulate Bamboo transactions in your store before offering it to customers. Deselect this option when you’re ready to process real transactions.
Provider Fields
Configure the following settings:
- Private Key: Enter your Bamboo PrivateKey.
- Enable Authorization and Capture: If enabled, you’ll need to manually capture payments made with Bamboo from your store.
- Operating Country: Select the country where your store operates.
After completing these fields, click the ‘Save’ button.
Payment Methods Configuration
To set up payment methods:
- Go to the ‘Payment Conditions’ tab.
- Click the ‘+’ icon to add a new condition.
- Configure the payment method you want to offer to your customers.
Installments for Credit Cards
To set up installments for Credit Cards:
- Select the desired card brand from the list.
- Activate the condition.
- Select Bamboo-Payments as the provider.
- Enter a name to identify the payment condition.
- Choose the ‘Installments’ option and enter the requested data.
- Configure interest rates and/or external interests as needed.
- Save the changes.
Single Payment (One-time Payment) for Credit and Debit Cards
To set up single payments (payments in one installment):
- Follow the same process as ‘Installment Payments’.
- Instead of selecting ‘Installments’, choose the ‘Single Payment’ option.
- Configure the necessary details for one-time payments.
- Save the changes.
By following these steps, you’ll successfully offer Bamboo as a payment method to your customers in your VTEX store, including both installment plans and single payment options.
Info
Changes to payment conditions may take up to 10 minutes to apply at your VTEX store’s checkout.
Antifraud Script
For the correct functioning of transactions made through Bamboo, an anti-fraud analysis script must be injected into the store. To configure it, follow the steps below:
Important note
This configuration only applies to PayFac merchants. It is not valid for the Gateway modality. If you have any doubts, please consult with support or your account manager.
- Inside the VTEX administrative panel, go to ‘Store Settings’.
- Navigate to ‘Storefront > Checkout’.
- Click on the configuration icon for the ‘Default’ option.
- Enter ‘Code > checkout-custom.js’.
- Insert the following code block into the file and save:
const API_Environment = "https://api.bamboopayment.com",
PublicAccountKey = "CT4XUYw10xDemA4UqCgU0m_I56ONV7HQ";
async function getIp() {
return fetch("https://api.ipify.org/?format=json")
}
async function loadScript(e, t) {
if (!window.vtex || window.vtex.deviceFingerprint) {
console.debug(window.vtex ? `already deviceFingerprint: ${window.vtex.deviceFingerprint}` : "there is no VTEX");
return
}
let n = document.createElement("script");
n.src = e,
n.onload = t,
document.head.appendChild(n)
}
async function generateFingerPrint() {
if (!window.setSessionID) {
console.debug("SetSessionID not found");
await new Promise(e => setTimeout(() => e(!0), 1e3));
console.debug("Retrying...");
return generateFingerPrint();
}
let e = window.getSessionAntifraud(),
t = await getIp().then(e => e.json()).then(({ip: e}) => e),
n = JSON.stringify({
sessionId: e,
ip: t
});
window.vtex.deviceFingerprint = n
}
window.addEventListener("DOMContentLoaded", () => {
console.info("==== RUNNING FINGER PRINT ====");
loadScript(`${API_Environment}/v1/Scripts/Antifraud.js?key=${PublicAccountKey}`, generateFingerPrint)
});
This script will ensure that the anti-fraud analysis is performed correctly for transactions processed through Bamboo.