Toss payments 개발자 커뮤니티Tp개커Toss payments 개발자 커뮤니티
Powered by
Mohammad Hasibul HasanM
Toss payments 개발자 커뮤니티•2y ago•
6 replies
Mohammad Hasibul Hasan

About Card Number Masking

I use APIs to make payments. In the API response, I noticed that we receive a card object. The object looks like this:

"card": {
    "issuerCode": "71",
    "acquirerCode": "71",
    "number": "12345678****000*",
    "installmentPlanMonths": 0,
    "isInterestFree": false,
    "interestPayer": null,
    "approveNo": "00000000",
    "useCardPoint": false,
    "cardType": "신용",
    "ownerType": "개인",
    "acquireStatus": "READY",
    "receiptUrl": "https://dashboard.tosspayments.com/receipt/redirection?transactionId=tviva20240213121757MvuS8&ref=PX",
    "amount": 1000
  }
"card": {
    "issuerCode": "71",
    "acquirerCode": "71",
    "number": "12345678****000*",
    "installmentPlanMonths": 0,
    "isInterestFree": false,
    "interestPayer": null,
    "approveNo": "00000000",
    "useCardPoint": false,
    "cardType": "신용",
    "ownerType": "개인",
    "acquireStatus": "READY",
    "receiptUrl": "https://dashboard.tosspayments.com/receipt/redirection?transactionId=tviva20240213121757MvuS8&ref=PX",
    "amount": 1000
  }

In card.number, I want to show only the last 4 digits, while masking the rest of the card number with asterisks.
"number": "**0000"

Is it possible?
Toss payments 개발자 커뮤니티 banner
Toss payments 개발자 커뮤니티Join
Toss payments 개발자 커뮤니티입니다. 결제 연동하며 겪는 기술 문의부터, 결제 시장에 대한 다양한 정보까지 얻어가세요~
15,588Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

how to add card
zilongZzilong / 🌎┃global-support
9mo ago
Testing payment credit card
Baro aka be baoBBaro aka be bao / 🌎┃global-support
3y ago
didn't find the add card and save card ID flow
jasonJjason / 🌎┃global-support
2y ago
Fake Visa/Mastercard test card
sayodenSsayoden / 🌎┃global-support
6mo ago