Skip to main content
Module

x/harmony/mod.ts>RESTEndpoints#createPurchaseDiscount

An easy to use Discord API Library for Deno.
Go to Latest
method RESTEndpoints.prototype.createPurchaseDiscount
Re-export
import { RESTEndpoints } from "https://deno.land/x/harmony@v2.9.0/mod.ts";

Creates a discount for the given user on their next purchase of the given SKU. You should call this endpoint from your backend server just before calling StartPurchase for the SKU you wish to discount. The user will then see a discounted price for that SKU at time of payment. The discount is automatically consumed after successful purchase or if the TTL expires.

Parameters

skuId: string
userId: string
payload: unknown

Returns

Promise<unknown>