Unable to set capped_amount for a RecurringApplicationCharge via REST API

bogdanvalsan
Shopify Partner
1 0 0

Hi there, 

 

On our Shopify application, we are creating a RecurringApplicationCharge with a price depending on the plan the user selects ($29.99, $59.99, $99.99, etc.)

Beside that, we are now planning to introduce usage charges, in order to charge usage specific fees. To allow that, a capped amount should be set on the recurring application charge initially created, so we are using the PUT API method to accomplish that. The request looks as follows : 

Screenshot 2023-10-27 at 14.54.15.png

The request completes successfully (200 Response status code returned), however on the returned response, the updated capped amount fields are missing (capped_amount, balance_used, balance_remaining, update_capped_amount_url) . The recurring application charge information is same as before making the PUT capped_amount request. 

Screenshot 2023-10-27 at 14.49.35.png

Although now error is provided, the capped_amount is not updated, nor we are receiving the update_capped_amount_url in order to ask the user for approval. Making a GET request on that recurring application charge behaves the same (missing capped_amount informations).

Note : If we initially create the recurring application charge with a capped_amount, later updates of the capped_amount via the PUT API  Endpoint work as expected.

 

Did anybody else encountered this issue lately? I did not find any information in the Shopify API documentation that recurring application charges should be initially created with a capped_amount in order to be able to later edit it via the PUT API Endpoint.

 

Is this a Shopify bug or are we missing anything?

 

Thanks in advance,

 

 

Reply 1 (1)
lizk
Shopify Staff
Shopify Staff
246 57 62

Hi there 👋

I can definitely see how the current documentation is unclear in this scenario. And I will forward the information to the team.

You are correct in your assumption that the recurring application charge must be created initially with as a usage plan and capped amount. This is so merchants can authorize the plan.

For your use case you will most likely want to create a second recurring charge for your merchants this one being the usage plan.

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