How do you create a customer using stripe?

Skip to first unread message

Phillip Senn

May 20, 2015, 4:06:02 PM5/20/15
I see their ruby, python, php and node examples but I don't understand how to translate

into ColdFusion.

Where does "stripe.customers.create" come from in the node example, or
"\Stripe\Customer::create" in the php?

Phil Cruz

May 20, 2015, 4:16:49 PM5/20/15
You received this message because you are subscribed to the Google Groups "cfpayment" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

Brian G

May 31, 2015, 2:37:35 PM5/31/15


You create a customer in Stripe from a stripe.js token OR a credit card or bank account struct you pass.  So basically, get your cfpayment Stripe gateway, then:

token = cfpayment.createToken().setID(token-value-from-stripejs);
customer =;

I've made a series of major changes today to Stripe in cfpayment which I'll detail separately in a moment.  But to charge, you would do either:

amount = cfpayment.createMoney(5000);

// charge the one-time token from stripejs by converting it to a cfpayment token and passing to purchase as the account
charge = gw.purchase(money = amount, account = token);

// charge the customer instead by converting the customer token (cus_*) into a cfpayment token and passing to purchase
customer_token = cfpayment.createToken().setID(customer.getTransactionId());
charge = gw.purchase(money = amount, options = {customer: customer_token});

Harold Loving

Aug 27, 2015, 8:40:16 AM8/27/15
to cfpayment
I think it would be helpful to have this line somewhere in the docs or examples:

token = cfpayment.createToken().setID(token-value-from-stripejs);


Brian G

Aug 27, 2015, 11:05:59 AM8/27/15
to cfpayment

Samples for all the stripe functionality can be found in the unit tests:

I have a branch I'm working on with some improvements and more tests coming soon.

Reply all
Reply to author
0 new messages