Overview
On this page, we’ll dive into the different product variant endpoints you can use to manage product variants programmatically.
Product variants are intertwined with products. It's what contains all data pertaining to deliverables and pricing.
As you might have already noticed, one product is able to have multiple variants which each can have their unique deliverables and pricing.
On this page, we'll dive into the different product variant endpoints you can use to manage products programmatically. We'll look at how to create, update, and delete product variants.
Endpoints
- List all product variants
- Create a product variant
- Retrieve a product variant
- Update a product variant
- Delete a product variant
The product variant model
The product variant model contains all the information about the product variants located within a product, including the price and deliverables.
Properties
- Name
idinteger- Description
The unique identifier for the product.
- Name
product_idinteger- Description
The unique product identified this variant is linked to.
- Name
titlestring- Description
The product variant title.
- Name
descriptionstring- Description
The product variant description.
- Name
deliverablearray- Description
Deliverable details of the product variant, consists of the following:
dataArray of deliverable data to be delivered. Consists of the following:serialsOnly applicable ifdeliverable.typescontainsTEXT. This array should contain all of your serials, separated by the delimiter you set inparsingMode.removeDuplicateWhether duplicateTEXTvalues should be removed.parsingModeIn which wayTEXTvalues are separated/parsed.commentOnly applicable ifdeliverable.typescontainsMANUAL. This string should specify what the next steps are for the manual delivery to be completed.fileOnly applicable ifdeliverable.typescontainsDOWNLOADABLE. If wanting to upload a file, make sure to send the request as a Multipart form instead of JSON.webhookOnly applicable ifdeliverable.typescontainsDYNAMIC. This string should be your dynamic webhook endpoint, which we ping following a successful purchase.stockSpecifies how much stock there is for the deliverable. Not required ifdeliverable.typescontainsTEXTas it is calculated automatically. If not present, stock will be set to infinite.
typesArray with values of the deliverable type(s) this product variant contains. Supported values:DOWNLOADABLEDownloadable file of any type.TEXTText products delivered one-by-one.DYNAMICGenerate a product via your webhook URL.MANUALA product that is manually carried out and/or delivered.
- Name
pricingarray- Description
The product variant pricing array, contains the following values:
humbleWhether the product is of a "Pay what you want" type. If set totrue, the customer can add an extra amount of their choosing on top of the price.frequencyarray that specifies how often a product should be charged. Consists of two values:valuethat specifies the period durationintervalthat specifies the interval between values. Can be days, weeks, months. Up to 1 year.
typethat contains a string of the charge frequency. One of two values:SINGLE_PAYMENTfor one-off chargesSUBSCRIPTIONfor recurring charges- At the moment, only Stripe is supported for subscriptions
pricewhich contains the product price array. Consists of two values:priceproduct price, in centscurrencyCountry ISO code of the currency the product is priced in
- Name
minimum_purchase_quantityinteger- Description
The minimum amount of stock a customer is required to purchase.
- Name
maximum_purchase_quantityinteger- Description
The maximum amount of stock a customer is allowed to purchase. If set to null, the customer can purchase an unlimited amount of quantity.
- Name
bulk_discountobject- Description
The bulk discount values of the product. Array consists of:
minimum_purchase_amountThe quantity at which the bulk discount gets triggered.discount_percentageThe discount value (in percentage) that gets applied to the product price.
- Name
payment_methodsarray- Description
This specifies which payment methods are available for the customer to check out with. Your store has to have a payment method activated in order for these to be set.
- Consists of at least one of the below values:
PAYPALPayPalSTRIPEStripeCASHAPPCash AppPADDLEPaddleAUTHNETAuthorize.netSQUARESquare
- Cryptocurrency payment methods:
BTCBitcoinLTCLitecoinETHEthereumXMRMoneroBNBBinance BNBTRXTronMATICPolygonETH_USDTUSDT (ETH network)ETH_USDCUSDC (ETH network)ETH_UNIUNI (ETH network)ETH_SHIBShiba (ETH network)ETH_DAIDAI (ETH network)BNB_USDTUSDT (BSC network)BNB_USDCUSDC (BSC network)TRX_USDTUSDT (TRX network)TRX_USDCUSDC (TRX network)
- Consists of at least one of the below values:
- Name
other_settingsarray- Description
Array of additional settings pertaining to the product variant. Consists of:
quantity_incrementsthat specifies by how much a product can be incremented.- The default is 1, which lets a customer purchase a quantity of 1,2,3 and so on
- When set to e.g. 2, the customer can only purchase a quantity of 1,3,5 and so on. A quantity of 2 would end up not being allowed.
discord_data_requiredwhich specifies whether a customer is required to authorize their Discord account before proceeding with the purchase. If enabled, a customer can not check out before linking their Discord account.
- Name
orderinteger- Description
The order of this variant relative to all other variants within the product
- Name
created_attimestamp- Description
The time at which this product variant was first created.
- Name
updated_attimestamp- Description
The time at which this product variant was last updated.
- Name
deleted_attimestamp- Description
The time at which this product variant was deleted.
- Name
productarray- Description
The relevant product details attached to this variant (readonly). Consists of additional information input(s) of the product. Additional information input array consists of:
requiredspecifying whether the additional information is requiredkeyunique key of the additional information inputtypeOne of the followingTEXTNUMBERHIDDENTEXTAREACHECKBOX
labelspecifying what the customer needs to enter. Examples belowTEXTWhat is your in-game username?NUMBERTo what mobile number do you want this delivered?HIDDENn.a. (as this is a hidden input not visible to the end-user)TEXTAREAPlease specify what your website should look like.CHECKBOXWould you like a complimentary drink?