Deactivate right after post activate RecurringApplicationCharge REST API?

Highlighted
Excursionist
36 2 1

 

I have POST this API

https://${shop}/admin/api/${API_VERSION}/recurring_application_charges.json

and then activate it with

https://${shop}/admin/api/${API_VERSION}/recurring_application_charges/${billing_id}/activate.json

It respond with

{ recurring_application_charge:
   { id: 12952207413,
     name: 'Super Duper Plan',
     api_client_id: 3422939,
     price: '10.00',
     status: 'active',
     return_url: 'https://b7f20789.ngrok.io/plan/activate',
     billing_on: '2020-05-26',
     created_at: '2020-05-26T06:33:13-04:00',
     updated_at: '2020-05-26T06:33:23-04:00',
     test: true,
     activated_on: '2020-05-26',
     cancelled_on: null,
     trial_days: 0,
     trial_ends_on: '2020-05-26',
     decorated_return_url:
      'https://b7f20789.ngrok.io/plan/activate?charge_id=12952207413' } }

But when I check in app history it respond with:

 

 

May 26, 2020 at 6:33AMSuccessRecurring charge activatedSuper Duper Plan - 10.0 (Test)
May 26, 2020 at 6:33AMRecurring charge cancelledSuper Duper Plan - 10.0 (Test)
May 26, 2020 at 6:33AMSuccessRecurring charge acceptedSuper Duper Plan - 10.0 (Test)

 

It cancelled right after activate it? And when I check with GET API

https://${shop}/admin/api/${API_VERSION}/recurring_application_charges.json

I get this response from Shopify

{"errors":"Internal Server Error"}

 

0 Likes