Skip to content

Commit af38577

Browse files
openapi changes
1 parent 04dc31f commit af38577

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed

api-reference/v2/openapi_spec_v2.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2973,6 +2973,47 @@
29732973
]
29742974
}
29752975
},
2976+
"/v2/payment-methods/details/{id}": {
2977+
"get": {
2978+
"tags": [
2979+
"Payment Methods"
2980+
],
2981+
"summary": "Payment Method - Get Payment Method Token Data",
2982+
"description": "Retrieve the Payment method id associated with a payment method.",
2983+
"operationId": "Get Payment Method Token Data",
2984+
"parameters": [
2985+
{
2986+
"name": "id",
2987+
"in": "path",
2988+
"description": "The unique identifier for the Payment Method Token",
2989+
"required": true,
2990+
"schema": {
2991+
"type": "string"
2992+
}
2993+
}
2994+
],
2995+
"responses": {
2996+
"200": {
2997+
"description": "Payment Method Token Data Retrieved",
2998+
"content": {
2999+
"application/json": {
3000+
"schema": {
3001+
"$ref": "#/components/schemas/PaymentMethodGetTokenDetailsResponse"
3002+
}
3003+
}
3004+
}
3005+
},
3006+
"404": {
3007+
"description": "Payment Method Not Found | Payment method token either expired or does not exist"
3008+
}
3009+
},
3010+
"security": [
3011+
{
3012+
"api_key": []
3013+
}
3014+
]
3015+
}
3016+
},
29763017
"/v2/payment-method-sessions": {
29773018
"post": {
29783019
"tags": [
@@ -19304,6 +19345,25 @@
1930419345
}
1930519346
}
1930619347
},
19348+
"PaymentMethodGetTokenDetailsResponse": {
19349+
"type": "object",
19350+
"required": [
19351+
"id",
19352+
"token"
19353+
],
19354+
"properties": {
19355+
"id": {
19356+
"type": "string",
19357+
"description": "The payment method ID associated with the token",
19358+
"example": "12345_pm_019959146f92737389eb6927ce1eb7dc"
19359+
},
19360+
"token": {
19361+
"type": "string",
19362+
"description": "The tokenization id associated with the payment method",
19363+
"example": "token_CSum555d9YxDOpGwYq6q"
19364+
}
19365+
}
19366+
},
1930719367
"PaymentMethodIntentConfirm": {
1930819368
"type": "object",
1930919369
"required": [

crates/openapi/src/openapi_v2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ Never share your secret api keys. Keep them guarded and secure.
139139
routes::payment_method::payment_method_delete_api,
140140
routes::payment_method::network_token_status_check_api,
141141
routes::payment_method::list_customer_payment_method_api,
142+
routes::payment_method::payment_method_get_token_details_api,
142143
143144
//Routes for payment method session
144145
routes::payment_method::payment_method_session_create,
@@ -284,6 +285,7 @@ Never share your secret api keys. Keep them guarded and secure.
284285
api_models::payment_methods::NetworkTokenStatusCheckResponse,
285286
api_models::payment_methods::NetworkTokenStatusCheckSuccessResponse,
286287
api_models::payment_methods::NetworkTokenStatusCheckFailureResponse,
288+
api_models::payment_methods::PaymentMethodGetTokenDetailsResponse,
287289
api_models::enums::TokenStatus,
288290
api_models::poll::PollResponse,
289291
api_models::poll::PollStatus,

crates/openapi/src/routes/payment_method.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,29 @@ pub async fn payment_method_delete_api() {}
345345
#[cfg(feature = "v2")]
346346
pub async fn network_token_status_check_api() {}
347347

348+
349+
/// Payment Method - Get Payment Method Token Data
350+
///
351+
/// Retrieve the Payment method id associated with a payment method.
352+
#[utoipa::path(
353+
get,
354+
path = "/v2/payment-methods/details/{id}",
355+
params (
356+
("id" = String, Path, description = "The unique identifier for the Payment Method Token"),
357+
),
358+
responses(
359+
(status = 200, description = "Payment Method Token Data Retrieved", body = PaymentMethodGetTokenDetailsResponse),
360+
(status = 404, description = "Payment Method Not Found | Payment method token either expired or does not exist"),
361+
),
362+
tag = "Payment Methods",
363+
operation_id = "Get Payment Method Token Data",
364+
security(("api_key" = []))
365+
)]
366+
#[cfg(feature = "v2")]
367+
pub async fn payment_method_get_token_details_api() {}
368+
369+
370+
348371
/// Payment Method - List Customer Saved Payment Methods
349372
///
350373
/// List the payment methods saved for a customer

0 commit comments

Comments
 (0)