Stripe component card number not existent

Hi there,

I am experiencing an issue where I am not able to access the card number that I put into the native Stripe component.

There is no parameter that equals the card number in the stripeToken object or its card parameter that is returned from the submission of the component (only the last 4 digits).

In order to create a card from the POST v1/customers/{customer}/cards endpoint the card number parameter is required even though it is not mentioned in the official stripe docs at Stripe API reference – Create a card – curl and nowhere to find in the retool docs.

Please help on how to create a payment method for a Stripe customer ideally using the native Stripe component and its returned token response.

Thanks in advance!

Hey Matteo! Welcome to the forum :slight_smile:
This is 100% intended behaviour. If you want to deal with and/or process card numbers, and other sensitive card payment details, you need both your own platform and Retool's platform to live up the PCI requirements. This, you certainly want to avoid.

You should instead use the token returned by the Stripe Card input form component to create a PaymentIntent, when you want to charge the card.

So there is no possibility to add a payment method to the Stripe customer?

My retool page serves the purpose of collecting the payment information, to be charged at a later point.

Thank you for the reply!

There is :-).

You attach it by the /customers/:customer/sources endpoint.

1 Like

This is support you need from the Stripe team.

However, to point you in the right direction, I think you're reading the API wrong. All you post is the token (id) returned by the Stripe component;

Then, you're referring to the response from the API, not the request, that may include the bank details if it's a bank source (i.e. for a Direct Debit), and not a card source.