Update Payment Error
Use Update Payment Error to show a payment processing error when the submitted credit card details cannot be accepted.
This screen keeps the user on the payment details page and displays the error in a popup.
This screen includes:
| # | Element | Description |
|---|---|---|
| 1 | Header | Displays Update payment details with back navigation and settings access. |
| 2 | Payment method section | Displays the selected payment method. |
| 3 | Credit card selector | Shows the selected credit card payment option. |
| 4 | Card details fields | Displays the entered card number, expiration date, and security code. |
| 5 | Save card indicator | Shows the option to save card details securely. |
| 6 | Error modal | Displays the card validation error. |
| 7 | Error message | Displays Your card number is incorrect. |
| 8 | OK action | Dismisses the error modal and returns to the payment details screen. |
| 9 | Update action | Submits the payment details when the form is valid. |
Workflow
- Open Update payment details.
- Enter or confirm card details.
- Select Update.
- Validate the submitted payment details.
- Display the error popup when validation fails.
- Select Ok to dismiss the popup.
- Return to the payment details screen.
Validations
| Scenario | App Behavior | SDK Output |
|---|---|---|
| Session invalid | Block payment update | state = unauthenticated |
| Card number invalid | Display card number error popup | error = invalid_card_number |
| Card details invalid | Display payment error popup | error = invalid_card |
| Payment method unavailable | Display payment method error | error = payment_method_unavailable |
| Update succeeds | Refresh the displayed payment method | paymentMethod = updated |
| Update fails | Display payment error popup | state = error |
Actions
| Scenario | App Behavior | SDK Output |
|---|---|---|
| Update selected | Submit payment details | PATCH /api/v3/payment-method |
| Card number rejected | Display Your card number is incorrect. | error = invalid_card_number |
| Payment processing fails | Load payment error content | PUT /api/v3/payment-method/error |
| Ok selected | Dismiss the error popup | state = dismissed |
| Error dismissed | Return to payment details | state = unchanged |
Endpoint Resources
Update Payment Error
PUT
v3/payment-method/error
Displays a payment system error message in a popup when payment method processing fails.