POST
/
payment_methods
/
{method_id}
curl --request POST \
  --url https://sandbox.hyperswitch.io/payment_methods/{method_id} \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '{
  "card": {
    "card_number": "4111111145551142",
    "card_exp_month": "10",
    "card_exp_year": "25",
    "card_holder_name": "John Doe",
    "nick_name": "John Doe"
  },
  "card_network": "Visa",
  "metadata": {}
}'
{
  "merchant_id": "merchant_1671528864",
  "customer_id": "cus_meowerunwiuwiwqw",
  "payment_method_id": "card_rGK4Vi5iSW70MY7J2mIy",
  "payment_method": "card",
  "payment_method_type": "ach",
  "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>"
  },
  "recurring_enabled": true,
  "installment_payment_enabled": true,
  "payment_experience": [
    "redirect_to_url"
  ],
  "metadata": {},
  "created": "2023-01-18T11:04:09.922Z"
}

Authorizations

api-key
string
headerrequired

Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.

Path Parameters

method_id
string
required

The unique identifier for the Payment Method

Body

application/json
card
object
card_network
enum<string>

Indicates the card network.

Available options:
Visa,
Mastercard,
AmericanExpress,
JCB,
DinersClub,
Discover,
CartesBancaires,
UnionPay,
Interac,
RuPay,
Maestro
metadata
object | null

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.

Response

200 - application/json
merchant_id
string
required

Unique identifier for a merchant

customer_id
string | null

The unique identifier of the customer.

payment_method_id
string
required

The unique identifier of the Payment method

payment_method
enum<string>
required

Indicates the type of payment method. Eg: 'card', 'wallet', etc.

Available options:
card,
card_redirect,
pay_later,
wallet,
bank_redirect,
bank_transfer,
crypto,
bank_debit,
reward,
upi,
voucher,
gift_card
payment_method_type
enum<string>

Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.

Available options:
ach,
affirm,
afterpay_clearpay,
alfamart,
ali_pay,
ali_pay_hk,
alma,
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,
efecty,
eps,
evoucher,
giropay,
givex,
google_pay,
go_pay,
gcash,
ideal,
interac,
indomaret,
klarna,
kakao_pay,
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,
pix,
pay_safe_card,
przelewy24,
pse,
red_compra,
red_pagos,
samsung_pay,
sepa,
sofort,
swish,
touch_n_go,
trustly,
twint,
upi_collect,
vipps,
walley,
we_chat_pay,
seven_eleven,
lawson,
mini_stop,
family_mart,
seicomart,
pay_easy
card
object
recurring_enabled
boolean
required

Indicates whether the payment method is eligible for recurring payments

installment_payment_enabled
boolean
required

Indicates whether the payment method is eligible for installment payments

payment_experience
enum<string>[] | null

Type of payment experience enabled with the connector

Available options:
redirect_to_url,
invoke_sdk_client,
display_qr_code,
one_click,
link_wallet,
invoke_payment_app,
display_wait_screen
metadata
object | null

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.

created
string | null

A timestamp (ISO 8601 code) that determines when the customer was created