#n_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1310538000211513364
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
Hello
as mentioned in the error message, we don't recommend directly passing the raw card numbers
what are you trying to do exactly?
I understand the what shpuld I do, is there any encoding before passing or something?
I don't understand your question. you shouldn't pass the raw numbers to Stripe.
instead it's the customer you should entier themselves the numbers
I am making payment gateway integration, where I have card details and make payment using stripe api
or, if you are just testing things, use our special strings: https://docs.stripe.com/testing?testing-method=payment-methods#cards
My questione is : I am making payment where in the process check customer exist or if not then create a new one,
Later check if card exist then fetch it and use else create a card and attach the card to the custome.
So now in this process I am failing
Using the stripe apis I want to create card there and later attach it to customer and then make payment using the api
is your business PCI compliant?
I have the test account and using the test-card to implement the code and make it work with test data
Once code is up I will change it to live account
is your goal to save a payment method while also charging it, or to only save the payment method for later?
For now please resolve my query, if my card is not exist and I am creating card using 'https://api.stripe.com/v1/payment_methods' how to pass data in payload in this api?
you can't, unless you are PCI comliant.
Nope I want to make payment right away, but stripe I have to store card and then make payment-intent on it right
- if your end goal is just to test things in test mode, then use the test payment methods I shared in the link above, like
pm_card_visa - or if your end goal is to design a real payment flow in test mode, then follow this guide: https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=elements
What if the given card is not exist and I want to make payment for customer. In stripe I have to store and then use it right ?
correct
PCI comliant, so without it, and using the stripe package will I be able to do the following ?
$paymentMethod = PaymentMethod::create([
'type' => 'card',
'card' => $cardDetails,
'customer' => $customerId,
]);
$customer->invoice_settings->default_payment_method = $paymentMethod->id;
$customer->save();
This is create card using the stripe' sdk
no you can't directly manipulate raw card numbers.
for me to help, can you answer this question:
- are you trying to test things quickly in test mode
- or is your end goal is to design a real payment flow in test mode
I have test account, how can I verify this 'PCI comliant' in my account?
This => end goal is to design a real payment flow in test mode
and in test mode all works fine then make it LIVE, so can make live transaction
you can learn more about PCI compliance here: https://stripe.com/guides/pci-compliance
This => end goal is to design a real payment flow in test mode
got it. now can you answer this question: how are you accepting payments? Checkout Session, Payment Element, something else?
I have card-data pass to my service class now here using the card-data I have to charge (using stripe api)
I don't understand. how do you want to collect the payment details from the customer? Checkout Session, Payment Element, something else? you can learn more about the differences here: https://docs.stripe.com/payments/online-payments#compare-features-and-availability
I have payment element
great! so just follow this guide: https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=elements
and if you want to also save the payment method, set setup_future_usage when creating the PaymentIntent https://docs.stripe.com/api/payment_intents/create#create_payment_intent-setup_future_usage