#liodegar-subscription

1 messages · Page 1 of 1 (latest)

nocturne scarab
#

Hi! Can you share your code?

sour sedge
#

SubscriptionCollection collection = Subscription.list(EMPTY_MAP, requestOptions).autoPagingIterable();

nocturne scarab
sour sedge
#

acct_1HtsgGBB2lsBqZNJ

#

yes, java code

charred lark
#

Does the subscription you’ve selected actually exist? Error says there’s no subscription

nocturne scarab
#

The subscription in the error message you shared does exist (sub_1KxEcRDhO9T7S5mHmbwOmpXh), however it doesn't belon to the account you just shared.

sour sedge
#

We have two accounts, please can you check this: acct_1HvgXhDhO9T7S5mH

nocturne scarab
#

Yes, that's the correct account. So you are using the API keys of acct_1HvgXhDhO9T7S5mH to list all subscriptions, and you get the error you share above?

sour sedge
#

I am iterating and then cancelling the subscription inside the loop

nocturne scarab
sour sedge
#

so, how can I cancel the retrieved subscriptions?

nocturne scarab
#

While you list the subscriptions, add the ID of the subscriptions you want to delete to an array. Then when you finished listing all subscription, then cancel all the subscription you need.

#

Listing and deleting at the same time doesn't work. But you can do that sequencially: list everything, then delete.