mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(openapi): add payment get to openapi (#6539)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in>
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
---
|
||||
openapi: get /v2/payments/{id}
|
||||
---
|
||||
@ -39,7 +39,8 @@
|
||||
"api-reference/payments/payments--create-intent",
|
||||
"api-reference/payments/payments--get-intent",
|
||||
"api-reference/payments/payments--session-token",
|
||||
"api-reference/payments/payments--confirm-intent"
|
||||
"api-reference/payments/payments--confirm-intent",
|
||||
"api-reference/payments/payments--get"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -111,9 +112,7 @@
|
||||
},
|
||||
{
|
||||
"group": "Refunds",
|
||||
"pages": [
|
||||
"api-reference/refunds/refunds--create"
|
||||
]
|
||||
"pages": ["api-reference/refunds/refunds--create"]
|
||||
}
|
||||
],
|
||||
"footerSocials": {
|
||||
|
||||
@ -1967,6 +1967,56 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v2/payments/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Payments"
|
||||
],
|
||||
"summary": "Payments - Get",
|
||||
"description": "Retrieves a Payment. This API can also be used to get the status of a previously initiated payment or next action for an ongoing payment",
|
||||
"operationId": "Retrieve a Payment",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "The global payment id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "force_sync",
|
||||
"in": "query",
|
||||
"description": "A boolean to indicate whether to force sync the payment status. Value can be true or false",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ForceSync"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Gets the payment with final status",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PaymentsRetrieveResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "No payment found with the given id"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v2/refunds": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@ -8030,6 +8080,13 @@
|
||||
],
|
||||
"description": "Possible field type of required fields in payment_method_data"
|
||||
},
|
||||
"ForceSync": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
]
|
||||
},
|
||||
"FrmAction": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@ -15072,6 +15129,105 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PaymentsRetrieveResponse": {
|
||||
"type": "object",
|
||||
"description": "Response for Payment Intent Confirm",
|
||||
"required": [
|
||||
"id",
|
||||
"status",
|
||||
"amount",
|
||||
"client_secret",
|
||||
"created"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier for the payment. This ensures idempotency for multiple payments\nthat have been done by a single merchant.",
|
||||
"example": "12345_pay_01926c58bc6e77c09e809964e72af8c8",
|
||||
"maxLength": 64,
|
||||
"minLength": 32
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/components/schemas/IntentStatus"
|
||||
},
|
||||
"amount": {
|
||||
"$ref": "#/components/schemas/ConfirmIntentAmountDetailsResponse"
|
||||
},
|
||||
"connector": {
|
||||
"type": "string",
|
||||
"description": "The connector used for the payment",
|
||||
"example": "stripe",
|
||||
"nullable": true
|
||||
},
|
||||
"client_secret": {
|
||||
"type": "string",
|
||||
"description": "It's a token used for client side verification."
|
||||
},
|
||||
"created": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "Time when the payment was created",
|
||||
"example": "2022-09-10T10:11:12Z"
|
||||
},
|
||||
"payment_method_data": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/PaymentMethodDataResponseWithBilling"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"payment_method_type": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/PaymentMethod"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"payment_method_subtype": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/PaymentMethodType"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"connector_transaction_id": {
|
||||
"type": "string",
|
||||
"description": "A unique identifier for a payment provided by the connector",
|
||||
"example": "993672945374576J",
|
||||
"nullable": true
|
||||
},
|
||||
"connector_reference_id": {
|
||||
"type": "string",
|
||||
"description": "reference(Identifier) to the payment at connector side",
|
||||
"example": "993672945374576J",
|
||||
"nullable": true
|
||||
},
|
||||
"merchant_connector_id": {
|
||||
"type": "string",
|
||||
"description": "Identifier of the connector ( merchant connector account ) which was chosen to make the payment",
|
||||
"nullable": true
|
||||
},
|
||||
"browser_info": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/BrowserInformation"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"error": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ErrorDetails"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"PaymentsSessionRequest": {
|
||||
"type": "object"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user