Error Codes Wiki

Payment Request API Error — Browser Native Payment Flow Failures

Errorgeneral

Overview

Fix Payment Request API errors when the browser's native payment sheet fails to display, process payment methods, or complete transactions.

Key Details

  • The Payment Request API provides a native browser payment interface as an alternative to custom checkout forms
  • It supports credit cards saved in the browser, Google Pay, Apple Pay, and other payment handlers
  • Payment Request requires HTTPS and a valid payment method identifier
  • Not all browsers support all payment methods — Chrome supports Google Pay, Safari supports Apple Pay
  • The API does not process payments — it collects payment details which must be sent to a payment processor

Common Causes

  • No payment methods available in the user's browser (no saved cards, no Google Pay/Apple Pay configured)
  • Unsupported payment method identifier for the user's browser
  • Payment Request API called on HTTP instead of HTTPS (required for security)
  • Browser Payment Request API disabled in settings or not supported in the browser version

Steps

  1. 1Check browser support: PaymentRequest in window returns true if supported
  2. 2Always provide a fallback checkout form when Payment Request is not available
  3. 3Test with canMakePayment() before showing the payment button to check if the user has valid payment methods
  4. 4Use the correct payment method identifiers: 'basic-card' for saved cards, 'https://google.com/pay' for Google Pay
  5. 5Handle AbortError gracefully — the user may dismiss the payment sheet without completing

Tags

payment-requestapicheckoutgoogle-payapple-pay

More in General

Frequently Asked Questions

No. Payment Request is a UI abstraction that collects payment details. You still need a payment processor (Stripe, PayPal, Braintree) to actually charge the card. Payment Request replaces the HTML form, not the payment processor.