curl --request GET \
--url https://sandbox.hyperswitch.io/v2/payments/{id}/payment-methods \
--header 'X-Profile-Id: <x-profile-id>' \
--header 'api-key: <api-key>'{
"payment_methods_enabled": [
{
"card_networks": [
{
"eligible_connectors": [
"stripe",
"adyen"
],
"card_network": "Visa",
"surcharge_details": {
"surcharge": {
"type": "fixed",
"value": 123
},
"display_surcharge_amount": 123,
"display_tax_on_surcharge_amount": 123,
"display_total_surcharge_amount": 123,
"tax_on_surcharge": {
"percentage": 123
}
}
}
],
"payment_method_type": "card",
"payment_method_subtype": "ach",
"required_fields": {
"required_field": "<string>",
"display_name": "<string>",
"field_type": "user_card_number",
"value": "<string>"
},
"payment_experience": [
"redirect_to_url"
],
"surcharge_details": {
"surcharge": {
"type": "fixed",
"value": 123
},
"display_surcharge_amount": 123,
"display_tax_on_surcharge_amount": 123,
"display_total_surcharge_amount": 123,
"tax_on_surcharge": {
"percentage": 123
}
}
}
],
"customer_payment_methods": [
{
"id": "12345_pm_01926c58bc6e77c09e809964e72af8c8",
"payment_token": "7ebf443f-a050-4067-84e5-e6f6d4800aef",
"customer_id": "12345_cus_01926c58bc6e77c09e809964e72af8c8",
"payment_method_type": "card",
"payment_method_subtype": "ach",
"recurring_enabled": true,
"created": "2023-01-18T11:04:09.922Z",
"requires_cvv": true,
"last_used_at": "2024-02-24T11:04:09.922Z",
"is_default": true,
"payment_method_data": {
"card": {
"saved_to_locker": true,
"issuer_country": "AF",
"last4_digits": "<string>",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_holder_name": "<string>",
"card_fingerprint": "<string>",
"nick_name": "<string>",
"card_network": "Visa",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_type": "<string>"
}
},
"bank": {
"mask": "<string>"
},
"billing": {
"address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
}
}
]
}List the payment methods eligible for a payment. This endpoint also returns the saved payment methods for the customer when the customer_id is passed when creating the payment
curl --request GET \
--url https://sandbox.hyperswitch.io/v2/payments/{id}/payment-methods \
--header 'X-Profile-Id: <x-profile-id>' \
--header 'api-key: <api-key>'{
"payment_methods_enabled": [
{
"card_networks": [
{
"eligible_connectors": [
"stripe",
"adyen"
],
"card_network": "Visa",
"surcharge_details": {
"surcharge": {
"type": "fixed",
"value": 123
},
"display_surcharge_amount": 123,
"display_tax_on_surcharge_amount": 123,
"display_total_surcharge_amount": 123,
"tax_on_surcharge": {
"percentage": 123
}
}
}
],
"payment_method_type": "card",
"payment_method_subtype": "ach",
"required_fields": {
"required_field": "<string>",
"display_name": "<string>",
"field_type": "user_card_number",
"value": "<string>"
},
"payment_experience": [
"redirect_to_url"
],
"surcharge_details": {
"surcharge": {
"type": "fixed",
"value": 123
},
"display_surcharge_amount": 123,
"display_tax_on_surcharge_amount": 123,
"display_total_surcharge_amount": 123,
"tax_on_surcharge": {
"percentage": 123
}
}
}
],
"customer_payment_methods": [
{
"id": "12345_pm_01926c58bc6e77c09e809964e72af8c8",
"payment_token": "7ebf443f-a050-4067-84e5-e6f6d4800aef",
"customer_id": "12345_cus_01926c58bc6e77c09e809964e72af8c8",
"payment_method_type": "card",
"payment_method_subtype": "ach",
"recurring_enabled": true,
"created": "2023-01-18T11:04:09.922Z",
"requires_cvv": true,
"last_used_at": "2024-02-24T11:04:09.922Z",
"is_default": true,
"payment_method_data": {
"card": {
"saved_to_locker": true,
"issuer_country": "AF",
"last4_digits": "<string>",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_holder_name": "<string>",
"card_fingerprint": "<string>",
"nick_name": "<string>",
"card_network": "Visa",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_type": "<string>"
}
},
"bank": {
"mask": "<string>"
},
"billing": {
"address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
}
}
]
}Publishable keys are a type of keys that can be public and have limited scope of usage.
Profile ID associated to the payment intent
The global payment id
Get the payment methods
The list of payment methods that are enabled for the business profile
Show child attributes
The list of payment methods that are saved by the given customer This field is only returned if the customer_id is provided in the request
Show child attributes
Was this page helpful?