#Lime

1 messages · Page 1 of 1 (latest)

analog merlinBOT
crisp sparrow
#

This will return all the invoices on this specific subscription. The most recent invoices will be listed first.

raven hill
crisp sparrow
#

$0 invoice will be generated with 100% discount.

Are you using Webhook or API to check the subscription status? If you use Webhook, you can listen to invoice.paid event for successful payment. If you use API, you can Invoice API with subscription set to check the invoice status or Subscription API to check the subscription status.

raven hill
#

i'm using the API, the subscription has a basic value of $1 where i'm using to test it, i'm kinda confuse about how to verify if someone has a already active subscription because when i request some info from the API has multiple places with "paid": true and "status": paid, so i'm thinking which one i should use for reference, but i believe should be the status right?

crisp sparrow
#

Yes, you should refer to status field

raven hill
crisp sparrow
#

Could you share the subscription ID (sub_xxx), so that I can have a check?

raven hill
crisp sparrow
raven hill
crisp sparrow
#

I'd recommend subscribing to Stripe Webhook events: https://stripe.com/docs/webhooks

Stripe will send webhook events to inform you about any changes on the subscription. These are the events that you can listen to for a subscription: https://stripe.com/docs/billing/subscriptions/webhooks

Since you're using Checkout Session, Stripe will send checkout.session.completed event when the subscription is successfully subscribed. If a subscription is cancelled, customer.subscription.deleted will be sent. Take sub_1MPvdWHrlhnqjXtyJnGAIp5E as an example,

#

If you only want to use API, then you can use Subscription API to check the subscription status and not using Invoice API

raven hill