== Purpose of this page ==
I need you to give me the api functions to call for the following: (#2 is really a reverse API, stripe calls me, not me call stripe like the rest)
== References ==
[https://stripe.com/docs/subscriptions Recurring payments guide]
[https://stripe.com/docs/webhooks Webhooks guide]
== Questions ==
=== Customer Info ===
==== is this person’s subscription active? ====
[https://stripe.com/docs/api?lang=php#customer_object Customer Object] contains [https://stripe.com/docs/api?lang=php#subscription_object Subscription Object]
==== is the subscription auto renewing? ====
[https://stripe.com/docs/api?lang=php#customer_object Customer Object] contains [https://stripe.com/docs/api?lang=php#subscription_object Subscription Object]
==== what level are they subscribed at? ====
[https://stripe.com/docs/api?lang=php#customer_object Customer Object] contains [https://stripe.com/docs/api?lang=php#subscription_object Subscription Object]
==== when does it expire / renew? ====
[https://stripe.com/docs/api?lang=php#customer_object Customer Object] contains [https://stripe.com/docs/api?lang=php#subscription_object Subscription Object]
=== CRUD ===
URL I can send the user to in order to change payment info, change subscription level, or cancel auto-renew
You need to provide this system.
To update payment info, you just retrive the customer token then update any fields: [https://stripe.com/docs/api?lang=php#update_customer Update customer]
[https://stripe.com/docs/api?lang=php#update_subscription To update a subscription] [https://stripe.com/docs/api?lang=php#cancel_subscription To cancel a subscription]
=== WebHooks ===
stripe needs to call https://ssl.acemonstertoys.org/member/stripe.php when something changes (someone creates new subscription, someone’s subscription expires, they change their membership level, etc). All it really needs to pass in is the UserID, then I can look up everything else
You need to setup WebHooks inside the Stripe Settings [http://manage.stripe.com]
It won’t pass in a User ID, but it will pass a customer token. Store the customer token in the database and look up by that.
[https://stripe.com/docs/api#event_types Here are all the Stripe event types you can receive WebHooks for]
The things you specifically mentioned:
New subscription: customer.subscription.created
Expired/Deleted subscription: customer.subscription.deleted
Change membership level: customer.subscription.updated
=== Creating users ===
[https://stripe.com/docs/api#create_customer Create customer]
=== function to manually activate someone’s account in stripe, without charging a credit card ===
Need more info
=== function to manually add time to someone’s active account in stripe, without charging a credit card ===
[https://stripe.com/docs/api?lang=php#update_subscription Update subscription]
=== function to manually add a charge to someone’s account in stripe (will either charge them immediately, or add onto their next auto payment, either is fine) ===
[https://stripe.com/docs/api?lang=php#create_charge Create charge]
=== Subscription management ===
Stripe does not provide any UI of any kind, you need to implement a UI and use Stripe.js to make calls to update info and such