Created
October 22, 2017 18:28
-
-
Save adamjstevenson/b13730a620943bfa12710c20892f2e90 to your computer and use it in GitHub Desktop.
Split payments between sellers
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 $10 | |
charge = Stripe::Charge.create({ | |
amount: 1000, | |
currency: "usd", | |
source: "src_1BF7yx2jy8PDLWD6TFmguGn0", | |
transfer_group: "notes_328324" | |
}) | |
# Send $4 to one account | |
transfer = Stripe::Transfer.create({ | |
amount: 400, | |
currency: "usd", | |
destination: "acct_j1cXUEAksEpalsjc3", | |
transfer_group: "notes_328324" | |
}) | |
# Sent $5 to another | |
transfer = Stripe::Transfer.create({ | |
amount: 500, | |
currency: "usd", | |
destination: "acct_1BF8VRBAxruRdpTq", | |
transfer_group: "notes_328324" | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment