You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/billing.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ The Admin API provides endpoints that enable apps to trigger purchases in the Sh
5
5
6
6
See the [billing reference](../reference/billing/README.md) for details on how to call those endpoints, using this configuration.
7
7
8
-
To trigger the billing behaviour, you'll need to set the `billing` value when calling `shopifyApi()`. For example:
8
+
To trigger the billing behaviour, you'll need to set the `billing` value when calling `shopifyApi()`. For example the following configuration will allow you to charge merchants $30 every 30 days. The first three charges will be discounted by $10, so merchants would be charged $20.
|`interval`|`ONE_TIME`| Yes | - |`BillingInterval.OneTime` value |
37
43
|`amount`|`number`| Yes | - | The amount to charge |
38
-
|`currencyCode`|`string`| Yes | - | The currency to charge, currently only `"USD"` is accepted|
44
+
|`currencyCode`|`string`| Yes | - | The currency to charge, USD or merchant's shop currency|
39
45
40
46
### Recurring Billing Plans
41
47
@@ -46,6 +52,9 @@ This setting is a collection of billing plans. Each billing plan allows the foll
46
52
|`currencyCode`|`string`| Yes | - | The currency to charge, currently only `"USD"` is accepted |
47
53
|`trialDays`|`number`| No | - | Give merchants this many days before charging |
48
54
|`replacementBehavior`|`BillingReplacementBehavior`| No | - |`BillingReplacementBehavior` value, see [the reference](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appSubscriptionCreate) for more information. |
55
+
|`discount.durationLimitInIntervals`|`number`| No | - | The number of billing intervals to apply the discount for. See the [reference](https://shopify.dev/docs/apps/billing/purchase-adjustments/subscription-discounts) for more information |
56
+
|`discount.value.amount`|`number`| No | - | The amount of the discount in the currency that the merchant is being billed in. |
57
+
|`discount.value.percentage`|`number`| No | - | The percentage value of the discount. |
0 commit comments