#scoobydoo_97409

1 messages · Page 1 of 1 (latest)

gilded pollenBOT
small bramble
#

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

ripe rampart
#

then how can I test?

small bramble
ripe rampart
#

Actually I am just hittig the apis on postman..I am not implementing any code..i just wanted to see the response

small bramble
#

I'm afraid that will not be possible with raw card number on /v1/payment_methods API

ripe rampart
#

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

small bramble
ripe rampart
#

now I am stuck at payment method api and without this I am unable to hit the subscription api also

small bramble
#

You can use the payment method ID (e.g. pm_card_visa) that has already been created for you and set in subscription API

ripe rampart
#

what should be the body for this?

small bramble
#

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

ripe rampart
#

wait let me try

#

just help to resolve this please

#

I am trying this for the first time

small bramble
#

A few parameters are missing in your request

ripe rampart
#

okay and thanks for helping me out

#

I am trying

small bramble
#

No problem! Happy to help 😄

ripe rampart
#

How to get through this..I am stuck here from yesterday

small bramble
#

As mentioned earlier, you can't create a payment method through raw card number

ripe rampart
#

how? please explain..I am not able to get this

small bramble
#

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?

ripe rampart
#

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

small bramble
#

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

ripe rampart
#

in subscription?

small bramble
#

To use this, the steps will be:

  1. Attach pm_card_visa to the customer and it will return a new payment method ID (pm_xxx)
  2. Use the payment method ID in Step 1 to set in default_payment_method of the Subscription
ripe rampart
#

should i add pm_card_visa while creating customer?

small bramble
#

And yes, you can also attach pm_card_visa in payment_method paramter when creating a customer

ripe rampart
#

not working

small bramble
#

What is not working?

#

Can you share the request ID?

ripe rampart
#

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

small bramble
#

The steps gonna be:

  1. Create a customer with attaching pm_card_visa in payment_method field
  2. Retrieve the payment method saved on the customer using List Customer's Payment Methods API: https://stripe.com/docs/api/payment_methods/customer_list
  3. 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 in default_payment_method field: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
ripe rampart
#

let me try

#

i did not understand the step 4 from the guide which you mentioned in your 3rd step

#

thanks subscription is done

small bramble
#

Great to hear that subscription is created successfully