v13.3.2
Add support for promotional offers on Apple AppStore
You can order a discount offer by providing additional data to "offer.order()" like so:
offer.order({
appStore: {
discount: {
id: "discount-id",
key: "...",
nonce: "...",
signature: "...",
timestamp: "...",
}
}
});
Check Apple documentation about the meaning of those fields and how to fill them. https://developer.apple.com/documentation/storekit/in-app_purchase/original_api_for_in-app_purchase/subscriptions_and_offers/setting_up_promotional_offers?language=objc
You can check this old example server here: https://github.com/j3k0/nodejs-suboffer-signature-server