diff --git a/.github/workflows/validate-openapi-spec.yml b/.github/workflows/validate-openapi-spec.yml
index 50ba1bc3f4..57d0b209f6 100644
--- a/.github/workflows/validate-openapi-spec.yml
+++ b/.github/workflows/validate-openapi-spec.yml
@@ -64,21 +64,21 @@ jobs:
- name: Validate the JSON file
shell: bash
- run: swagger-cli validate ./api-reference/openapi_spec.json
+ run: swagger-cli validate ./api-reference/v1/openapi_spec_v1.json
- name: Validate the JSON file for V2
shell: bash
- run: swagger-cli validate ./api-reference-v2/openapi_spec.json
+ run: swagger-cli validate ./api-reference/v2/openapi_spec_v2.json
- name: Commit the JSON file if it is not up-to-date
# PR originated from same repository
if: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}
shell: bash
run: |
- if ! git diff --quiet --exit-code -- api-reference/openapi_spec.json api-reference-v2/openapi_spec.json ; then
+ if ! git diff --quiet --exit-code -- api-reference/v1/openapi_spec_v1.json api-reference/v2/openapi_spec_v2.json ; then
git config --local user.name 'hyperswitch-bot[bot]'
git config --local user.email '148525504+hyperswitch-bot[bot]@users.noreply.github.com'
- git add api-reference/openapi_spec.json api-reference-v2/openapi_spec.json
+ git add api-reference/v1/openapi_spec_v1.json api-reference/v2/openapi_spec_v2.json
git commit --message 'docs(openapi): re-generate OpenAPI specification'
git push
fi
@@ -87,7 +87,7 @@ jobs:
if: ${{ (github.event_name == 'merge_group') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)) }}
shell: bash
run: |
- if ! git diff --quiet --exit-code -- api-reference/openapi_spec.json ; then
+ if ! git diff --quiet --exit-code -- api-reference/v1/openapi_spec_v1.json ; then
echo '::error::The OpenAPI spec file is not up-to-date. Please re-generate the OpenAPI spec file using `cargo run -p openapi --features v1 && cargo run -p openapi --features v2` and commit it.'
exit 1
fi
diff --git a/api-reference-v2/README.md b/api-reference-v2/README.md
deleted file mode 100644
index 61bc1f0893..0000000000
--- a/api-reference-v2/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# Api Reference
-
-We use the [openapi specification](https://swagger.io/specification) for the api reference. The openapi file is generated from the code base [openapi_spec.json](openapi_spec.json).
-
-## How to generate the file
-
-This file is automatically generated from our CI pipeline when the PR is raised. However if you want to generate it manually, the following command can be used
-
-```bash
-cargo r -p openapi --features v2
-```
-
-## Render the generated openapi spec file
-
-In order to render the openapi spec file, we use a tool called [mintlify](https://mintlify.com/). Local setup instructions can be found [here](https://mintlify.com/docs/development#development). Once the cli is installed, Run the following command to render the openapi spec
-
-- Navigate to the directory where `mint.json` exists
-
-```bash
-cd api-reference-v2
-```
-
-- Run the cli
-
-```bash
-mintlify dev
-```
-
-## Add new routes to openapi
-
-If you have added new routes to the openapi. Then in order for them to be displayed on the mintlify, run the following commands
-
-- Switch to the directory where api reference ( mint.json ) exists
-
-```bash
-cd api-reference-v2
-```
-
-- Run the following command to generate the route files
-
-```bash
-npx @mintlify/scraping@latest openapi-file openapi_spec.json -o api-reference
-```
-
-This will generate files in [api-reference](api-reference) folder. These routes should be added to the [mint.json](mint.json) file under navigation, under respective group.
diff --git a/api-reference-v2/assets/images/image.png b/api-reference-v2/assets/images/image.png
deleted file mode 100644
index d13e245932..0000000000
Binary files a/api-reference-v2/assets/images/image.png and /dev/null differ
diff --git a/api-reference-v2/essentials/error_codes.mdx b/api-reference-v2/essentials/error_codes.mdx
deleted file mode 100644
index 2f633e9cff..0000000000
--- a/api-reference-v2/essentials/error_codes.mdx
+++ /dev/null
@@ -1,77 +0,0 @@
----
-title: Error Codes
----
-
-Hyperswitch uses Error codes, types, and messages to communicate errors during API calls. There are three types of error codes:
-
-| Error Code | Type | Description |
-| ---------- | --------------------- | ------------------------------------------------------------ |
-| IR | Invalid Request Error | Error caused due to invalid fields and values in API request |
-| CE | Connector Error | Errors originating from connector’s end |
-| HE | Hyperswitch Error | Errors originating from Hyperswitch’s end |
-| WE | Webhook Error | Errors related to Webhooks |
-
-| Error Codes | HTTP Status codes | Error Type | Error message | Error Handling |
-| ----------- | ------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| IR_00 | 501 | server_not_available | This API is under development and will be made available soon | No action required. If you require this feature, please reach out to Hyperswitch support |
-| IR_01 | 401 | invalid_request_error | API key not provided or invalid API key used. Provide the API key in the Authorization header using api-key (e.g api-key: API_KEY) or create a new API key from the dashboard | Provide the API key in the Authorization header using api-key (e.g api-key: API_KEY) or create a new API key from the dashboard |
-| IR_02 | 404 | invalid_request_error | Unrecognized request URL | Please recheck and enter the correct request URL. Refer to our API documentation |
-| IR_03 | 405 | invalid_request_error | The HTTP method is not applicable for this API | Please recheck the HTTP method used in the request. Refer to our API documentation |
-| IR_04 | 400 | invalid_request_error | Missing required param: “field_name” | Please pass the missing required parameter. Refer to our API documentation |
-| IR_05 | 422 | invalid_request_error | “field_name” contains invalid data. Expected format is “expected_format” | Please pass the data in the expected format. Refer to our API documentation |
-| IR_06 | 400 | invalid_request_error | “message” | Refer to our API documentation for required fields and format |
-| IR_07 | 400 | invalid_request_error | Invalid value provided: “field_name” | Provide a valid value for the required fields in the expected format. Refer to our API documentation |
-| IR_08 | 400 | invalid_request_error | Client secret was not provided | Provide the client secret received in payments/create API response |
-| IR_09 | 400 | invalid_request_error | The client_secret provided does not match the client_secret associated with the Payment | Provide the same client secret received in payments/create API response for the corresponding payment |
-| IR_10 | 400 | invalid_request_error | Customer has an existing mandate/subscription | Cancel the active mandates/subscriptions for the customer before proceeding to delete the customer data |
-| IR_11 | 400 | invalid_request_error | Customer has already been redacted | Customer has already been redacted. No action required |
-| IR_12 | 400 | invalid_request_error | Reached the maximum refund attempts | Maximum refund attempts reached for this payment. Please contact Hyperswitch support for attempting more refunds for the same payment |
-| IR_13 | 400 | invalid_request_error | Refund amount exceeds the payment amount | Please verify and pass a refund amount equal to or less than the payment amount |
-| IR_14 | 400 | invalid_request_error | This Payment could not be “current_flow” because it has a “field_name” of “current_value”. The expected state is “states” | Please verify the status of the payment and make sure that you are performing an action that is allowed for the current status of the payment |
-| IR_15 | 400 | invalid_request_error | Invalid Ephemeral Key for the customer | Please pass the right Ephemeral key for the customer |
-| IR_16 | 400 | invalid_request_error | “message” | Typically used when information involving multiple fields or previously provided information doesn’t satisfy a condition. Refer to our API documentation for required fields and format |
-| IR_17 | 401 | invalid_request_error | Access forbidden, an invalid JWT token was used | Provide a valid JWT token to access the APIs |
-| IR_18 | 401 | invalid_request_error | "message" | The user is not authorised to update the customer, Contact Org. Admin for the appropriate access. |
-| IR_19 | 400 | invalid_request_error | "message" | Please check and retry with correct details. Refer to our API documentation |
-| IR_20 | 400 | invalid_request_error | "flow" not supported by the "connector" | Requested flow is not supported for this Connector. |
-| IR_21 | 400 | invalid_request_error | Missing required params | Please add the required params in the request. Refer to our API documentation |
-| IR_22 | 403 | invalid_request_error | Access forbidden. Not authorized to access this "resource" | Contact Org. Admin for the appropriate access. |
-| IR_23 | 400 | invalid_request_error | "message" | Use a supported file provider. Refer to our API documentation |
-| IR_24 | 422 | processing_error | Invalid "wallet_name" wallet token | Share the correct wallet token. |
-| IR_25 | 400 | invalid_request_error | Cannot delete the default payment method | Check if the Payment method is activated. Refer to Control centre to check this. |
-| IR_26 | 400 | invalid_request_error | Invalid Cookie | Recheck the site setting for the cookies. |
-| IR_27 | 404 | invalid_request_error | Extended card info does not exist | Recheck the card info shared in the request. |
-| IR_28 | 400 | invalid_request_error | "message" | Use a valid currency. Refer to our API documentation |
-| IR_29 | 422 | invalid_request_error | "message" | The data format is invalid for this request. Refer to our API documentation |
-| IR_30 | 400 | invalid_request_error | Merchant connector account is configured with invalid config | Correct the config for merchant connector account |
-| IR_31 | 400 | invalid_request_error | Card with the provided iin does not exist | Check the IIN (Issuer Identification Number) and ensure it is correct. |
-| IR_32 | 400 | invalid_request_error | The provided card IIN length is invalid, please provide an iin with 6 or 8 digits | Provide a valid IIN with either 6 or 8 digits. |
-| IR_33 | 400 | invalid_request_error | File not found / valid in the request | Ensure the required file is included in the request and is valid. Refer to our API documentation |
-| IR_34 | 400 | invalid_request_error | Dispute id not found in the request | Ensure that a valid dispute ID is included in the request. |
-| IR_35 | 400 | invalid_request_error | File purpose not found in the request or is invalid | Specify a valid file purpose in the request. |
-| IR_36 | 400 | invalid_request_error | File content type not found / valid | Ensure the file content type is specified and is valid. |
-| IR_37 | 404 | invalid_request_error | "message" | Check the request for the resource being accessed and ensure it exists. |
-| IR_38 | 400 | invalid_request_error | "message" | Check for any duplicate entries in the request and correct them. |
-| IR_39 | 400 | invalid_request_error | required payment method is not configured or configured incorrectly for all configured connectors | Verify that the required payment method is correctly configured for all connectors in use. |
-| CE_00 | Status codes shared by the connectors | connector_error | “message” | The error code and message passed from the connectors. Refer to the respective connector’s documentation for more information on the error |
-| CE_01 | 400 | processing_error | Payment failed during authorization with the connector. Retry payment | Retry the payment again as payment failed at the connector during authorization |
-| CE_02 | 400 | processing_error | Payment failed during authentication with the connector. Retry payment | Retry the payment again as payment failed at the connector during authentication |
-| CE_03 | 400 | processing_error | Capture attempt failed while processing with the connector | Capture failed for the payment at the connector. Please retry the payment |
-| CE_04 | 400 | processing_error | The card data is invalid | Invalid card data passed. Please pass valid card data |
-| CE_05 | 400 | processing_error | The card has expired | Card expired. Please pass valid card data |
-| CE_06 | 400 | processing_error | Refund failed while processing with the connector. Retry refund | Refund failed to process at the connector. Please retry refund |
-| CE_07 | 400 | processing_error | Verification failed while processing with the connector. Retry operation | Retry the operation again as verification failed at the connector |
-| CE_08 | 400 | processing_error | Dispute operation failed while processing with connector. Retry operation | Retry the operation again as dispute failed at the connector |
-| CE_09 | 400 | invalid_request_error | Payout validation failed | Retry the operation again with correct Payout details. |
-| HE_00 | 422,500 | server_not_available | Resource not available right now, Please try again later. | Please Wait for a few moments and try again. If the error still persists, please reach out to Hyperswitch support |
-| HE_01 | 400,422 | duplicate_request | Requested operation(Customer, Payments, Merchants, Refunds etc.) for these identifier already exists. | Please verify the Details(Customer, Payments, Merchants, Refunds, as applicable on the basis of request) and enter valid details. |
-| HE_02 | 404 | object_not_found | Requested object(Customer, Payments, Merchants, Refunds etc.) does not exist in our records | Please verify the Details(Customer, Payments, Merchants, Refunds, as applicable on the basis of request) and enter valid details. |
-| HE_03 | 500 | validation_error | Validation Failed for the requested operation with the given details. | Please verify the details again and enter valid details |
-| HE_04 | 404 | object_not_found | Requested object(Customer, Payments, Merchants, Refunds etc.) does not exist in our records | Please verify the Details(Customer, Payments, Merchants, Refunds, as applicable on the basis of request) and enter valid details. |
-| HE_05 | 500 | processing_error | Missing or invalid tenant details. | Please verify the tenant Details and try again. |
-| WE_01 | 400 | invalid_request_error | Failed to authenticate the webhook | Please verify the authentication credentials and try again. |
-| WE_02 | 400 | invalid_request_error | Bad request received in webhook | Check the request parameters and format, then try again. |
-| WE_03 | 500 | router_error | There was some issue processing the webhook | Please try again later. If the issue persists, contact Hyperswitch support. |
-| WE_04 | 404 | object_not_found | Webhook resource not found | Ensure the webhook URL is correct and the resource exists. |
-| WE_05 | 400 | invalid_request_error | Unable to process the webhook body | Ensure the webhook body is correctly formatted and try again. |
-| WE_06 | 400 | invalid_request_error | Merchant Secret set by merchant for webhook source verification is invalid | Verify the Merchant Secret, then try again. |
\ No newline at end of file
diff --git a/api-reference-v2/essentials/go-live.mdx b/api-reference-v2/essentials/go-live.mdx
deleted file mode 100644
index 80d030e4c5..0000000000
--- a/api-reference-v2/essentials/go-live.mdx
+++ /dev/null
@@ -1,50 +0,0 @@
----
-title: Go-live Checklist
----
-
-Refer to this checklist for a seamless transition as you prepare to go live with your integration.
-
-
-The connector configurations set up in the sandbox need to be replicated on the Hyperswitch production account.
-
-
-### Signing of Hyperswitch services agreement
-
-- [ ] Ensure that the Hyperswitch services agreement is signed and shared with the Hyperswitch team. In case you need any help, please drop an email to biz@hyperswitch.io.
-
-
-The Hyperswitch team will share your production Hyperswitch credentials once the above process is completed.
-
-
-### Connector Configurations
-
-- [ ] Configure all the required connectors using production credentials on the Hyperswitch production dashboard and enable the required payment methods.
-- [ ] Ensure that the payment methods are enabled on the connector (payment processor) dashboard.
-- [ ] Enable raw card processing for each connector. Some connectors offer this as a dashboard toggle feature. Some processors might need you to share a PCI Attestation of Compliance over email to enable this. Drop an email to biz@hyperswitch.io if you need any support with PCI AOC.
-
-### Secure your api-keys
-
-- [ ] Make sure your secret key (api-key) is not exposed on the front-end (website/mobile app).
-- [ ] Ensure that your workflow avoids the duplication or storage of your API keys in multiple locations.
-
-### Set up Webhooks
-
-- [ ] [Configure your webhook endpoint](https://juspay-78.mintlify.app/essentials/webhooks#configuring-webhooks) on our dashboard to receive notifications for different events.
-- [ ] Update Hyperswitch's webhook endpoints on your connector's Dashboard. [Refer here](https://juspay-78.mintlify.app/essentials/webhooks#configuring-webhooks) for detailed instructions.
-- [ ] Update the connector secret key in our dashboard for us to authenticate webhooks sent by your connector.
-
-### Secure your Payments
-
-- [ ] Make sure you decrypt and verify the signed payload sent along with the payment status in your return URL.
-- [ ] Always verify the payment amount and payment status before fulfilling your customer's shopping cart/service request.
-
-### Error Handling
-
-- [ ] Make sure your API integration is set up to handle all the possible error scenarios (refer this [link](https://juspay-78.mintlify.app/essentials/error_codes)).
-- [ ] Ensure your Unified Checkout (SDK) integration is set up to handle all the possible error scenarios (refer this [link](https://hyperswitch.io/docs/sdkIntegrations/unifiedCheckoutWeb/errorCodes)).
-- [ ] Ensure that your integration can handle the entire payments lifecycle and test various scenarios using actual payment details.
-
-### Customize and sanity check the payment experience
-
-- [ ] Ensure the pay button is properly highlighted to the customer.
-- [ ] Ensure a blended look and feel of the payment experience using the [styling APIs](https://hyperswitch.io/docs/sdkIntegrations/unifiedCheckoutWeb/customization) of Unified Checkout.
diff --git a/api-reference-v2/essentials/rate_limit.mdx b/api-reference-v2/essentials/rate_limit.mdx
deleted file mode 100644
index 2857271f96..0000000000
--- a/api-reference-v2/essentials/rate_limit.mdx
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: Rate Limits
----
-
-The Hyperswitch API has multiple checks in place to enhance its stability when faced with sudden surges of incoming traffic. Merchants who send numerous requests in rapid succession could encounter error responses indicated by the status code 429.
-
-
- The default rate limit for all Hyperswitch APIs is **80 requests per second**.
- Reach out to biz@hyperswitch.io if you have a requirement for higher limits.
-
-
-## How to handle rate limits
-
-Effectively handling rate limit 429 errors is crucial for maintaining a seamless user experience.
-
-- Implement retry mechanisms with progressively increasing intervals to avoid overwhelming the system with repeated requests.
-- To proactively manage these errors, monitoring tools can help track usage patterns and provide insights for adjusting rate limits as necessary.
-- Ultimately, a well-orchestrated strategy for managing 429 errors not only prevents disruption but also fosters positive user engagement by transparently addressing limitations and promoting responsible API usage.
-
-## Understanding API locking
-
-If you see a 429 error with the following error message, it is due to API locking and not due to rate limiting:
-
-```text
-At this moment, access to this object is restricted due to ongoing utilization by another API request or an ongoing Hyperswitch process. Retry after some time if this error persists.
-```
-
-API locking is a robust feature that empowers us to proactively secure and optimize access to our APIs. Our API locks objects on some operations to prevent the disruption caused by concurrent workloads that could potentially lead to inconsistent outcomes.
-
-This proactive measure not only ensures the continued integrity and performance of our APIs but also guarantees a high standard of security for our users. Once triggered, the API lock initiates a controlled pause in access, preventing any potential threats from compromising the system.
diff --git a/api-reference-v2/favicon.png b/api-reference-v2/favicon.png
deleted file mode 100644
index c9a0fc50f7..0000000000
Binary files a/api-reference-v2/favicon.png and /dev/null differ
diff --git a/api-reference-v2/introduction.mdx b/api-reference-v2/introduction.mdx
deleted file mode 100644
index 5c59dbc11e..0000000000
--- a/api-reference-v2/introduction.mdx
+++ /dev/null
@@ -1,51 +0,0 @@
----
-tags: [Getting Started]
-stoplight-id: 3lmsk7ocvq21v
----
-
-# 👋 Welcome to Hyperswitch API Reference
-
-Hyperswitch provides a collection of APIs that enable you to process and manage payments. Our APIs accept and return JSON in the HTTP body and return standard HTTP response codes. You can consume the APIs directly using your favorite HTTP/REST library.
-
-## Environment
-
-We have a testing environment referred to "sandbox," which you can set up to test API calls without affecting production data. You can sign up on our Dashboard to get API keys to access Hyperswitch API.
-
-Use the following base URLs when making requests to the APIs:
-
-| Environment | Base URL |
-| ----------- | ------------------------------ |
-| Sandbox | https://sandbox.hyperswitch.io |
-| Production | https://api.hyperswitch.io |
-
- If you **do not hold a PCI certification** to collect and store card data on your servers, we recommend using [**Unified Checkout**](https://hyperswitch.io/docs/sdkIntegrations/unifiedCheckoutWeb/#unified-checkout) to accept card information from users.
-
-## Authentication and API keys
-
-Hyperswitch authenticates your API requests using your account’s API keys. Each account has two API keys for authentication:
-
-| Key | Example | When to Use |
-| -------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
-| Secret key (API-key) | `snd_c69***` | Used to authenticate API requests from your merchant server. **Don’t expose this key** on a website or embed it in a mobile application. |
-| Publishable key | `pk_snd_3b3***` | Used to authenticate API requests from your app’s client. Can be publicly-accessible in your web or mobile app’s client-side code. |
-
-
-Get your [API key](https://app.hyperswitch.io/developers?tabIndex=1) and [Publishable Key](https://app.hyperswitch.io/home)
-
-
-[Postman Collection](https://www.postman.com/hyperswitch/workspace/hyperswitch-development/collection/25176162-630b5353-7002-44d1-8ba1-ead6c230f2e3)
-
-
-## Payment Status Lifecycle
-Hyperswitch handles the complex functionality of a comprehensive payments flow through the Payments object that transitions through multiple states during its payments lifecycle. Given below are the various statuses a payment can have:
-| Payment Status | Description |
-| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| requires_payment_method | Once you create a payment through payments/create endpoint with no payment method attached to it, the payments object transitions to ‘requires_payment_method’. |
-| requires_confirmation | After attaching a payment method through payments/update endpoint, the payments object requires you to confirm the payment. |
-| requires_customer_action | Once the payment is confirmed through payments/confirm endpoint, if additional authentication is required, the payments object transitions to this state. |
-| requires_capture | If you want to do separate authorize and capture, setting capture field to ‘manual’ during payments/create or confirm call will transition the payment object to this state after customer action succeeds. |
-| processing | In case of automatic capture, the payments object transitions to processing state post confirm call and subsequent customer authentication if available. |
-| succeeded | The payments object reaches success state post confirmation of successful processing from the payment processor. |
-| failed | The payments object transitions to a failed state when the payment processor confirms the processing failure. |
-| expired | You can expire the payments object while it is in any state except when it is under ‘processing’ or ‘succeeded’ state. |
-
diff --git a/api-reference-v2/logo/dark.svg b/api-reference-v2/logo/dark.svg
deleted file mode 100644
index f07be0cea1..0000000000
--- a/api-reference-v2/logo/dark.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-
diff --git a/api-reference-v2/logo/light.svg b/api-reference-v2/logo/light.svg
deleted file mode 100644
index 66b2c279d0..0000000000
--- a/api-reference-v2/logo/light.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-
diff --git a/api-reference-v2/mint.json b/api-reference-v2/mint.json
deleted file mode 100644
index 8c49d3dd70..0000000000
--- a/api-reference-v2/mint.json
+++ /dev/null
@@ -1,163 +0,0 @@
-{
- "$schema": "https://mintlify.com/schema.json",
- "name": "Hyperswitch",
- "logo": {
- "dark": "/logo/dark.svg",
- "light": "/logo/light.svg"
- },
- "favicon": "/favicon.png",
- "colors": {
- "primary": "#006DF9",
- "light": "#006DF9",
- "dark": "#006DF9",
- "background": {
- "dark": "#242F48"
- }
- },
- "tabs": [
- {
- "name": "API Reference",
- "url": "api-reference"
- }
- ],
- "navigation": [
- {
- "group": "Get Started",
- "pages": ["introduction"]
- },
- {
- "group": "Essentials",
- "pages": [
- "essentials/error_codes",
- "essentials/rate_limit",
- "essentials/go-live"
- ]
- },
- {
- "group": "Payments",
- "pages": [
- "api-reference/payments/payments--create-intent",
- "api-reference/payments/payments--get-intent",
- "api-reference/payments/payments--update-intent",
- "api-reference/payments/payments--session-token",
- "api-reference/payments/payments--payment-methods-list",
- "api-reference/payments/payments--confirm-intent",
- "api-reference/payments/payments--get",
- "api-reference/payments/payments--create-and-confirm-intent",
- "api-reference/payments/payments--list"
- ]
- },
- {
- "group": "Payment Methods",
- "pages": [
- "api-reference/payment-methods/payment-method--create",
- "api-reference/payment-methods/payment-method--create-intent",
- "api-reference/payment-methods/payment-method--payment-methods-list",
- "api-reference/payment-methods/payment-method--confirm-intent",
- "api-reference/payment-methods/payment-method--update",
- "api-reference/payment-methods/payment-method--retrieve",
- "api-reference/payment-methods/payment-method--delete",
- "api-reference/payment-methods/list-saved-payment-methods-for-a-customer"
- ]
- },
- {
- "group": "Payment Method Session",
- "pages": [
- "api-reference/payment-method-session/payment-method-session--create",
- "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--delete-a-saved-payment-method"
- ]
- },
- {
- "group": "Organization",
- "pages": [
- "api-reference/organization/organization--create",
- "api-reference/organization/organization--retrieve",
- "api-reference/organization/organization--update",
- "api-reference/organization/organization--merchant-account--list"
- ]
- },
- {
- "group": "Merchant Account",
- "pages": [
- "api-reference/merchant-account/merchant-account--create",
- "api-reference/merchant-account/merchant-account--retrieve",
- "api-reference/merchant-account/merchant-account--update",
- "api-reference/merchant-account/business-profile--list"
- ]
- },
- {
- "group": "Profile",
- "pages": [
- "api-reference/profile/profile--create",
- "api-reference/profile/profile--update",
- "api-reference/profile/profile--activate-routing-algorithm",
- "api-reference/profile/profile--update-default-fallback-routing-algorithm",
- "api-reference/profile/profile--deactivate-routing-algorithm",
- "api-reference/profile/profile--retrieve",
- "api-reference/profile/merchant-connector--list",
- "api-reference/profile/profile--retrieve-active-routing-algorithm",
- "api-reference/profile/profile--retrieve-default-fallback-routing-algorithm"
- ]
- },
- {
- "group": "Connector Account",
- "pages": [
- "api-reference/connector-account/connector-account--create",
- "api-reference/connector-account/connector-account--retrieve",
- "api-reference/connector-account/connector-account--update"
- ]
- },
- {
- "group": "API Key",
- "pages": [
- "api-reference/api-key/api-key--create",
- "api-reference/api-key/api-key--retrieve",
- "api-reference/api-key/api-key--update",
- "api-reference/api-key/api-key--revoke",
- "api-reference/api-key/api-key--list"
- ]
- },
- {
- "group": "Routing",
- "pages": [
- "api-reference/routing/routing--create",
- "api-reference/routing/routing--retrieve"
- ]
- },
- {
- "group": "Customers",
- "pages": [
- "api-reference/customers/customers--create",
- "api-reference/customers/customers--retrieve",
- "api-reference/customers/customers--update",
- "api-reference/customers/customers--delete",
- "api-reference/customers/customers--list",
- "api-reference/customers/customers--list-saved-payment-methods"
- ]
- },
- {
- "group": "Refunds",
- "pages": ["api-reference/refunds/refunds--create"]
- },
- {
- "group": "Proxy",
- "pages": ["api-reference/proxy/proxy"]
- },
- {
- "group": "Tokenization",
- "pages": ["api-reference/tokenization/tokenization--create"]
- }
- ],
- "footerSocials": {
- "github": "https://github.com/juspay/hyperswitch",
- "linkedin": "https://www.linkedin.com/company/hyperswitch"
- },
- "openapi": ["openapi_spec.json"],
- "api": {
- "maintainOrder": true
- }
-}
diff --git a/api-reference-v2/rust_locker_open_api_spec.yml b/api-reference-v2/rust_locker_open_api_spec.yml
deleted file mode 100644
index 17a19fec44..0000000000
--- a/api-reference-v2/rust_locker_open_api_spec.yml
+++ /dev/null
@@ -1,372 +0,0 @@
-openapi: "3.0.2"
-info:
- title: Tartarus - OpenAPI 3.0
- description: |-
- This is the OpenAPI 3.0 specification for the card locker.
- This is used by the [hyperswitch](https://github.com/juspay/hyperswitch) for storing card information securely.
- version: "1.0"
-tags:
- - name: Key Custodian
- description: API used to initialize the locker after deployment.
- - name: Data
- description: CRUD APIs for working with data to be stored in the locker
- - name: Cards
- description: CRUD APIs for working with cards data to be stored in the locker (deprecated)
-paths:
- /custodian/key1:
- post:
- tags:
- - Key Custodian
- summary: Provide Key 1
- description: Provide the first key to unlock the locker
- operationId: setKey1
- requestBody:
- description: Provide key 1 to unlock the locker
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Key"
- required: true
- responses:
- "200":
- description: Key 1 provided
- content:
- text/plain:
- schema:
- $ref: "#/components/schemas/Key1Set"
- /custodian/key2:
- post:
- tags:
- - Key Custodian
- summary: Provide Key 2
- description: Provide the second key to unlock the locker
- operationId: setKey2
- requestBody:
- description: Provide key 2 to unlock the locker
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Key"
- required: true
- responses:
- "200":
- description: Key 2 provided
- content:
- text/plain:
- schema:
- $ref: "#/components/schemas/Key2Set"
- /custodian/decrypt:
- post:
- tags:
- - Key Custodian
- summary: Unlock the locker
- description: Unlock the locker with the key1 and key2 provided
- responses:
- "200":
- description: Successfully Unlocked
- content:
- text/plain:
- schema:
- $ref: "#/components/schemas/Decrypt200"
- /health:
- get:
- summary: Get Health
- description: To check whether the application is up
- responses:
- "200":
- description: Health is good
- content:
- text/plain:
- schema:
- $ref: "#/components/schemas/Health"
- /data/add:
- post:
- tags:
- - Cards
- - Data
- summary: Add Data in Locker
- description: Add sensitive data in the locker
- requestBody:
- description: The request body might be JWE + JWS encrypted when using middleware
- content:
- application/json:
- schema:
- oneOf:
- - $ref: "#/components/schemas/StoreDataReq"
- - $ref: "#/components/schemas/JWEReq"
- required: true
- responses:
- "200":
- description: Store Data Response
- content:
- application/json:
- schema:
- oneOf:
- - $ref: "#/components/schemas/StoreDataRes"
- - $ref: "#/components/schemas/JWERes"
- /data/delete:
- post:
- tags:
- - Cards
- - Data
- summary: Delete Data from Locker
- description: Delete sensitive data from the locker
- requestBody:
- description: The request body might be JWE + JWS encrypted when using middleware
- content:
- application/json:
- schema:
- oneOf:
- - $ref: "#/components/schemas/DeleteDataReq"
- - $ref: "#/components/schemas/JWEReq"
- required: true
- responses:
- "200":
- description: Delete Data Response
- content:
- application/json:
- schema:
- oneOf:
- - $ref: "#/components/schemas/DeleteDataRes"
- - $ref: "#/components/schemas/JWERes"
- /data/retrieve:
- post:
- tags:
- - Cards
- - Data
- summary: Retrieve Data from Locker
- description: Retrieve sensitive data from the locker
- requestBody:
- description: The request body might be JWE + JWS encrypted when using middleware
- content:
- application/json:
- schema:
- oneOf:
- - $ref: "#/components/schemas/RetrieveDataReq"
- - $ref: "#/components/schemas/JWEReq"
- required: true
- responses:
- "200":
- description: Retrieve Data Response
- content:
- application/json:
- schema:
- oneOf:
- - $ref: "#/components/schemas/RetrieveDataRes"
- - $ref: "#/components/schemas/JWERes"
- /data/fingerprint:
- post:
- tags:
- - Cards
- - Data
- summary: Get or insert the card fingerprint
- description: Get or insert the card fingerprint
- requestBody:
- description: Provide card number and hash key
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/FingerprintReq"
- required: true
- responses:
- "200":
- description: Fingerprint Response
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/FingerprintRes"
-components:
- schemas:
- Key:
- type: object
- properties:
- key:
- type: string
- example: 801bb63c1bd51820acbc8ac20c674675
- required:
- - key
- StoreDataReq:
- title: StoreDataReq
- type: object
- properties:
- merchant_id:
- type: string
- example: m0100
- merchant_customer_id:
- type: string
- example: HsCustomer1
- requester_card_reference:
- type: string
- example: 3ffdf1e5-7f38-4f26-936f-c66a6f4296fa
- card:
- $ref: "#/components/schemas/Card"
- enc_card_data:
- type: string
- example: "qwe4tyusdfg"
- RetrieveDataReq:
- title: RetrieveDataReq
- type: object
- properties:
- merchant_id:
- type: string
- example: m0100
- merchant_customer_id:
- type: string
- example: HsCustomer1
- card_reference:
- type: string
- example: 3ffdf1e5-7f38-4f26-936f-c66a6f4296fa
- DeleteDataReq:
- title: DeleteDataReq
- type: object
- properties:
- merchant_id:
- type: string
- example: m0100
- merchant_customer_id:
- type: string
- example: HsCustomer1
- card_reference:
- type: string
- example: 3ffdf1e5-7f38-4f26-936f-c66a6f4296fa
- FingerprintReq:
- type: object
- properties:
- card:
- $ref: "#/components/schemas/FingerprintCardData"
- hash_key:
- type: string
- example: Hash1
- JWEReq:
- title: JWEReq
- type: object
- properties:
- header:
- type: string
- iv:
- type: string
- encrypted_payload:
- type: string
- tag:
- type: string
- encrypted_key:
- type: string
- RetrieveRes:
- title: RetrieveRes
- oneOf:
- - type: object
- properties:
- card:
- $ref: "#/components/schemas/Card"
- - type: object
- properties:
- enc_card_data:
- type: string
- Card:
- title: Card
- type: object
- required:
- - card_number
- properties:
- card_number:
- type: string
- name_on_card:
- type: string
- card_exp_month:
- type: string
- card_exp_year:
- type: string
- card_brand:
- type: string
- card_isin:
- type: string
- nick_name:
- type: string
- FingerprintCardData:
- type: object
- properties:
- card_number:
- type: string
- example: 4242424242424242
- Key1Set:
- title: Key1Set
- type: string
- # summary: Response after setting key1
- description: Received Key1
- example: Received Key1
- Key2Set:
- title: Key2Set
- type: string
- # description: Response after setting key2
- description: Received Key2
- example: Received Key2
- Decrypt200:
- title: Decrypt200
- type: string
- # description: Response if the locker key custodian decryption was successful
- description: Decryption successful
- example: Decryption successful
- Health:
- title: Health
- type: string
- # description: Response when the health is good
- description: health is good
- example: health is good
- StoreDataRes:
- title: StoreDataRes
- type: object
- description: Response received if the data was stored successfully
- properties:
- status:
- type: string
- enum: [Ok]
- payload:
- type: object
- properties:
- card_reference:
- type: string
- RetrieveDataRes:
- title: RetrieveDataRes
- type: object
- description: Response received with the sensitive data, associated to the card reference
- properties:
- status:
- type: string
- enum: [Ok]
- payload:
- $ref: "#/components/schemas/RetrieveRes"
- DeleteDataRes:
- title: DeleteDataRes
- type: object
- description: Response received if the data deletion was successful
- properties:
- status:
- type: string
- enum: [Ok]
- FingerprintRes:
- type: object
- description: Response received if the fingerprint insertion or retrieval was successful
- properties:
- status:
- type: string
- enum: [Ok]
- payload:
- type: object
- properties:
- fingerprint:
- type: string
- JWERes:
- title: JWERes
- type: object
- description: JWE encrypted response equivalent
- properties:
- header:
- type: string
- iv:
- type: string
- encrypted_payload:
- type: string
- tag:
- type: string
- encrypted_key:
- type: string
\ No newline at end of file
diff --git a/api-reference/README.md b/api-reference/README.md
index a883fc663d..b0343f44e6 100644
--- a/api-reference/README.md
+++ b/api-reference/README.md
@@ -1,6 +1,6 @@
# Api Reference
-We use the [openapi specification](https://swagger.io/specification) for the api reference. The openapi file is generated from the code base [openapi_spec.json](openapi_spec.json).
+We use the [openapi specification](https://swagger.io/specification) for the api reference. The openapi file is generated from the code base [openapi_spec_v1.json](v1/openapi_spec_v1.json).
## How to generate the file
@@ -14,7 +14,7 @@ cargo r -p openapi --features v1
In order to render the openapi spec file, we use a tool called [mintlify](https://mintlify.com/). Local setup instructions can be found [here](https://mintlify.com/docs/development#development). Once the cli is installed, Run the following command to render the openapi spec
-- Navigate to the directory where `mint.json` exists
+- Navigate to the directory where `docs.json` exists
```bash
cd api-reference
@@ -23,14 +23,14 @@ cd api-reference
- Run the cli
```bash
-mintlify dev
+mint dev
```
## Add new routes to openapi
If you have added new routes to the openapi. Then in order for them to be displayed on the mintlify, run the following commands
-- Switch to the directory where api reference ( mint.json ) exists
+- Switch to the directory where api reference ( docs.json ) exists
```bash
cd api-reference
@@ -39,7 +39,10 @@ cd api-reference
- Run the following command to generate the route files
```bash
-npx @mintlify/scraping@latest openapi-file openapi_spec.json -o api-reference
+npx @mintlify/scraping@latest openapi-file v1/openapi_spec_v1.json -o v1
```
This will generate files in [api-reference](api-reference) folder. These routes should be added to the [mint.json](mint.json) file under navigation, under respective group.
+
+
+NOTE: For working with V2 API reference, replace every occurence of `v1` with `v2` in above commands
\ No newline at end of file
diff --git a/api-reference/api-reference/customers/customers--create.mdx b/api-reference/api-reference/customers/customers--create.mdx
deleted file mode 100644
index 2482c4b75c..0000000000
--- a/api-reference/api-reference/customers/customers--create.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /customers
----
\ No newline at end of file
diff --git a/api-reference/api-reference/customers/customers--delete.mdx b/api-reference/api-reference/customers/customers--delete.mdx
deleted file mode 100644
index 3e226a2919..0000000000
--- a/api-reference/api-reference/customers/customers--delete.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec delete /customers/{customer_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/customers/customers--list.mdx b/api-reference/api-reference/customers/customers--list.mdx
deleted file mode 100644
index 6fb6b63286..0000000000
--- a/api-reference/api-reference/customers/customers--list.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /customers/list
----
\ No newline at end of file
diff --git a/api-reference/api-reference/customers/customers--retrieve.mdx b/api-reference/api-reference/customers/customers--retrieve.mdx
deleted file mode 100644
index 341216a1e8..0000000000
--- a/api-reference/api-reference/customers/customers--retrieve.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /customers/{customer_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/customers/customers--update.mdx b/api-reference/api-reference/customers/customers--update.mdx
deleted file mode 100644
index ec11ed710d..0000000000
--- a/api-reference/api-reference/customers/customers--update.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /customers/{customer_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/disputes/disputes--list.mdx b/api-reference/api-reference/disputes/disputes--list.mdx
deleted file mode 100644
index 254366f073..0000000000
--- a/api-reference/api-reference/disputes/disputes--list.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /disputes/list
----
\ No newline at end of file
diff --git a/api-reference/api-reference/disputes/disputes--retrieve.mdx b/api-reference/api-reference/disputes/disputes--retrieve.mdx
deleted file mode 100644
index abdbabc564..0000000000
--- a/api-reference/api-reference/disputes/disputes--retrieve.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /disputes/{dispute_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/gsm/gsm--create.mdx b/api-reference/api-reference/gsm/gsm--create.mdx
deleted file mode 100644
index 1c610fe39d..0000000000
--- a/api-reference/api-reference/gsm/gsm--create.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /gsm
----
\ No newline at end of file
diff --git a/api-reference/api-reference/gsm/gsm--delete.mdx b/api-reference/api-reference/gsm/gsm--delete.mdx
deleted file mode 100644
index caf315c6d5..0000000000
--- a/api-reference/api-reference/gsm/gsm--delete.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /gsm/delete
----
\ No newline at end of file
diff --git a/api-reference/api-reference/gsm/gsm--get.mdx b/api-reference/api-reference/gsm/gsm--get.mdx
deleted file mode 100644
index 8c79328343..0000000000
--- a/api-reference/api-reference/gsm/gsm--get.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /gsm/get
----
\ No newline at end of file
diff --git a/api-reference/api-reference/gsm/gsm--update.mdx b/api-reference/api-reference/gsm/gsm--update.mdx
deleted file mode 100644
index 59dc8a77f6..0000000000
--- a/api-reference/api-reference/gsm/gsm--update.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /gsm/update
----
\ No newline at end of file
diff --git a/api-reference/api-reference/mandates/mandates--retrieve-mandate.mdx b/api-reference/api-reference/mandates/mandates--retrieve-mandate.mdx
deleted file mode 100644
index d9eca03f92..0000000000
--- a/api-reference/api-reference/mandates/mandates--retrieve-mandate.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /mandates/{mandate_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/mandates/mandates--revoke-mandate.mdx b/api-reference/api-reference/mandates/mandates--revoke-mandate.mdx
deleted file mode 100644
index daa307ecda..0000000000
--- a/api-reference/api-reference/mandates/mandates--revoke-mandate.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /mandates/revoke/{mandate_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payment-methods/list-payment-methods-for-a-customer.mdx b/api-reference/api-reference/payment-methods/list-payment-methods-for-a-customer.mdx
deleted file mode 100644
index f51fcd1a64..0000000000
--- a/api-reference/api-reference/payment-methods/list-payment-methods-for-a-customer.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /customers/{customer_id}/payment_methods
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payment-methods/list-payment-methods-for-a-merchant.mdx b/api-reference/api-reference/payment-methods/list-payment-methods-for-a-merchant.mdx
deleted file mode 100644
index 53f9be27d0..0000000000
--- a/api-reference/api-reference/payment-methods/list-payment-methods-for-a-merchant.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /account/payment_methods
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payment-methods/payment-method--delete.mdx b/api-reference/api-reference/payment-methods/payment-method--delete.mdx
deleted file mode 100644
index c828a8b7a2..0000000000
--- a/api-reference/api-reference/payment-methods/payment-method--delete.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec delete /payment_methods/{method_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payment-methods/payment-method--retrieve.mdx b/api-reference/api-reference/payment-methods/payment-method--retrieve.mdx
deleted file mode 100644
index 9183ca34a9..0000000000
--- a/api-reference/api-reference/payment-methods/payment-method--retrieve.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /payment_methods/{method_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payment-methods/payment-method--update.mdx b/api-reference/api-reference/payment-methods/payment-method--update.mdx
deleted file mode 100644
index fe5db5f2b4..0000000000
--- a/api-reference/api-reference/payment-methods/payment-method--update.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payment_methods/{method_id}/update
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payment-methods/paymentmethods--create.mdx b/api-reference/api-reference/payment-methods/paymentmethods--create.mdx
deleted file mode 100644
index 34df9e3c17..0000000000
--- a/api-reference/api-reference/payment-methods/paymentmethods--create.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payment_methods
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--cancel.mdx b/api-reference/api-reference/payments/payments--cancel.mdx
deleted file mode 100644
index 54ce60ea3b..0000000000
--- a/api-reference/api-reference/payments/payments--cancel.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payments/{payment_id}/cancel
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--capture.mdx b/api-reference/api-reference/payments/payments--capture.mdx
deleted file mode 100644
index 1a00d84ec1..0000000000
--- a/api-reference/api-reference/payments/payments--capture.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payments/{payment_id}/capture
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--confirm.mdx b/api-reference/api-reference/payments/payments--confirm.mdx
deleted file mode 100644
index 81e3e2134b..0000000000
--- a/api-reference/api-reference/payments/payments--confirm.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payments/{payment_id}/confirm
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--create.mdx b/api-reference/api-reference/payments/payments--create.mdx
deleted file mode 100644
index af43603873..0000000000
--- a/api-reference/api-reference/payments/payments--create.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-openapi: openapi_spec post /payments
----
- Use the dropdown on the top right corner of the code snippet to try out different payment scenarios.
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--list.mdx b/api-reference/api-reference/payments/payments--list.mdx
deleted file mode 100644
index c16239788e..0000000000
--- a/api-reference/api-reference/payments/payments--list.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /payments/list
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--retrieve.mdx b/api-reference/api-reference/payments/payments--retrieve.mdx
deleted file mode 100644
index f5de441830..0000000000
--- a/api-reference/api-reference/payments/payments--retrieve.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /payments/{payment_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--session-token.mdx b/api-reference/api-reference/payments/payments--session-token.mdx
deleted file mode 100644
index 33d736ab36..0000000000
--- a/api-reference/api-reference/payments/payments--session-token.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payments/session_tokens
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--update.mdx b/api-reference/api-reference/payments/payments--update.mdx
deleted file mode 100644
index f097578a6a..0000000000
--- a/api-reference/api-reference/payments/payments--update.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payments/{payment_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments-link--retrieve.mdx b/api-reference/api-reference/payments/payments-link--retrieve.mdx
deleted file mode 100644
index 92dca125ec..0000000000
--- a/api-reference/api-reference/payments/payments-link--retrieve.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /payment_link/{payment_link_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payouts/payouts--cancel.mdx b/api-reference/api-reference/payouts/payouts--cancel.mdx
deleted file mode 100644
index 66bebcc600..0000000000
--- a/api-reference/api-reference/payouts/payouts--cancel.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payouts/{payout_id}/cancel
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payouts/payouts--confirm.mdx b/api-reference/api-reference/payouts/payouts--confirm.mdx
deleted file mode 100644
index baa20bc437..0000000000
--- a/api-reference/api-reference/payouts/payouts--confirm.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payouts/{payout_id}/confirm
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payouts/payouts--create.mdx b/api-reference/api-reference/payouts/payouts--create.mdx
deleted file mode 100644
index 2ceea05aad..0000000000
--- a/api-reference/api-reference/payouts/payouts--create.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payouts/create
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payouts/payouts--fulfill.mdx b/api-reference/api-reference/payouts/payouts--fulfill.mdx
deleted file mode 100644
index bf41fcf29e..0000000000
--- a/api-reference/api-reference/payouts/payouts--fulfill.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payouts/{payout_id}/fulfill
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payouts/payouts--retrieve.mdx b/api-reference/api-reference/payouts/payouts--retrieve.mdx
deleted file mode 100644
index 9e47516e91..0000000000
--- a/api-reference/api-reference/payouts/payouts--retrieve.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /payouts/{payout_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/payouts/payouts--update.mdx b/api-reference/api-reference/payouts/payouts--update.mdx
deleted file mode 100644
index 953b8332c2..0000000000
--- a/api-reference/api-reference/payouts/payouts--update.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /payouts/{payout_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/refunds/refunds--create.mdx b/api-reference/api-reference/refunds/refunds--create.mdx
deleted file mode 100644
index 98f059244f..0000000000
--- a/api-reference/api-reference/refunds/refunds--create.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /refunds
----
\ No newline at end of file
diff --git a/api-reference/api-reference/refunds/refunds--list.mdx b/api-reference/api-reference/refunds/refunds--list.mdx
deleted file mode 100644
index 5362713df9..0000000000
--- a/api-reference/api-reference/refunds/refunds--list.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /refunds/list
----
\ No newline at end of file
diff --git a/api-reference/api-reference/refunds/refunds--retrieve.mdx b/api-reference/api-reference/refunds/refunds--retrieve.mdx
deleted file mode 100644
index 1ca602bfa9..0000000000
--- a/api-reference/api-reference/refunds/refunds--retrieve.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /refunds/{refund_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/refunds/refunds--update.mdx b/api-reference/api-reference/refunds/refunds--update.mdx
deleted file mode 100644
index 8ab210521b..0000000000
--- a/api-reference/api-reference/refunds/refunds--update.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /refunds/{refund_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/relay/relay--retrieve.mdx b/api-reference/api-reference/relay/relay--retrieve.mdx
deleted file mode 100644
index d65e62d31d..0000000000
--- a/api-reference/api-reference/relay/relay--retrieve.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec get /relay/{relay_id}
----
\ No newline at end of file
diff --git a/api-reference/api-reference/relay/relay.mdx b/api-reference/api-reference/relay/relay.mdx
deleted file mode 100644
index a6b5962740..0000000000
--- a/api-reference/api-reference/relay/relay.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
----
-openapi: openapi_spec post /relay
----
\ No newline at end of file
diff --git a/api-reference/docs.json b/api-reference/docs.json
index 4746d18683..ecdf944452 100644
--- a/api-reference/docs.json
+++ b/api-reference/docs.json
@@ -12,222 +12,368 @@
"tabs": [
{
"tab": "Documentation",
- "groups": [
+ "versions": [
{
- "group": "Get Started",
- "pages": [
- "introduction"
- ]
- },
- {
- "group": "Essentials",
- "pages": [
- "essentials/error_codes",
- "essentials/rate_limit",
- "essentials/go-live"
- ]
- },
- {
- "group": "Payments Core APIs",
- "pages": [
- "api-reference/payments/setup--instructions",
- "api-reference/payments/payment--flows",
+ "version": "1.0.0",
+ "groups": [
{
- "group": "Payments",
+ "group": "Get Started",
+ "pages": ["introduction"]
+ },
+ {
+ "group": "Essentials",
"pages": [
- "api-reference/payments/payments--create",
- "api-reference/payments/payments--update",
- "api-reference/payments/payments--confirm",
- "api-reference/payments/payments--retrieve",
- "api-reference/payments/payments--cancel",
- "api-reference/payments/payments--capture",
- "api-reference/payments/payments--incremental-authorization",
- "api-reference/payments/payments--session-token",
- "api-reference/payments/payments-link--retrieve",
- "api-reference/payments/payments--list",
- "api-reference/payments/payments--external-3ds-authentication",
- "api-reference/payments/payments--complete-authorize",
- "api-reference/payments/payments--update-metadata"
+ "essentials/error_codes",
+ "essentials/rate_limit",
+ "essentials/go-live"
]
},
{
- "group": "Payment Methods",
+ "group": "Payments Core APIs",
"pages": [
- "api-reference/payment-methods/paymentmethods--create",
- "api-reference/payment-methods/payment-method--retrieve",
- "api-reference/payment-methods/payment-method--update",
- "api-reference/payment-methods/payment-method--delete",
- "api-reference/payment-methods/payment-method--set-default-payment-method-for-customer",
- "api-reference/payment-methods/list-payment-methods-for-a-merchant",
- "api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment",
- "api-reference/payment-methods/list-payment-methods-for-a-customer",
- "api-reference/customer-set-default-payment-method/customers--set-default-payment-method"
+ "v1/payments/setup--instructions",
+ "v1/payments/payment--flows",
+ {
+ "group": "Payments",
+ "pages": [
+ "v1/payments/payments--create",
+ "v1/payments/payments--update",
+ "v1/payments/payments--confirm",
+ "v1/payments/payments--retrieve",
+ "v1/payments/payments--cancel",
+ "v1/payments/payments--capture",
+ "v1/payments/payments--incremental-authorization",
+ "v1/payments/payments--session-token",
+ "v1/payments/payments-link--retrieve",
+ "v1/payments/payments--list",
+ "v1/payments/payments--external-3ds-authentication",
+ "v1/payments/payments--complete-authorize",
+ "v1/payments/payments--update-metadata"
+ ]
+ },
+ {
+ "group": "Payment Methods",
+ "pages": [
+ "v1/payment-methods/paymentmethods--create",
+ "v1/payment-methods/payment-method--retrieve",
+ "v1/payment-methods/payment-method--update",
+ "v1/payment-methods/payment-method--delete",
+ "v1/payment-methods/payment-method--set-default-payment-method-for-customer",
+ "v1/payment-methods/list-payment-methods-for-a-merchant",
+ "v1/payment-methods/list-customer-saved-payment-methods-for-a-payment",
+ "v1/payment-methods/list-payment-methods-for-a-customer",
+ "v1/customer-set-default-payment-method/customers--set-default-payment-method"
+ ]
+ },
+ {
+ "group": "Customers",
+ "pages": [
+ "v1/customers/customers--create",
+ "v1/customers/customers--retrieve",
+ "v1/customers/customers--update",
+ "v1/customers/customers--delete",
+ "v1/customers/customers--list"
+ ]
+ },
+ {
+ "group": "Mandates",
+ "pages": [
+ "v1/mandates/mandates--revoke-mandate",
+ "v1/mandates/mandates--retrieve-mandate",
+ "v1/mandates/mandates--customer-mandates-list"
+ ]
+ },
+ {
+ "group": "Refunds",
+ "pages": [
+ "v1/refunds/refunds--create",
+ "v1/refunds/refunds--update",
+ "v1/refunds/refunds--retrieve",
+ "v1/refunds/refunds--list"
+ ]
+ },
+ {
+ "group": "Disputes",
+ "pages": [
+ "v1/disputes/disputes--retrieve",
+ "v1/disputes/disputes--list"
+ ]
+ },
+ {
+ "group": "Payouts",
+ "pages": [
+ "v1/payouts/payouts--create",
+ "v1/payouts/payouts--update",
+ "v1/payouts/payouts--cancel",
+ "v1/payouts/payouts--fulfill",
+ "v1/payouts/payouts--confirm",
+ "v1/payouts/payouts--retrieve",
+ "v1/payouts/payouts--list",
+ "v1/payouts/payouts--list-filters",
+ "v1/payouts/payouts--filter"
+ ]
+ }
]
},
{
- "group": "Customers",
+ "group": "Account management APIs",
"pages": [
- "api-reference/customers/customers--create",
- "api-reference/customers/customers--retrieve",
- "api-reference/customers/customers--update",
- "api-reference/customers/customers--delete",
- "api-reference/customers/customers--list"
+ {
+ "group": "Organization",
+ "pages": [
+ "v1/organization/organization--create",
+ "v1/organization/organization--retrieve",
+ "v1/organization/organization--update"
+ ]
+ },
+ {
+ "group": "Merchant Account",
+ "pages": [
+ "v1/merchant-account/merchant-account--create",
+ "v1/merchant-account/merchant-account--retrieve",
+ "v1/merchant-account/merchant-account--update",
+ "v1/merchant-account/merchant-account--delete",
+ "v1/merchant-account/merchant-account--kv-status"
+ ]
+ },
+ {
+ "group": "Business Profile",
+ "pages": [
+ "v1/business-profile/business-profile--create",
+ "v1/business-profile/business-profile--update",
+ "v1/business-profile/business-profile--retrieve",
+ "v1/business-profile/business-profile--delete",
+ "v1/business-profile/business-profile--list"
+ ]
+ },
+ {
+ "group": "API Key",
+ "pages": [
+ "v1/api-key/api-key--create",
+ "v1/api-key/api-key--retrieve",
+ "v1/api-key/api-key--update",
+ "v1/api-key/api-key--revoke",
+ "v1/api-key/api-key--list"
+ ]
+ },
+ {
+ "group": "Merchant Connector Account",
+ "pages": [
+ "v1/merchant-connector-account/merchant-connector--create",
+ "v1/merchant-connector-account/merchant-connector--retrieve",
+ "v1/merchant-connector-account/merchant-connector--update",
+ "v1/merchant-connector-account/merchant-connector--delete",
+ "v1/merchant-connector-account/merchant-connector--list"
+ ]
+ },
+ {
+ "group": "GSM (Global Status Mapping)",
+ "pages": [
+ "v1/gsm/gsm--create",
+ "v1/gsm/gsm--get",
+ "v1/gsm/gsm--update",
+ "v1/gsm/gsm--delete"
+ ]
+ }
]
},
{
- "group": "Mandates",
+ "group": "Other APIs",
"pages": [
- "api-reference/mandates/mandates--revoke-mandate",
- "api-reference/mandates/mandates--retrieve-mandate",
- "api-reference/mandates/mandates--customer-mandates-list"
- ]
- },
- {
- "group": "Refunds",
- "pages": [
- "api-reference/refunds/refunds--create",
- "api-reference/refunds/refunds--update",
- "api-reference/refunds/refunds--retrieve",
- "api-reference/refunds/refunds--list"
- ]
- },
- {
- "group": "Disputes",
- "pages": [
- "api-reference/disputes/disputes--retrieve",
- "api-reference/disputes/disputes--list"
- ]
- },
- {
- "group": "Payouts",
- "pages": [
- "api-reference/payouts/payouts--create",
- "api-reference/payouts/payouts--update",
- "api-reference/payouts/payouts--cancel",
- "api-reference/payouts/payouts--fulfill",
- "api-reference/payouts/payouts--confirm",
- "api-reference/payouts/payouts--retrieve",
- "api-reference/payouts/payouts--list",
- "api-reference/payouts/payouts--list-filters",
- "api-reference/payouts/payouts--filter"
+ {
+ "group": "Event",
+ "pages": [
+ "v1/event/events--list",
+ "v1/event/events--delivery-attempt-list",
+ "v1/event/events--manual-retry"
+ ]
+ },
+ {
+ "group": "Poll",
+ "pages": ["v1/poll/poll--retrieve-poll-status"]
+ },
+ {
+ "group": "Blocklist",
+ "pages": [
+ "v1/blocklist/get-blocklist",
+ "v1/blocklist/post-blocklist",
+ "v1/blocklist/delete-blocklist",
+ "v1/blocklist/post-blocklisttoggle"
+ ]
+ },
+ {
+ "group": "Routing",
+ "pages": [
+ "v1/routing/routing--list",
+ "v1/routing/routing--create",
+ "v1/routing/routing--retrieve-config",
+ "v1/routing/routing--deactivate",
+ "v1/routing/routing--retrieve-default-config",
+ "v1/routing/routing--update-default-config",
+ "v1/routing/routing--retrieve-default-for-profile",
+ "v1/routing/routing--update-default-for-profile",
+ "v1/routing/routing--retrieve",
+ "v1/routing/routing--activate-config"
+ ]
+ },
+ {
+ "group": "Relay",
+ "pages": ["v1/relay/relay", "v1/relay/relay--retrieve"]
+ },
+ {
+ "group": "Schemas",
+ "pages": ["v1/schemas/outgoing--webhook"]
+ }
]
}
]
},
{
- "group": "Account management APIs",
- "pages": [
+ "version": "2.0.0 [BETA]",
+ "groups": [
{
- "group": "Organization",
+ "group": "Get Started [BETA]",
+ "pages": ["introduction"]
+ },
+ {
+ "group": "Essentials [BETA]",
"pages": [
- "api-reference/organization/organization--create",
- "api-reference/organization/organization--retrieve",
- "api-reference/organization/organization--update"
+ "essentials/error_codes",
+ "essentials/rate_limit",
+ "essentials/go-live"
]
},
{
- "group": "Merchant Account",
+ "group": "Payments Core APIs [BETA]",
"pages": [
- "api-reference/merchant-account/merchant-account--create",
- "api-reference/merchant-account/merchant-account--retrieve",
- "api-reference/merchant-account/merchant-account--update",
- "api-reference/merchant-account/merchant-account--delete",
- "api-reference/merchant-account/merchant-account--kv-status"
+ {
+ "group": "Payments",
+ "pages": [
+ "v2/payments/payments--create-intent",
+ "v2/payments/payments--get-intent",
+ "v2/payments/payments--update-intent",
+ "v2/payments/payments--session-token",
+ "v2/payments/payments--payment-methods-list",
+ "v2/payments/payments--confirm-intent",
+ "v2/payments/payments--get",
+ "v2/payments/payments--create-and-confirm-intent",
+ "v2/payments/payments--list"
+ ]
+ },
+ {
+ "group": "Payment Methods",
+ "pages": [
+ "v2/payment-methods/payment-method--create",
+ "v2/payment-methods/payment-method--create-intent",
+ "v2/payment-methods/payment-method--payment-methods-list",
+ "v2/payment-methods/payment-method--confirm-intent",
+ "v2/payment-methods/payment-method--update",
+ "v2/payment-methods/payment-method--retrieve",
+ "v2/payment-methods/payment-method--delete",
+ "v2/payment-methods/list-saved-payment-methods-for-a-customer"
+ ]
+ },
+ {
+ "group": "Payment Method Session",
+ "pages": [
+ "v2/payment-method-session/payment-method-session--create",
+ "v2/payment-method-session/payment-method-session--retrieve",
+ "v2/payment-method-session/payment-method-session--list-payment-methods",
+ "v2/payment-method-session/payment-method-session--update-a-saved-payment-method",
+ "v2/payment-method-session/payment-method-session--confirm-a-payment-method-session",
+ "v2/payment-method-session/payment-method-session--delete-a-saved-payment-method"
+ ]
+ },
+ {
+ "group": "Customers",
+ "pages": [
+ "v2/customers/customers--create",
+ "v2/customers/customers--retrieve",
+ "v2/customers/customers--update",
+ "v2/customers/customers--delete",
+ "v2/customers/customers--list",
+ "v2/customers/customers--list-saved-payment-methods"
+ ]
+ },
+ {
+ "group": "Refunds",
+ "pages": ["v2/refunds/refunds--create"]
+ }
]
},
{
- "group": "Business Profile",
+ "group": "Account management APIs [BETA]",
"pages": [
- "api-reference/business-profile/business-profile--create",
- "api-reference/business-profile/business-profile--update",
- "api-reference/business-profile/business-profile--retrieve",
- "api-reference/business-profile/business-profile--delete",
- "api-reference/business-profile/business-profile--list"
+ {
+ "group": "Organization",
+ "pages": [
+ "v2/organization/organization--create",
+ "v2/organization/organization--retrieve",
+ "v2/organization/organization--update",
+ "v2/organization/organization--merchant-account--list"
+ ]
+ },
+ {
+ "group": "Merchant Account",
+ "pages": [
+ "v2/merchant-account/merchant-account--create",
+ "v2/merchant-account/merchant-account--retrieve",
+ "v2/merchant-account/merchant-account--update",
+ "v2/merchant-account/business-profile--list"
+ ]
+ },
+ {
+ "group": "Profile",
+ "pages": [
+ "v2/profile/profile--create",
+ "v2/profile/profile--update",
+ "v2/profile/profile--activate-routing-algorithm",
+ "v2/profile/profile--update-default-fallback-routing-algorithm",
+ "v2/profile/profile--deactivate-routing-algorithm",
+ "v2/profile/profile--retrieve",
+ "v2/profile/merchant-connector--list",
+ "v2/profile/profile--retrieve-active-routing-algorithm",
+ "v2/profile/profile--retrieve-default-fallback-routing-algorithm"
+ ]
+ },
+ {
+ "group": "Connector Account",
+ "pages": [
+ "v2/connector-account/connector-account--create",
+ "v2/connector-account/connector-account--retrieve",
+ "v2/connector-account/connector-account--update"
+ ]
+ },
+ {
+ "group": "API Key",
+ "pages": [
+ "v2/api-key/api-key--create",
+ "v2/api-key/api-key--retrieve",
+ "v2/api-key/api-key--update",
+ "v2/api-key/api-key--revoke",
+ "v2/api-key/api-key--list"
+ ]
+ },
+ {
+ "group": "Routing",
+ "pages": [
+ "v2/routing/routing--create",
+ "v2/routing/routing--retrieve"
+ ]
+ }
]
},
{
- "group": "API Key",
+ "group": "Other APIs [BETA]",
"pages": [
- "api-reference/api-key/api-key--create",
- "api-reference/api-key/api-key--retrieve",
- "api-reference/api-key/api-key--update",
- "api-reference/api-key/api-key--revoke",
- "api-reference/api-key/api-key--list"
- ]
- },
- {
- "group": "Merchant Connector Account",
- "pages": [
- "api-reference/merchant-connector-account/merchant-connector--create",
- "api-reference/merchant-connector-account/merchant-connector--retrieve",
- "api-reference/merchant-connector-account/merchant-connector--update",
- "api-reference/merchant-connector-account/merchant-connector--delete",
- "api-reference/merchant-connector-account/merchant-connector--list"
- ]
- },
- {
- "group": "GSM (Global Status Mapping)",
- "pages": [
- "api-reference/gsm/gsm--create",
- "api-reference/gsm/gsm--get",
- "api-reference/gsm/gsm--update",
- "api-reference/gsm/gsm--delete"
- ]
- }
- ]
- },
- {
- "group": "Other APIs",
- "pages": [
- {
- "group": "Event",
- "pages": [
- "api-reference/event/events--list",
- "api-reference/event/events--delivery-attempt-list",
- "api-reference/event/events--manual-retry"
- ]
- },
- {
- "group": "Poll",
- "pages": [
- "api-reference/poll/poll--retrieve-poll-status"
- ]
- },
- {
- "group": "Blocklist",
- "pages": [
- "api-reference/blocklist/get-blocklist",
- "api-reference/blocklist/post-blocklist",
- "api-reference/blocklist/delete-blocklist",
- "api-reference/blocklist/post-blocklisttoggle"
- ]
- },
- {
- "group": "Routing",
- "pages": [
- "api-reference/routing/routing--list",
- "api-reference/routing/routing--create",
- "api-reference/routing/routing--retrieve-config",
- "api-reference/routing/routing--deactivate",
- "api-reference/routing/routing--retrieve-default-config",
- "api-reference/routing/routing--update-default-config",
- "api-reference/routing/routing--retrieve-default-for-profile",
- "api-reference/routing/routing--update-default-for-profile",
- "api-reference/routing/routing--retrieve",
- "api-reference/routing/routing--activate-config"
- ]
- },
- {
- "group": "Relay",
- "pages": [
- "api-reference/relay/relay",
- "api-reference/relay/relay--retrieve"
- ]
- },
- {
- "group": "Schemas",
- "pages": [
- "api-reference/schemas/outgoing--webhook"
+ {
+ "group": "Proxy",
+ "pages": ["v2/proxy/proxy"]
+ },
+ {
+ "group": "Tokenization",
+ "pages": ["v2/tokenization/tokenization--create"]
+ }
]
}
]
@@ -239,18 +385,14 @@
"groups": [
{
"group": "Hyperswitch Card Vault",
- "pages": [
- "locker-api-reference/overview"
- ]
+ "pages": ["locker-api-reference/overview"]
},
{
"group": "API Reference",
"pages": [
{
"group": "Locker - Health",
- "pages": [
- "locker-api-reference/locker-health/get-health"
- ]
+ "pages": ["locker-api-reference/locker-health/get-health"]
},
{
"group": "Locker - Key Custodian",
@@ -278,9 +420,7 @@
"groups": [
{
"group": "Hyperswitch Intelligent Router",
- "pages": [
- "intelligent-router-api-reference/overview"
- ]
+ "pages": ["intelligent-router-api-reference/overview"]
},
{
"group": "API Reference",
@@ -329,7 +469,8 @@
},
"api": {
"openapi": [
- "openapi_spec.json",
+ "v1/openapi_spec_v1.json",
+ "v2/openapi_spec_v2.json",
"rust_locker_open_api_spec.yml"
]
},
@@ -371,11 +512,6 @@
}
},
"contextual": {
- "options": [
- "copy",
- "claude",
- "chatgpt",
- "view"
- ]
- }
-}
\ No newline at end of file
+ "options": ["copy", "claude", "chatgpt", "view"]
+ }
+}
diff --git a/api-reference/api-reference/3ds-decision-rule/execute-a-3ds-decision-rule-based-on-the-provided-input.mdx b/api-reference/v1/3ds-decision-rule/execute-a-3ds-decision-rule-based-on-the-provided-input.mdx
similarity index 100%
rename from api-reference/api-reference/3ds-decision-rule/execute-a-3ds-decision-rule-based-on-the-provided-input.mdx
rename to api-reference/v1/3ds-decision-rule/execute-a-3ds-decision-rule-based-on-the-provided-input.mdx
diff --git a/api-reference/api-reference/api-key/api-key--create.mdx b/api-reference/v1/api-key/api-key--create.mdx
similarity index 100%
rename from api-reference/api-reference/api-key/api-key--create.mdx
rename to api-reference/v1/api-key/api-key--create.mdx
diff --git a/api-reference/api-reference/api-key/api-key--list.mdx b/api-reference/v1/api-key/api-key--list.mdx
similarity index 100%
rename from api-reference/api-reference/api-key/api-key--list.mdx
rename to api-reference/v1/api-key/api-key--list.mdx
diff --git a/api-reference/api-reference/api-key/api-key--retrieve.mdx b/api-reference/v1/api-key/api-key--retrieve.mdx
similarity index 100%
rename from api-reference/api-reference/api-key/api-key--retrieve.mdx
rename to api-reference/v1/api-key/api-key--retrieve.mdx
diff --git a/api-reference/api-reference/api-key/api-key--revoke.mdx b/api-reference/v1/api-key/api-key--revoke.mdx
similarity index 100%
rename from api-reference/api-reference/api-key/api-key--revoke.mdx
rename to api-reference/v1/api-key/api-key--revoke.mdx
diff --git a/api-reference/api-reference/api-key/api-key--update.mdx b/api-reference/v1/api-key/api-key--update.mdx
similarity index 100%
rename from api-reference/api-reference/api-key/api-key--update.mdx
rename to api-reference/v1/api-key/api-key--update.mdx
diff --git a/api-reference/api-reference/blocklist/delete-blocklist.mdx b/api-reference/v1/blocklist/delete-blocklist.mdx
similarity index 100%
rename from api-reference/api-reference/blocklist/delete-blocklist.mdx
rename to api-reference/v1/blocklist/delete-blocklist.mdx
diff --git a/api-reference/api-reference/blocklist/get-blocklist.mdx b/api-reference/v1/blocklist/get-blocklist.mdx
similarity index 100%
rename from api-reference/api-reference/blocklist/get-blocklist.mdx
rename to api-reference/v1/blocklist/get-blocklist.mdx
diff --git a/api-reference/api-reference/blocklist/post-blocklist.mdx b/api-reference/v1/blocklist/post-blocklist.mdx
similarity index 100%
rename from api-reference/api-reference/blocklist/post-blocklist.mdx
rename to api-reference/v1/blocklist/post-blocklist.mdx
diff --git a/api-reference/api-reference/blocklist/post-blocklisttoggle.mdx b/api-reference/v1/blocklist/post-blocklisttoggle.mdx
similarity index 100%
rename from api-reference/api-reference/blocklist/post-blocklisttoggle.mdx
rename to api-reference/v1/blocklist/post-blocklisttoggle.mdx
diff --git a/api-reference/api-reference/business-profile/business-profile--create.mdx b/api-reference/v1/business-profile/business-profile--create.mdx
similarity index 100%
rename from api-reference/api-reference/business-profile/business-profile--create.mdx
rename to api-reference/v1/business-profile/business-profile--create.mdx
diff --git a/api-reference/api-reference/business-profile/business-profile--delete.mdx b/api-reference/v1/business-profile/business-profile--delete.mdx
similarity index 100%
rename from api-reference/api-reference/business-profile/business-profile--delete.mdx
rename to api-reference/v1/business-profile/business-profile--delete.mdx
diff --git a/api-reference/api-reference/business-profile/business-profile--list.mdx b/api-reference/v1/business-profile/business-profile--list.mdx
similarity index 100%
rename from api-reference/api-reference/business-profile/business-profile--list.mdx
rename to api-reference/v1/business-profile/business-profile--list.mdx
diff --git a/api-reference/api-reference/business-profile/business-profile--retrieve.mdx b/api-reference/v1/business-profile/business-profile--retrieve.mdx
similarity index 100%
rename from api-reference/api-reference/business-profile/business-profile--retrieve.mdx
rename to api-reference/v1/business-profile/business-profile--retrieve.mdx
diff --git a/api-reference/api-reference/business-profile/business-profile--update.mdx b/api-reference/v1/business-profile/business-profile--update.mdx
similarity index 100%
rename from api-reference/api-reference/business-profile/business-profile--update.mdx
rename to api-reference/v1/business-profile/business-profile--update.mdx
diff --git a/api-reference/api-reference/customer-set-default-payment-method/customers--set-default-payment-method.mdx b/api-reference/v1/customer-set-default-payment-method/customers--set-default-payment-method.mdx
similarity index 100%
rename from api-reference/api-reference/customer-set-default-payment-method/customers--set-default-payment-method.mdx
rename to api-reference/v1/customer-set-default-payment-method/customers--set-default-payment-method.mdx
diff --git a/api-reference/v1/customers/customers--create.mdx b/api-reference/v1/customers/customers--create.mdx
new file mode 100644
index 0000000000..d679fa09b1
--- /dev/null
+++ b/api-reference/v1/customers/customers--create.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /customers
+---
\ No newline at end of file
diff --git a/api-reference/v1/customers/customers--delete.mdx b/api-reference/v1/customers/customers--delete.mdx
new file mode 100644
index 0000000000..536094bac3
--- /dev/null
+++ b/api-reference/v1/customers/customers--delete.mdx
@@ -0,0 +1,3 @@
+---
+openapi: delete /customers/{customer_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/customers/customers--list.mdx b/api-reference/v1/customers/customers--list.mdx
new file mode 100644
index 0000000000..5dce4f2e7f
--- /dev/null
+++ b/api-reference/v1/customers/customers--list.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /customers/list
+---
\ No newline at end of file
diff --git a/api-reference/v1/customers/customers--retrieve.mdx b/api-reference/v1/customers/customers--retrieve.mdx
new file mode 100644
index 0000000000..0f4e1fa291
--- /dev/null
+++ b/api-reference/v1/customers/customers--retrieve.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /customers/{customer_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/customers/customers--update.mdx b/api-reference/v1/customers/customers--update.mdx
new file mode 100644
index 0000000000..3f4c55d96e
--- /dev/null
+++ b/api-reference/v1/customers/customers--update.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /customers/{customer_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/disputes/disputes--list.mdx b/api-reference/v1/disputes/disputes--list.mdx
new file mode 100644
index 0000000000..33850e5e41
--- /dev/null
+++ b/api-reference/v1/disputes/disputes--list.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /disputes/list
+---
\ No newline at end of file
diff --git a/api-reference/v1/disputes/disputes--retrieve.mdx b/api-reference/v1/disputes/disputes--retrieve.mdx
new file mode 100644
index 0000000000..e3e71f29fa
--- /dev/null
+++ b/api-reference/v1/disputes/disputes--retrieve.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /disputes/{dispute_id}
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/event/events--delivery-attempt-list.mdx b/api-reference/v1/event/events--delivery-attempt-list.mdx
similarity index 100%
rename from api-reference/api-reference/event/events--delivery-attempt-list.mdx
rename to api-reference/v1/event/events--delivery-attempt-list.mdx
diff --git a/api-reference/api-reference/event/events--list.mdx b/api-reference/v1/event/events--list.mdx
similarity index 100%
rename from api-reference/api-reference/event/events--list.mdx
rename to api-reference/v1/event/events--list.mdx
diff --git a/api-reference/api-reference/event/events--manual-retry.mdx b/api-reference/v1/event/events--manual-retry.mdx
similarity index 100%
rename from api-reference/api-reference/event/events--manual-retry.mdx
rename to api-reference/v1/event/events--manual-retry.mdx
diff --git a/api-reference/v1/gsm/gsm--create.mdx b/api-reference/v1/gsm/gsm--create.mdx
new file mode 100644
index 0000000000..7de9aad1b1
--- /dev/null
+++ b/api-reference/v1/gsm/gsm--create.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /gsm
+---
\ No newline at end of file
diff --git a/api-reference/v1/gsm/gsm--delete.mdx b/api-reference/v1/gsm/gsm--delete.mdx
new file mode 100644
index 0000000000..e8ebc8561d
--- /dev/null
+++ b/api-reference/v1/gsm/gsm--delete.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /gsm/delete
+---
\ No newline at end of file
diff --git a/api-reference/v1/gsm/gsm--get.mdx b/api-reference/v1/gsm/gsm--get.mdx
new file mode 100644
index 0000000000..3a4b58590e
--- /dev/null
+++ b/api-reference/v1/gsm/gsm--get.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /gsm/get
+---
\ No newline at end of file
diff --git a/api-reference/v1/gsm/gsm--update.mdx b/api-reference/v1/gsm/gsm--update.mdx
new file mode 100644
index 0000000000..c50fbb75e9
--- /dev/null
+++ b/api-reference/v1/gsm/gsm--update.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /gsm/update
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/mandates/mandates--customer-mandates-list.mdx b/api-reference/v1/mandates/mandates--customer-mandates-list.mdx
similarity index 100%
rename from api-reference/api-reference/mandates/mandates--customer-mandates-list.mdx
rename to api-reference/v1/mandates/mandates--customer-mandates-list.mdx
diff --git a/api-reference/v1/mandates/mandates--retrieve-mandate.mdx b/api-reference/v1/mandates/mandates--retrieve-mandate.mdx
new file mode 100644
index 0000000000..6211cd09b6
--- /dev/null
+++ b/api-reference/v1/mandates/mandates--retrieve-mandate.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /mandates/{mandate_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/mandates/mandates--revoke-mandate.mdx b/api-reference/v1/mandates/mandates--revoke-mandate.mdx
new file mode 100644
index 0000000000..590bde6ea9
--- /dev/null
+++ b/api-reference/v1/mandates/mandates--revoke-mandate.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /mandates/revoke/{mandate_id}
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/merchant-account/merchant-account--create.mdx b/api-reference/v1/merchant-account/merchant-account--create.mdx
similarity index 100%
rename from api-reference/api-reference/merchant-account/merchant-account--create.mdx
rename to api-reference/v1/merchant-account/merchant-account--create.mdx
diff --git a/api-reference/api-reference/merchant-account/merchant-account--delete.mdx b/api-reference/v1/merchant-account/merchant-account--delete.mdx
similarity index 100%
rename from api-reference/api-reference/merchant-account/merchant-account--delete.mdx
rename to api-reference/v1/merchant-account/merchant-account--delete.mdx
diff --git a/api-reference/api-reference/merchant-account/merchant-account--kv-status.mdx b/api-reference/v1/merchant-account/merchant-account--kv-status.mdx
similarity index 100%
rename from api-reference/api-reference/merchant-account/merchant-account--kv-status.mdx
rename to api-reference/v1/merchant-account/merchant-account--kv-status.mdx
diff --git a/api-reference/api-reference/merchant-account/merchant-account--retrieve.mdx b/api-reference/v1/merchant-account/merchant-account--retrieve.mdx
similarity index 100%
rename from api-reference/api-reference/merchant-account/merchant-account--retrieve.mdx
rename to api-reference/v1/merchant-account/merchant-account--retrieve.mdx
diff --git a/api-reference/api-reference/merchant-account/merchant-account--update.mdx b/api-reference/v1/merchant-account/merchant-account--update.mdx
similarity index 100%
rename from api-reference/api-reference/merchant-account/merchant-account--update.mdx
rename to api-reference/v1/merchant-account/merchant-account--update.mdx
diff --git a/api-reference/api-reference/merchant-connector-account/merchant-connector--create.mdx b/api-reference/v1/merchant-connector-account/merchant-connector--create.mdx
similarity index 100%
rename from api-reference/api-reference/merchant-connector-account/merchant-connector--create.mdx
rename to api-reference/v1/merchant-connector-account/merchant-connector--create.mdx
diff --git a/api-reference/api-reference/merchant-connector-account/merchant-connector--delete.mdx b/api-reference/v1/merchant-connector-account/merchant-connector--delete.mdx
similarity index 100%
rename from api-reference/api-reference/merchant-connector-account/merchant-connector--delete.mdx
rename to api-reference/v1/merchant-connector-account/merchant-connector--delete.mdx
diff --git a/api-reference/api-reference/merchant-connector-account/merchant-connector--list.mdx b/api-reference/v1/merchant-connector-account/merchant-connector--list.mdx
similarity index 100%
rename from api-reference/api-reference/merchant-connector-account/merchant-connector--list.mdx
rename to api-reference/v1/merchant-connector-account/merchant-connector--list.mdx
diff --git a/api-reference/api-reference/merchant-connector-account/merchant-connector--retrieve.mdx b/api-reference/v1/merchant-connector-account/merchant-connector--retrieve.mdx
similarity index 100%
rename from api-reference/api-reference/merchant-connector-account/merchant-connector--retrieve.mdx
rename to api-reference/v1/merchant-connector-account/merchant-connector--retrieve.mdx
diff --git a/api-reference/api-reference/merchant-connector-account/merchant-connector--update.mdx b/api-reference/v1/merchant-connector-account/merchant-connector--update.mdx
similarity index 100%
rename from api-reference/api-reference/merchant-connector-account/merchant-connector--update.mdx
rename to api-reference/v1/merchant-connector-account/merchant-connector--update.mdx
diff --git a/api-reference/openapi_spec.json b/api-reference/v1/openapi_spec_v1.json
similarity index 100%
rename from api-reference/openapi_spec.json
rename to api-reference/v1/openapi_spec_v1.json
diff --git a/api-reference/api-reference/organization/organization--create.mdx b/api-reference/v1/organization/organization--create.mdx
similarity index 100%
rename from api-reference/api-reference/organization/organization--create.mdx
rename to api-reference/v1/organization/organization--create.mdx
diff --git a/api-reference/api-reference/organization/organization--retrieve.mdx b/api-reference/v1/organization/organization--retrieve.mdx
similarity index 100%
rename from api-reference/api-reference/organization/organization--retrieve.mdx
rename to api-reference/v1/organization/organization--retrieve.mdx
diff --git a/api-reference/api-reference/organization/organization--update.mdx b/api-reference/v1/organization/organization--update.mdx
similarity index 100%
rename from api-reference/api-reference/organization/organization--update.mdx
rename to api-reference/v1/organization/organization--update.mdx
diff --git a/api-reference/api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx b/api-reference/v1/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx
similarity index 100%
rename from api-reference/api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx
rename to api-reference/v1/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx
diff --git a/api-reference/v1/payment-methods/list-payment-methods-for-a-customer.mdx b/api-reference/v1/payment-methods/list-payment-methods-for-a-customer.mdx
new file mode 100644
index 0000000000..5b18efafe7
--- /dev/null
+++ b/api-reference/v1/payment-methods/list-payment-methods-for-a-customer.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /customers/{customer_id}/payment_methods
+---
\ No newline at end of file
diff --git a/api-reference/v1/payment-methods/list-payment-methods-for-a-merchant.mdx b/api-reference/v1/payment-methods/list-payment-methods-for-a-merchant.mdx
new file mode 100644
index 0000000000..6ef3be6e55
--- /dev/null
+++ b/api-reference/v1/payment-methods/list-payment-methods-for-a-merchant.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /account/payment_methods
+---
\ No newline at end of file
diff --git a/api-reference/v1/payment-methods/payment-method--delete.mdx b/api-reference/v1/payment-methods/payment-method--delete.mdx
new file mode 100644
index 0000000000..7b8758e68b
--- /dev/null
+++ b/api-reference/v1/payment-methods/payment-method--delete.mdx
@@ -0,0 +1,3 @@
+---
+openapi: delete /payment_methods/{method_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/payment-methods/payment-method--retrieve.mdx b/api-reference/v1/payment-methods/payment-method--retrieve.mdx
new file mode 100644
index 0000000000..504f4644c4
--- /dev/null
+++ b/api-reference/v1/payment-methods/payment-method--retrieve.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /payment_methods/{method_id}
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/payment-methods/payment-method--set-default-payment-method-for-customer.mdx b/api-reference/v1/payment-methods/payment-method--set-default-payment-method-for-customer.mdx
similarity index 100%
rename from api-reference/api-reference/payment-methods/payment-method--set-default-payment-method-for-customer.mdx
rename to api-reference/v1/payment-methods/payment-method--set-default-payment-method-for-customer.mdx
diff --git a/api-reference/v1/payment-methods/payment-method--update.mdx b/api-reference/v1/payment-methods/payment-method--update.mdx
new file mode 100644
index 0000000000..c4ff42b87a
--- /dev/null
+++ b/api-reference/v1/payment-methods/payment-method--update.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payment_methods/{method_id}/update
+---
\ No newline at end of file
diff --git a/api-reference/v1/payment-methods/paymentmethods--create.mdx b/api-reference/v1/payment-methods/paymentmethods--create.mdx
new file mode 100644
index 0000000000..2675d224f0
--- /dev/null
+++ b/api-reference/v1/payment-methods/paymentmethods--create.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payment_methods
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payment--flows.mdx b/api-reference/v1/payments/payment--flows.mdx
similarity index 100%
rename from api-reference/api-reference/payments/payment--flows.mdx
rename to api-reference/v1/payments/payment--flows.mdx
diff --git a/api-reference/v1/payments/payments--cancel.mdx b/api-reference/v1/payments/payments--cancel.mdx
new file mode 100644
index 0000000000..5aed48140e
--- /dev/null
+++ b/api-reference/v1/payments/payments--cancel.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payments/{payment_id}/cancel
+---
\ No newline at end of file
diff --git a/api-reference/v1/payments/payments--capture.mdx b/api-reference/v1/payments/payments--capture.mdx
new file mode 100644
index 0000000000..3797a56952
--- /dev/null
+++ b/api-reference/v1/payments/payments--capture.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payments/{payment_id}/capture
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--complete-authorize.mdx b/api-reference/v1/payments/payments--complete-authorize.mdx
similarity index 100%
rename from api-reference/api-reference/payments/payments--complete-authorize.mdx
rename to api-reference/v1/payments/payments--complete-authorize.mdx
diff --git a/api-reference/v1/payments/payments--confirm.mdx b/api-reference/v1/payments/payments--confirm.mdx
new file mode 100644
index 0000000000..9779c7192b
--- /dev/null
+++ b/api-reference/v1/payments/payments--confirm.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payments/{payment_id}/confirm
+---
\ No newline at end of file
diff --git a/api-reference/v1/payments/payments--create.mdx b/api-reference/v1/payments/payments--create.mdx
new file mode 100644
index 0000000000..6ee948cb83
--- /dev/null
+++ b/api-reference/v1/payments/payments--create.mdx
@@ -0,0 +1,4 @@
+---
+openapi: post /payments
+---
+ Use the dropdown on the top right corner of the code snippet to try out different payment scenarios.
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--external-3ds-authentication.mdx b/api-reference/v1/payments/payments--external-3ds-authentication.mdx
similarity index 100%
rename from api-reference/api-reference/payments/payments--external-3ds-authentication.mdx
rename to api-reference/v1/payments/payments--external-3ds-authentication.mdx
diff --git a/api-reference/api-reference/payments/payments--incremental-authorization.mdx b/api-reference/v1/payments/payments--incremental-authorization.mdx
similarity index 100%
rename from api-reference/api-reference/payments/payments--incremental-authorization.mdx
rename to api-reference/v1/payments/payments--incremental-authorization.mdx
diff --git a/api-reference/v1/payments/payments--list.mdx b/api-reference/v1/payments/payments--list.mdx
new file mode 100644
index 0000000000..13c3a03df4
--- /dev/null
+++ b/api-reference/v1/payments/payments--list.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /payments/list
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--post-session-tokens.mdx b/api-reference/v1/payments/payments--post-session-tokens.mdx
similarity index 100%
rename from api-reference/api-reference/payments/payments--post-session-tokens.mdx
rename to api-reference/v1/payments/payments--post-session-tokens.mdx
diff --git a/api-reference/v1/payments/payments--retrieve.mdx b/api-reference/v1/payments/payments--retrieve.mdx
new file mode 100644
index 0000000000..269ab887a5
--- /dev/null
+++ b/api-reference/v1/payments/payments--retrieve.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /payments/{payment_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/payments/payments--session-token.mdx b/api-reference/v1/payments/payments--session-token.mdx
new file mode 100644
index 0000000000..7f060a06af
--- /dev/null
+++ b/api-reference/v1/payments/payments--session-token.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payments/session_tokens
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/payments--update-metadata.mdx b/api-reference/v1/payments/payments--update-metadata.mdx
similarity index 100%
rename from api-reference/api-reference/payments/payments--update-metadata.mdx
rename to api-reference/v1/payments/payments--update-metadata.mdx
diff --git a/api-reference/v1/payments/payments--update.mdx b/api-reference/v1/payments/payments--update.mdx
new file mode 100644
index 0000000000..9eb6f4bf89
--- /dev/null
+++ b/api-reference/v1/payments/payments--update.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payments/{payment_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/payments/payments-link--retrieve.mdx b/api-reference/v1/payments/payments-link--retrieve.mdx
new file mode 100644
index 0000000000..d5ed6957f7
--- /dev/null
+++ b/api-reference/v1/payments/payments-link--retrieve.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /payment_link/{payment_link_id}
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/payments/setup--instructions.mdx b/api-reference/v1/payments/setup--instructions.mdx
similarity index 100%
rename from api-reference/api-reference/payments/setup--instructions.mdx
rename to api-reference/v1/payments/setup--instructions.mdx
diff --git a/api-reference/v1/payouts/payouts--cancel.mdx b/api-reference/v1/payouts/payouts--cancel.mdx
new file mode 100644
index 0000000000..5bd8875e19
--- /dev/null
+++ b/api-reference/v1/payouts/payouts--cancel.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payouts/{payout_id}/cancel
+---
\ No newline at end of file
diff --git a/api-reference/v1/payouts/payouts--confirm.mdx b/api-reference/v1/payouts/payouts--confirm.mdx
new file mode 100644
index 0000000000..14373744eb
--- /dev/null
+++ b/api-reference/v1/payouts/payouts--confirm.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payouts/{payout_id}/confirm
+---
\ No newline at end of file
diff --git a/api-reference/v1/payouts/payouts--create.mdx b/api-reference/v1/payouts/payouts--create.mdx
new file mode 100644
index 0000000000..923d4f0bc1
--- /dev/null
+++ b/api-reference/v1/payouts/payouts--create.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payouts/create
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/payouts/payouts--filter.mdx b/api-reference/v1/payouts/payouts--filter.mdx
similarity index 100%
rename from api-reference/api-reference/payouts/payouts--filter.mdx
rename to api-reference/v1/payouts/payouts--filter.mdx
diff --git a/api-reference/v1/payouts/payouts--fulfill.mdx b/api-reference/v1/payouts/payouts--fulfill.mdx
new file mode 100644
index 0000000000..5e11b3b11c
--- /dev/null
+++ b/api-reference/v1/payouts/payouts--fulfill.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payouts/{payout_id}/fulfill
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/payouts/payouts--list-filters.mdx b/api-reference/v1/payouts/payouts--list-filters.mdx
similarity index 100%
rename from api-reference/api-reference/payouts/payouts--list-filters.mdx
rename to api-reference/v1/payouts/payouts--list-filters.mdx
diff --git a/api-reference/api-reference/payouts/payouts--list.mdx b/api-reference/v1/payouts/payouts--list.mdx
similarity index 100%
rename from api-reference/api-reference/payouts/payouts--list.mdx
rename to api-reference/v1/payouts/payouts--list.mdx
diff --git a/api-reference/v1/payouts/payouts--retrieve.mdx b/api-reference/v1/payouts/payouts--retrieve.mdx
new file mode 100644
index 0000000000..81b9c2b6a0
--- /dev/null
+++ b/api-reference/v1/payouts/payouts--retrieve.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /payouts/{payout_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/payouts/payouts--update.mdx b/api-reference/v1/payouts/payouts--update.mdx
new file mode 100644
index 0000000000..c6a61c7715
--- /dev/null
+++ b/api-reference/v1/payouts/payouts--update.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /payouts/{payout_id}
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/poll/poll--retrieve-poll-status.mdx b/api-reference/v1/poll/poll--retrieve-poll-status.mdx
similarity index 100%
rename from api-reference/api-reference/poll/poll--retrieve-poll-status.mdx
rename to api-reference/v1/poll/poll--retrieve-poll-status.mdx
diff --git a/api-reference/v1/refunds/refunds--create.mdx b/api-reference/v1/refunds/refunds--create.mdx
new file mode 100644
index 0000000000..1c60568f2a
--- /dev/null
+++ b/api-reference/v1/refunds/refunds--create.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /refunds
+---
\ No newline at end of file
diff --git a/api-reference/v1/refunds/refunds--list.mdx b/api-reference/v1/refunds/refunds--list.mdx
new file mode 100644
index 0000000000..a577ab2851
--- /dev/null
+++ b/api-reference/v1/refunds/refunds--list.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /refunds/list
+---
\ No newline at end of file
diff --git a/api-reference/v1/refunds/refunds--retrieve.mdx b/api-reference/v1/refunds/refunds--retrieve.mdx
new file mode 100644
index 0000000000..bbed228309
--- /dev/null
+++ b/api-reference/v1/refunds/refunds--retrieve.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /refunds/{refund_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/refunds/refunds--update.mdx b/api-reference/v1/refunds/refunds--update.mdx
new file mode 100644
index 0000000000..dc6c5d585c
--- /dev/null
+++ b/api-reference/v1/refunds/refunds--update.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /refunds/{refund_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/relay/relay--retrieve.mdx b/api-reference/v1/relay/relay--retrieve.mdx
new file mode 100644
index 0000000000..de0f42bbe5
--- /dev/null
+++ b/api-reference/v1/relay/relay--retrieve.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /relay/{relay_id}
+---
\ No newline at end of file
diff --git a/api-reference/v1/relay/relay.mdx b/api-reference/v1/relay/relay.mdx
new file mode 100644
index 0000000000..393df84d0a
--- /dev/null
+++ b/api-reference/v1/relay/relay.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /relay
+---
\ No newline at end of file
diff --git a/api-reference/api-reference/routing/routing--activate-config.mdx b/api-reference/v1/routing/routing--activate-config.mdx
similarity index 100%
rename from api-reference/api-reference/routing/routing--activate-config.mdx
rename to api-reference/v1/routing/routing--activate-config.mdx
diff --git a/api-reference/api-reference/routing/routing--create.mdx b/api-reference/v1/routing/routing--create.mdx
similarity index 100%
rename from api-reference/api-reference/routing/routing--create.mdx
rename to api-reference/v1/routing/routing--create.mdx
diff --git a/api-reference/api-reference/routing/routing--deactivate.mdx b/api-reference/v1/routing/routing--deactivate.mdx
similarity index 100%
rename from api-reference/api-reference/routing/routing--deactivate.mdx
rename to api-reference/v1/routing/routing--deactivate.mdx
diff --git a/api-reference/api-reference/routing/routing--list.mdx b/api-reference/v1/routing/routing--list.mdx
similarity index 100%
rename from api-reference/api-reference/routing/routing--list.mdx
rename to api-reference/v1/routing/routing--list.mdx
diff --git a/api-reference/api-reference/routing/routing--retrieve-config.mdx b/api-reference/v1/routing/routing--retrieve-config.mdx
similarity index 100%
rename from api-reference/api-reference/routing/routing--retrieve-config.mdx
rename to api-reference/v1/routing/routing--retrieve-config.mdx
diff --git a/api-reference/api-reference/routing/routing--retrieve-default-config.mdx b/api-reference/v1/routing/routing--retrieve-default-config.mdx
similarity index 100%
rename from api-reference/api-reference/routing/routing--retrieve-default-config.mdx
rename to api-reference/v1/routing/routing--retrieve-default-config.mdx
diff --git a/api-reference/api-reference/routing/routing--retrieve-default-for-profile.mdx b/api-reference/v1/routing/routing--retrieve-default-for-profile.mdx
similarity index 100%
rename from api-reference/api-reference/routing/routing--retrieve-default-for-profile.mdx
rename to api-reference/v1/routing/routing--retrieve-default-for-profile.mdx
diff --git a/api-reference/api-reference/routing/routing--retrieve.mdx b/api-reference/v1/routing/routing--retrieve.mdx
similarity index 100%
rename from api-reference/api-reference/routing/routing--retrieve.mdx
rename to api-reference/v1/routing/routing--retrieve.mdx
diff --git a/api-reference/api-reference/routing/routing--update-default-config.mdx b/api-reference/v1/routing/routing--update-default-config.mdx
similarity index 100%
rename from api-reference/api-reference/routing/routing--update-default-config.mdx
rename to api-reference/v1/routing/routing--update-default-config.mdx
diff --git a/api-reference/api-reference/routing/routing--update-default-for-profile.mdx b/api-reference/v1/routing/routing--update-default-for-profile.mdx
similarity index 100%
rename from api-reference/api-reference/routing/routing--update-default-for-profile.mdx
rename to api-reference/v1/routing/routing--update-default-for-profile.mdx
diff --git a/api-reference/api-reference/schemas/outgoing--webhook.mdx b/api-reference/v1/schemas/outgoing--webhook.mdx
similarity index 100%
rename from api-reference/api-reference/schemas/outgoing--webhook.mdx
rename to api-reference/v1/schemas/outgoing--webhook.mdx
diff --git a/api-reference-v2/api-reference/api-key/api-key--create.mdx b/api-reference/v2/api-key/api-key--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/api-key/api-key--create.mdx
rename to api-reference/v2/api-key/api-key--create.mdx
diff --git a/api-reference-v2/api-reference/api-key/api-key--list.mdx b/api-reference/v2/api-key/api-key--list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/api-key/api-key--list.mdx
rename to api-reference/v2/api-key/api-key--list.mdx
diff --git a/api-reference-v2/api-reference/api-key/api-key--retrieve.mdx b/api-reference/v2/api-key/api-key--retrieve.mdx
similarity index 100%
rename from api-reference-v2/api-reference/api-key/api-key--retrieve.mdx
rename to api-reference/v2/api-key/api-key--retrieve.mdx
diff --git a/api-reference-v2/api-reference/api-key/api-key--revoke.mdx b/api-reference/v2/api-key/api-key--revoke.mdx
similarity index 100%
rename from api-reference-v2/api-reference/api-key/api-key--revoke.mdx
rename to api-reference/v2/api-key/api-key--revoke.mdx
diff --git a/api-reference-v2/api-reference/api-key/api-key--update.mdx b/api-reference/v2/api-key/api-key--update.mdx
similarity index 100%
rename from api-reference-v2/api-reference/api-key/api-key--update.mdx
rename to api-reference/v2/api-key/api-key--update.mdx
diff --git a/api-reference-v2/api-reference/business-profile/merchant-connector--list.mdx b/api-reference/v2/business-profile/merchant-connector--list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/business-profile/merchant-connector--list.mdx
rename to api-reference/v2/business-profile/merchant-connector--list.mdx
diff --git a/api-reference-v2/api-reference/business-profile/profile--connector-accounts-list.mdx b/api-reference/v2/business-profile/profile--connector-accounts-list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/business-profile/profile--connector-accounts-list.mdx
rename to api-reference/v2/business-profile/profile--connector-accounts-list.mdx
diff --git a/api-reference-v2/api-reference/connector-account/connector-account--create.mdx b/api-reference/v2/connector-account/connector-account--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/connector-account/connector-account--create.mdx
rename to api-reference/v2/connector-account/connector-account--create.mdx
diff --git a/api-reference-v2/api-reference/connector-account/connector-account--delete.mdx b/api-reference/v2/connector-account/connector-account--delete.mdx
similarity index 100%
rename from api-reference-v2/api-reference/connector-account/connector-account--delete.mdx
rename to api-reference/v2/connector-account/connector-account--delete.mdx
diff --git a/api-reference-v2/api-reference/connector-account/connector-account--retrieve.mdx b/api-reference/v2/connector-account/connector-account--retrieve.mdx
similarity index 100%
rename from api-reference-v2/api-reference/connector-account/connector-account--retrieve.mdx
rename to api-reference/v2/connector-account/connector-account--retrieve.mdx
diff --git a/api-reference-v2/api-reference/connector-account/connector-account--update.mdx b/api-reference/v2/connector-account/connector-account--update.mdx
similarity index 100%
rename from api-reference-v2/api-reference/connector-account/connector-account--update.mdx
rename to api-reference/v2/connector-account/connector-account--update.mdx
diff --git a/api-reference-v2/api-reference/customers/customers--create.mdx b/api-reference/v2/customers/customers--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/customers/customers--create.mdx
rename to api-reference/v2/customers/customers--create.mdx
diff --git a/api-reference-v2/api-reference/customers/customers--delete.mdx b/api-reference/v2/customers/customers--delete.mdx
similarity index 100%
rename from api-reference-v2/api-reference/customers/customers--delete.mdx
rename to api-reference/v2/customers/customers--delete.mdx
diff --git a/api-reference-v2/api-reference/customers/customers--list-saved-payment-methods.mdx b/api-reference/v2/customers/customers--list-saved-payment-methods.mdx
similarity index 100%
rename from api-reference-v2/api-reference/customers/customers--list-saved-payment-methods.mdx
rename to api-reference/v2/customers/customers--list-saved-payment-methods.mdx
diff --git a/api-reference-v2/api-reference/customers/customers--list.mdx b/api-reference/v2/customers/customers--list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/customers/customers--list.mdx
rename to api-reference/v2/customers/customers--list.mdx
diff --git a/api-reference-v2/api-reference/customers/customers--retrieve.mdx b/api-reference/v2/customers/customers--retrieve.mdx
similarity index 100%
rename from api-reference-v2/api-reference/customers/customers--retrieve.mdx
rename to api-reference/v2/customers/customers--retrieve.mdx
diff --git a/api-reference-v2/api-reference/customers/customers--update.mdx b/api-reference/v2/customers/customers--update.mdx
similarity index 100%
rename from api-reference-v2/api-reference/customers/customers--update.mdx
rename to api-reference/v2/customers/customers--update.mdx
diff --git a/api-reference-v2/api-reference/merchant-account/business-profile--list.mdx b/api-reference/v2/merchant-account/business-profile--list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/merchant-account/business-profile--list.mdx
rename to api-reference/v2/merchant-account/business-profile--list.mdx
diff --git a/api-reference-v2/api-reference/merchant-account/merchant-account--create.mdx b/api-reference/v2/merchant-account/merchant-account--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/merchant-account/merchant-account--create.mdx
rename to api-reference/v2/merchant-account/merchant-account--create.mdx
diff --git a/api-reference-v2/api-reference/merchant-account/merchant-account--profile-list.mdx b/api-reference/v2/merchant-account/merchant-account--profile-list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/merchant-account/merchant-account--profile-list.mdx
rename to api-reference/v2/merchant-account/merchant-account--profile-list.mdx
diff --git a/api-reference-v2/api-reference/merchant-account/merchant-account--retrieve.mdx b/api-reference/v2/merchant-account/merchant-account--retrieve.mdx
similarity index 100%
rename from api-reference-v2/api-reference/merchant-account/merchant-account--retrieve.mdx
rename to api-reference/v2/merchant-account/merchant-account--retrieve.mdx
diff --git a/api-reference-v2/api-reference/merchant-account/merchant-account--update.mdx b/api-reference/v2/merchant-account/merchant-account--update.mdx
similarity index 100%
rename from api-reference-v2/api-reference/merchant-account/merchant-account--update.mdx
rename to api-reference/v2/merchant-account/merchant-account--update.mdx
diff --git a/api-reference-v2/api-reference/merchant-connector-account/connector-account--create.mdx b/api-reference/v2/merchant-connector-account/connector-account--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/merchant-connector-account/connector-account--create.mdx
rename to api-reference/v2/merchant-connector-account/connector-account--create.mdx
diff --git a/api-reference-v2/api-reference/merchant-connector-account/connector-account--retrieve.mdx b/api-reference/v2/merchant-connector-account/connector-account--retrieve.mdx
similarity index 100%
rename from api-reference-v2/api-reference/merchant-connector-account/connector-account--retrieve.mdx
rename to api-reference/v2/merchant-connector-account/connector-account--retrieve.mdx
diff --git a/api-reference-v2/api-reference/merchant-connector-account/connector-account--update.mdx b/api-reference/v2/merchant-connector-account/connector-account--update.mdx
similarity index 100%
rename from api-reference-v2/api-reference/merchant-connector-account/connector-account--update.mdx
rename to api-reference/v2/merchant-connector-account/connector-account--update.mdx
diff --git a/api-reference-v2/api-reference/merchant-connector-account/merchant-connector--delete.mdx b/api-reference/v2/merchant-connector-account/merchant-connector--delete.mdx
similarity index 100%
rename from api-reference-v2/api-reference/merchant-connector-account/merchant-connector--delete.mdx
rename to api-reference/v2/merchant-connector-account/merchant-connector--delete.mdx
diff --git a/api-reference-v2/openapi_spec.json b/api-reference/v2/openapi_spec_v2.json
similarity index 100%
rename from api-reference-v2/openapi_spec.json
rename to api-reference/v2/openapi_spec_v2.json
diff --git a/api-reference-v2/api-reference/organization/organization--create.mdx b/api-reference/v2/organization/organization--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/organization/organization--create.mdx
rename to api-reference/v2/organization/organization--create.mdx
diff --git a/api-reference-v2/api-reference/organization/organization--merchant-account--list.mdx b/api-reference/v2/organization/organization--merchant-account--list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/organization/organization--merchant-account--list.mdx
rename to api-reference/v2/organization/organization--merchant-account--list.mdx
diff --git a/api-reference-v2/api-reference/organization/organization--retrieve.mdx b/api-reference/v2/organization/organization--retrieve.mdx
similarity index 100%
rename from api-reference-v2/api-reference/organization/organization--retrieve.mdx
rename to api-reference/v2/organization/organization--retrieve.mdx
diff --git a/api-reference-v2/api-reference/organization/organization--update.mdx b/api-reference/v2/organization/organization--update.mdx
similarity index 100%
rename from api-reference-v2/api-reference/organization/organization--update.mdx
rename to api-reference/v2/organization/organization--update.mdx
diff --git a/api-reference-v2/api-reference/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx b/api-reference/v2/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx
rename to api-reference/v2/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx
diff --git a/api-reference-v2/api-reference/payment-method-session/payment-method-session--create.mdx b/api-reference/v2/payment-method-session/payment-method-session--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-method-session/payment-method-session--create.mdx
rename to api-reference/v2/payment-method-session/payment-method-session--create.mdx
diff --git a/api-reference-v2/api-reference/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdx b/api-reference/v2/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdx
rename to api-reference/v2/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdx
diff --git a/api-reference-v2/api-reference/payment-method-session/payment-method-session--list-payment-methods.mdx b/api-reference/v2/payment-method-session/payment-method-session--list-payment-methods.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-method-session/payment-method-session--list-payment-methods.mdx
rename to api-reference/v2/payment-method-session/payment-method-session--list-payment-methods.mdx
diff --git a/api-reference-v2/api-reference/payment-method-session/payment-method-session--retrieve.mdx b/api-reference/v2/payment-method-session/payment-method-session--retrieve.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-method-session/payment-method-session--retrieve.mdx
rename to api-reference/v2/payment-method-session/payment-method-session--retrieve.mdx
diff --git a/api-reference-v2/api-reference/payment-method-session/payment-method-session--update-a-saved-payment-method.mdx b/api-reference/v2/payment-method-session/payment-method-session--update-a-saved-payment-method.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-method-session/payment-method-session--update-a-saved-payment-method.mdx
rename to api-reference/v2/payment-method-session/payment-method-session--update-a-saved-payment-method.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx b/api-reference/v2/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx
rename to api-reference/v2/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/list-payment-methods-for-a-customer.mdx b/api-reference/v2/payment-methods/list-payment-methods-for-a-customer.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/list-payment-methods-for-a-customer.mdx
rename to api-reference/v2/payment-methods/list-payment-methods-for-a-customer.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/list-saved-payment-methods-for-a-customer.mdx b/api-reference/v2/payment-methods/list-saved-payment-methods-for-a-customer.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/list-saved-payment-methods-for-a-customer.mdx
rename to api-reference/v2/payment-methods/list-saved-payment-methods-for-a-customer.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/payment-method--confirm-intent.mdx b/api-reference/v2/payment-methods/payment-method--confirm-intent.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/payment-method--confirm-intent.mdx
rename to api-reference/v2/payment-methods/payment-method--confirm-intent.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/payment-method--create-intent.mdx b/api-reference/v2/payment-methods/payment-method--create-intent.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/payment-method--create-intent.mdx
rename to api-reference/v2/payment-methods/payment-method--create-intent.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/payment-method--create.mdx b/api-reference/v2/payment-methods/payment-method--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/payment-method--create.mdx
rename to api-reference/v2/payment-methods/payment-method--create.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/payment-method--delete.mdx b/api-reference/v2/payment-methods/payment-method--delete.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/payment-method--delete.mdx
rename to api-reference/v2/payment-methods/payment-method--delete.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/payment-method--payment-methods-list.mdx b/api-reference/v2/payment-methods/payment-method--payment-methods-list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/payment-method--payment-methods-list.mdx
rename to api-reference/v2/payment-methods/payment-method--payment-methods-list.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/payment-method--retrieve.mdx b/api-reference/v2/payment-methods/payment-method--retrieve.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/payment-method--retrieve.mdx
rename to api-reference/v2/payment-methods/payment-method--retrieve.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/payment-method--update.mdx b/api-reference/v2/payment-methods/payment-method--update.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/payment-method--update.mdx
rename to api-reference/v2/payment-methods/payment-method--update.mdx
diff --git a/api-reference-v2/api-reference/payment-methods/payment-methods--payment-methods-list.mdx b/api-reference/v2/payment-methods/payment-methods--payment-methods-list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payment-methods/payment-methods--payment-methods-list.mdx
rename to api-reference/v2/payment-methods/payment-methods--payment-methods-list.mdx
diff --git a/api-reference-v2/api-reference/payments/payments--confirm-intent.mdx b/api-reference/v2/payments/payments--confirm-intent.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payments/payments--confirm-intent.mdx
rename to api-reference/v2/payments/payments--confirm-intent.mdx
diff --git a/api-reference-v2/api-reference/payments/payments--create-and-confirm-intent.mdx b/api-reference/v2/payments/payments--create-and-confirm-intent.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payments/payments--create-and-confirm-intent.mdx
rename to api-reference/v2/payments/payments--create-and-confirm-intent.mdx
diff --git a/api-reference-v2/api-reference/payments/payments--create-intent.mdx b/api-reference/v2/payments/payments--create-intent.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payments/payments--create-intent.mdx
rename to api-reference/v2/payments/payments--create-intent.mdx
diff --git a/api-reference-v2/api-reference/payments/payments--get-intent.mdx b/api-reference/v2/payments/payments--get-intent.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payments/payments--get-intent.mdx
rename to api-reference/v2/payments/payments--get-intent.mdx
diff --git a/api-reference-v2/api-reference/payments/payments--get.mdx b/api-reference/v2/payments/payments--get.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payments/payments--get.mdx
rename to api-reference/v2/payments/payments--get.mdx
diff --git a/api-reference-v2/api-reference/payments/payments--list.mdx b/api-reference/v2/payments/payments--list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payments/payments--list.mdx
rename to api-reference/v2/payments/payments--list.mdx
diff --git a/api-reference-v2/api-reference/payments/payments--payment-methods-list.mdx b/api-reference/v2/payments/payments--payment-methods-list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payments/payments--payment-methods-list.mdx
rename to api-reference/v2/payments/payments--payment-methods-list.mdx
diff --git a/api-reference-v2/api-reference/payments/payments--session-token.mdx b/api-reference/v2/payments/payments--session-token.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payments/payments--session-token.mdx
rename to api-reference/v2/payments/payments--session-token.mdx
diff --git a/api-reference-v2/api-reference/payments/payments--update-intent.mdx b/api-reference/v2/payments/payments--update-intent.mdx
similarity index 100%
rename from api-reference-v2/api-reference/payments/payments--update-intent.mdx
rename to api-reference/v2/payments/payments--update-intent.mdx
diff --git a/api-reference-v2/api-reference/profile/merchant-connector--list.mdx b/api-reference/v2/profile/merchant-connector--list.mdx
similarity index 100%
rename from api-reference-v2/api-reference/profile/merchant-connector--list.mdx
rename to api-reference/v2/profile/merchant-connector--list.mdx
diff --git a/api-reference-v2/api-reference/profile/profile--activate-routing-algorithm.mdx b/api-reference/v2/profile/profile--activate-routing-algorithm.mdx
similarity index 100%
rename from api-reference-v2/api-reference/profile/profile--activate-routing-algorithm.mdx
rename to api-reference/v2/profile/profile--activate-routing-algorithm.mdx
diff --git a/api-reference-v2/api-reference/profile/profile--create.mdx b/api-reference/v2/profile/profile--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/profile/profile--create.mdx
rename to api-reference/v2/profile/profile--create.mdx
diff --git a/api-reference-v2/api-reference/profile/profile--deactivate-routing-algorithm.mdx b/api-reference/v2/profile/profile--deactivate-routing-algorithm.mdx
similarity index 100%
rename from api-reference-v2/api-reference/profile/profile--deactivate-routing-algorithm.mdx
rename to api-reference/v2/profile/profile--deactivate-routing-algorithm.mdx
diff --git a/api-reference-v2/api-reference/profile/profile--retrieve-active-routing-algorithm.mdx b/api-reference/v2/profile/profile--retrieve-active-routing-algorithm.mdx
similarity index 100%
rename from api-reference-v2/api-reference/profile/profile--retrieve-active-routing-algorithm.mdx
rename to api-reference/v2/profile/profile--retrieve-active-routing-algorithm.mdx
diff --git a/api-reference-v2/api-reference/profile/profile--retrieve-default-fallback-routing-algorithm.mdx b/api-reference/v2/profile/profile--retrieve-default-fallback-routing-algorithm.mdx
similarity index 100%
rename from api-reference-v2/api-reference/profile/profile--retrieve-default-fallback-routing-algorithm.mdx
rename to api-reference/v2/profile/profile--retrieve-default-fallback-routing-algorithm.mdx
diff --git a/api-reference-v2/api-reference/profile/profile--retrieve.mdx b/api-reference/v2/profile/profile--retrieve.mdx
similarity index 100%
rename from api-reference-v2/api-reference/profile/profile--retrieve.mdx
rename to api-reference/v2/profile/profile--retrieve.mdx
diff --git a/api-reference-v2/api-reference/profile/profile--update-default-fallback-routing-algorithm.mdx b/api-reference/v2/profile/profile--update-default-fallback-routing-algorithm.mdx
similarity index 100%
rename from api-reference-v2/api-reference/profile/profile--update-default-fallback-routing-algorithm.mdx
rename to api-reference/v2/profile/profile--update-default-fallback-routing-algorithm.mdx
diff --git a/api-reference-v2/api-reference/profile/profile--update.mdx b/api-reference/v2/profile/profile--update.mdx
similarity index 100%
rename from api-reference-v2/api-reference/profile/profile--update.mdx
rename to api-reference/v2/profile/profile--update.mdx
diff --git a/api-reference-v2/api-reference/proxy/proxy.mdx b/api-reference/v2/proxy/proxy.mdx
similarity index 100%
rename from api-reference-v2/api-reference/proxy/proxy.mdx
rename to api-reference/v2/proxy/proxy.mdx
diff --git a/api-reference-v2/api-reference/refunds/refunds--create.mdx b/api-reference/v2/refunds/refunds--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/refunds/refunds--create.mdx
rename to api-reference/v2/refunds/refunds--create.mdx
diff --git a/api-reference-v2/api-reference/routing/routing--create.mdx b/api-reference/v2/routing/routing--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/routing/routing--create.mdx
rename to api-reference/v2/routing/routing--create.mdx
diff --git a/api-reference-v2/api-reference/routing/routing--retrieve.mdx b/api-reference/v2/routing/routing--retrieve.mdx
similarity index 100%
rename from api-reference-v2/api-reference/routing/routing--retrieve.mdx
rename to api-reference/v2/routing/routing--retrieve.mdx
diff --git a/api-reference-v2/api-reference/tokenization/tokenization--create.mdx b/api-reference/v2/tokenization/tokenization--create.mdx
similarity index 100%
rename from api-reference-v2/api-reference/tokenization/tokenization--create.mdx
rename to api-reference/v2/tokenization/tokenization--create.mdx
diff --git a/crates/openapi/src/main.rs b/crates/openapi/src/main.rs
index 975ff33107..cf8158cfb0 100644
--- a/crates/openapi/src/main.rs
+++ b/crates/openapi/src/main.rs
@@ -10,10 +10,10 @@ fn main() {
compile_error!("features v1 and v2 are mutually exclusive, please enable only one of them");
#[cfg(feature = "v1")]
- let relative_file_path = "api-reference/openapi_spec.json";
+ let relative_file_path = "api-reference/v1/openapi_spec_v1.json";
#[cfg(feature = "v2")]
- let relative_file_path = "api-reference-v2/openapi_spec.json";
+ let relative_file_path = "api-reference/v2/openapi_spec_v2.json";
#[cfg(any(feature = "v1", feature = "v2"))]
let mut file_path = router_env::workspace_path();