Last active
December 15, 2017 12:58
-
-
Save adamjstevenson/67cfe00ad1fd1e22f31a1aa496be81f7 to your computer and use it in GitHub Desktop.
Create a subscription on a connected account
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a subscription and take a 10% commission | |
subscription = Stripe::Subscription.create( | |
{ | |
customer: "cus_BcNDyG0NuHZn4i", # The ID of the customer on the connected account to charge | |
items: [ | |
{ | |
plan: "29_monthly" # The ID of the plan to which the customer will be subscribed | |
} | |
], | |
application_fee_percent: 10 | |
}, | |
{ | |
stripe_account: "acct_j1cXUEAksEpalsjc3Xl3" # The ID of the Stripe account connected to your platform | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment