> ## Documentation Index
> Fetch the complete documentation index at: https://nce-docs.bglobale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Plug-In Configuration

This page describes the following elements:

* [Configuring Global-e Plugins](/plug-in-configuration#1-1-configuring-global-e-plugins)
* [Extra Order Attributes in Order Details](/plug-in-configuration#1-2-extra-order-attributes-in-order-details)
* [Configuring Local Tax Groups](/plug-in-configuration#1-3-configuring-local-tax-groups)
* [Creating Orders](/plug-in-configuration#1-4-creating-orders)
* [Shipping Methods](/plug-in-configuration#1-5-shipping-methods)
* [Validating Payments](/plug-in-configuration#1-6-validating-payments)
* [Creating Voucher Extra Attributes](/plug-in-configuration#1-7-creating-voucher-extra-attributes)
* [Configuring the Global-e Module](/plug-in-configuration#1-8-configuring-the-global-e-module)
* [Mandatory Developments](/plug-in-configuration#mandatory-developments-442200)
* [Order Management](/plug-in-configuration#-442200-1)

## 1.1 Configuring Global-e Plugins

Centra's three main APIs and webhooks must be added from Centra and configured in Global-e. Each of these has a plug-in that must be created on each environment separately.

1. Navigate toStores management > Stores.
2. Select a store and click View\.Each store should have one entry.
3. From the Store panel, scroll down to the Plugins section and click Add plugin method.
4. Click **GE Order API** to view its configuration settings.
5. Configure the **Order API** settings (for managing your store):

   <Note>
     This document only describes the required settings, and all settings that are not described can be ignored.
   </Note>

   * **Status**: Active
   * **Plugin name**: GE Order API
   * **Plugin**: Order API
6. Configure the following **Settings**:

   | **URI**: ge-order-api<br />**Secret API key**: to get the secret token, generate a random token in the **Encrypt** section of the [it-tools.tech](https://it-tools.tech/encryption) website:**Your text**: GLOBAL-E INTEGRATION**Your secret key**: \<MERCHANT NAME>\_ORDERAPI**Encryption algorithm**: AES**Your text encrypted**: \<generated token><br />**Markets**: Select all<br />**Debug logging**: Yes<br />**Primary warehouse**: Relevant warehouse specified by the merchant<br />**Update stock updates**: Physical | **Limit shipments by warehouse**: No<br />**Get Orders with Status**: Select ALL<br />**Return "waiting for payment"**: Yes<br />**Return "on hold" orders**: Yes<br />**Get orders starting with**: Oldest<br />**Get orders and shipments returns internal comment**: Yes<br />**Get orders and shipments returns Other**: Yes<br />**Get products returns cost price**: Yes<br />**Return unconfirmed allocations**: No<br />**Get products returns tax for the country**: None<br />**Bundles in shipments**: Only containing items<br />**Bundles in orders**: Only containing items<br />**Updating shipment with missing items**: Keep items in order<br />**Allow access to the following endpoints**: Select ALL |
   | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7. Click **GE Integration Webhooks** to view its configuration settings.
8. Configure the following **Centra Webhook** settings (for integrating webhooks):

   * **Status**: Active
   * **Plugin name**: GE Integration Webhooks
   * **Plugin**: Centra Webhook
   * **Required Settings**:

     * **Webhook URL**: Setting this field with the correct value requires building a dedicated URL in the following format:

       `https://{Global-e Environment}/webhooks/v1/Webhooks/WebhookIntegrationApi?merchantId={Merchant ID}&domain={Centra’s Merchant Domain}`

       See the table below for the possible options to include in the webhook URL format shown above:

       | Element                  | Example Value                                                    |
       | ------------------------ | ---------------------------------------------------------------- |
       | Global-e Environment     | QA-INT - centra-int.bglobale.com<br />PROD - centra.global-e.com |
       | MerchantID               | 1808                                                             |
       | Centra's merchant domain | sandbox.centraqa.com                                             |

       The following is an example of the URL result based on the values above:

       `https://centra-int.bglobale.com/webhooks/v1/Webhooks/WebhookIntegrationApi?merchantId=1808&domain=sandbox.centraqa.com`
   * **Version**: Integration API
   * **Event triggers**:

     | Order - Yes<br />Shipment - No<br />Customer - No<br />Account - No | Check first - No<br />Allocation request - No<br />Return - Yes |
     | ------------------------------------------------------------------- | --------------------------------------------------------------- |
9. Navigate to System > API Tokens.
10. Click Create integration API token.
11. Configure the following fields:

    | **General**                                                                           | **Restrictions**                                    | **Permissions**                                                                                                                      |
    | ------------------------------------------------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
    | Description<br />Organization name<br />Email<br />Phone number<br />Integration name | **Store types**: ALL<br />**Stores**: GlobalE Store | **Read permissions**: Select ALL except CENTRAIP and CentraIP Details<br />**Update permissions**: Select ALL except Anonymize:write |
12. Copy and store the token:

    1. Click **Show**.
    2. Copy the token and save it locally.

    Once created, Centra makes the token available for a limited time before hiding it.

## 1.2 Extra Order Attributes in Order Details

Once you've configured the required plugins and webhooks, you can configure orders to display the relevant details when an order is created. You can do this by using the mandatory extra attributes feature to enable configuring your relevant fields (Global-e order ID, tax values, discount values, etc).

Centra supports several discount types that may include multiple rules and dependencies. You can specify these conditions while creating both vouchers and campaigns.

1. Navigate to System > Configurations.
2. Click Create attribute type.
3. Type the new attribute type ge\_order\_details in the **Name** field.
4. Select **Text** from the dropdown menu.
5. Paste the following in the text field and click Save:

   ```
    {
     "desc": "Global-E Information",
     "readonly": false,
     "group": "order",
     "elements": {
       "ge_order_id": {
         "type": "input",
         "desc": "Global-E Order Id"
       },
       "ge_order_total": {
         "type": "input",
         "desc": "Global-E Order Total"
       },
       "ge_order_shipping": {
         "type": "input",
         "desc": "Global-E Order Shipping"
       },
       "ge_order_duties": {
         "type": "input",
         "desc": "Global-E Order Duties"
       },
       "ge_order_delivery_days": {
         "type": "input",
         "desc": "Global-E delivery in days"
       },
       "canceled_by_ge": {
         "type": "boolean",
         "desc": "Canceled by Global-E"
       },
       "code_vouchers": {
         "type": "input",
         "desc": "Code Vouchers"
       },
       "automatic_vouchers": {
         "type": "input",
         "desc": "Automatic Vouchers"
       },
       "free_shipping": {
         "type": "input",
         "desc": "Free Shipping"
       },
       "ge_cart_item_ids_mapping": {
         "type": "textarea",
         "desc": "Global-E CartItemIds mapping"
       },
       "ge_cart_item_id_to_price_mapping": {
         "type": "textarea",
         "desc": "Global-E CartItemId to Price mapping"
       },
       "centra_to_ge_cart_mapping": {
         "type": "textarea",
         "desc": "Centra to Global-E order items mapping"
       }
     }
   }
   ```

## 1.3 Configuring Local Tax Groups

Centra tax groups may consist of one or more tax rules, which set how much tax to apply to orders on the market level. While each store can have only one default tax group, merchants can configure as many as they want.

During integration, a local tax group must be made on the merchant's platform to ensure that all markets operated by Global-e include relevant VAT in orders.

1. Navigate to System > Tax Groups.
2. Click Create tax group.The**New tax group screen** is displayed.
3. Configure the following settings:

   * **Status**: Active
   * **Name**: GE Local VAT
   * **Default in stores**: \<relevant default store>
4. Click **Save**.The new tax group configuration page is displayed.
5. Click Add tax rule and set the following configurations:

   | **Name**: GE Local VAT<br />**Tax display name:** GE Local VAT<br />**Tax code**: VAT<br />**Apply tax per:** Select Ship-to country<br />**Geolocation**: Select ALL and unselect markets operate by the merchant | **Include tax**: Select In prices displayed before and in the checkout<br />**Apply tax to shipping fees**: Yes<br />**Apply tax to handling fees**: Yes<br />**Tax rate**: Merchant Local VAT (for example, UK = 20%)<br />**Include shipping cost to order total**: Yes |
   | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
6. Click **Save**.The tax is displayed in Global-e orders.

## 1.4 Creating Orders

When Global-e uses the `SendOrderToMerchant` API, Centra's [Order API](https://centra.dev/docs/apis/order-api/api-reference) is used to create the order in Centra. During this stage we include the relevant order data natively (when available in the API) or as an extra attribute.

### 1.4.1 Native Order Data

Natively added order data takes precedence and is classified along with the merchant's domestic orders. This data is only transmitted if the Order API supports the relevant fields.

The following order details are supported according to the method above:

| Order date and time<br />Shipping address<br />Billing address<br />Customer information<br />Product information:Product list priceProduct price | Product Discounts (sum of all discounts)<br />Shipping method<br />Order transaction - When created, order payments are stored in the payment history only with the Auth indication. In this stage orders are unpaid before passing fraud validation. |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

The following figure shows the Order payment history:

<Frame>
  <img src="https://mintcdn.com/globale-nce/uDvROrO5ThNQJhEA/images/uuid-39365c8f-e708-3b55-81db-676596a0d19a.png?fit=max&auto=format&n=uDvROrO5ThNQJhEA&q=85&s=183035fbc25836aa126c9b1740c039ee" width="804" height="287" data-path="images/uuid-39365c8f-e708-3b55-81db-676596a0d19a.png" />
</Frame>

### 1.4.2 Extra Attributes

The data included in the Extra Attributes section must be preconfigured as described in the Integration Guide. The same Custom attribute (same name and structure) is implemented during each the QA/Staging phase of each merchant's integration, and deployed to Production by Centra developers. For any additional attributes that we add we must add a change in the configuration. This information is visible in the **Other Information** section of the order.

Global-e supports the following fields:

| Global-e order ID<br />Global-e order total in the consumer's currency<br />Global-e order shipping cost in the customer's currency<br />Delivery days (from-to) | Code vouchers<br />Automatic vouchers<br />Cart item ID mapping (storing data used in webhooks)<br />Centra to Global-e order item mapping (storing date used in webhooks)<br />Order Duties and Taxes in the consumer's currency |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

### 1.4.3 Static Information

Static information is information that includes the same values for all orders belonging to a specific merchant:

* **Tax (Global-e local VAT)** - a tax group set up in Centra according to the base country
* **Pricelist**- always the default pricelist

## 1.5 Shipping Methods

To map the relevant shipping method to each Global-e order in Centra, the mapping must exist on both sides (in Global-e and in Centra) so that the shipping method used appears on your Global-e orders and is displayed correctly on your order form.

During integration, your Global-e Solutions Engineer agrees with you on the list of shipping methods to support. For each method, we need the code (URI) you intend to use; it is critical that Global-e and Centra hold identical codes per method, so Global-e can use the shipping code to display the correct method on your order form.

This list of shipping methods and their corresponding codes (URIs) must then be mapped on both sides - in Global-e and in Centra. In addition, you must create a default Global-e shipping method (GESHIPPING) that acts as a fallback whenever Global-e sends an order with an unmapped shipping method code:

<Frame>
  <img src="https://mintcdn.com/globale-nce/q28nt6TaYmhf9wTZ/images/uuid-d901c53a-1226-efc1-8116-f592e682f7b6.png?fit=max&auto=format&n=q28nt6TaYmhf9wTZ&q=85&s=a6d2a05743e724934b9faeaa50f268b9" width="776" height="367" data-path="images/uuid-d901c53a-1226-efc1-8116-f592e682f7b6.png" />
</Frame>

To correctly map your shipping methods to Global-e's, create your shipping methods using the values in [1.3 Configuring Local Tax Groups](/plug-in-configuration#1-3-configuring-local-tax-groups).

1. Navigate to *More (DTC) > Shipping*:

   <Frame>
     <img src="https://mintcdn.com/globale-nce/xv375Io-Zpy9CEM_/images/uuid-708f6118-a858-6dbd-4f89-d7892d2048a1.png?fit=max&auto=format&n=xv375Io-Zpy9CEM_&q=85&s=b3cd96cbde0eba846bc15a98c074f5e8" width="396" height="535" data-path="images/uuid-708f6118-a858-6dbd-4f89-d7892d2048a1.png" />
   </Frame>
2. Click on **Create range** on the top right side of the screen and set the following:

   * **Status**: Active
   * **Shipping Name**: Global-e Shipping
   * **Currency**: Merchant Base Currency
   * **URI**: GESHIPPING
   * **Active in market**: relevant GE operated markets
   * **Default in stores**: relevant stores
   * **Pickup point**: No
   * Click on Add group:

     * **Apply shipping group per**: Select Countries
     * **Geolocation**: Select ALL
     * **Add Price Range**: From 0 to 0 - fixed price
   * Click **Save**:

     <Frame>
       <img src="https://mintcdn.com/globale-nce/HEMTL5jLmdt1JA9r/images/uuid-ad5999e9-865f-7605-1fb0-487b7754722d.png?fit=max&auto=format&n=HEMTL5jLmdt1JA9r&q=85&s=d3aea4214c2a383fb8edb966cc2db353" width="649" height="813" data-path="images/uuid-ad5999e9-865f-7605-1fb0-487b7754722d.png" />
     </Frame>

   <Note>
     Repeat the same procedure for every other shipping method agreed with your Global-e Solutions Engineer, substituting the relevant Shipping Name and URI for each one. The URIs in Centra must match the codes mapped in Global-e exactly.
   </Note>

## 1.6 Validating Payments

When an order is created in Centra, Global-e does the following:

1. Validates that payment has been received for the order.
2. Notifies the platform when the fraud check passes. Failed fraud checks cancel the order.
3. Adds a new row in the **Order payment history** region:

   <Frame>
     <img src="https://mintcdn.com/globale-nce/rQ4xDQOUppqWxFrS/images/uuid-ff484fe1-0055-1914-30e6-f4d169721bd4.png?fit=max&auto=format&n=rQ4xDQOUppqWxFrS&q=85&s=0358ef29fd70700d8f3a3ebba9e2eb54" width="797" height="353" data-path="images/uuid-ff484fe1-0055-1914-30e6-f4d169721bd4.png" />
   </Frame>

## 1.7 Creating Voucher Extra Attributes

You can store vouchers in Centra's back-office. Storing these vouchers requires adding two extra attributes.

1. Configure the customer voucher usage:

   1. Navigate to System > Configurations.
   2. Click **Create Attribute Type**.
   3. Define the Name as **ge\_customer\_coupon**.
   4. In the **Copy values form** dropdown menu, select text.
   5. Copy and paste the following in the text field:

      ```
      	{
        "desc": "Coupons used by GE orders",
        "readonly": false,
        "group": "customer",
        "elements": {
          "ge_coupon_usage": {
            "type": "textarea",
            "desc": "Coupons used by GE orders"
          }
        }
      }
      ```
2. Configure the number of usages:

   1. Navigate to System > Configurations.
   2. Click **Create Attribute Type**.
   3. Define the Name as **ge\_voucher\_details**.
   4. In the **Copy values form** dropdown menu, select text.
   5. Copy and paste the following in the text field:

      ```
      {
        "desc": "Global-e Voucher details",
        "readonly": false,
        "group": "voucher",
        "elements": {
          "ge_successful_usages": {
            "type": "input",
            "desc": "Global-e Successful Usages"
          }
        }
      }
      ```

## 1.8 Configuring the Global-e Module

After completing a merchant's integration, we must list the following relevant configurations that require specific values (in contrast to using the default template values):

* Cart data on the front-end
* Checkout tokens
* Storefront attributes
* Dedicated international Checkout page
* Directing merchants to the Checkout page
* Clearing the front-end cart

## Mandatory Developments

The following table shows the mandatory developments:

| Feature                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pricelist                      | You must be able to retrieve the country from the Global-e Module cookie to use the relevant pricelist on the front-end                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| My account currency conversion | The following parameters are required to correctly convert currencies in the My Account or My Orders sections:<br />**Customer ID**: dedicated cookie<br />**Global-e order ID**: in the **Document Object Model (DOM)** of the relevant pages in the section                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Google Shopping feed           | See the [Marketing Feeds and Tax/Shipping Rates](/international-marketing-feeds--non-shopify-).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Cookies                        | Global-e uses cookies in API requests between your client, our servers, and Centra. These cookies help identify the active cart and customer so that data stays consistent across the checkout flow:<br />`token` – Identifies the shopping cart. It allows you to retrieve cart details on the client side (for showing prices on the cart page) and on the server side (when sending the cart to checkout).<br />`Customer_id` – Identifies the logged-in customer. It is used on the **My Account** page to fetch their past orders and to display prices based on the international rates they paid.<br />*Both*cookies should match the cart and customer identifiers stored in Centra. You can store them as one combined cookie or as two separate cookies, depending on your implementation.<br />The cookie must follow this structure so Global-e can extract the token and customer\_id:<br />`ge_frontend_data = {“token”:”asfd444ggv44677870jhv”,”customer_id”:”123456”}`<br />Requirements:<br />The cookie must be classified as **Essential**.<br />The cookie must not be set as **httpOnly** (Global-e's client-side scripts need to read it). |

## Order Management

### Cancelling Orders

Orders can be cancelled from Global-e to Centra, or from Centra to Global-e. When an order is cancelled Global-e restocks the inventory. Note that refunds are only created in Global-e and not in Centra.

When orders are cancelled from Centra to Global-e, you can restock items using native functionality without Global-e's assistance, and a refund is created in Global-e for the entire order amount.

### Creating Refunds

In Centra you need to create a return to get a refund. Marking uncompleted reverts the return, but does not the refund. This creates discrepancies between the order status in Centra and Global-e. Global-e always sends the refund as **Return** in this scenario.

Regarding return objects, you can restock items directly on Centra.

### Amending Items

You can cancel single products from orders by removing them from the order, or by reducing their quantity.
