What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Applying a discount with a recurring application charge API

Solved

Applying a discount with a recurring application charge API

vanessa_adabra
Shopify Partner
11 0 0

Hi, 

 

I have been reading this documentation: https://shopify.dev/apps/billing/purchase-adjustments/subscription-discounts#create-a-new-recurring-... and I have been trying to apply it to my cUrl request. Unfortunately, I am unable to produce a payment request that takes the discount into consideration.

Here is my cUrl without the sensitive data:

curl --location --request POST 'https:///admin/api/2021-10/recurring_application_charges.json' \
--header 'X-Shopify-Access-Token:' \
--header 'Content-Type: application/json' \
--header 'Cookie: _master_udr=' \
--data-raw '{

    "recurring_application_charge": {
        "name": "Super Duper Plan",
        "price": 5,
        "currency": "EUR",
        "interval": "ANNUAL",
        "return_url": "https://shopify.dev/apps/billing/purchase-adjustments/subscription-discounts",
        "test": true,
        "discount": {
            "value": {
                "amount": {"amount": 1.00,"currency": "EUR"}
            }
        },
        "priceAfterDiscount": {
            "amount": 1.00,
            "currencyCode": "EUR"
        }
    }
}'

I cannot seem to figure out how to make it work with the discount part, without it works just fine.

 

Accepted Solution (1)

qc11
Shopify Staff (Retired)
47 14 12

This is an accepted solution.

Hi,


Your question seems to be related to billing API as opposed to subscriptions API. Unfortunately I don't have much context on billing API.
I'd suggest reposting your question in https://community.shopify.com/c/shopify-apis-and-sdks/bd-p/shopify-apis-and-technology for better help.

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Reply 1 (1)

qc11
Shopify Staff (Retired)
47 14 12

This is an accepted solution.

Hi,


Your question seems to be related to billing API as opposed to subscriptions API. Unfortunately I don't have much context on billing API.
I'd suggest reposting your question in https://community.shopify.com/c/shopify-apis-and-sdks/bd-p/shopify-apis-and-technology for better help.

To learn more visit the Shopify Help Center or the Community Blog.