Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
861d6d5
add support for proxy api
prasunna09 Apr 15, 2025
ef4ca7a
code refactoring
prasunna09 Apr 22, 2025
77e6cdc
code optimization
prasunna09 Apr 25, 2025
dde789a
revert cargo.toml changes
prasunna09 Apr 25, 2025
d5638f5
code refactoring
prasunna09 May 5, 2025
7156896
code refactoring
prasunna09 May 14, 2025
6712bf8
code refactoring
prasunna09 May 15, 2025
5cf3510
add payment method id support for proxy api
prasunna09 May 16, 2025
51e1919
resolve pr comments
prasunna09 May 18, 2025
794ff40
Merge main
prasunna09 May 19, 2025
1d10061
resolve pr comments
prasunna09 May 19, 2025
3f995d8
merge main
prasunna09 May 19, 2025
2d1ade7
chore: run formatter
hyperswitch-bot[bot] May 19, 2025
3c73bad
fix clippy
prasunna09 May 19, 2025
6a78b23
Merge branch 'add-proxy-api' of github.com:juspay/hyperswitch into ad…
prasunna09 May 19, 2025
627e6b4
fix clippy
prasunna09 May 19, 2025
33467f7
resolve pr comments and generate open api spec
prasunna09 May 20, 2025
552f74c
chore: run formatter
hyperswitch-bot[bot] May 20, 2025
4d7f97c
fix openspec api_v2
prasunna09 May 20, 2025
9f16eb3
Merge branch 'add-proxy-api' of github.com:juspay/hyperswitch into ad…
prasunna09 May 20, 2025
8871c3a
chore: run formatter
hyperswitch-bot[bot] May 20, 2025
eef8450
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] May 20, 2025
93f7242
fix open api spec
prasunna09 May 21, 2025
548bbdc
resolve pr comments
prasunna09 May 21, 2025
dd05e03
chore: run formatter
hyperswitch-bot[bot] May 21, 2025
7238311
add dependency to fix open api spec
prasunna09 May 22, 2025
2256117
Merge main
prasunna09 May 22, 2025
135ffbf
chore: run formatter
hyperswitch-bot[bot] May 22, 2025
5c33ec2
resolve conflicts
prasunna09 May 22, 2025
484cf3c
Merge branch 'add-proxy-api' of github.com:juspay/hyperswitch into ad…
prasunna09 May 22, 2025
1db2293
chore: run formatter
hyperswitch-bot[bot] May 22, 2025
d1f2cb7
Merge main
prasunna09 May 22, 2025
8943a24
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] May 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api-reference-v2/api-reference/proxy/proxy.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: post /proxy
---
4 changes: 4 additions & 0 deletions api-reference-v2/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@
{
"group": "Refunds",
"pages": ["api-reference/refunds/refunds--create"]
},
{
"group": "Proxy",
"pages": ["api-reference/proxy/proxy"]
}
],
"footerSocials": {
Expand Down
200 changes: 188 additions & 12 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3450,6 +3450,88 @@
}
]
}
},
"/proxy": {
"post": {
"tags": [
"Proxy"
],
"summary": "Proxy",
"description": "Create a proxy request",
"operationId": "Proxy Request",
"parameters": [
{
"name": "X-Profile-Id",
"in": "header",
"description": "Profile ID for authentication",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProxyRequest"
},
"examples": {
"Create a proxy request": {
"value": {
"destination_url": "https://api.example.com/payments",
"headers": {
"Authorization": "Bearer sk_test_example",
"Content-Type": "application/json"
},
"method": "POST",
"request_body": {
"amount": 6540,
"capture": true,
"currency": "USD",
"reference": "ORD-5023-4E89",
"source": {
"billing_address": {
"address_line1": "123 High St.",
"city": "London",
"country": "GB"
},
"expiry_month": "{{$card_exp_month}}",
"expiry_year": "{{$card_exp_year}}",
"number": "{{$card_number}}",
"type": "card"
}
},
"token": "pm_0196ea5a42a67583863d5b1253d62931",
"token_type": "PaymentMethodId"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Proxy request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProxyResponse"
}
}
}
},
"400": {
"description": "Invalid data"
}
},
"security": [
{
"api_key": []
}
]
}
}
},
"components": {
Expand Down Expand Up @@ -7929,6 +8011,7 @@
"aci",
"adyen",
"airwallex",
"archipel",
"authorizedotnet",
"bambora",
"bamboraapac",
Expand Down Expand Up @@ -13184,6 +13267,16 @@
}
}
},
"Method": {
"type": "string",
"enum": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH"
]
},
"MifinityData": {
"type": "object",
"required": [
Expand Down Expand Up @@ -13804,7 +13897,8 @@
"trigger_api",
"display_bank_transfer_information",
"display_wait_screen",
"collect_otp"
"collect_otp",
"redirect_inside_popup"
]
},
"NoThirdPartySdkSessionResponse": {
Expand Down Expand Up @@ -14148,11 +14242,8 @@
"nullable": true
},
"platform_merchant_id": {
"allOf": [
{
"$ref": "#/components/schemas/id_type.MerchantId"
}
],
"type": "string",
"description": "Platform merchant id is unique distiguisher for special merchant in the platform org",
"nullable": true
}
},
Expand Down Expand Up @@ -18098,6 +18189,11 @@
"type": "boolean",
"description": "Indicates if 3ds challenge is forced",
"nullable": true
},
"is_iframe_redirection_enabled": {
"type": "boolean",
"description": "Indicates if the redirection has to open in the iframe",
"nullable": true
}
},
"additionalProperties": false
Expand Down Expand Up @@ -18269,6 +18365,11 @@
],
"default": "no_three_ds",
"nullable": true
},
"is_iframe_redirection_enabled": {
"type": "boolean",
"description": "Indicates if the redirection has to open in the iframe",
"nullable": true
}
}
},
Expand Down Expand Up @@ -20071,6 +20172,11 @@
],
"nullable": true
},
"is_iframe_redirection_enabled": {
"type": "boolean",
"description": "Indicates if the redirection has to open in the iframe",
"nullable": true
},
"is_external_vault_enabled": {
"type": "boolean",
"description": "Indicates if external vault is enabled or not.",
Expand Down Expand Up @@ -20334,6 +20440,11 @@
],
"nullable": true
},
"is_iframe_redirection_enabled": {
"type": "boolean",
"description": "Indicates if the redirection has to open in the iframe",
"nullable": true
},
"is_external_vault_enabled": {
"type": "boolean",
"description": "Indicates if external vault is enabled or not.",
Expand Down Expand Up @@ -20370,6 +20481,64 @@
}
}
},
"ProxyRequest": {
"type": "object",
"required": [
"request_body",
"destination_url",
"headers",
"method",
"token",
"token_type"
],
"properties": {
"request_body": {
"description": "The request body that needs to be forwarded"
},
"destination_url": {
"type": "string",
"description": "The destination URL where the request needs to be forwarded",
"example": "https://api.example.com/endpoint"
},
"headers": {
"type": "object",
"description": "The headers that need to be forwarded"
},
"method": {
"$ref": "#/components/schemas/Method"
},
"token": {
"type": "string",
"description": "The vault token that is used to fetch sensitive data from the vault"
},
"token_type": {
"$ref": "#/components/schemas/TokenType"
}
}
},
"ProxyResponse": {
"type": "object",
"required": [
"response",
"status_code",
"response_headers"
],
"properties": {
"response": {
"description": "The response received from the destination"
},
"status_code": {
"type": "integer",
"format": "int32",
"description": "The status code of the response",
"minimum": 0
},
"response_headers": {
"type": "object",
"description": "The headers of the response"
}
}
},
"PspTokenization": {
"type": "object",
"description": "The Payment Service Provider Configuration for payment methods that are created using the payment method session",
Expand Down Expand Up @@ -20614,19 +20783,18 @@
},
{
"type": "object",
"required": [
"refund_id"
],
"properties": {
"payment_id": {
"type": "string",
"description": "The identifier for the payment",
"nullable": true
},
"refund_id": {
"allOf": [
{
"$ref": "#/components/schemas/common_utils.id_type.GlobalRefundId"
}
],
"nullable": true
"type": "string",
"description": "The identifier for the refund"
},
"limit": {
"type": "integer",
Expand Down Expand Up @@ -21415,6 +21583,7 @@
"aci",
"adyen",
"airwallex",
"archipel",
"authorizedotnet",
"bankofamerica",
"billwerk",
Expand Down Expand Up @@ -23093,6 +23262,13 @@
}
]
},
"TokenType": {
"type": "string",
"enum": [
"tokenization_id",
"payment_method_id"
]
},
"TokenizationType": {
"type": "string",
"description": "The type of tokenization to use for the payment method",
Expand Down
Loading
Loading