Skip to main content

Update Payment Method


Use the Update Payment Method screen to collect new card details when the current payment method requires an update.


Update payment details screen with card fields and continue action

This screen includes:

#ElementDescription
1Screen titleDisplays Update payment details
2Payment instructionsRequests new payment details
3Card fieldsCollect card number, expiration date, and security code
4Country fieldSelects the cardholder country
5Continue actionSubmits the payment details

Workflow

  1. Open the Update payment details screen.
  2. Enter the card details.
  3. Select the cardholder country.
  4. Select Provide payment details and continue.
  5. Submit the payment method.
  6. Continue the payment flow after a successful update.

Validations

ScenarioApp behaviorSDK output
Card number is missing or invalidDisplay a field errorerror = invalid_card_number
Expiration date is missing or invalidDisplay a field errorerror = invalid_expiration_date
Security code is missing or invalidDisplay a field errorerror = invalid_security_code
Country is not selectedBlock submissionerror = country_required
Payment details are validEnable submissionstate = valid
Payment update failsDisplay a payment errorstate = error

Actions

ScenarioApp behaviorSDK output
Card details enteredUpdate the form stateInput update
Country selectedUpdate the country valuecountry = updated
Continue selectedSubmit the payment detailsPATCH request
Update succeedsContinue the payment flowstate = success
Update failsPreserve the entered detailsstate = error

Endpoint Resources

Update Payment Method

PUT 

v3/payment-method

Returns the screen that collects updated payment details.

ParameterLocationTypeRequiredDescription
appointment-idQueryIntegerNoIdentifies the appointment associated with the payment update

Confirm Payment Method

PATCH 

v3/payment-method

Attaches the updated payment method to the user account and appointment.