mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(router): Add payment_methods_session_delete_payment_method endpoint [V2] (#7409)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
---
|
||||
openapi: delete /v2/payment-method-session/:id
|
||||
---
|
||||
@ -67,7 +67,8 @@
|
||||
"api-reference/payment-method-session/payment-method-session--retrieve",
|
||||
"api-reference/payment-method-session/payment-method-session--list-payment-methods",
|
||||
"api-reference/payment-method-session/payment-method-session--update-a-saved-payment-method",
|
||||
"api-reference/payment-method-session/payment-method-session--confirm-a-payment-method-session"
|
||||
"api-reference/payment-method-session/payment-method-session--confirm-a-payment-method-session",
|
||||
"api-reference/payment-method-session/payment-method-session--delete-a-saved-payment-method"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@ -2960,6 +2960,62 @@
|
||||
"ephemeral_key": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"Payment Method Session"
|
||||
],
|
||||
"summary": "Payment Method Session - Delete a saved payment method",
|
||||
"description": "Delete a saved payment method from the given payment method session.",
|
||||
"operationId": "Delete a saved payment method",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "The unique identifier for the Payment Method Session",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PaymentMethodSessionDeleteSavedPaymentMethod"
|
||||
},
|
||||
"examples": {
|
||||
"Update the card holder name": {
|
||||
"value": {
|
||||
"payment_method_id": "12345_pm_0194b1ecabc172e28aeb71f70a4daba3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The payment method has been updated successfully",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PaymentMethodDeleteResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "The request is invalid"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"ephemeral_key": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v2/payment-method-session/:id/list-payment-methods": {
|
||||
@ -4462,15 +4518,19 @@
|
||||
"AuthenticationDetails": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"status",
|
||||
"error"
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"status": {
|
||||
"$ref": "#/components/schemas/IntentStatus"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/components/schemas/ErrorDetails"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ErrorDetails"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -15633,6 +15693,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PaymentMethodSessionDeleteSavedPaymentMethod": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"payment_method_id"
|
||||
],
|
||||
"properties": {
|
||||
"payment_method_id": {
|
||||
"type": "string",
|
||||
"description": "The payment method id of the payment method to be updated",
|
||||
"example": "12345_pm_01926c58bc6e77c09e809964e72af8c8"
|
||||
}
|
||||
}
|
||||
},
|
||||
"PaymentMethodSessionRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
Reference in New Issue
Block a user