Jeff
Jeff

Reputation: 6663

Associate one-off Stripe payment token (tok_) with Customer object

Is it possible to associate a one-off Stripe charge/payment with a Stripe Customer profile but not save the card to the profile? I'd really like to organize my Customers and their purchases within the Stripe dashboard, but I can't see any way to do this. From what I can tell there are three ways to create a payment:

  1. Using the source parameter and no customer parameter. The source parameter in this instance starts with tok_
  2. Using the customer parameter, which will use the default card on file.
  3. Using the customer and source parameters, where source is the card ID associated with the customer starting with card_.

I've looked through the docs and can't see anything that alludes to being able to create a payment using customer and a tok_ source. Am I missing something here?

Upvotes: 1

Views: 602

Answers (1)

koopajah
koopajah

Reputation: 25632

This is not supported by Stripe at the moment. You can still do this though with a few steps:

  1. You create a card token
  2. You add the card to a customer
  3. You charge that card
  4. You delete the card from the customer

This ensures that you don't save the card but still have the charge associated with the right customer.

Upvotes: 1

Related Questions