w3c / w3c/payment-request

Support for gift cards and discount codes

Open
#145 32 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Future Candidate Feature proposal - needs discussion
Dominant language
HTML
Stars
510
Forks
139
PR merge metrics
No merged PRs in 30d

Description

An important part of Shopify's checkout is the ability for the user to enter a discount code and or gift card at any point during the checkout (shown below). Once the discount or gift card code is verified the checkout balance is adjusted accordingly.

Step 1 - shipping

Step 2 - delivery

Step 3 - payment

The majority of checkout on the web support gift and promotional codes as well. Examples from Amazon and Nike below.

What is the strategy for accepting gift card and discount codes in the payments api? Will this be the responsibility of the user agent or the payment app?

There has been related discussion on the ability for the merchant to require the collection of certain shipping and billing information. This is similar but gift card and discount codes are more complex as they require an additional verification step to be carried out by the merchant. This verification could be accomplished through a callback to the merchant where they would be responsible for any updates.

Note: It’s more common to include gift card and discount entry in the payments step of checkout, however, we have experienced better cart conversation rates by making the option available throughout our checkout experience.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the requirements in this issue and the related browser-payment-api issue #1. Done means reaching a decision on whether the user agent or payment app handles gift cards and discount codes, including the merchant verification and checkout update flow.

Written by the indexing model from the issue text.

Assessment

Domain
api, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.