Does my Stripe create tokens cURL command import look normal?

Options

Guys,

I've imported this into Xano:

curl https://api.stripe.com/v1/tokens \
-u sk_test_51MKlHvJaJ66qam0ro2Aoud3nRpdL91gbsUg0Wp9NM3D0Fniqy2yx66oy5YkaNjkX3HotTBPDcQglAiffKypWj2SV00MOzxycdY: \
-d "card[number]"=4242424242424242 \
-d "card[exp_month]"=5 \
-d "card[exp_year]"=2024 \
-d "card[cvc]"=314

and I see this "Basic" mention and base64 thing populated in the headers:

Are these normal?

Best Answer

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Answer ✓
    Options

    Yes. -u tells curl to add a Basic authorization hearder. The way that works is it takes the username and a password, links them with a colon, and base64 encodes the result. Curl manages this for you. Xano is unpacking it explicitly.

Answers