Commerce Engine is now in early preview. Please report any issues or feedback to support@commercengine.io
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/payment-methods \
--header 'Authorization: Bearer <token>'{
"message": "<string>",
"success": true,
"content": {
"saved_payment_methods": {
"upi_collect": [
{
"count": 123,
"last_used": "<string>",
"vpa": "<string>"
}
],
"wallet": [
{
"id": "<string>",
"wallet": "<string>",
"gateway_reference_id": "<string>",
"last_refreshed": "<string>",
"linked": "<string>",
"metadata": {
"mobile_number": "<string>",
"device_id": "<string>"
},
"sub_details": {
"last_used": "<string>",
"current_balance": "<string>",
"last_refreshed": "<string>",
"payment_method": "<string>",
"payment_method_type": "<string>"
}
}
],
"card": [
{
"card_sub_type": "<string>",
"extended_card_type": "<string>",
"provider_category": "<string>",
"vault_provider": "<string>",
"card_type": "<string>",
"card_token": "<string>",
"card_exp_month": "<string>",
"expired": true,
"tokenize_support": true,
"card_exp_year": "<string>",
"name_on_card": "<string>",
"country_code": "<string>",
"card_number": "<string>",
"card_global_fingerprint": "<string>",
"nickname": "<string>",
"card_reference": "<string>",
"metadata": {
"origin_merchant_id": "<string>"
},
"card_issuer": "<string>",
"provider": "<string>",
"card_sub_type_category": "<string>",
"card_fingerprint": "<string>",
"juspay_bank_code": "<string>",
"card_isin": "<string>",
"card_brand": "<string>",
"card_issuer_country": "<string>"
}
]
}
}
}This endpoint acts as a proxy for JusPayโs Fetch Saved Payment Methods API. It enables to securely retrieve a list of payment methods (such as saved cards, UPI handles, wallets) that have been previously stored for a given customer.
The operation helps streamline the checkout flow by allowing users to quickly select from existing payment methods, reducing input friction and improving conversion.
You can filter the results by payment method type using the payment_method query parameter. Multiple payment methods can be specified by separating them with commas (e.g., payment_method=upi_collect,card,wallet).
API documentation of JusPay can be found at below link:
https://juspay.io/in/docs/api-reference/docs/express-checkout/fetch-saved-payment-methods
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{customer_id}/payment-methods \
--header 'Authorization: Bearer <token>'{
"message": "<string>",
"success": true,
"content": {
"saved_payment_methods": {
"upi_collect": [
{
"count": 123,
"last_used": "<string>",
"vpa": "<string>"
}
],
"wallet": [
{
"id": "<string>",
"wallet": "<string>",
"gateway_reference_id": "<string>",
"last_refreshed": "<string>",
"linked": "<string>",
"metadata": {
"mobile_number": "<string>",
"device_id": "<string>"
},
"sub_details": {
"last_used": "<string>",
"current_balance": "<string>",
"last_refreshed": "<string>",
"payment_method": "<string>",
"payment_method_type": "<string>"
}
}
],
"card": [
{
"card_sub_type": "<string>",
"extended_card_type": "<string>",
"provider_category": "<string>",
"vault_provider": "<string>",
"card_type": "<string>",
"card_token": "<string>",
"card_exp_month": "<string>",
"expired": true,
"tokenize_support": true,
"card_exp_year": "<string>",
"name_on_card": "<string>",
"country_code": "<string>",
"card_number": "<string>",
"card_global_fingerprint": "<string>",
"nickname": "<string>",
"card_reference": "<string>",
"metadata": {
"origin_merchant_id": "<string>"
},
"card_issuer": "<string>",
"provider": "<string>",
"card_sub_type_category": "<string>",
"card_fingerprint": "<string>",
"juspay_bank_code": "<string>",
"card_isin": "<string>",
"card_brand": "<string>",
"card_issuer_country": "<string>"
}
]
}
}
}Access token
Customer Id
Filter payment methods by type. Accepts multiple payment method types separated by commas. Example: payment_method=upi_collect,card,wallet. Available payment method types include: upi_collect, card, wallet.
Was this page helpful?