Last active
December 15, 2017 12:59
-
-
Save adamjstevenson/8ea94f08fd907aa1def10a5033522783 to your computer and use it in GitHub Desktop.
Create a direct charge 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 charge for $100 and take a $10 commission for the platform | |
charge = Stripe::Charge.create( | |
{ | |
amount: 10000, # Charge amount in cents | |
currency: "usd", # The currency of the charge | |
source: "src_1BF7yx2jy8PDLWD6TFmguGn0", # A source token representing a Visa card | |
application_fee: 1000 # The commission your platform is taking | |
}, | |
{ | |
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