#scoobydoo_97409
1 messages · Page 1 of 1 (latest)
As mentioned in the API response, you're not allowed to send raw card number as part of PCI compliance regulation unless the SAQ-D is completed
@ripe rampart Let's discuss in the thread here
then how can I test?
I'd recommend following this guide to collect card details with Payment Element: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Actually I am just hittig the apis on postman..I am not implementing any code..i just wanted to see the response
I'm afraid that will not be possible with raw card number on /v1/payment_methods API
what should i send in key card[number]
Is there any step that I should do before hitting this?I created the product , price and customer
what should i send in key card[number]
No, you can't use this parameter unless you complete approval process in https://support.stripe.com/questions/enabling-access-to-raw-card-data-apis
Alternatively, you may use the payment method (pm_xxx) that has been created for you: https://stripe.com/docs/testing?testing-method=payment-methods#cards
now I am stuck at payment method api and without this I am unable to hit the subscription api also
You can use the payment method ID (e.g. pm_card_visa) that has already been created for you and set in subscription API
what should be the body for this?
You don't need to make a /v1/payment_methods request as the Payment Method as been provided to use directly in other API requires a payment method
wait let me try
just help to resolve this please
I am trying this for the first time
I'd recommend following this guide for the parameters to set when creating a Subscription (espcially on Step 4): https://stripe.com/docs/billing/subscriptions/build-subscriptions
A few parameters are missing in your request
No problem! Happy to help 😄
How to get through this..I am stuck here from yesterday
As mentioned earlier, you can't create a payment method through raw card number
You can use the payment method that has already been created for you in https://stripe.com/docs/testing?testing-method=payment-methods#cards
how? please explain..I am not able to get this
What steps are you following in your postman requests?
The guide I shared doesn't have this /v1/payment_methods step
What are you trying to achieve with this request here?
i created the product first
then i created the price for that product
then i created the customer
now I am stuck at the payment method api
as I said
Unless Elements (frontend code integration) is used, it's not possible to create a payment method through API.
The only workaround is to skip this this Payment Method API and use the pre-existing pm_card_visa (This an valid Payment Method ID) in the next API that requires a payment method ID
in subscription?
To use this, the steps will be:
- Attach
pm_card_visato the customer and it will return a new payment method ID (pm_xxx) - Use the payment method ID in Step 1 to set in
default_payment_methodof the Subscription
should i add pm_card_visa while creating customer?
In the live payment integration, this guide should be followed instead of using API directly: https://stripe.com/docs/billing/subscriptions/build-subscriptions
If you're just testing purpose about how a Subscription looks like in test mode (not for payment acceptance) and would like to have a payment method to test, attaching pm_card_visa can be done with Attach Payment Method API https://stripe.com/docs/api/payment_methods/attach
And yes, you can also attach pm_card_visa in payment_method paramter when creating a customer
not working
wait
i created the customer with pm_card_visa in payment_method paramter
but when i used the customer id in subsciption api
the same error came..that the customer has no payment source and payment method
Have you followed the step 4 of this guide to create a subscription? https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#create-subscription
There a few parameters missing in your previous screenshot. In addition, you'd need to set default_payment_method with the Payment Method ID (pm_xxx) attached to your customer. You can use List Payment Methods API to retrieve them: https://stripe.com/docs/api/payment_methods/customer_list
The steps gonna be:
- Create a customer with attaching
pm_card_visainpayment_methodfield - Retrieve the payment method saved on the customer using List Customer's Payment Methods API: https://stripe.com/docs/api/payment_methods/customer_list
- Get the payment method ID from Step 1 and create the Subscription with the Step 4 of this guide https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#create-subscription
with setting the payment method ID indefault_payment_methodfield: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
Please note that this is only for your testing purpose. For actual live payment integration, you should still full guide with Elements integration: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
let me try
i did not understand the step 4 from the guide which you mentioned in your 3rd step
thanks subscription is done
Great to hear that subscription is created successfully