Skip to main content
Version: next

BuyBox

This guide explains how Front-Commerce allows using BuyBox in a headless commerce project.

There is only one way to accept payments with BuyBox in your Front-Commerce application for now.

Front-Commerce Payment​

Since version 3.19

This section explains how to configure and customize the BuyBox Front-Commerce Payment module into an existing Front-Commerce application. The implementation use BuyBox's API to initiate payments and redirect customers to BuyBox to proceed to the payment using their Gift Card.

Configure your environment​

With API keys found on your BuyBox dashboard (sandbox).

.env
# BuyBox payment
# API Keys from https://sandbox.buybox.net/wallet_backoffice/core/infos.php
FRONT_COMMERCE_BUYBOX_IS_PRODUCTION_MODE=false
FRONT_COMMERCE_BUYBOX_USER=xxxx
FRONT_COMMERCE_BUYBOX_PWD=xxxxxxxxx
FRONT_COMMERCE_BUYBOX_SIGNATURE=xxxxxxxxxxxxxxxxxxxxxxxxxxx

Register the BuyBox payment module​

In your Front-Commerce application:

pnpm add @front-commerce/buybox
front-commerce.config.ts
+import buybox from "@front-commerce/buybox";

export default defineConfig({
extensions: [
// other extensions...
+ buybox()
],
});

That's it!​

Restart your application and test your payments.

tip

You can use the front-commerce:payment:buybox flag to DEBUG this integration and view the interactions with the payment API.