Payment Request API - Pay Cash option

446 Views Asked by At

Is it possible to add a "Cash on Delivery" option to the Payment Request API ?

Can I solve this problem with methodData?

1

There are 1 best solutions below

1
On

Cash on delivery is one of most frequently requested features. There is no plan to provide such payment method as a standard AFAIK but an idea to accommodate it as part of Payment Request API user experience exists.

A spec called Payment Handler API enables anyone to develop their own payment method and its implementing payment app (webpage) as part of Payment Request API (if merchant adds it).

The idea is a merchant can create a cash on delivery payment app and serve it by itself. The payment method simply tells a user that they need to pay upon receiving an item.

That way, you can take advantage of collecting shipping address part of PR API yet using cash on delivery as a payment method.

If you want to try Payment Handler example, visit https://bobpay.xyz and install "Bobpay web payment app" then go to https://rsolomakhin.github.io/pr/bob/ to make payment.