#max-schedule

1 messages ยท Page 1 of 1 (latest)

marble hound
#

@warm meteor that's expected as we don't "chain" metadata across objects

#

when you get the event for the PI you should look at the underlying invoice/sub

warm meteor
#

Metadata in invoice.created Event is also empty

#

or do you mean somethign different?

marble hound
#

I mean that you should look at the subscription's metadata

#

PI -> invoice -> subscription and look at that subscription's metadata to find the information you want

warm meteor
#

How to do it via the api?

warm meteor
#

But I need the invoice_number from metadata in my Web Application

novel knoll
#

Right, and you said the invoice_number metadata is on the subscription object correct?

warm meteor
novel knoll
#

So like koopajah said, metadata isn't typically transferred between related objects

warm meteor
#

Yes
But how to check if user paid?

novel knoll
warm meteor
#

So the payment Intent will have the invoice_object attached?
Then will get the invoice via the invoice API and from there my metadata?

warm meteor
#

Ok I will try
Thank you guys

#

๐Ÿ˜ƒ ๐Ÿ™

novel knoll
#

Of course, happy to help

warm meteor
#

Can you leave this thread open?
I will reply if its working or not

I have to wait about 1h to finalize the payment ๐Ÿ˜„

novel knoll
#

Of course

warm meteor
#

Then I will see if the invoice ID is there or not

#

thank you

novel knoll
#

Sounds good let me know. It should be there if it is in the metadata. Just remember you have to either expand the subscription property

warm meteor
#

So I need to get the Invoice from the Payment Intent via API first and from the Invoice the Subscription via the API and from there my metadata right?

#
  1. Get Invoice ID from Payment Intent
  2. Find Invoice via API
  3. Get Subscription ID from the Invoice
  4. Find Subscription via API
  5. Extract Metadata
novel knoll
#

Correct. You can actually look up the Invoice and Subscription at the same time with the Invoice call

warm meteor
#

Man if this is working I will send you definetely a tip via paypal ๐Ÿ˜†
You are going to safe my project

novel knoll
#

Your thanks and working project is plenty! We are always happy to help on questions like this.

warm meteor
#

What would you recommend:

I use the SubscriptionSchedules API to create an Installments Payment for an online course.

On which Webhook Event should I send the user the credentials and access to the course? In best case he should have direct access without delay

novel knoll
#

Typically I think we reccommend provisioning based on the invoice.paid event where reason is subscription_created

warm meteor
#

How long does this usually take for a credit card subscriptionschedules payment?

marble hound
#

@warm meteor not sure what you mean

#

I recommend going through our docs to understand the basics of Billing and billing cycles in general

#

it's all covered in a lot of details

warm meteor
#

I have an expensive product (online course) - 1.000$ is the price
User can pay this price in monthly installments like 500$ per month (2 months)

So the user clicks the buy button and a subscriptionSchedule is created

When will the first invoice be successfully finalized normally to release access to the course?

#

I couldnt find helpful article in the docs

marble hound
warm meteor
#

Perfect this helps a lot
Thank you!