Get prices for oneclick

POST
/api/v3/buyers/{buyerId}/products/bundles
lts

The new v3 endpoint for retrieving prices for a one-click order lets you create product bundles and apply a separate discount and coupon to each individual product. Multiple bundles can be included in a single request.
It also allows you to request price breakdowns by day, week, and month for each action.

Header parameters
Attribute
Requirement
Description
x-public-key
mandatory
a public key that identifies the merchant account (there can be several for one merchant)
x-buyer-ip
mandatory
is responsible for information about the buyer's IP address
x-date
mandatory
is responsible for the date and time of sending the request
x-token
mandatory
generated on the merchant side
x-source
mandatory
identifier of the type of service that is the initiator of the request
x-id
mandatory
service identifier from which the current request is made
Request parameters
There are rules for creating the request that must be followed:
  1. You cannot perform upgrade, renew, and downgrade simultaneously for the same subscription (subscriptions must be unique).
  2. The set of parameters for purchase differs from those for upgrade, renew, and downgrade.
  3. Do not use the enabled priceCalculationType for upgrade and downgrade
  4. If all values are set to false for priceCalculationType, the response will include only the total product price without a breakdown.
Attribute
Type
Requirement
Description
Standard
buyerId
string
mandatory
Unique identifier of the buyer in the system.
uuid
currency
string
optional
The currency in which the prices should be returned
ISO 4217 Alphabetic
isMobile
bool
mandatory
Indicates whether the request is for the mobile version.
Its value affects the precheckAutocharge settings.
-
locale
string
optional
The locale used to display product names and other content.
If not provided, the value en will be used.
ISO 639 set 1
bundles
array of objects
mandatory
An array containing information about bundles and the products within them.
-
Response parameters
Attribute
Type
Description
data
object
Contains information related to the subscription product, including currency, taxes, and product-specific details.
Note: If the request contains a product that does not exist in the database, you will receive a 404 — Products not found error code.
meta
object
Provides metadata about the response
{
  "data": {
    "currency": "GBP",
    "tax": {
      "type": "vat",
      "country": "nl"
    },
    "chargeMethods": [
      {
        "paymentMethodType": "card",
        "paymentMethodIdentifier": "**** **** **** 9903",
        "chargeMethodId": "477cabe0-e92a-486e-badd-b87555e3a5b1"
      },
      {
        "paymentMethodType": "pay_pal",
        "paymentMethodIdentifier": "test@test.com",
        "chargeMethodId": "477cabe0-e92a-486e-badd-b87555e3a5b2"
      }
    ],
    "bundles": [
      {
        "bundleHashKey": "hashKey1",
        "totalAmount": {
          "origin": "50.00",
          "discountsAndCoupons": "19.90",
          "amountWithDiscountsAndCoupons": "30.10",
          "taxPercent": "10.00",
          "tax": "3.01",
          "amountWithDiscountsAndCouponsAndTax": "33.11"
        },
        "products": [
          {
            "productHashKey": "hashKey1",
            "code": "MMBM",
            "isTrial": true,
            "action": "upgrade",
            "subscriptionId": "UUID",
            "precheckAutocharge": {
              "isPrechecked": false,
              "isShown": true
            },
            "amount": {
              "origin": "50.00",
              "amountForAction": "40.00",
              "discountPercent": "20.00",
              "discount": "10.00",
              "amountWithDiscount": "40.00",
              "couponPercent": "25.00",
              "couponCode": "XMAS25",
              "coupon": "10.00",
              "amountWithDiscountAndCoupon": "30.00",
              "taxPercent": "10.00",
              "tax": "3.00",
              "amountWithDiscountAndCouponAndTax": "33.00"
            }
          },
          {
            "productHashKey": "hashKey2",
            "code": "MMPM",
            "isTrial": false,
            "action": "purchase",
            "quantity": 2,
            "precheckAutocharge": {
              "isPrechecked": false,
              "isShown": true
            },
            "amount": {
              "origin": "50.00",
              "amountForAction": "0.00",
              "discountPercent": "20.00",
              "discount": "10.00",
              "amountWithDiscount": "40.00",
              "couponPercent": "25.00",
              "couponCode": "XMAS25",
              "coupon": "10.00",
              "amountWithDiscountAndCoupon": "30.00",
              "taxPercent": "10.00",
              "tax": "3.00",
              "amountWithDiscountAndCouponAndTax": "33.00"
            },
            "dailyAmount": {
              "origin": "50.00",
              "amountForAction": "0.00",
              "discountPercent": "20.00",
              "discount": "10.00",
              "amountWithDiscount": "40.00",
              "couponPercent": "25.00",
              "couponCode": "XMAS25",
              "coupon": "10.00",
              "amountWithDiscountAndCoupon": "30.00",
              "taxPercent": "10.00",
              "tax": "3.00",
              "amountWithDiscountAndCouponAndTax": "33.00"
            },
            "weeklyAmount": {
              "origin": "50.00",
              "amountForAction": "0.00",
              "discountPercent": "20.00",
              "discount": "10.00",
              "amountWithDiscount": "40.00",
              "couponPercent": "25.00",
              "couponCode": "XMAS25",
              "coupon": "10.00",
              "amountWithDiscountAndCoupon": "30.00",
              "taxPercent": "10.00",
              "tax": "3.00",
              "amountWithDiscountAndCouponAndTax": "33.00"
            },
            "mounthlyAmount": {
              "origin": "50.00",
              "amountForAction": "0.00",
              "discountPercent": "20.00",
              "discount": "10.00",
              "amountWithDiscount": "40.00",
              "couponPercent": "25.00",
              "couponCode": "XMAS25",
              "coupon": "10.00",
              "amountWithDiscountAndCoupon": "30.00",
              "taxPercent": "10.00",
              "tax": "3.00",
              "amountWithDiscountAndCouponAndTax": "33.00"
            }
          }
        ]
      },
      {
        "bundleHashKey": "hashKey2",
        "totalAmount": {
          "origin": "50.00",
          "discountsAndCoupons": "19.90",
          "amountWithDiscountsAndCoupons": "30.10",
          "taxPercent": "10.00",
          "tax": "3.01",
          "amountWithDiscountsAndCouponsAndTax": "33.11"
        },
        "products": [
          {
            "productHashKey": "hashKey1",
            "code": "MMBM",
            "isTrial": false,
            "action": "renew",
            "subscriptionId": "UUID",
            "precheckAutocharge": {
              "isPrechecked": false,
              "isShown": true
            },
            "amount": {
              "origin": "50.00",
              "amountForAction": "0.00",
              "discountPercent": "20.00",
              "discount": "10.00",
              "amountWithDiscount": "40.00",
              "couponPercent": "25.00",
              "couponCode": "XMAS25",
              "coupon": "10.00",
              "amountWithDiscountAndCoupon": "30.00",
              "taxPercent": "10.00",
              "tax": "3.00",
              "amountWithDiscountAndCouponAndTax": "33.00"
            },
            "dailyAmount": {
              "origin": "50.00",
              "amountForAction": "0.00",
              "discountPercent": "20.00",
              "discount": "10.00",
              "amountWithDiscount": "40.00",
              "couponPercent": "25.00",
              "couponCode": "XMAS25",
              "coupon": "10.00",
              "amountWithDiscountAndCoupon": "30.00",
              "taxPercent": "10.00",
              "tax": "3.00",
              "amountWithDiscountAndCouponAndTax": "33.00"
            },
            "weeklyAmount": {
              "origin": "50.00",
              "amountForAction": "0.00",
              "discountPercent": "20.00",
              "discount": "10.00",
              "amountWithDiscount": "40.00",
              "couponPercent": "25.00",
              "couponCode": "XMAS25",
              "coupon": "10.00",
              "amountWithDiscountAndCoupon": "30.00",
              "taxPercent": "10.00",
              "tax": "3.00",
              "amountWithDiscountAndCouponAndTax": "33.00"
            },
            "mounthlyAmount": {
              "origin": "50.00",
              "amountForAction": "0.00",
              "discountPercent": "20.00",
              "discount": "10.00",
              "amountWithDiscount": "40.00",
              "couponPercent": "25.00",
              "couponCode": "XMAS25",
              "coupon": "10.00",
              "amountWithDiscountAndCoupon": "30.00",
              "taxPercent": "10.00",
              "tax": "3.00",
              "amountWithDiscountAndCouponAndTax": "33.00"
            }
          }
        ]
      },
      {
        "bundleHashKey": "hashKey3",
        "totalAmount": {
          "origin": "50.00",
          "discountsAndCoupons": "19.90",
          "amountWithDiscountsAndCoupons": "30.10",
          "taxPercent": "10.00",
          "tax": "3.01",
          "amountWithDiscountsAndCouponsAndTax": "33.11"
        },
        "products": [
          {
            "productHashKey": "hashKey1",
            "code": "MMPM",
            "isTrial": false,
            "action": "downgrade",
            "subscriptionId": "UUID",
            "precheckAutocharge": {
              "isPrechecked": false,
              "isShown": true
            },
            "amount": {
              "origin": "50.00",
              "amountForAction": "50.00",
              "discountPercent": "20.00",
              "discount": "10.00",
              "amountWithDiscount": "40.00",
              "couponPercent": "25.00",
              "couponCode": "XMAS25",
              "coupon": "10.00",
              "amountWithDiscountAndCoupon": "30.00",
              "taxPercent": "10.00",
              "tax": "3.00",
              "amountWithDiscountAndCouponAndTax": "33.00"
            }
          }
        ]
      }
    ],
    "products": [
      {
        "id": "33025962-414d-440a-a4ec-1eaec711473b",
        "code": "MMBM",
        "name": "mSpy 1-Month Premium Subscription",
        "nameByLocale": "mSpy 1-Month Basic Subscription",
        "durationDays": 28,
        "durationWeeks": 4,
        "durationMonth": 1,
        "isActive": true,
        "availableForShop": true,
        "availableForControlPanel": true,
        "availableForAutocharge": true
      },
      {
        "id": "12345678-414d-440a-a4ec-1eaec711473b",
        "code": "MMPM",
        "name": "mSpy 1-Month Premium Subscription",
        "nameByLocale": "mSpy 1-Month Basic Subscription",
        "durationDays": 28,
        "durationWeeks": 4,
        "durationMonth": 1,
        "isActive": true,
        "availableForShop": true,
        "availableForControlPanel": true,
        "availableForAutocharge": true
      }
    ]
  },
  "meta": {
    "type": "collection",
    "total": 1,
    "offset": 0
  }
}
Errors and interpretation

The list of possible errors for this endpoint, along with their types and interpretation, is provided in the general reference: Endpoint response errors.