Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Save CC (1009)

Title

Saved Credit Card feature

Description / Background

Currently on our platform, we still don’t have a "Save Credit Card" feature. Compared with other reservation platforms, each time, the user must input his credit/debit card details again to complete the booking/order process.

Objectives

User can save credits card 2 places

  1. On the profile page via payment methods
    1. user can: add a new credit or debit card;
    2. can set which credit or debit card to be primary;
    3. can delete an unwanted card.
  2. On the payment page
    1. user can add a new credit or debit card and choose which card will be used for this booking.
    2. If a user adds a new card on this page, they can decide
    3. if this new card is to be primary or not. And when this user needs to be pre-paid again next time, he can set this card to be primary. He’s not supposed to add the credit card details again because it’s already defaulted.

Scope

Available on all platforms. Add save credit card feature on 2 places which are on profile page & on payment page. To reduce user journey time.

Sequence Diagram / Flow

ERD

[

drive.google.com

https://drive.google.com/file/d/1apckEqN4jYIUr6xsXCRcxsBeF4KLa6_L/view

](https://drive.google.com/file/d/1apckEqN4jYIUr6xsXCRcxsBeF4KLa6_L/view)

DB Schema / Database Migration

Column NameTable NameData TypeDescription
is_primaryexternals_gb_primepay_cardsbooleanAdd this column, mark the cc as primary
card_locationexternals_gb_primepay_cardsstring
card_typeexternals_gb_primepay_cardsstring
gb_primepay_card_idExternals_omise_sourcesinteger

API Blueprint

PathURLDescriptionpayload
GET/users/{user_id}/credit_cards.jsonGet credit card list{ "access_token": "0aqu4-ue6swEUPN_E_VwMIooenkuHaKCs4kBFXlzF_U" }
GET/users/{user_id}/credit_cards/{credit_card_id}.jsonGet 1 credit card{ "access_token": "0aqu4-ue6swEUPN_E_VwMIooenkuHaKCs4kBFXlzF_U" }
POST/users/{user_id}/credit_cards.json{ "access_token": "0aqu4-ue6swEUPN_E_VwMIooenkuHaKCs4kBFXlzF_U", "card": { "token": "2987f087-f40b-457b-97d1-0119a97a7794", "number": "1111XXXXXXXX5555", "last_digits": "4444", "name": "Card Holder", "expiration_month": "01", "expiration_year": "25", "is_primary": false, "card_locations": "Indonesia", "card_type": "VIS" } }
PATCH/users/{user_id}/credit_cards/{credit_card_id}.json{ "access_token": "0aqu4-ue6swEUPN_E_VwMIooenkuHaKCs4kBFXlzF_U", "card": { "token": "2987f087-f40b-457b-97d1-0119a97a7794", "number": "1111XXXXXXXX4422", "last_digits": "4444", "name": "Card Holder", "expiration_month": "01", "expiration_year": "25", "is_primary": false, "card_locations": "Indonesia", "card_type": "VIS" } }
DEL/users/{user_id}/credit_cards/{credit_card_id}.json{ "access_token": "0aqu4-ue6swEUPN_E_VwMIooenkuHaKCs4kBFXlzF_U" }
POST/reservations.jsonada perubahan payload ketika member menggunakan CC yang telah di save "gb_primepay_card": { "hungryhub_card_id": {externals_gb_primepay_cards_id} },"omise_payment_type": "cc", "gb_primepay_card": { "hungryhub_card_id": "2605" },

Notes, Constraint & Assumptions

TODO List / Action Items

Basecamp Log In

References

Change History

NODate TimeWhat ChagedDescription
13 Oct 2022 14:30-Initiate Document
2