#rongong

1 messages ยท Page 1 of 1 (latest)

primal compassBOT
cursive charm
#

When we go into Stripe we only see a "Card Id" but we're unable to find the "Token Id" as we would when we call the card token api.
Could you elaborate where exactly are you looking at?

noble vault
#

I'm looking in the stripe UI under the customer

cursive charm
#

Could you screenshot? (mask out sensitive information if there is)

noble vault
#

Here is the "Card Id" for the payment method and were looking to get the "Token Id" which starts with "tok_"

cursive charm
#

Ah I see. So it can depend on how this card was collected. It could be a source, or a payment method. If you retrieve the Customer via API and look at its https://stripe.com/docs/api/customers/object#customer_object-default_source or https://stripe.com/docs/api/customers/object#customer_object-sources, what do you see?

noble vault
#

I can retrieve the customer but that doesn't give me the payment token. I've also tried making a request to the "/customer/<<customer id>>/sources". This provides me with the "Card Id".

cursive charm
#

Can you share the customer id? cus_xxx I can take a quick look

noble vault
#

cus_P2SIV08llWxuu9

cursive charm
noble vault
#

It provides me with the "card_" id.

cursive charm
#

Okie I think this is also usable. Where do you need to pass in the token id?

noble vault
#

I'm actually not sure how this token is being utilized as there is a different work stream which performs this task. hahahha...sorry... My task was to generate the transaction and then pass the token id to a separate internal process.

cursive charm
#

I see. Common situations for developer though ๐Ÿ˜… But yes this Source (card_xxx) behaves a bit different and can not convert back to Token (tok_xxx) unfortunately. As a system overview you would want to desgin the next process to accept an enum of

  • A Payment Method (pm_xxx)
  • A Source (src_xxx or card_xxx)
  • A Token (tok_xxx)
    and be able to handle or save all of them.
#

Those are the possible things a Customer can have