Skip to main content

External Pricelists

Introduction

The External Pricelists feature allows you to set product prices dynamically via secure JWT tokens. By providing a signed JWT in your Merchant API requests, you can override default pricing with values from external sources, enabling flexible and automated price management.

JWT Header

{
"alg": "HS256",
"typ": "JWT",
"kid": "gad" // This is the key ID for the JWT. Multiple keys can be used for the feature.
}

Payload Format

{
"f": true | false, // if forced, prices are set even if current selling price is lower
"p": [ // prices array
[pid, price, source], // pid = productId, price = selling price in decimal format, source = external price source origin (optional)
[456, 19.99, "google"], // example: product with id 456 from google automated discounts with selling price 19.99
[789, 5, "pricerunner"] // example: product with id 789 from google automated discounts with selling price 5
]
}

How to use with Merchant API

All queries and mutations in the Merchant API support an HTTP header called x-prices. To use external prices, simply include this header with your requests.

JWT Secret

Contact Geins support to obtain your JWT secret. Use this secret to sign your JWTs. If the signing key is invalid, external prices will not be applied.

External price source

The external price source will be stored on each order row whose price originated from an external price list. This field is accessible when fetching orders via the Geins Management API.