Hello,
I tried to deactivated the subscription plan with this code
$resp = Http::withHeaders([
'Square-Version' => '2022-07-20',
'Authorization' => "Bearer {$accessToken}",
'Content-Type' => 'application/json'
])->post("{$url}/catalog/object", [
"idempotency_key" => $this->guidv4(),
"object" => [
"type" => "SUBSCRIPTION_PLAN",
"id" => "#Customer-{$customerId}-Items-{$itemString}",
"is_deleted" => false,
"present_at_all_locations" => false,
"subscription_plan_data" => [
"name" => "Signed up for {$subscription['cadence']} order. Customer: #{$customerId}",
"phases" => [
[
"cadence" => $subscription['cadence'],
"recurring_price_money" => [
"amount" => $subscription['amount']*$this->zeroDecimal($subscription['currency']),
"currency" => $subscription['currency']
]
]
]
]
]
]);
I received the response and everything looks good but when I go to the Subscription Plan Sign In, the status still is “Active”.
Any ideas? Thanks in adnvaced.