Skip to content

Commit

Permalink
Fix example in README.md
Browse files Browse the repository at this point in the history
Source properties should be under a top-level `source` key in the create source request.
  • Loading branch information
fred-stripe committed Dec 28, 2016
1 parent d2660af commit 1aa1e3b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ stripe.customers.create({
email: 'foo-customer@example.com'
}).then(function(customer){
return stripe.customers.createSource(customer.id, {
object: 'card',
exp_month: 10,
exp_year: 2018,
number: '4242 4242 4242 4242',
cvc: 100
source: {
object: 'card',
exp_month: 10,
exp_year: 2018,
number: '4242 4242 4242 4242',
cvc: 100
}
});
}).then(function(source) {
return stripe.charges.create({
Expand Down

0 comments on commit 1aa1e3b

Please sign in to comment.