Card Management
This section focuses on managing payment cards associated with a user's account. It includes APIs for adding, retrieving, and deleting card details, allowing your customers to manage their payment methods easily.
Included APIs:
Get User Card Details: Retrieves the saved card information for a user, facilitating a smoother checkout process by allowing users to choose from their saved cards.
Add Card Details: Allows users to add new card details to their account, expanding their options for payment methods.
Delete Card: Enables users to remove a saved card from their account, maintaining the relevance and accuracy of their payment options.
1. Get User Card Details
Endpoint:
GET /api/Checkout/GetUserDetails
Purpose: Retrieves the user's saved card details.
Request Parameters:
emailId=string
{
"userVM": {
"userId": "4936",
"cardType": "visa",
"lastFourDigitCardNumber": "1111"
}
}
Response:
Status 200: Card details fetched successfully.
2. Add Card Details
Endpoint:
POST /api/Checkout/AddCardDetails
Purpose: Adds a new payment card to the user's account.
Request Body:
{
"CardNumber": "4111111111111111",
"CardValidityDate": "1225",
"CardCVVNumber": "123",
"UserId": "4936"
}
Response:
Status 200: Card added successfully.
{
"status": 1,
"message": "Card has been added successfully"
}
3. Delete Card
POST
/api/Checkout/DeleteCard
Purpose: Removes a saved card from the user's account.
Request Body:
{
"UserId": "4936",
"CardId": "cardId123"
}
Response:
{
"UserId": "4936",
"CardId": "cardId123"
}
Last updated