Get Started
Essentials
API Reference
- Payments
- Payment Methods
- POSTPaymentMethods - Create
- GETPayment Method - Retrieve
- POSTPayment Method - Update
- DELPayment Method - Delete
- GETPayment Method - Set Default Payment Method for Customer
- GETList payment methods for a Merchant
- GETList customer saved payment methods for a Payment
- GETList payment methods for a Customer
- GETPayment Method - Set Default Payment Method for Customer
- POST
- Customers
- Mandates
- Refunds
- Disputes
- Organization
- Merchant Account
- Business Profile
- API Key
- Merchant Connector Account
- Payouts
- Event
- GSM (Global Status Mapping)
- Poll
- Blocklist
- Routing
- Relay
- Schemas
List customer saved payment methods for a Payment
Lists all the applicable payment methods for a particular payment tied to the client_secret
.
curl --request GET \
--url https://sandbox.hyperswitch.io/customers/payment_methods \
--header 'api-key: <api-key>'
{
"customer_payment_methods": [
{
"payment_token": "7ebf443f-a050-4067-84e5-e6f6d4800aef",
"payment_method_id": "pm_iouuy468iyuowqs",
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"payment_method": "card",
"payment_method_type": "ach",
"payment_method_issuer": "Citibank",
"payment_method_issuer_code": "jp_hdfc",
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "<string>",
"issuer_country": "<string>",
"last4_digits": "<string>",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_token": "<string>",
"card_holder_name": "<string>",
"card_fingerprint": "<string>",
"nick_name": "<string>",
"card_network": "Visa",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_type": "<string>",
"saved_to_locker": true
},
"metadata": {},
"created": "2023-01-18T11:04:09.922Z",
"bank_transfer": {
"bank_name": "Deutsche Bank",
"bank_country_code": "AF",
"bank_city": "California",
"bank_account_number": "000123456",
"bank_routing_number": "110000000"
},
"bank": {
"mask": "<string>"
},
"surcharge_details": {
"surcharge": {
"type": "fixed",
"value": 123
},
"tax_on_surcharge": {
"percentage": 123
},
"display_surcharge_amount": 123,
"display_tax_on_surcharge_amount": 123,
"display_total_surcharge_amount": 123
},
"requires_cvv": true,
"last_used_at": "2024-02-24T11:04:09.922Z",
"default_payment_method_set": true,
"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"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
}
}
],
"is_guest_customer": true
}
Authorizations
Publishable keys are a type of keys that can be public and have limited scope of usage.
Path Parameters
A secret known only to your client and the authorization server. Used for client side authentication
The unique identifier for the customer account
The three-letter ISO currency code
AED
, AFN
, ALL
, AMD
, ANG
, AOA
, ARS
, AUD
, AWG
, AZN
, BAM
, BBD
, BDT
, BGN
, BHD
, BIF
, BMD
, BND
, BOB
, BRL
, BSD
, BTN
, BWP
, BYN
, BZD
, CAD
, CDF
, CHF
, CLP
, CNY
, COP
, CRC
, CUP
, CVE
, CZK
, DJF
, DKK
, DOP
, DZD
, EGP
, ERN
, ETB
, EUR
, FJD
, FKP
, GBP
, GEL
, GHS
, GIP
, GMD
, GNF
, GTQ
, GYD
, HKD
, HNL
, HRK
, HTG
, HUF
, IDR
, ILS
, INR
, IQD
, IRR
, ISK
, JMD
, JOD
, JPY
, KES
, KGS
, KHR
, KMF
, KPW
, KRW
, KWD
, KYD
, KZT
, LAK
, LBP
, LKR
, LRD
, LSL
, LYD
, MAD
, MDL
, MGA
, MKD
, MMK
, MNT
, MOP
, MRU
, MUR
, MVR
, MWK
, MXN
, MYR
, MZN
, NAD
, NGN
, NIO
, NOK
, NPR
, NZD
, OMR
, PAB
, PEN
, PGK
, PHP
, PKR
, PLN
, PYG
, QAR
, RON
, RSD
, RUB
, RWF
, SAR
, SBD
, SCR
, SDG
, SEK
, SGD
, SHP
, SLE
, SLL
, SOS
, SRD
, SSP
, STN
, SVC
, SYP
, SZL
, THB
, TJS
, TMT
, TND
, TOP
, TRY
, TTD
, TWD
, TZS
, UAH
, UGX
, USD
, UYU
, UZS
, VES
, VND
, VUV
, WST
, XAF
, XCD
, XOF
, XPF
, YER
, ZAR
, ZMW
, ZWL
Query Parameters
The two-letter ISO currency code
The minimum amount accepted for processing by the particular payment method.
The maximum amount accepted for processing by the particular payment method.
Indicates whether the payment method is eligible for recurring payments
Indicates whether the payment method is eligible for installment payments
Response
List of payment methods for customer
Token for payment method in temporary card locker which gets refreshed often
The unique identifier of the customer.
The unique identifier of the customer.
1 - 64
Indicates the type of payment method. Eg: 'card', 'wallet', etc.
card
, card_redirect
, pay_later
, wallet
, bank_redirect
, bank_transfer
, crypto
, bank_debit
, reward
, real_time_payment
, upi
, voucher
, gift_card
, open_banking
, mobile_payment
Indicates whether the payment method is eligible for recurring payments
Indicates whether the payment method is eligible for installment payments
Whether this payment method requires CVV to be collected
Indicates if the payment method has been set to default or not
Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.
ach
, affirm
, afterpay_clearpay
, alfamart
, ali_pay
, ali_pay_hk
, alma
, amazon_pay
, apple_pay
, atome
, bacs
, bancontact_card
, becs
, benefit
, bizum
, blik
, boleto
, bca_bank_transfer
, bni_va
, bri_va
, card_redirect
, cimb_va
, classic
, credit
, crypto_currency
, cashapp
, dana
, danamon_va
, debit
, duit_now
, efecty
, eps
, fps
, evoucher
, giropay
, givex
, google_pay
, go_pay
, gcash
, ideal
, interac
, indomaret
, klarna
, kakao_pay
, local_bank_redirect
, mandiri_va
, knet
, mb_way
, mobile_pay
, momo
, momo_atm
, multibanco
, online_banking_thailand
, online_banking_czech_republic
, online_banking_finland
, online_banking_fpx
, online_banking_poland
, online_banking_slovakia
, oxxo
, pago_efectivo
, permata_bank_transfer
, open_banking_uk
, pay_bright
, paypal
, paze
, pix
, pay_safe_card
, przelewy24
, prompt_pay
, pse
, red_compra
, red_pagos
, samsung_pay
, sepa
, sofort
, swish
, touch_n_go
, trustly
, twint
, upi_collect
, upi_intent
, vipps
, viet_qr
, venmo
, walley
, we_chat_pay
, seven_eleven
, lawson
, mini_stop
, family_mart
, seicomart
, pay_easy
, local_bank_transfer
, mifinity
, open_banking_pis
, direct_carrier_billing
The name of the bank/ provider issuing the payment method to the end user
jp_hdfc
, jp_icici
, jp_googlepay
, jp_applepay
, jp_phonepay
, jp_wechat
, jp_sofort
, jp_giropay
, jp_sepa
, jp_bacs
Type of payment experience enabled with the connector
redirect_to_url
, invoke_sdk_client
, display_qr_code
, one_click
, link_wallet
, invoke_payment_app
, display_wait_screen
, collect_otp
Indicates the card network.
Visa
, Mastercard
, AmericanExpress
, JCB
, DinersClub
, Discover
, CartesBancaires
, UnionPay
, Interac
, RuPay
, Maestro
You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
A timestamp (ISO 8601 code) that determines when the payment method was created
Bank account number is an unique identifier assigned by a bank to a customer.
[9 digits] Routing number - used in USA for identifying a specific bank.
Bank name
AF
, AX
, AL
, DZ
, AS
, AD
, AO
, AI
, AQ
, AG
, AR
, AM
, AW
, AU
, AT
, AZ
, BS
, BH
, BD
, BB
, BY
, BE
, BZ
, BJ
, BM
, BT
, BO
, BQ
, BA
, BW
, BV
, BR
, IO
, BN
, BG
, BF
, BI
, KH
, CM
, CA
, CV
, KY
, CF
, TD
, CL
, CN
, CX
, CC
, CO
, KM
, CG
, CD
, CK
, CR
, CI
, HR
, CU
, CW
, CY
, CZ
, DK
, DJ
, DM
, DO
, EC
, EG
, SV
, GQ
, ER
, EE
, ET
, FK
, FO
, FJ
, FI
, FR
, GF
, PF
, TF
, GA
, GM
, GE
, DE
, GH
, GI
, GR
, GL
, GD
, GP
, GU
, GT
, GG
, GN
, GW
, GY
, HT
, HM
, VA
, HN
, HK
, HU
, IS
, IN
, ID
, IR
, IQ
, IE
, IM
, IL
, IT
, JM
, JP
, JE
, JO
, KZ
, KE
, KI
, KP
, KR
, KW
, KG
, LA
, LV
, LB
, LS
, LR
, LY
, LI
, LT
, LU
, MO
, MK
, MG
, MW
, MY
, MV
, ML
, MT
, MH
, MQ
, MR
, MU
, YT
, MX
, FM
, MD
, MC
, MN
, ME
, MS
, MA
, MZ
, MM
, NA
, NR
, NP
, NL
, NC
, NZ
, NI
, NE
, NG
, NU
, NF
, MP
, NO
, OM
, PK
, PW
, PS
, PA
, PG
, PY
, PE
, PH
, PN
, PL
, PT
, PR
, QA
, RE
, RO
, RU
, RW
, BL
, SH
, KN
, LC
, MF
, PM
, VC
, WS
, SM
, ST
, SA
, SN
, RS
, SC
, SL
, SG
, SX
, SK
, SI
, SB
, SO
, ZA
, GS
, SS
, ES
, LK
, SD
, SR
, SJ
, SZ
, SE
, CH
, SY
, TW
, TJ
, TZ
, TH
, TL
, TG
, TK
, TO
, TT
, TN
, TR
, TM
, TC
, TV
, UG
, UA
, AE
, GB
, UM
, UY
, UZ
, VU
, VE
, VN
, VG
, VI
, WF
, EH
, YE
, ZM
, ZW
, US
Bank city
surcharge amount for this payment
tax on surcharge amount for this payment
sum of display_surcharge_amount and display_tax_on_surcharge_amount
A timestamp (ISO 8601 code) that determines when the payment method was last used
Address details
The address city
50
AF
, AX
, AL
, DZ
, AS
, AD
, AO
, AI
, AQ
, AG
, AR
, AM
, AW
, AU
, AT
, AZ
, BS
, BH
, BD
, BB
, BY
, BE
, BZ
, BJ
, BM
, BT
, BO
, BQ
, BA
, BW
, BV
, BR
, IO
, BN
, BG
, BF
, BI
, KH
, CM
, CA
, CV
, KY
, CF
, TD
, CL
, CN
, CX
, CC
, CO
, KM
, CG
, CD
, CK
, CR
, CI
, HR
, CU
, CW
, CY
, CZ
, DK
, DJ
, DM
, DO
, EC
, EG
, SV
, GQ
, ER
, EE
, ET
, FK
, FO
, FJ
, FI
, FR
, GF
, PF
, TF
, GA
, GM
, GE
, DE
, GH
, GI
, GR
, GL
, GD
, GP
, GU
, GT
, GG
, GN
, GW
, GY
, HT
, HM
, VA
, HN
, HK
, HU
, IS
, IN
, ID
, IR
, IQ
, IE
, IM
, IL
, IT
, JM
, JP
, JE
, JO
, KZ
, KE
, KI
, KP
, KR
, KW
, KG
, LA
, LV
, LB
, LS
, LR
, LY
, LI
, LT
, LU
, MO
, MK
, MG
, MW
, MY
, MV
, ML
, MT
, MH
, MQ
, MR
, MU
, YT
, MX
, FM
, MD
, MC
, MN
, ME
, MS
, MA
, MZ
, MM
, NA
, NR
, NP
, NL
, NC
, NZ
, NI
, NE
, NG
, NU
, NF
, MP
, NO
, OM
, PK
, PW
, PS
, PA
, PG
, PY
, PE
, PH
, PN
, PL
, PT
, PR
, QA
, RE
, RO
, RU
, RW
, BL
, SH
, KN
, LC
, MF
, PM
, VC
, WS
, SM
, ST
, SA
, SN
, RS
, SC
, SL
, SG
, SX
, SK
, SI
, SB
, SO
, ZA
, GS
, SS
, ES
, LK
, SD
, SR
, SJ
, SZ
, SE
, CH
, SY
, TW
, TJ
, TZ
, TH
, TL
, TG
, TK
, TO
, TT
, TN
, TR
, TM
, TC
, TV
, UG
, UA
, AE
, GB
, UM
, UY
, UZ
, VU
, VE
, VN
, VG
, VI
, WF
, EH
, YE
, ZM
, ZW
, US
The first line of the address
200
The second line of the address
50
The third line of the address
50
The zip/postal code for the address
50
The address state
The first name for the address
255
The last name for the address
255
Returns whether a customer id is not tied to a payment intent (only when the request is made against a client secret)
curl --request GET \
--url https://sandbox.hyperswitch.io/customers/payment_methods \
--header 'api-key: <api-key>'
{
"customer_payment_methods": [
{
"payment_token": "7ebf443f-a050-4067-84e5-e6f6d4800aef",
"payment_method_id": "pm_iouuy468iyuowqs",
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"payment_method": "card",
"payment_method_type": "ach",
"payment_method_issuer": "Citibank",
"payment_method_issuer_code": "jp_hdfc",
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "<string>",
"issuer_country": "<string>",
"last4_digits": "<string>",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_token": "<string>",
"card_holder_name": "<string>",
"card_fingerprint": "<string>",
"nick_name": "<string>",
"card_network": "Visa",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_type": "<string>",
"saved_to_locker": true
},
"metadata": {},
"created": "2023-01-18T11:04:09.922Z",
"bank_transfer": {
"bank_name": "Deutsche Bank",
"bank_country_code": "AF",
"bank_city": "California",
"bank_account_number": "000123456",
"bank_routing_number": "110000000"
},
"bank": {
"mask": "<string>"
},
"surcharge_details": {
"surcharge": {
"type": "fixed",
"value": 123
},
"tax_on_surcharge": {
"percentage": 123
},
"display_surcharge_amount": 123,
"display_tax_on_surcharge_amount": 123,
"display_total_surcharge_amount": 123
},
"requires_cvv": true,
"last_used_at": "2024-02-24T11:04:09.922Z",
"default_payment_method_set": true,
"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"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
}
}
],
"is_guest_customer": true
}