All options on this page are additional fields you can add to the preparePurchase payload. See Checkout: Prepare a Purchase for the base request structure.
allowMultiplePurchases
By default, Frisbii Media prevents a customer from buying a product they already own. Set allowMultiplePurchases: true to disable this check and allow the same product to be purchased multiple times.
$payload = [
'debugMode' => true,
'customerIpAddress' => $ip,
'customerId' => $customer->customerId,
'allowMultiplePurchases' => true,
'items' => [
['plenigoOfferId' => 'O_6E487EBURRY35FOD0J', 'quantity' => 1],
],
];
showNetPrices
The checkout displays gross prices by default. Set showNetPrices: true to additionally show the net price of each item.
$payload = [
'debugMode' => true,
'customerIpAddress' => $ip,
'customerId' => $customer->customerId,
'showNetPrices' => true,
'items' => [
['plenigoOfferId' => 'O_6E487EBURRY35FOD0J', 'quantity' => 1],
],
];
Custom product data (overwriting per-item)
If you sell many similar items (e.g. a daily ePaper), you do not need to create a separate Frisbii Media product for each one. Create one base product in the backend and overwrite its data per checkout using the products array inside the item.
$payload = [
'debugMode' => true,
'customerIpAddress' => $ip,
'customerId' => $customer->customerId,
'items' => [
[
'plenigoOfferId' => 'O_6E487EBURRY35FOD0J', // your shared base offer
'quantity' => 1,
'title' => 'My daily ePaper: 2020-04-04',
'products' => [
[
'plenigoProductId' => 'P_GZUZGJHGJHGGJ', // base product ID
'productId' => 'ePaper-2020-04-04', // unique ID for this issue
'price' => 5, // override price (optional)
'title' => 'My daily ePaper: 2020-04-04',
'accessRightUniqueId' => 'ePaper-2020-04-04', // grants access to exactly this issue
],
],
],
],
];
Setting a distinct
accessRightUniqueIdper issue lets you check access per issue withhasAccess. See Access Rights: Check Access.
Campaign/UTM parameters
To persist campaign tracking data with an order (for analytics integrations such as Upscore):
$payload = [
'debugMode' => true,
'customerIpAddress' => $ip,
'customerId' => $customer->customerId,
'items' => [
['plenigoOfferId' => 'O_6E487EBURRY35FOD0J', 'quantity' => 1],
],
'additionalData' => [
'sourceId' => 'example.com/4711',
'affiliateId' => 'webshop',
'data' => [
'custom_parameter' => '4711',
],
'utm' => [
'source' => 'example.com',
'medium' => 'https%3A%2F%2Fexample.com%2Farticle.html',
'campaign' => '171517130', // all UTM values MUST be strings
'term' => '4711',
'content' => '4711',
],
],
];
For Upscore specifically, you can pass Upscore parameters inside additionalData.data:
'additionalData' => [
'data' => [
'upscore_object_id' => $_GET['upscore_object_id'],
'upscore_offer_id' => $_GET['upscore_offer_id'],
'upscore_click_id' => $_GET['upscore_click_id'],
'upscore_domain' => 'example.com',
'custom_parameter' => '4711',
],
],
Shopping carts (basketId)
Instead of passing items, you can reference a pre-configured shopping cart from the Frisbii Media backend. Shopping carts bundle multiple offers. The items field must be omitted when using basketId.
$payload = [
'debugMode' => true,
'customerIpAddress' => $ip,
'customerId' => $customer->customerId,
// do NOT include 'items' when using basketId
'basketId' => 'SC_UKKJH8KJHKJ',
];
Configure shopping carts in the Frisbii Media merchant backend under Products → Shopping Carts.
Bonus products
To offer the customer a choice of bonus products before checkout, pass plenigoBonusIds inside the item:
$payload = [
'debugMode' => true,
'customerIpAddress' => $ip,
'customerId' => $customer->customerId,
'items' => [
[
'plenigoOfferId' => 'O_6E487EBURRY35FOD0J',
'quantity' => 1,
'plenigoBonusIds' => ['BO_ZWOSLHAS3CVOG73G2'], // array of bonus IDs
],
],
];
If you bundle a single fixed bonus with an offer in the Frisbii Media backend, it is applied automatically without passing
plenigoBonusIds.
To retrieve the list of available bonuses for an offer: GET /products/bonuses