forked from drone/go.stripe
-
Notifications
You must be signed in to change notification settings - Fork 7
Plans
bradrydzewski edited this page Jun 5, 2012
·
4 revisions
stripe.SetKey("vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE")
params := stripe.PlanParams{
Id: "gold",
Name: "Amazing Gold Plan",
Amount: 2000,
Currency: USD,
Interval: stripe.IntervalMonth,
}
plan, err := stripe.Plans.Create(¶m)
Full list of parameters for creating a Plan:
http://go.pkgdoc.org/github.com/bradrydzewski/go.stripe#PlanParams
Official Stripe Documentation:
https://stripe.com/docs/api#create_plan
stripe.SetKey("vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE")
plan, err := stripe.Plans.Retrieve("gold")
stripe.SetKey("vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE")
plan, err := stripe.Plans.Update("gold", "Super Insane Gold Plan")
stripe.SetKey("vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE")
plans, err := stripe.Plans.Delete("gold")
stripe.SetKey("vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE")
plans, err := stripe.Plans.List()
List a range of Plans:
// get a list of 10 plans, starting at position 40 in the list
plans, err := stripe.Plans.ListN(10, 40)