Skip to content

Add UPI to payment types#1623

Merged
tyrasd merged 3 commits intoopenstreetmap:mainfrom
sanatsathaye:upi
Nov 18, 2025
Merged

Add UPI to payment types#1623
tyrasd merged 3 commits intoopenstreetmap:mainfrom
sanatsathaye:upi

Conversation

@sanatsathaye
Copy link
Copy Markdown
Contributor

Description, Motivation & Context

Makes UPI an easily selectable option under Payment Types. UPI is used in India for contactless payments by scanning QR codes has usage of over hundreds of million transactions per day.

Related issues

NA

Links and data

Relevant OSM Wiki links:

New Wiki data item created: https://wiki.openstreetmap.org/wiki/Item:Q23065 (btw this part is seriously under-documented IMO)
UPI already document in Wiki under https://wiki.openstreetmap.org/wiki/Key:payment:*#National_electronic_payment_systems

Relevant tag usage stats:

Exactly 1000 at time of writing :) https://taginfo.openstreetmap.org/keys/payment%3Aupi

Checklist and Test-Documentation Template

Read on to get your PR merged faster…

Follow these steps to test your PR yourself and make it a lot easier and faster for maintainers to check and approve it.

This is how it works:

  1. After you submit your PR, the system will create a preview and comment on your PR:

    🍱 Your pull request preview is ready.
    If this is your first contribution to this project, the preview will not happen right away but requires a click from one of the project members. We will do this ASAP.

  2. Once the preview is ready, use it to test your changes.

  3. Now copy the snippet below into a new comment and fill out the blanks.

  4. Now your PR is ready to be reviewed.

## Test-Documentation

### Preview links & Sidebar Screenshots

<!-- Use the preview to find examples, select the feature in question and **copy this link here**.
     Find examples of nodes/areas. Find examples with a lot of tags or very few tags. – Whatever helps to test this thoroughly.
     Add relevant **screenshots** of the sidebar of those examples. -->

<!-- FYI: What we will check:
     - Is the [icon](https://github.com/ideditor/schema-builder/blob/main/ICONS.md) well chosen.
     - Are the fields well-structured and have good labels.
     - Do the dropdowns (etc.) work well and show helpful data. -->

### Search

<!-- **Test the search** of your preset and share relevant **screenshots** here.
     - Test the preset name as search terms.
     - Also test the preset terms and aliases as search terms (if present). -->

### Info-`i`

<!-- **Test the info-i** for your fields and preset and share relevant **screenshots** here.
     The info needs to help mappers understand the preset and when to use it.
     [Learn more…](https://github.com/openstreetmap/id-tagging-schema/blob/main/CONTRIBUTING.md#info-i)
 -->

### Wording

- [ ] American English
- [ ] `name`, `aliases` (if present) use Title Case
- [ ] `terms` (if present) use lower case, sorted A-Z
<!-- Learn more in https://github.com/openstreetmap/id-tagging-schema/blob/main/GUIDELINES.md#2-design-the-preset -->

@matkoniecz

This comment was marked as resolved.

@k-yle

This comment was marked as resolved.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 4, 2025

🍱 Your pull request preview is ready

Please use this preview to check your changes. Ideally use the test documentation template and document your test results by commenting on the PR. This will speed up the review process for everyone.

FYI, once this PR is merged, you can use the iD Editor Preview to test your changes in interaction with all other changes.

@matkoniecz

This comment was marked as resolved.

@sanatsathaye
Copy link
Copy Markdown
Contributor Author

Hope I've done this correctly...

Test-Documentation

Preview links & Sidebar Screenshots

Should work for any object which supports payment method, I've taken generic shop as an example

image

Search

image

Info-i

image

Wording

  • American English
  • name, aliases (if present) use Title Case
  • terms (if present) use lower case, sorted A-Z

@matkoniecz
Copy link
Copy Markdown
Collaborator

Hope I've done this correctly...

it looks so to me! Though I have not done much with payment tagging, so I will not help much with PR review itself

Copy link
Copy Markdown
Collaborator

@matkoniecz matkoniecz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still not an expert, but it looks fine?

is documented, used, noone seems protesting?

but not strongly confident and I may wish i have not approved this

@tordans
Copy link
Copy Markdown
Collaborator

tordans commented Nov 16, 2025

Research notes: The key is used ~1.300 times and as such would have the lowest number of all the options.

{
    "result": [
        {
            "payment_key": "payment:account_cards",
            "usage_count": 4530
        },
        {
            "payment_key": "payment:alipay",
            "usage_count": 10534
        },
        {
            "payment_key": "payment:american_express",
            "usage_count": 43963
        },
        {
            "payment_key": "payment:app",
            "usage_count": 46691
        },
        {
            "payment_key": "payment:apple_pay",
            "usage_count": 23730
        },
        {
            "payment_key": "payment:bancomat",
            "usage_count": 4011
        },
        {
            "payment_key": "payment:blik",
            "usage_count": 2829
        },
        {
            "payment_key": "payment:cards",
            "usage_count": 66924
        },
        {
            "payment_key": "payment:cash",
            "usage_count": 393394
        },
        {
            "payment_key": "payment:cheque",
            "usage_count": 12813
        },
        {
            "payment_key": "payment:clipper",
            "usage_count": 1343
        },
        {
            "payment_key": "payment:coins",
            "usage_count": 122793
        },
        {
            "payment_key": "payment:contactless",
            "usage_count": 79648
        },
        {
            "payment_key": "payment:credit_cards",
            "usage_count": 290091
        },
        {
            "payment_key": "payment:cryptocurrencies",
            "usage_count": 11385
        },
        {
            "payment_key": "payment:debit_cards",
            "usage_count": 239492
        },
        {
            "payment_key": "payment:diners_club",
            "usage_count": 20066
        },
        {
            "payment_key": "payment:discover_card",
            "usage_count": 23931
        },
        {
            "payment_key": "payment:dkv",
            "usage_count": 4435
        },
        {
            "payment_key": "payment:electronic_purses",
            "usage_count": 17014
        },
        {
            "payment_key": "payment:ep_easycard",
            "usage_count": 15630
        },
        {
            "payment_key": "payment:ep_geldkarte",
            "usage_count": 4505
        },
        {
            "payment_key": "payment:ep_ipass",
            "usage_count": 15417
        },
        {
            "payment_key": "payment:girocard",
            "usage_count": 16043
        },
        {
            "payment_key": "payment:google_pay",
            "usage_count": 20976
        },
        {
            "payment_key": "payment:jcb",
            "usage_count": 21108
        },
        {
            "payment_key": "payment:maestro",
            "usage_count": 52055
        },
        {
            "payment_key": "payment:mastercard",
            "usage_count": 157956
        },
        {
            "payment_key": "payment:mastercard_contactless",
            "usage_count": 9067
        },
        {
            "payment_key": "payment:notes",
            "usage_count": 52862
        },
        {
            "payment_key": "payment:paypal",
            "usage_count": 4173
        },
        {
            "payment_key": "payment:prepaid_ticket",
            "usage_count": 1997
        },
        {
            "payment_key": "payment:telephone_cards",
            "usage_count": 11515
        },
        {
            "payment_key": "payment:unionpay",
            "usage_count": 15866
        },
        {
            "payment_key": "payment:upi",
            "usage_count": 1334
        },
        {
            "payment_key": "payment:uta",
            "usage_count": 4052
        },
        {
            "payment_key": "payment:visa",
            "usage_count": 164312
        },
        {
            "payment_key": "payment:visa_debit",
            "usage_count": 16915
        },
        {
            "payment_key": "payment:visa_electron",
            "usage_count": 22514
        },
        {
            "payment_key": "payment:v_pay",
            "usage_count": 6013
        },
        {
            "payment_key": "payment:wechat",
            "usage_count": 9902
        }
    ],
    "metadata": {
        "generator": "Postpass API 0.2",
        "timestamp": "2025-11-16T07:16:42Z"
    }
}%

Query:

curl -g https://postpass.geofabrik.de/api/0.2/interpreter \
--data-urlencode "options[geojson]=false" \
--data-urlencode "data=
SELECT
  t.key AS payment_key,
  COUNT(*) AS usage_count
FROM postpass_pointlinepolygon AS p,
     LATERAL jsonb_object_keys(p.tags) AS t(key)
WHERE t.key IN (
  'payment:account_cards',
  'payment:app',
  'payment:cards',
  'payment:cash',
  'payment:cheque',
  'payment:coins',
  'payment:contactless',
  'payment:credit_cards',
  'payment:cryptocurrencies',
  'payment:debit_cards',
  'payment:electronic_purses',
  'payment:notes',
  'payment:prepaid_ticket',
  'payment:telephone_cards',
  'payment:alipay',
  'payment:american_express',
  'payment:apple_pay',
  'payment:bancomat',
  'payment:blik',
  'payment:clipper',
  'payment:diners_club',
  'payment:discover_card',
  'payment:dkv',
  'payment:ep_easycard',
  'payment:ep_geldkarte',
  'payment:ep_ipass',
  'payment:girocard',
  'payment:google_pay',
  'payment:jcb',
  'payment:maestro',
  'payment:mastercard',
  'payment:mastercard_contactless',
  'payment:paypal',
  'payment:unionpay',
  'payment:uta',
  'payment:v_pay',
  'payment:visa',
  'payment:visa_debit',
  'payment:visa_electron',
  'payment:wechat',
  'payment:upi'
)
GROUP BY t.key"

Comment thread data/fields/payment_multi.json Outdated
"visa_electron": "Visa Electron",
"wechat": "WeChat Pay"
"wechat": "WeChat Pay",
"upi": "UPI"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am tempted to say that it should be different key than upi - to reduce risk of key collision in future. But it is too late for that I guess.

Though maybe label should be longer than UPI? if that is just "UPI" it does not add much of context

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the label - I did think of this but there already seem to be a few similarly named like DKV, JCB, UTA so I opted to keep it as just UPI. The Info-i for those doesn't even say anything lol, at least I've added the details for UPI.

Should I change it to "UPI (Unified Payments Interface)"? That might be a bit wordy though

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the longer name is better here.

Did you see the docs on how to handle the info-I?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the label now. I meant earlier I had added already added the details for Info-i 🙂

@matkoniecz
Copy link
Copy Markdown
Collaborator

Research notes: The key is used ~1.300 times and as such would have the lowest number of all the options.

do we have somewhere in docs at least list of PRs rejected in past for too lower tag use?

AFAIK not. And https://github.com/openstreetmap/id-tagging-schema/blob/main/CONTRIBUTING.md is not even mentioning that changes that add support for rarely used tags are more likely to be rejected.

@tordans
Copy link
Copy Markdown
Collaborator

tordans commented Nov 16, 2025

do we have somewhere in docs at least list of PRs rejected in past for too lower tag use?

It is documented at https://github.com/openstreetmap/id-tagging-schema/blob/main/GUIDELINES.md#general-guidelines but we don't have numbers there which I think is right given the various reasons that we take into account...

For this case I think cam merge now or wait a few month... - both fine.
Which reminds me to check the grows graph...

@sanatsathaye
Copy link
Copy Markdown
Contributor Author

For this case I think cam merge now or wait a few month... - both fine.

I would prefer the former :D

Tbh its usage is very popular but just undermapped I suppose

@tyrasd tyrasd merged commit b8cee23 into openstreetmap:main Nov 18, 2025
5 checks passed
@sanatsathaye sanatsathaye deleted the upi branch November 23, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants