403 forbidden when trying to create a usage charge

Highlighted
Shopify Partner
11 1 7

Wondering why I'm getting a 403 when trying to create a usage charge.

Is there a scope I am missing?

 

POST

https://{shop}.myshopify.com/admin/api/2019-07/recurring_application_charges/{chargeId}/usage_charges.json

403 Forbidden

 

Body:

 

{
"usage_charge": {
"description": "Item charge",
"price": 0.01
}
}
{ status: 403,
> statusText: 'Forbidden',
> headers: 
> { date: 'Mon, 05 Aug 2019 19:31:12 GMT',
> 'content-type': 'application/json; charset=utf-8',
> 'x-request-id': 'b5a484f9-6a99-48b3-a9df-05cd852a8a57',

 

0 Likes
Highlighted
Shopify Partner
11 1 7

Nvm, it works now after uninstalling/installing

0 Likes
Highlighted
New Member
2 0 1

not helpful..

1 Like
Highlighted
New Member
10 0 0

Uninstall/install does not help us. Still getting 403 . Tried removing "test:true" from corresponding recurring charge. No effect. We are testing against dev shop, could that be a reason? We are able to activate a recurring application charge against the same shop and then getting 403 for usage charge.  

0 Likes
Highlighted
Shopify Partner
5 1 7

Hi, in order to create a Shopify usage charge you need to set a capped amount and terms fields to the original recurring charge.
Hope this helps !!


@Michael144 wrote:

Wondering why I'm getting a 403 when trying to create a usage charge.

Is there a scope I am missing?

 

POST

https://{shop}.myshopify.com/admin/api/2019-07/recurring_application_charges/{chargeId}/usage_charges.json

403 Forbidden

 

Body:

 

{
"usage_charge": {
"description": "Item charge",
"price": 0.01
}
}
{ status: 403,
> statusText: 'Forbidden',
> headers: 
> { date: 'Mon, 05 Aug 2019 19:31:12 GMT',
> 'content-type': 'application/json; charset=utf-8',
> 'x-request-id': 'b5a484f9-6a99-48b3-a9df-05cd852a8a57',

 


 

0 Likes