Skip to content

Instantly share code, notes, and snippets.

@adamjstevenson
Last active December 15, 2017 12:56
Show Gist options
  • Save adamjstevenson/95cb241011d0006f7435db595d315d8f to your computer and use it in GitHub Desktop.
Save adamjstevenson/95cb241011d0006f7435db595d315d8f to your computer and use it in GitHub Desktop.
Create a destination charge with a 10% platform commission
charge = Stripe::Charge.create({
amount: 1000, # The total amount of the charge
currency: "usd",
source: "src_1BF7yx2jy8PDLWD6TFmguGn0", # A token representing the customer's payment details
destination: {
amount: 900, # The amount the connected user gets
account: "acct_1BF8VRBAxruRdpTq", # The ID of the connected user
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment