Skip to main content
DELETE
/
v1
/
payment-method-sessions
/
{id}
Payment Method Session - Delete a saved payment method
curl --request DELETE \
  --url https://sandbox.hyperswitch.io/v1/payment-method-sessions/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'X-Profile-Id: <x-profile-id>' \
  --data '
{
  "payment_method_token": "token_9wcXDRVkfEtLEsSnYKgQ"
}
'
{
  "payment_method_token": "token_9wcXDRVkfEtLEsSnYKgQ"
}

Authorizations

Authorization
string
header
required

Format: publishable-key=<publishable-key>,client-secret=<client-secret>

Publishable keys are a type of keys that can be public and have limited scope of usage. Client Secret provide temporary access to singular data, such as access to a single customer object for a short period of time. This authentication scheme is used by the SDK.

Headers

X-Profile-Id
string
required

Profile ID associated to the payment method session

Path Parameters

id
string
required

The unique identifier for the Payment Method Session

Body

application/json
payment_method_token
string
required

The payment method token associated with the payment method to be deleted

Example:

"token_9wcXDRVkfEtLEsSnYKgQ"

Response

The payment method has been deleted successfully

payment_method_token
string
required

The unique identifier of the Payment method

Example:

"token_9wcXDRVkfEtLEsSnYKgQ"