Web Payments workflow issues

With the new verifyBuyer() requirements, how does one create a customer, save a nonce as a card, get a card-id returned and then make the payment with that card-id? The workflow from the prior paymentForm method was:
Frontend

  • Get a nonce
  • Pass it to the backend

Backend

  • Receive a nonce
  • Create the customer if does not exist
  • Use the nonce to save the card to the customer
  • Use the new card-id to make the payment

Unfortunately, with the introduction of verifyBuyer() and the different 'Intents" of the verificationData I can’t see how to create a customer and save the card without multiple calls to verifyBuyer(). Once to save the card and again to make the payment . This is awkward at best given that one may be managing a payment from a selection of several card-ids and/or a new card that is to be saved.

It would take several ajax calls to the server to create the customer, create a card, and then use that new card-id for the payment. In addition, it would take 2 separate verifyBuyer() calls. Customers will become annoyed with the multiple verifications and web-site conversions will tank.

Can you provide a workflow on how this is to be done?

With the Cards API you can save a card on file with a payment_id so you can limit the number of times you call verifyBuyer with the different intents.

So the customer is expected to change their workflow to account for a change in an API? The changes to the API require me to completely reverse the workflow process.

The old way of saving the card on file still works with the Cards API. The above was just a suggestion so you wouldn’t have to call verifyBuyer() so many times. However with the Web Payments SDK when you wants to STORE the card then there’s a StoreVerifyBuyerDetails object you can pass to VerifyBuyer

Here is the link to our Technical Reference.

To fix these errors, try the following steps:

  1. Make sure your card & address information is up to date.
  2. Submit any extra information that is requested.
  3. Check you have sufficient funds for the purchase.
  4. Contact your bank or card issuer.
  5. If you see “Your payment was declined due to an issue with your account”

Greeting,
Rachel Gomez