From a17b2d4f5553934db42938a859174f3c3ff8e5f4 Mon Sep 17 00:00:00 2001 From: liblab Date: Tue, 21 Jan 2025 13:47:33 -0600 Subject: [PATCH] liblab API documentation update --- .../get-checkoutsupported_countries.mdx | 3 + api-reference/customers/get-customers-1.mdx | 3 + api-reference/customers/get-customers.mdx | 3 + api-reference/customers/patch-customers.mdx | 3 + api-reference/customers/post-customers.mdx | 3 + api-reference/delete-plants.mdx | 3 - api-reference/disputes/get-disputes-1.mdx | 3 + api-reference/disputes/get-disputes.mdx | 3 + api-reference/get-plants.mdx | 3 - .../invoices/get-invoicespayments.mdx | 3 + .../get-license_key_instances-1.mdx | 3 + .../get-license_key_instances.mdx | 3 + .../license-keys/get-license_keys-1.mdx | 3 + .../license-keys/get-license_keys.mdx | 3 + .../patch-license_key_instances.mdx | 3 + .../license-keys/patch-license_keys.mdx | 3 + .../licenses/post-licensesactivate.mdx | 3 + .../licenses/post-licensesdeactivate.mdx | 3 + .../licenses/post-licensesvalidate.mdx | 3 + api-reference/openapi.json | 4361 ++++++++++++++++- .../post-your-webhook-url.mdx | 3 + api-reference/payments/get-payments-1.mdx | 3 + api-reference/payments/get-payments.mdx | 3 + api-reference/payments/post-payments.mdx | 3 + api-reference/payouts/get-payouts.mdx | 3 + api-reference/post-plants.mdx | 3 - api-reference/products/delete-products.mdx | 3 + api-reference/products/get-products-1.mdx | 3 + api-reference/products/get-products.mdx | 3 + api-reference/products/patch-products.mdx | 3 + api-reference/products/post-products.mdx | 3 + .../products/put-products-images.mdx | 3 + api-reference/refunds/get-refunds-1.mdx | 3 + api-reference/refunds/get-refunds.mdx | 3 + api-reference/refunds/post-refunds.mdx | 3 + .../subscriptions/get-subscriptions-1.mdx | 3 + .../subscriptions/get-subscriptions.mdx | 3 + .../subscriptions/patch-subscriptions.mdx | 3 + .../subscriptions/post-subscriptions.mdx | 3 + .../webhook-events/get-webhook_events-1.mdx | 3 + .../webhook-events/get-webhook_events.mdx | 3 + mint.json | 112 +- 42 files changed, 4457 insertions(+), 136 deletions(-) create mode 100644 api-reference/checkout/get-checkoutsupported_countries.mdx create mode 100644 api-reference/customers/get-customers-1.mdx create mode 100644 api-reference/customers/get-customers.mdx create mode 100644 api-reference/customers/patch-customers.mdx create mode 100644 api-reference/customers/post-customers.mdx delete mode 100644 api-reference/delete-plants.mdx create mode 100644 api-reference/disputes/get-disputes-1.mdx create mode 100644 api-reference/disputes/get-disputes.mdx delete mode 100644 api-reference/get-plants.mdx create mode 100644 api-reference/invoices/get-invoicespayments.mdx create mode 100644 api-reference/license-keys/get-license_key_instances-1.mdx create mode 100644 api-reference/license-keys/get-license_key_instances.mdx create mode 100644 api-reference/license-keys/get-license_keys-1.mdx create mode 100644 api-reference/license-keys/get-license_keys.mdx create mode 100644 api-reference/license-keys/patch-license_key_instances.mdx create mode 100644 api-reference/license-keys/patch-license_keys.mdx create mode 100644 api-reference/licenses/post-licensesactivate.mdx create mode 100644 api-reference/licenses/post-licensesdeactivate.mdx create mode 100644 api-reference/licenses/post-licensesvalidate.mdx create mode 100644 api-reference/outgoing-webhooks/post-your-webhook-url.mdx create mode 100644 api-reference/payments/get-payments-1.mdx create mode 100644 api-reference/payments/get-payments.mdx create mode 100644 api-reference/payments/post-payments.mdx create mode 100644 api-reference/payouts/get-payouts.mdx delete mode 100644 api-reference/post-plants.mdx create mode 100644 api-reference/products/delete-products.mdx create mode 100644 api-reference/products/get-products-1.mdx create mode 100644 api-reference/products/get-products.mdx create mode 100644 api-reference/products/patch-products.mdx create mode 100644 api-reference/products/post-products.mdx create mode 100644 api-reference/products/put-products-images.mdx create mode 100644 api-reference/refunds/get-refunds-1.mdx create mode 100644 api-reference/refunds/get-refunds.mdx create mode 100644 api-reference/refunds/post-refunds.mdx create mode 100644 api-reference/subscriptions/get-subscriptions-1.mdx create mode 100644 api-reference/subscriptions/get-subscriptions.mdx create mode 100644 api-reference/subscriptions/patch-subscriptions.mdx create mode 100644 api-reference/subscriptions/post-subscriptions.mdx create mode 100644 api-reference/webhook-events/get-webhook_events-1.mdx create mode 100644 api-reference/webhook-events/get-webhook_events.mdx diff --git a/api-reference/checkout/get-checkoutsupported_countries.mdx b/api-reference/checkout/get-checkoutsupported_countries.mdx new file mode 100644 index 0000000..d51e970 --- /dev/null +++ b/api-reference/checkout/get-checkoutsupported_countries.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /checkout/supported_countries +--- \ No newline at end of file diff --git a/api-reference/customers/get-customers-1.mdx b/api-reference/customers/get-customers-1.mdx new file mode 100644 index 0000000..0f4e1fa --- /dev/null +++ b/api-reference/customers/get-customers-1.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /customers/{customer_id} +--- \ No newline at end of file diff --git a/api-reference/customers/get-customers.mdx b/api-reference/customers/get-customers.mdx new file mode 100644 index 0000000..40078ad --- /dev/null +++ b/api-reference/customers/get-customers.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /customers +--- \ No newline at end of file diff --git a/api-reference/customers/patch-customers.mdx b/api-reference/customers/patch-customers.mdx new file mode 100644 index 0000000..ecada81 --- /dev/null +++ b/api-reference/customers/patch-customers.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /customers/{customer_id} +--- \ No newline at end of file diff --git a/api-reference/customers/post-customers.mdx b/api-reference/customers/post-customers.mdx new file mode 100644 index 0000000..d679fa0 --- /dev/null +++ b/api-reference/customers/post-customers.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /customers +--- \ No newline at end of file diff --git a/api-reference/delete-plants.mdx b/api-reference/delete-plants.mdx deleted file mode 100644 index cbd6b1c..0000000 --- a/api-reference/delete-plants.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: delete /plants/{id} ---- \ No newline at end of file diff --git a/api-reference/disputes/get-disputes-1.mdx b/api-reference/disputes/get-disputes-1.mdx new file mode 100644 index 0000000..e3e71f2 --- /dev/null +++ b/api-reference/disputes/get-disputes-1.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /disputes/{dispute_id} +--- \ No newline at end of file diff --git a/api-reference/disputes/get-disputes.mdx b/api-reference/disputes/get-disputes.mdx new file mode 100644 index 0000000..3632f6b --- /dev/null +++ b/api-reference/disputes/get-disputes.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /disputes +--- \ No newline at end of file diff --git a/api-reference/get-plants.mdx b/api-reference/get-plants.mdx deleted file mode 100644 index 40fd931..0000000 --- a/api-reference/get-plants.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /plants ---- \ No newline at end of file diff --git a/api-reference/invoices/get-invoicespayments.mdx b/api-reference/invoices/get-invoicespayments.mdx new file mode 100644 index 0000000..cbd10c7 --- /dev/null +++ b/api-reference/invoices/get-invoicespayments.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /invoices/payments/{payment_id} +--- \ No newline at end of file diff --git a/api-reference/license-keys/get-license_key_instances-1.mdx b/api-reference/license-keys/get-license_key_instances-1.mdx new file mode 100644 index 0000000..05b3417 --- /dev/null +++ b/api-reference/license-keys/get-license_key_instances-1.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /license_key_instances/{id} +--- \ No newline at end of file diff --git a/api-reference/license-keys/get-license_key_instances.mdx b/api-reference/license-keys/get-license_key_instances.mdx new file mode 100644 index 0000000..37d2cfd --- /dev/null +++ b/api-reference/license-keys/get-license_key_instances.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /license_key_instances +--- \ No newline at end of file diff --git a/api-reference/license-keys/get-license_keys-1.mdx b/api-reference/license-keys/get-license_keys-1.mdx new file mode 100644 index 0000000..10f9eeb --- /dev/null +++ b/api-reference/license-keys/get-license_keys-1.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /license_keys/{id} +--- \ No newline at end of file diff --git a/api-reference/license-keys/get-license_keys.mdx b/api-reference/license-keys/get-license_keys.mdx new file mode 100644 index 0000000..ea70844 --- /dev/null +++ b/api-reference/license-keys/get-license_keys.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /license_keys +--- \ No newline at end of file diff --git a/api-reference/license-keys/patch-license_key_instances.mdx b/api-reference/license-keys/patch-license_key_instances.mdx new file mode 100644 index 0000000..f1a9070 --- /dev/null +++ b/api-reference/license-keys/patch-license_key_instances.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /license_key_instances/{id} +--- \ No newline at end of file diff --git a/api-reference/license-keys/patch-license_keys.mdx b/api-reference/license-keys/patch-license_keys.mdx new file mode 100644 index 0000000..e3412db --- /dev/null +++ b/api-reference/license-keys/patch-license_keys.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /license_keys/{id} +--- \ No newline at end of file diff --git a/api-reference/licenses/post-licensesactivate.mdx b/api-reference/licenses/post-licensesactivate.mdx new file mode 100644 index 0000000..0c53520 --- /dev/null +++ b/api-reference/licenses/post-licensesactivate.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /licenses/activate +--- \ No newline at end of file diff --git a/api-reference/licenses/post-licensesdeactivate.mdx b/api-reference/licenses/post-licensesdeactivate.mdx new file mode 100644 index 0000000..16149f2 --- /dev/null +++ b/api-reference/licenses/post-licensesdeactivate.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /licenses/deactivate +--- \ No newline at end of file diff --git a/api-reference/licenses/post-licensesvalidate.mdx b/api-reference/licenses/post-licensesvalidate.mdx new file mode 100644 index 0000000..114c9bc --- /dev/null +++ b/api-reference/licenses/post-licensesvalidate.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /licenses/validate +--- \ No newline at end of file diff --git a/api-reference/openapi.json b/api-reference/openapi.json index a4e3031..80cfef2 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -1,86 +1,213 @@ { - "openapi": "3.0.1", + "openapi": "3.0.3", "info": { - "title": "OpenAPI Plant Store", - "description": "A sample API that uses a plant store as an example to demonstrate features in the OpenAPI specification", + "title": "dodopayments-api", + "description": "", "license": { - "name": "MIT" + "name": "Apache 2.0" }, - "version": "1.0.0" + "version": "0.17.0" }, "servers": [ { - "url": "http://sandbox.mintlify.com" - } - ], - "security": [ + "url": "https://test.dodopayments.com/", + "description": "Test Mode Server Host" + }, { - "bearerAuth": [] + "url": "https://live.dodopayments.com/", + "description": "Live Mode Server Host" } ], "paths": { - "/plants": { + "/checkout/supported_countries": { + "get": { + "tags": [ + "Checkout" + ], + "operationId": "get_supported_countries_proxy", + "responses": { + "200": { + "description": "Currently Supported Countries", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CountryCodeAlpha2" + } + } + } + } + } + }, + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->checkout->getSupportedCountriesProxy();\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/customers": { "get": { - "description": "Returns all plants from the system that the user has access to", + "tags": [ + "Customers" + ], + "operationId": "list_customers", "parameters": [ { - "name": "limit", + "name": "page_size", + "in": "query", + "description": "Page size default is 10 max is 100", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "page_number", "in": "query", - "description": "The maximum number of results to return", + "description": "Page number default is 0", + "required": false, "schema": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true, + "minimum": 0 } } ], "responses": { "200": { - "description": "Plant response", + "description": "Customers List", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Plant" - } + "$ref": "#/components/schemas/GetCustomersListResponse" } } } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->customers->listCustomers(\n pageSize: 8,\n pageNumber: 2\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + }, + "post": { + "tags": [ + "Customers" + ], + "operationId": "create_customer", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCustomerRequest" + } + } }, - "400": { - "description": "Unexpected error", + "required": true + }, + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/CustomerResponse" } } } } }, + "security": [ + { + "API_KEY": [] + } + ], "x-codeSamples": [ { - "lang": "Go", - "source": "import (\n \"fmt\"\n \"encoding/json\"\n \"github.com/swagger-api/swagger-petstore/pkg/testsdkconfig\"\n \"github.com/swagger-api/swagger-petstore/pkg/testsdk\"\n \"github.com/swagger-api/swagger-petstore/pkg/plants\"\n)\n\nconfig := testsdkconfig.NewConfig()\nclient := testsdk.NewTestSdk(config)\n\n\nparams := plants.GetPlantsRequestParams{}\n\n\nresponse, err := client.Plants.GetPlants(context.Background(), params)\nif err != nil {\n panic(err)\n}\n\nfmt.Print(response)" - }, + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\CreateCustomerRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n\n$input = new Models\\CreateCustomerRequest(\n email: \"email\",\n name: \"name\",\n phoneNumber: \"phone_number\"\n);\n\n$response = $sdk->customers->createCustomer(\n input: $input\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/customers/{customer_id}": { + "get": { + "tags": [ + "Customers" + ], + "operationId": "get_customer_handler", + "parameters": [ { - "lang": "TypeScript", - "source": "import { TestSdk } from 'test-sdk';\n\n(async () => {\n const testSdk = new TestSdk({\n token: 'YOUR_TOKEN',\n });\n\n const { data } = await testSdk.plants.getPlants({\n limit: 8,\n });\n\n console.log(data);\n})();" - }, + "name": "customer_id", + "in": "path", + "description": "Customer Id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ { - "lang": "Python", - "source": "from test_sdk import TestSdk, Environment\n\nsdk = TestSdk(\n access_token=\"YOUR_ACCESS_TOKEN\",\n base_url=Environment.DEFAULT.value,\n timeout=10000\n)\n\nresult = sdk.plants.get_plants(limit=8)\n\nprint(result)" + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->customers->getCustomerHandler(\n customerId: \"customer_id\"\n);\n\nprint_r($response);", + "lang": "PHP" } ] }, - "post": { - "description": "Creates a new plant in the store", + "patch": { + "tags": [ + "Customers" + ], + "operationId": "patch_customer", + "parameters": [ + { + "name": "customer_id", + "in": "path", + "description": "Customer Id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "description": "Plant to add to the store", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewPlant" + "$ref": "#/components/schemas/PatchCustomerRequest" } } }, @@ -88,150 +215,4138 @@ }, "responses": { "200": { - "description": "plant response", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Plant" + "$ref": "#/components/schemas/CustomerResponse" } } } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\PatchCustomerRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n\n$input = new Models\\PatchCustomerRequest(\n name: \"name\",\n phoneNumber: \"phone_number\"\n);\n\n$response = $sdk->customers->patchCustomer(\n input: $input,\n customerId: \"customer_id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/disputes": { + "get": { + "tags": [ + "Disputes" + ], + "operationId": "list_disputes", + "parameters": [ + { + "name": "created_at_gte", + "in": "query", + "description": "Get events after this created time", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } }, - "400": { - "description": "unexpected error", + { + "name": "created_at_lte", + "in": "query", + "description": "Get events created before this time", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page_size", + "in": "query", + "description": "Page size default is 10 max is 100", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "page_number", + "in": "query", + "description": "Page number default is 0", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "dispute_status", + "in": "query", + "description": "Filter by dispute status", + "required": false, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DisputeStatus" + } + ], + "nullable": true + } + }, + { + "name": "dispute_stage", + "in": "query", + "description": "Filter by dispute stage", + "required": false, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DisputeStage" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/GetDisputesListResponse" } } } } }, - "x-codeSamples": [ + "security": [ { - "lang": "Go", - "source": "import (\n \"fmt\"\n \"encoding/json\"\n \"github.com/swagger-api/swagger-petstore/pkg/testsdkconfig\"\n \"github.com/swagger-api/swagger-petstore/pkg/testsdk\"\n \"github.com/swagger-api/swagger-petstore/pkg/plants\"\n)\n\nconfig := testsdkconfig.NewConfig()\nclient := testsdk.NewTestSdk(config)\n\n\nrequest := plants.NewPlant{}\nrequest.SetName(\"Name\")\nrequest.SetId(int64(123))\n\nresponse, err := client.Plants.CreatePlants(context.Background(), request)\nif err != nil {\n panic(err)\n}\n\nfmt.Print(response)" - }, - { - "lang": "TypeScript", - "source": "import { NewPlant, TestSdk } from 'test-sdk';\n\n(async () => {\n const testSdk = new TestSdk({\n token: 'YOUR_TOKEN',\n });\n\n const newPlant: NewPlant = {\n name: 'name',\n tag: 'tag',\n id: 2,\n };\n\n const { data } = await testSdk.plants.createPlants(input);\n\n console.log(data);\n})();" - }, + "API_KEY": [] + } + ], + "x-codeSamples": [ { - "lang": "Python", - "source": "from test_sdk import TestSdk, Environment\nfrom test_sdk.models import NewPlant\n\nsdk = TestSdk(\n access_token=\"YOUR_ACCESS_TOKEN\",\n base_url=Environment.DEFAULT.value,\n timeout=10000\n)\n\nrequest_body = NewPlant(\n name=\"name\",\n tag=\"tag\",\n id_=2\n)\n\nresult = sdk.plants.create_plants(request_body=request_body)\n\nprint(result)" + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$disputeStatus = Models\\DisputeStatus::DisputeOpened;\n$disputeStage = Models\\DisputeStage::PreDispute;\n\n$response = $sdk->disputes->listDisputes(\n createdAtGte: \"created_at_gte\",\n createdAtLte: \"created_at_lte\",\n pageSize: 9,\n pageNumber: 8,\n disputeStatus: $disputeStatus,\n disputeStage: $disputeStage\n);\n\nprint_r($response);", + "lang": "PHP" } ] } }, - "/plants/{id}": { - "delete": { - "description": "Deletes a single plant based on the ID supplied", + "/disputes/{dispute_id}": { + "get": { + "tags": [ + "Disputes" + ], + "operationId": "get_dispute_handler", "parameters": [ { - "name": "id", + "name": "dispute_id", "in": "path", - "description": "ID of plant to delete", + "description": "Dispute Id", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } } ], "responses": { - "204": { - "description": "Plant deleted", - "content": {} - }, - "400": { - "description": "unexpected error", + "200": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/DisputeResponse" } } } } }, + "security": [ + { + "API_KEY": [] + } + ], "x-codeSamples": [ { - "lang": "Go", - "source": "import (\n \"fmt\"\n \"encoding/json\"\n \"github.com/swagger-api/swagger-petstore/pkg/testsdkconfig\"\n \"github.com/swagger-api/swagger-petstore/pkg/testsdk\"\n)\n\nconfig := testsdkconfig.NewConfig()\nclient := testsdk.NewTestSdk(config)\n\nresponse, err := client.Plants.DeletePlantsById(context.Background(), int64(1234))\nif err != nil {\n panic(err)\n}\n\nfmt.Print(response)" - }, + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->disputes->getDisputeHandler(\n disputeId: \"dispute_id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/invoices/payments/{payment_id}": { + "get": { + "tags": [ + "Invoices" + ], + "operationId": "get_payment_invoice_no_auth", + "parameters": [ { - "lang": "TypeScript", - "source": "import { TestSdk } from 'test-sdk';\n\n(async () => {\n const testSdk = new TestSdk({\n token: 'YOUR_TOKEN',\n });\n\n const { data } = await testSdk.plants.deletePlantsById(9);\n\n console.log(data);\n})();" - }, + "name": "payment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "PDF document" + } + }, + "x-codeSamples": [ { - "lang": "Python", - "source": "from test_sdk import TestSdk, Environment\n\nsdk = TestSdk(\n access_token=\"YOUR_ACCESS_TOKEN\",\n base_url=Environment.DEFAULT.value,\n timeout=10000\n)\n\nresult = sdk.plants.delete_plants_by_id(id_=3)\n\nprint(result)" + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->invoices->getPaymentInvoiceNoAuth(\n paymentId: \"payment_id\"\n);\n\nprint_r($response);", + "lang": "PHP" } ] } - } - }, - "components": { - "schemas": { - "Plant": { - "required": [ - "name" + }, + "/license_key_instances": { + "get": { + "tags": [ + "License Keys" ], - "type": "object", - "properties": { - "name": { - "description": "The name of the plant", - "type": "string" + "operationId": "list_license_key_instances", + "parameters": [ + { + "name": "page_size", + "in": "query", + "description": "Page size default is 10 max is 100", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } }, - "tag": { - "description": "Tag to specify the type", - "type": "string" - } - } - }, - "NewPlant": { - "allOf": [ { - "$ref": "#/components/schemas/Plant" + "name": "page_number", + "in": "query", + "description": "Page number default is 0", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } }, { - "required": [ - "id" - ], - "type": "object", - "properties": { - "id": { - "description": "Identification number of the plant", - "type": "integer", - "format": "int64" + "name": "license_key_id", + "in": "query", + "description": "Filter by license key ID", + "required": false, + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ListLicenseKeyInstancesResponse" + } + } } } } - ] - }, - "Error": { - "required": [ - "error", - "message" + }, + "security": [ + { + "API_KEY": [] + } ], - "type": "object", - "properties": { - "error": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->licenseKeys->listLicenseKeyInstances(\n pageSize: 2,\n pageNumber: 3,\n licenseKeyId: \"license_key_id\"\n);\n\nprint_r($response);", + "lang": "PHP" } - } + ] } }, - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer" - } + "/license_key_instances/{id}": { + "get": { + "tags": [ + "License Keys" + ], + "operationId": "get_license_key_instance", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "License key instance ID", + "required": true, + "schema": { + "type": "string" + }, + "example": "lki_123" + } + ], + "responses": { + "200": { + "description": "License key instance found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicenseKeyInstanceResponse" + } + } + } + }, + "404": { + "description": "License key instance not found" + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->licenseKeys->getLicenseKeyInstance(\n id: \"id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + }, + "patch": { + "tags": [ + "License Keys" + ], + "operationId": "update_license_key_instance", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "License key instance ID", + "required": true, + "schema": { + "type": "string" + }, + "example": "lki_123" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchLicenseKeyInstanceRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "License key instance updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicenseKeyInstanceResponse" + } + } + } + }, + "404": { + "description": "License key instance not found" + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\PatchLicenseKeyInstanceRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n\n$input = new Models\\PatchLicenseKeyInstanceRequest(\n name: \"name\"\n);\n\n$response = $sdk->licenseKeys->updateLicenseKeyInstance(\n input: $input,\n id: \"id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/license_keys": { + "get": { + "tags": [ + "License Keys" + ], + "operationId": "list_license_keys", + "parameters": [ + { + "name": "page_size", + "in": "query", + "description": "Page size default is 10 max is 100", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "page_number", + "in": "query", + "description": "Page number default is 0", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "customer_id", + "in": "query", + "description": "Filter by customer ID", + "required": false, + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Filter by license key status", + "required": false, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/LicenseKeyStatus" + } + ], + "nullable": true + } + }, + { + "name": "product_id", + "in": "query", + "description": "Filter by product ID", + "required": false, + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ListLicenseKeysResponse" + } + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$status = Models\\LicenseKeyStatus::Active;\n\n$response = $sdk->licenseKeys->listLicenseKeys(\n pageSize: 6,\n pageNumber: 7,\n customerId: \"customer_id\",\n status: $status,\n productId: \"product_id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/license_keys/{id}": { + "get": { + "tags": [ + "License Keys" + ], + "operationId": "get_license_key_handler", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "License key ID", + "required": true, + "schema": { + "type": "string" + }, + "example": "lic_123" + } + ], + "responses": { + "200": { + "description": "License key found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicenseKeyResponse" + } + } + } + }, + "404": { + "description": "License key not found" + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->licenseKeys->getLicenseKeyHandler(\n id: \"id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + }, + "patch": { + "tags": [ + "License Keys" + ], + "operationId": "update_license_key", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "License key ID", + "required": true, + "schema": { + "type": "string" + }, + "example": "lic_123" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchLicenseKeyRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "License key updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicenseKeyResponse" + } + } + } + }, + "400": { + "description": "Cannot set expiry for subscription-based license" + }, + "404": { + "description": "License key not found" + }, + "422": { + "description": "New activation limit is less than current instances count" + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\PatchLicenseKeyRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n\n$input = new Models\\PatchLicenseKeyRequest(\n activationsLimit: 2,\n disabled: true,\n expiresAt: \"expires_at\"\n);\n\n$response = $sdk->licenseKeys->updateLicenseKey(\n input: $input,\n id: \"id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/licenses/activate": { + "post": { + "tags": [ + "Licenses" + ], + "operationId": "activate_license_key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivateLicenseKeyRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "License key instance created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicenseKeyInstanceResponse" + } + } + } + }, + "403": { + "description": "License key cannot be activated (inactive)" + }, + "404": { + "description": "License key not found" + }, + "422": { + "description": "License key activation limit reached" + } + }, + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\ActivateLicenseKeyRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n\n$input = new Models\\ActivateLicenseKeyRequest(\n licenseKey: \"license_key\",\n name: \"name\"\n);\n\n$response = $sdk->licenses->activateLicenseKey(\n input: $input\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/licenses/deactivate": { + "post": { + "tags": [ + "Licenses" + ], + "operationId": "deactivate_license_key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeactivateLicenseKeyRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "License key instance deactivated successfully" + }, + "403": { + "description": "License key instance not found or does not belong to this license key" + }, + "404": { + "description": "License key not found" + } + }, + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\DeactivateLicenseKeyRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n\n$input = new Models\\DeactivateLicenseKeyRequest(\n licenseKey: \"license_key\",\n licenseKeyInstanceId: \"license_key_instance_id\"\n);\n\n$response = $sdk->licenses->deactivateLicenseKey(\n input: $input\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/licenses/validate": { + "post": { + "tags": [ + "Licenses" + ], + "operationId": "validate_license_key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateLicenseKeyRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "License key validation result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateLicenseKeyResponse" + } + } + } + }, + "422": { + "description": "Invalid request format" + } + }, + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\ValidateLicenseKeyRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n\n$input = new Models\\ValidateLicenseKeyRequest(\n licenseKey: \"2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43\",\n licenseKeyInstanceId: \"lki_123\"\n);\n\n$response = $sdk->licenses->validateLicenseKey(\n input: $input\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/payments": { + "get": { + "tags": [ + "Payments" + ], + "operationId": "list_payments", + "parameters": [ + { + "name": "created_at_gte", + "in": "query", + "description": "Get events after this created time", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "created_at_lte", + "in": "query", + "description": "Get events created before this time", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page_size", + "in": "query", + "description": "Page size default is 10 max is 100", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "page_number", + "in": "query", + "description": "Page number default is 0", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "customer_id", + "in": "query", + "description": "Filter by customer id", + "required": false, + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Filter by status", + "required": false, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/IntentStatus" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPaymentsListResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$status = Models\\IntentStatus::Succeeded;\n\n$response = $sdk->payments->listPayments(\n createdAtGte: \"created_at_gte\",\n createdAtLte: \"created_at_lte\",\n pageSize: 1,\n pageNumber: 3,\n customerId: \"customer_id\",\n status: $status\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + }, + "post": { + "tags": [ + "Payments" + ], + "operationId": "create_one_time_payment_handler", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOneTimePaymentRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "One Time payment successfully initiated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOneTimePaymentResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\BillingAddress;\nuse DodopaymentsSdk\\Models\\CustomerRequest;\nuse DodopaymentsSdk\\Models\\OneTimeProductCartItem;\nuse DodopaymentsSdk\\Models\\CreateOneTimePaymentRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$countryCodeAlpha2 = Models\\CountryCodeAlpha2::Af;\n\n$billingAddress = new Models\\BillingAddress(\n city: \"city\",\n country: $countryCodeAlpha2,\n state: \"state\",\n street: \"street\",\n zipcode: \"zipcode\"\n);\n\nCOMPLEX_MODEL_NOT_IMPLEMENTED\n\n\n$oneTimeProductCartItem = new Models\\OneTimeProductCartItem(\n productId: \"product_id\",\n quantity: 2\n);\n\n$input = new Models\\CreateOneTimePaymentRequest(\n billing: $billingAddress,\n customer: $customerRequest,\n metadata: [],\n paymentLink: true,\n productCart: [],\n returnUrl: \"return_url\"\n);\n\n$response = $sdk->payments->createOneTimePaymentHandler(\n input: $input\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/payments/{payment_id}": { + "get": { + "tags": [ + "Payments" + ], + "operationId": "get_payment_handler", + "parameters": [ + { + "name": "payment_id", + "in": "path", + "description": "Payment Id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->payments->getPaymentHandler(\n paymentId: \"payment_id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/payouts": { + "get": { + "tags": [ + "Payouts" + ], + "operationId": "list_payouts", + "parameters": [ + { + "name": "page_size", + "in": "query", + "description": "Page size default is 10 max is 100", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "page_number", + "in": "query", + "description": "Page number default is 0", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + } + ], + "responses": { + "200": { + "description": "Payouts List", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPayoutsResponseList" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->payouts->listPayouts(\n pageSize: 5,\n pageNumber: 9\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/products": { + "get": { + "tags": [ + "Products" + ], + "operationId": "list_products", + "parameters": [ + { + "name": "page_size", + "in": "query", + "description": "Page size default is 10 max is 100", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "page_number", + "in": "query", + "description": "Page number default is 0", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + } + ], + "responses": { + "200": { + "description": "Products List", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetProductsListResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->products->listProducts(\n pageSize: 8,\n pageNumber: 4\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + }, + "post": { + "tags": [ + "Products" + ], + "operationId": "create_product", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProductRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Product Created Succesfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetProductResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\LicenseKeyDuration;\nuse DodopaymentsSdk\\Models\\Price;\nuse DodopaymentsSdk\\Models\\TaxCategory;\nuse DodopaymentsSdk\\Models\\CreateProductRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\nCOMPLEX_MODEL_NOT_IMPLEMENTED\n\n$taxCategory = Models\\TaxCategory::DigitalProducts;\n\n$input = new Models\\CreateProductRequest(\n description: \"description\",\n licenseKeyActivationMessage: \"license_key_activation_message\",\n licenseKeyActivationsLimit: 10,\n licenseKeyDuration: $licenseKeyDuration,\n licenseKeyEnabled: true,\n name: \"name\",\n price: $price,\n taxCategory: $taxCategory\n);\n\n$response = $sdk->products->createProduct(\n input: $input\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/products/{id}": { + "get": { + "tags": [ + "Products" + ], + "operationId": "get_product_handler", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Product Id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Product Details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetProductResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->products->getProductHandler(\n id: \"id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + }, + "delete": { + "tags": [ + "Products" + ], + "operationId": "delete_product", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Product Delected Succesfully" + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->products->deleteProduct(\n id: \"id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + }, + "patch": { + "tags": [ + "Products" + ], + "operationId": "patch_product", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchProductRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Product Updated Succesfully" + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\LicenseKeyDuration;\nuse DodopaymentsSdk\\Models\\Price;\nuse DodopaymentsSdk\\Models\\TaxCategory;\nuse DodopaymentsSdk\\Models\\PatchProductRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n\n$input = new Models\\PatchProductRequest(\n description: \"description\",\n licenseKeyActivationMessage: \"license_key_activation_message\",\n licenseKeyActivationsLimit: 4,\n licenseKeyDuration: $licenseKeyDuration,\n licenseKeyEnabled: true,\n name: \"name\",\n price: $price,\n taxCategory: $taxCategory\n);\n\n$response = $sdk->products->patchProduct(\n input: $input,\n id: \"id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/products/{id}/images": { + "put": { + "tags": [ + "Products" + ], + "operationId": "update_product_image", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Product Id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Aws s3 presigned URL. Upload image to this URL withing 60s", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateProductImageResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->products->updateProductImage(\n id: \"id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/refunds": { + "get": { + "tags": [ + "Refunds" + ], + "operationId": "list_refunds", + "parameters": [ + { + "name": "created_at_gte", + "in": "query", + "description": "Get events after this created time", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "created_at_lte", + "in": "query", + "description": "Get events created before this time", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page_size", + "in": "query", + "description": "Page size default is 10 max is 100", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "page_number", + "in": "query", + "description": "Page number default is 0", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "status", + "in": "query", + "description": "Filter by status", + "required": false, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/RefundStatus" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRefundsListResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$status = Models\\RefundStatus::Succeeded;\n\n$response = $sdk->refunds->listRefunds(\n createdAtGte: \"created_at_gte\",\n createdAtLte: \"created_at_lte\",\n pageSize: 10,\n pageNumber: 8,\n status: $status\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + }, + "post": { + "tags": [ + "Refunds" + ], + "operationId": "create_refund", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRefundRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Refund successfully initiated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefundResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\CreateRefundRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n\n$input = new Models\\CreateRefundRequest(\n amount: 7,\n paymentId: \"payment_id\",\n reason: \"reason\"\n);\n\n$response = $sdk->refunds->createRefund(\n input: $input\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/refunds/{refund_id}": { + "get": { + "tags": [ + "Refunds" + ], + "operationId": "get_refund_handler", + "parameters": [ + { + "name": "refund_id", + "in": "path", + "description": "Refund Id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefundResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->refunds->getRefundHandler(\n refundId: \"refund_id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/subscriptions": { + "get": { + "tags": [ + "Subscriptions" + ], + "operationId": "list_subscriptions", + "parameters": [ + { + "name": "created_at_gte", + "in": "query", + "description": "Get events after this created time", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "created_at_lte", + "in": "query", + "description": "Get events created before this time", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page_size", + "in": "query", + "description": "Page size default is 10 max is 100", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "page_number", + "in": "query", + "description": "Page number default is 0", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "customer_id", + "in": "query", + "description": "Filter by customer id", + "required": false, + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Filter by status", + "required": false, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionStatus" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionsListResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$status = Models\\SubscriptionStatus::Pending;\n\n$response = $sdk->subscriptions->listSubscriptions(\n createdAtGte: \"created_at_gte\",\n createdAtLte: \"created_at_lte\",\n pageSize: 1,\n pageNumber: 1,\n customerId: \"customer_id\",\n status: $status\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + }, + "post": { + "tags": [ + "Subscriptions" + ], + "operationId": "create_subscription_handler", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Subscription successfully initiated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\BillingAddress;\nuse DodopaymentsSdk\\Models\\CustomerRequest;\nuse DodopaymentsSdk\\Models\\CreateSubscriptionRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$countryCodeAlpha2 = Models\\CountryCodeAlpha2::Af;\n\n$billingAddress = new Models\\BillingAddress(\n city: \"city\",\n country: $countryCodeAlpha2,\n state: \"state\",\n street: \"street\",\n zipcode: \"zipcode\"\n);\n\nCOMPLEX_MODEL_NOT_IMPLEMENTED\n\n$input = new Models\\CreateSubscriptionRequest(\n billing: $billingAddress,\n customer: $customerRequest,\n metadata: [],\n paymentLink: true,\n productId: \"product_id\",\n quantity: 4,\n returnUrl: \"return_url\",\n trialPeriodDays: 6\n);\n\n$response = $sdk->subscriptions->createSubscriptionHandler(\n input: $input\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/subscriptions/{subscription_id}": { + "get": { + "tags": [ + "Subscriptions" + ], + "operationId": "get_subscription_handler", + "parameters": [ + { + "name": "subscription_id", + "in": "path", + "description": "Subscription Id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->subscriptions->getSubscriptionHandler(\n subscriptionId: \"subscription_id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + }, + "patch": { + "tags": [ + "Subscriptions" + ], + "operationId": "patch_subscription", + "parameters": [ + { + "name": "subscription_id", + "in": "path", + "description": "Subscription Id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchSubscriptionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Subscription successfully updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\nuse DodopaymentsSdk\\Models\\SubscriptionStatus;\nuse DodopaymentsSdk\\Models\\PatchSubscriptionRequest;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n\n$input = new Models\\PatchSubscriptionRequest(\n metadata: [],\n status: $subscriptionStatus\n);\n\n$response = $sdk->subscriptions->patchSubscription(\n input: $input,\n subscriptionId: \"subscription_id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/webhook_events": { + "get": { + "tags": [ + "Webhook Events" + ], + "operationId": "list_webhook_events", + "parameters": [ + { + "name": "created_at_gte", + "in": "query", + "description": "Get events after this created time", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "created_at_lte", + "in": "query", + "description": "Get events created before this time", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "limit", + "in": "query", + "description": "Min : 1, Max : 100, default 10", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "object_id", + "in": "query", + "description": "Get events history of a specific object like payment/subscription/refund/dispute", + "required": false, + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page_size", + "in": "query", + "description": "Page size default is 10 max is 100", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + }, + { + "name": "page_number", + "in": "query", + "description": "Page number default is 0", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0 + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListWebhookEventsResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->webhookEvents->listWebhookEvents(\n createdAtGte: \"created_at_gte\",\n createdAtLte: \"created_at_lte\",\n limit: 8,\n objectId: \"object_id\",\n pageSize: 4,\n pageNumber: 123\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/webhook_events/{webhook_event_id}": { + "get": { + "tags": [ + "Webhook Events" + ], + "operationId": "get_webhook_event", + "parameters": [ + { + "name": "webhook_event_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookEventLogResponse" + } + } + } + } + }, + "security": [ + { + "API_KEY": [] + } + ], + "x-codeSamples": [ + { + "source": "use DodopaymentsSdk\\Client;\n\n$sdk = new Client(accessToken: 'YOUR_TOKEN');\n\n$response = $sdk->webhookEvents->getWebhookEvent(\n webhookEventId: \"webhook_event_id\"\n);\n\nprint_r($response);", + "lang": "PHP" + } + ] + } + }, + "/your-webhook-url": { + "post": { + "tags": [ + "Outgoing Webhooks" + ], + "operationId": "dummy_handler_for_outgoing_webhook_docs", + "parameters": [ + { + "name": "webhook-id", + "in": "header", + "description": "Unique identifier for the webhook", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "webhook-signature", + "in": "header", + "description": "Signature of the Webhook", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "webhook-timestamp", + "in": "header", + "description": "Unix timestamp when the webhook was sent", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OutgoingWebhook" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Webhook processed successfully" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Invalid webhook signature" + } + } + } + } + }, + "components": { + "schemas": { + "ActivateLicenseKeyRequest": { + "type": "object", + "required": [ + "name", + "license_key" + ], + "properties": { + "license_key": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "AttachExistingCustomer": { + "title": "Attach Existing Customer", + "type": "object", + "required": [ + "customer_id" + ], + "properties": { + "customer_id": { + "type": "string" + } + } + }, + "BillingAddress": { + "type": "object", + "required": [ + "country", + "state", + "city", + "street", + "zipcode" + ], + "properties": { + "city": { + "type": "string", + "description": "City name" + }, + "country": { + "$ref": "#/components/schemas/CountryCodeAlpha2" + }, + "state": { + "type": "string", + "description": "State or province name" + }, + "street": { + "type": "string", + "description": "Street address including house number and unit/apartment if applicable" + }, + "zipcode": { + "type": "string", + "description": "Postal code or ZIP code" + } + } + }, + "CountryCodeAlpha2": { + "type": "string", + "description": "ISO country code alpha2 variant", + "enum": [ + "AF", + "AX", + "AL", + "DZ", + "AS", + "AD", + "AO", + "AI", + "AQ", + "AG", + "AR", + "AM", + "AW", + "AU", + "AT", + "AZ", + "BS", + "BH", + "BD", + "BB", + "BY", + "BE", + "BZ", + "BJ", + "BM", + "BT", + "BO", + "BQ", + "BA", + "BW", + "BV", + "BR", + "IO", + "BN", + "BG", + "BF", + "BI", + "KH", + "CM", + "CA", + "CV", + "KY", + "CF", + "TD", + "CL", + "CN", + "CX", + "CC", + "CO", + "KM", + "CG", + "CD", + "CK", + "CR", + "CI", + "HR", + "CU", + "CW", + "CY", + "CZ", + "DK", + "DJ", + "DM", + "DO", + "EC", + "EG", + "SV", + "GQ", + "ER", + "EE", + "ET", + "FK", + "FO", + "FJ", + "FI", + "FR", + "GF", + "PF", + "TF", + "GA", + "GM", + "GE", + "DE", + "GH", + "GI", + "GR", + "GL", + "GD", + "GP", + "GU", + "GT", + "GG", + "GN", + "GW", + "GY", + "HT", + "HM", + "VA", + "HN", + "HK", + "HU", + "IS", + "IN", + "ID", + "IR", + "IQ", + "IE", + "IM", + "IL", + "IT", + "JM", + "JP", + "JE", + "JO", + "KZ", + "KE", + "KI", + "KP", + "KR", + "KW", + "KG", + "LA", + "LV", + "LB", + "LS", + "LR", + "LY", + "LI", + "LT", + "LU", + "MO", + "MK", + "MG", + "MW", + "MY", + "MV", + "ML", + "MT", + "MH", + "MQ", + "MR", + "MU", + "YT", + "MX", + "FM", + "MD", + "MC", + "MN", + "ME", + "MS", + "MA", + "MZ", + "MM", + "NA", + "NR", + "NP", + "NL", + "NC", + "NZ", + "NI", + "NE", + "NG", + "NU", + "NF", + "MP", + "NO", + "OM", + "PK", + "PW", + "PS", + "PA", + "PG", + "PY", + "PE", + "PH", + "PN", + "PL", + "PT", + "PR", + "QA", + "RE", + "RO", + "RU", + "RW", + "BL", + "SH", + "KN", + "LC", + "MF", + "PM", + "VC", + "WS", + "SM", + "ST", + "SA", + "SN", + "RS", + "SC", + "SL", + "SG", + "SX", + "SK", + "SI", + "SB", + "SO", + "ZA", + "GS", + "SS", + "ES", + "LK", + "SD", + "SR", + "SJ", + "SZ", + "SE", + "CH", + "SY", + "TW", + "TJ", + "TZ", + "TH", + "TL", + "TG", + "TK", + "TO", + "TT", + "TN", + "TR", + "TM", + "TC", + "TV", + "UG", + "UA", + "AE", + "GB", + "UM", + "US", + "UY", + "UZ", + "VU", + "VE", + "VN", + "VG", + "VI", + "WF", + "EH", + "YE", + "ZM", + "ZW" + ] + }, + "CreateCustomerRequest": { + "type": "object", + "required": [ + "name", + "email" + ], + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "phone_number": { + "type": "string", + "nullable": true + } + } + }, + "CreateNewCustomer": { + "title": "Create New Customer", + "type": "object", + "required": [ + "name", + "email" + ], + "properties": { + "create_new_customer": { + "type": "boolean", + "description": "When true, the most recently created customer object with the given email is used if exists.\nFalse by default" + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "phone_number": { + "type": "string", + "nullable": true + } + } + }, + "CreateOneTimePaymentRequest": { + "type": "object", + "required": [ + "product_cart", + "customer", + "billing" + ], + "properties": { + "billing": { + "$ref": "#/components/schemas/BillingAddress" + }, + "customer": { + "$ref": "#/components/schemas/CustomerRequest" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "payment_link": { + "type": "boolean", + "description": "Whether to generate a payment link. Defaults to false if not specified.", + "nullable": true + }, + "product_cart": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OneTimeProductCartItem" + }, + "description": "List of products in the cart. Must contain at least 1 and at most 100 items." + }, + "return_url": { + "type": "string", + "description": "Optional URL to redirect the customer after payment.\nMust be a valid URL if provided.", + "nullable": true + } + } + }, + "CreateOneTimePaymentResponse": { + "type": "object", + "required": [ + "payment_id", + "total_amount", + "client_secret", + "customer", + "metadata" + ], + "properties": { + "client_secret": { + "type": "string", + "description": "Client secret used to load Dodo checkout SDK\nNOTE : Dodo checkout SDK will be coming soon" + }, + "customer": { + "$ref": "#/components/schemas/CustomerLimitedDetailsResponse" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "payment_id": { + "type": "string", + "description": "Unique identifier for the payment" + }, + "payment_link": { + "type": "string", + "description": "Optional URL to a hosted payment page", + "nullable": true + }, + "product_cart": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OneTimeProductCartItem" + }, + "description": "Optional list of products included in the payment", + "nullable": true + }, + "total_amount": { + "type": "integer", + "format": "int32", + "description": "Total amount of the payment in smallest currency unit (e.g. cents)", + "minimum": 0 + } + } + }, + "CreateProductRequest": { + "type": "object", + "required": [ + "tax_category", + "price" + ], + "properties": { + "description": { + "type": "string", + "description": "Optional description of the product", + "nullable": true + }, + "license_key_activation_message": { + "type": "string", + "description": "Optional message displayed during license key activation", + "nullable": true + }, + "license_key_activations_limit": { + "type": "integer", + "format": "int32", + "description": "The number of times the license key can be activated.\nMust be 0 or greater", + "nullable": true + }, + "license_key_duration": { + "allOf": [ + { + "$ref": "#/components/schemas/LicenseKeyDuration" + } + ], + "nullable": true + }, + "license_key_enabled": { + "type": "boolean", + "description": "When true, generates and sends a license key to your customer.\nDefaults to false", + "nullable": true + }, + "name": { + "type": "string", + "description": "Optional name of the product", + "nullable": true + }, + "price": { + "$ref": "#/components/schemas/Price" + }, + "tax_category": { + "$ref": "#/components/schemas/TaxCategory" + } + } + }, + "CreateRefundRequest": { + "type": "object", + "required": [ + "payment_id" + ], + "properties": { + "amount": { + "type": "integer", + "format": "int32", + "description": "The amount to be refunded. Must be non-negative. Optional.\nPartial refunds are currently disabled.", + "nullable": true + }, + "payment_id": { + "type": "string", + "description": "The unique identifier of the payment to be refunded." + }, + "reason": { + "type": "string", + "description": "The reason for the refund, if any. Maximum length is 3000 characters. Optional.", + "nullable": true + } + } + }, + "CreateSubscriptionRequest": { + "type": "object", + "description": "Request payload for creating a new subscription\n\nThis struct represents the data required to create a new subscription in the system.\nIt includes details about the product, quantity, customer information, and billing details.", + "required": [ + "product_id", + "quantity", + "customer", + "billing" + ], + "properties": { + "billing": { + "$ref": "#/components/schemas/BillingAddress" + }, + "customer": { + "$ref": "#/components/schemas/CustomerRequest" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "payment_link": { + "type": "boolean", + "description": "If true, generates a payment link.\nDefaults to false if not specified.", + "nullable": true + }, + "product_id": { + "type": "string", + "description": "Unique identifier of the product to subscribe to" + }, + "quantity": { + "type": "integer", + "format": "int32", + "description": "Number of units to subscribe for. Must be at least 1.", + "minimum": 0 + }, + "return_url": { + "type": "string", + "description": "Optional URL to redirect after successful subscription creation", + "nullable": true + }, + "trial_period_days": { + "type": "integer", + "format": "int32", + "description": "Optional trial period in days\nIf specified, this value overrides the trial period set in the product's price\nMust be between 0 and 10000 days", + "nullable": true + } + } + }, + "CreateSubscriptionResponse": { + "type": "object", + "required": [ + "subscription_id", + "recurring_pre_tax_amount", + "customer", + "metadata" + ], + "properties": { + "client_secret": { + "type": "string", + "description": "Client secret used to load Dodo checkout SDK\nNOTE : Dodo checkout SDK will be coming soon", + "nullable": true + }, + "customer": { + "$ref": "#/components/schemas/CustomerLimitedDetailsResponse" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "payment_link": { + "type": "string", + "description": "URL to checkout page", + "nullable": true + }, + "recurring_pre_tax_amount": { + "type": "integer", + "format": "int32", + "description": "Tax will be added to the amount and charged to the customer on each billing cycle", + "minimum": 0 + }, + "subscription_id": { + "type": "string", + "description": "Unique identifier for the subscription" + } + } + }, + "Currency": { + "type": "string", + "enum": [ + "AED", + "ALL", + "AMD", + "ANG", + "AOA", + "ARS", + "AUD", + "AWG", + "AZN", + "BAM", + "BBD", + "BDT", + "BGN", + "BHD", + "BIF", + "BMD", + "BND", + "BOB", + "BRL", + "BSD", + "BWP", + "BYN", + "BZD", + "CAD", + "CHF", + "CLP", + "CNY", + "COP", + "CRC", + "CUP", + "CVE", + "CZK", + "DJF", + "DKK", + "DOP", + "DZD", + "EGP", + "ETB", + "EUR", + "FJD", + "FKP", + "GBP", + "GEL", + "GHS", + "GIP", + "GMD", + "GNF", + "GTQ", + "GYD", + "HKD", + "HNL", + "HRK", + "HTG", + "HUF", + "IDR", + "ILS", + "INR", + "IQD", + "JMD", + "JOD", + "JPY", + "KES", + "KGS", + "KHR", + "KMF", + "KRW", + "KWD", + "KYD", + "KZT", + "LAK", + "LBP", + "LKR", + "LRD", + "LSL", + "LYD", + "MAD", + "MDL", + "MGA", + "MKD", + "MMK", + "MNT", + "MOP", + "MRU", + "MUR", + "MVR", + "MWK", + "MXN", + "MYR", + "MZN", + "NAD", + "NGN", + "NIO", + "NOK", + "NPR", + "NZD", + "OMR", + "PAB", + "PEN", + "PGK", + "PHP", + "PKR", + "PLN", + "PYG", + "QAR", + "RON", + "RSD", + "RUB", + "RWF", + "SAR", + "SBD", + "SCR", + "SEK", + "SGD", + "SHP", + "SLE", + "SLL", + "SOS", + "SRD", + "SSP", + "STN", + "SVC", + "SZL", + "THB", + "TND", + "TOP", + "TRY", + "TTD", + "TWD", + "TZS", + "UAH", + "UGX", + "USD", + "UYU", + "UZS", + "VES", + "VND", + "VUV", + "WST", + "XAF", + "XCD", + "XOF", + "XPF", + "YER", + "ZAR", + "ZMW" + ] + }, + "CustomerLimitedDetailsResponse": { + "type": "object", + "required": [ + "customer_id", + "name", + "email" + ], + "properties": { + "customer_id": { + "type": "string", + "description": "Unique identifier for the customer" + }, + "email": { + "type": "string", + "description": "Email address of the customer" + }, + "name": { + "type": "string", + "description": "Full name of the customer" + } + } + }, + "CustomerRequest": { + "oneOf": [ + { + "$ref": "#/components/schemas/AttachExistingCustomer" + }, + { + "$ref": "#/components/schemas/CreateNewCustomer" + } + ] + }, + "CustomerResponse": { + "type": "object", + "required": [ + "customer_id", + "business_id", + "name", + "email", + "created_at" + ], + "properties": { + "business_id": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "customer_id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "phone_number": { + "type": "string", + "nullable": true + } + } + }, + "DeactivateLicenseKeyRequest": { + "type": "object", + "required": [ + "license_key", + "license_key_instance_id" + ], + "properties": { + "license_key": { + "type": "string" + }, + "license_key_instance_id": { + "type": "string" + } + } + }, + "DisputeResponse": { + "type": "object", + "required": [ + "dispute_id", + "payment_id", + "business_id", + "amount", + "currency", + "dispute_status", + "dispute_stage", + "created_at" + ], + "properties": { + "amount": { + "type": "string", + "description": "The amount involved in the dispute, represented as a string to accommodate precision." + }, + "business_id": { + "type": "string", + "description": "The unique identifier of the business involved in the dispute." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The timestamp of when the dispute was created, in UTC." + }, + "currency": { + "type": "string", + "description": "The currency of the disputed amount, represented as an ISO 4217 currency code." + }, + "dispute_id": { + "type": "string", + "description": "The unique identifier of the dispute." + }, + "dispute_stage": { + "$ref": "#/components/schemas/DisputeStage" + }, + "dispute_status": { + "$ref": "#/components/schemas/DisputeStatus" + }, + "payment_id": { + "type": "string", + "description": "The unique identifier of the payment associated with the dispute." + } + } + }, + "DisputeStage": { + "type": "string", + "enum": [ + "pre_dispute", + "dispute", + "pre_arbitration" + ] + }, + "DisputeStatus": { + "type": "string", + "enum": [ + "dispute_opened", + "dispute_expired", + "dispute_accepted", + "dispute_cancelled", + "dispute_challenged", + "dispute_won", + "dispute_lost" + ] + }, + "EventType": { + "type": "string", + "description": "Event types for Dodo events", + "enum": [ + "payment.succeeded", + "payment.failed", + "payment.processing", + "payment.cancelled", + "refund.succeeded", + "refund.failed", + "dispute.opened", + "dispute.expired", + "dispute.accepted", + "dispute.cancelled", + "dispute.challenged", + "dispute.won", + "dispute.lost", + "subscription.active", + "subscription.renewed", + "subscription.on_hold", + "subscription.paused", + "subscription.cancelled", + "subscription.failed", + "subscription.expired", + "license_key.created" + ] + }, + "GetCustomersListResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomerResponse" + } + } + } + }, + "GetDisputesListResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DisputeResponse" + } + } + } + }, + "GetPaymentsListResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetPaymentsListResponseItem" + } + } + } + }, + "GetPaymentsListResponseItem": { + "type": "object", + "required": [ + "payment_id", + "total_amount", + "currency", + "customer", + "created_at", + "metadata" + ], + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "customer": { + "$ref": "#/components/schemas/CustomerLimitedDetailsResponse" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "payment_id": { + "type": "string" + }, + "payment_method": { + "type": "string", + "nullable": true + }, + "payment_method_type": { + "type": "string", + "nullable": true + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/IntentStatus" + } + ], + "nullable": true + }, + "subscription_id": { + "type": "string", + "nullable": true + }, + "total_amount": { + "type": "integer", + "format": "int32" + } + } + }, + "GetPayoutsResponseList": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayoutsResponse" + } + } + } + }, + "GetProductResponse": { + "type": "object", + "required": [ + "product_id", + "business_id", + "created_at", + "updated_at", + "is_recurring", + "tax_category", + "price", + "license_key_enabled" + ], + "properties": { + "business_id": { + "type": "string", + "description": "Unique identifier for the business to which the product belongs." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the product was created." + }, + "description": { + "type": "string", + "description": "Description of the product, optional.", + "nullable": true + }, + "image": { + "type": "string", + "description": "URL of the product image, optional.", + "nullable": true + }, + "is_recurring": { + "type": "boolean", + "description": "Indicates if the product is recurring (e.g., subscriptions)." + }, + "license_key_activation_message": { + "type": "string", + "description": "Message sent upon license key activation, if applicable.", + "nullable": true + }, + "license_key_activations_limit": { + "type": "integer", + "format": "int32", + "description": "Limit on the number of activations for the license key, if enabled.", + "nullable": true + }, + "license_key_duration": { + "allOf": [ + { + "$ref": "#/components/schemas/LicenseKeyDuration" + } + ], + "nullable": true + }, + "license_key_enabled": { + "type": "boolean", + "description": "Indicates whether the product requires a license key." + }, + "name": { + "type": "string", + "description": "Name of the product, optional.", + "nullable": true + }, + "price": { + "$ref": "#/components/schemas/Price" + }, + "product_id": { + "type": "string", + "description": "Unique identifier for the product." + }, + "tax_category": { + "$ref": "#/components/schemas/TaxCategory" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the product was last updated." + } + } + }, + "GetProductsListResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetProductsListResponseItem" + } + } + } + }, + "GetProductsListResponseItem": { + "type": "object", + "required": [ + "product_id", + "business_id", + "created_at", + "updated_at", + "is_recurring", + "tax_category" + ], + "properties": { + "business_id": { + "type": "string", + "description": "Unique identifier for the business to which the product belongs." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the product was created." + }, + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ], + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of the product, optional.", + "nullable": true + }, + "image": { + "type": "string", + "description": "URL of the product image, optional.", + "nullable": true + }, + "is_recurring": { + "type": "boolean", + "description": "Indicates if the product is recurring (e.g., subscriptions)." + }, + "name": { + "type": "string", + "description": "Name of the product, optional.", + "nullable": true + }, + "price": { + "type": "integer", + "format": "int32", + "description": "Price of the product, optional.\n\nThe price is represented in the lowest denomination of the currency.\nFor example:\n- In USD, a price of `$12.34` would be represented as `1234` (cents).\n- In JPY, a price of `¥1500` would be represented as `1500` (yen).\n- In INR, a price of `₹1234.56` would be represented as `123456` (paise).\n\nThis ensures precision and avoids floating-point rounding errors.", + "nullable": true + }, + "product_id": { + "type": "string", + "description": "Unique identifier for the product." + }, + "tax_category": { + "$ref": "#/components/schemas/TaxCategory" + }, + "tax_inclusive": { + "type": "boolean", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the product was last updated." + } + } + }, + "GetRefundsListResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RefundResponse" + } + } + } + }, + "GetSubscriptionsListResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriptionResponse" + } + } + } + }, + "IntentStatus": { + "type": "string", + "enum": [ + "succeeded", + "failed", + "cancelled", + "processing", + "requires_customer_action", + "requires_merchant_action", + "requires_payment_method", + "requires_confirmation", + "requires_capture", + "partially_captured", + "partially_captured_and_capturable" + ] + }, + "LicenseKeyDuration": { + "type": "object", + "required": [ + "count", + "interval" + ], + "properties": { + "count": { + "type": "integer", + "format": "int32" + }, + "interval": { + "$ref": "#/components/schemas/TimeInterval" + } + } + }, + "LicenseKeyInstanceResponse": { + "type": "object", + "required": [ + "id", + "business_id", + "name", + "license_key_id", + "created_at" + ], + "properties": { + "business_id": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2024-01-01T00:00:00Z" + }, + "id": { + "type": "string", + "example": "lki_123" + }, + "license_key_id": { + "type": "string", + "example": "lic_123" + }, + "name": { + "type": "string", + "example": "Production Server 1" + } + } + }, + "LicenseKeyResponse": { + "type": "object", + "required": [ + "id", + "business_id", + "key", + "status", + "customer_id", + "product_id", + "payment_id", + "instances_count", + "created_at" + ], + "properties": { + "activations_limit": { + "type": "integer", + "format": "int32", + "description": "The maximum number of activations allowed for this license key.", + "example": 5, + "nullable": true + }, + "business_id": { + "type": "string", + "description": "The unique identifier of the business associated with the license key." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The timestamp indicating when the license key was created, in UTC.", + "example": "2024-01-01T00:00:00Z" + }, + "customer_id": { + "type": "string", + "description": "The unique identifier of the customer associated with the license key.", + "example": "cus_123" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "The timestamp indicating when the license key expires, in UTC.", + "example": "2024-12-31T23:59:59Z", + "nullable": true + }, + "id": { + "type": "string", + "description": "The unique identifier of the license key.", + "example": "lic_123" + }, + "instances_count": { + "type": "integer", + "format": "int32", + "description": "The current number of instances activated for this license key." + }, + "key": { + "type": "string", + "description": "The license key string." + }, + "payment_id": { + "type": "string", + "description": "The unique identifier of the payment associated with the license key." + }, + "product_id": { + "type": "string", + "description": "The unique identifier of the product associated with the license key." + }, + "status": { + "$ref": "#/components/schemas/LicenseKeyStatus" + }, + "subscription_id": { + "type": "string", + "description": "The unique identifier of the subscription associated with the license key, if any.", + "nullable": true + } + } + }, + "LicenseKeyStatus": { + "type": "string", + "enum": [ + "active", + "expired", + "disabled" + ] + }, + "ListLicenseKeyInstancesResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LicenseKeyInstanceResponse" + } + } + } + }, + "ListLicenseKeysResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LicenseKeyResponse" + } + } + } + }, + "ListWebhookEventsResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookEventLogResponse" + } + } + } + }, + "Metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "OneTimePrice": { + "type": "object", + "required": [ + "price", + "currency", + "discount", + "purchasing_power_parity" + ], + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "discount": { + "type": "number", + "format": "float", + "description": "Discount applied to the price, represented as a percentage (0 to 100)." + }, + "price": { + "type": "integer", + "format": "int32", + "description": "The payment amount. Represented in the lowest denomination of the currency (e.g., cents for USD).\nFor example, to charge $1.00, pass `100`." + }, + "purchasing_power_parity": { + "type": "boolean", + "description": "Indicates if purchasing power parity adjustments are applied to the price.\nPurchasing power parity feature is not available as of now" + }, + "tax_inclusive": { + "type": "boolean", + "description": "Indicates if the price is tax inclusive", + "nullable": true + } + } + }, + "OneTimeProductCartItem": { + "type": "object", + "required": [ + "product_id", + "quantity" + ], + "properties": { + "product_id": { + "type": "string" + }, + "quantity": { + "type": "integer", + "format": "int32", + "minimum": 0 + } + } + }, + "OutgoingWebhook": { + "type": "object", + "required": [ + "business_id", + "type", + "timestamp", + "data" + ], + "properties": { + "business_id": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/OutgoingWebhookData" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The timestamp of when the event occurred (not necessarily the same of when it was delivered)" + }, + "type": { + "$ref": "#/components/schemas/EventType" + } + } + }, + "OutgoingWebhookData": { + "oneOf": [ + { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentResponse" + }, + { + "type": "object", + "required": [ + "payload_type" + ], + "properties": { + "payload_type": { + "type": "string", + "enum": [ + "Payment" + ] + } + } + } + ], + "title": "Payment" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionResponse" + }, + { + "type": "object", + "required": [ + "payload_type" + ], + "properties": { + "payload_type": { + "type": "string", + "enum": [ + "Subscription" + ] + } + } + } + ], + "title": "Subscription" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/RefundResponse" + }, + { + "type": "object", + "required": [ + "payload_type" + ], + "properties": { + "payload_type": { + "type": "string", + "enum": [ + "Refund" + ] + } + } + } + ], + "title": "Refund" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/DisputeResponse" + }, + { + "type": "object", + "required": [ + "payload_type" + ], + "properties": { + "payload_type": { + "type": "string", + "enum": [ + "Dispute" + ] + } + } + } + ], + "title": "Dispute" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/LicenseKeyResponse" + }, + { + "type": "object", + "required": [ + "payload_type" + ], + "properties": { + "payload_type": { + "type": "string", + "enum": [ + "LicenseKey" + ] + } + } + } + ], + "title": "License Key" + } + ], + "discriminator": { + "propertyName": "payload_type" + } + }, + "PatchCustomerRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "phone_number": { + "type": "string", + "nullable": true + } + } + }, + "PatchLicenseKeyInstanceRequest": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "PatchLicenseKeyRequest": { + "type": "object", + "properties": { + "activations_limit": { + "type": "integer", + "format": "int32", + "description": "The updated activation limit for the license key.\nUse `null` to remove the limit, or omit this field to leave it unchanged.", + "nullable": true + }, + "disabled": { + "type": "boolean", + "description": "Indicates whether the license key should be disabled.\nA value of `true` disables the key, while `false` enables it. Omit this field to leave it unchanged.", + "nullable": true + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "The updated expiration timestamp for the license key in UTC.\nUse `null` to remove the expiration date, or omit this field to leave it unchanged.", + "nullable": true + } + } + }, + "PatchProductRequest": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the product, optional and must be at most 1000 characters.", + "nullable": true + }, + "license_key_activation_message": { + "type": "string", + "description": "Message sent to the customer upon license key activation.\n\nOnly applicable if `license_key_enabled` is `true`. This message contains instructions for\nactivating the license key.", + "nullable": true + }, + "license_key_activations_limit": { + "type": "integer", + "format": "int32", + "description": "Limit for the number of activations for the license key.\n\nOnly applicable if `license_key_enabled` is `true`. Represents the maximum number of times\nthe license key can be activated.", + "nullable": true + }, + "license_key_duration": { + "allOf": [ + { + "$ref": "#/components/schemas/LicenseKeyDuration" + } + ], + "nullable": true + }, + "license_key_enabled": { + "type": "boolean", + "description": "Whether the product requires a license key.\n\nIf `true`, additional fields related to license key (duration, activations limit, activation message)\nbecome applicable.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the product, optional and must be at most 100 characters.", + "nullable": true + }, + "price": { + "allOf": [ + { + "$ref": "#/components/schemas/Price" + } + ], + "nullable": true + }, + "tax_category": { + "allOf": [ + { + "$ref": "#/components/schemas/TaxCategory" + } + ], + "nullable": true + } + } + }, + "PatchSubscriptionRequest": { + "type": "object", + "properties": { + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/Metadata" + } + ], + "nullable": true + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionStatus" + } + ], + "nullable": true + } + } + }, + "PaymentResponse": { + "type": "object", + "required": [ + "payment_id", + "business_id", + "total_amount", + "currency", + "created_at", + "disputes", + "refunds", + "customer", + "metadata" + ], + "properties": { + "business_id": { + "type": "string", + "description": "Identifier of the business associated with the payment" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the payment was created" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "customer": { + "$ref": "#/components/schemas/CustomerLimitedDetailsResponse" + }, + "disputes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DisputeResponse" + }, + "description": "List of disputes associated with this payment" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "payment_id": { + "type": "string", + "description": "Unique identifier for the payment" + }, + "payment_link": { + "type": "string", + "description": "Checkout URL", + "nullable": true + }, + "payment_method": { + "type": "string", + "description": "Payment method used by customer (e.g. \"card\", \"bank_transfer\")", + "nullable": true + }, + "payment_method_type": { + "type": "string", + "description": "Specific type of payment method (e.g. \"visa\", \"mastercard\")", + "nullable": true + }, + "product_cart": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OneTimeProductCartItem" + }, + "description": "List of products purchased in a one-time payment", + "nullable": true + }, + "refunds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RefundResponse" + }, + "description": "List of refunds issued for this payment" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/IntentStatus" + } + ], + "nullable": true + }, + "subscription_id": { + "type": "string", + "description": "Identifier of the subscription if payment is part of a subscription", + "nullable": true + }, + "tax": { + "type": "integer", + "format": "int32", + "description": "Amount of tax collected in smallest currency unit (e.g. cents)", + "nullable": true + }, + "total_amount": { + "type": "integer", + "format": "int32", + "description": "Total amount charged to the customer including tax, in smallest currency unit (e.g. cents)" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the payment was last updated", + "nullable": true + } + } + }, + "PayoutStatus": { + "type": "string", + "enum": [ + "in_progress", + "failed", + "success" + ] + }, + "PayoutsResponse": { + "type": "object", + "required": [ + "payout_id", + "business_id", + "payment_method", + "status", + "fee", + "tax", + "amount", + "created_at", + "updated_at", + "currency", + "refunds", + "chargebacks" + ], + "properties": { + "amount": { + "type": "integer", + "format": "int32", + "description": "The total amount of the payout." + }, + "business_id": { + "type": "string", + "description": "The unique identifier of the business associated with the payout." + }, + "chargebacks": { + "type": "integer", + "format": "int32", + "description": "The total value of chargebacks associated with the payout." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the payout was created, in UTC." + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "fee": { + "type": "integer", + "format": "int32", + "description": "The fee charged for processing the payout." + }, + "name": { + "type": "string", + "description": "The name of the payout recipient or purpose.", + "nullable": true + }, + "payment_method": { + "type": "string", + "description": "The payment method used for the payout (e.g., bank transfer, card, etc.)." + }, + "payout_document_url": { + "type": "string", + "description": "The URL of the document associated with the payout.", + "nullable": true + }, + "payout_id": { + "type": "string", + "description": "The unique identifier of the payout." + }, + "refunds": { + "type": "integer", + "format": "int32", + "description": "The total value of refunds associated with the payout." + }, + "remarks": { + "type": "string", + "description": "Any additional remarks or notes associated with the payout.", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/PayoutStatus" + }, + "tax": { + "type": "integer", + "format": "int32", + "description": "The tax applied to the payout." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the payout was last updated, in UTC." + } + } + }, + "Price": { + "oneOf": [ + { + "allOf": [ + { + "$ref": "#/components/schemas/OneTimePrice" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "one_time_price" + ] + } + } + } + ], + "title": "One Time Price" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/RecurringPrice" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "recurring_price" + ] + } + } + } + ], + "title": "Recurring Price" + } + ], + "discriminator": { + "propertyName": "type" + } + }, + "RecurringPrice": { + "type": "object", + "required": [ + "price", + "currency", + "discount", + "purchasing_power_parity", + "payment_frequency_count", + "payment_frequency_interval", + "subscription_period_count", + "subscription_period_interval" + ], + "properties": { + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "discount": { + "type": "number", + "format": "float", + "description": "Discount applied to the price, represented as a percentage (0 to 100)." + }, + "payment_frequency_count": { + "type": "integer", + "format": "int32", + "description": "Number of units for the payment frequency.\nFor example, a value of `1` with a `payment_frequency_interval` of `month` represents monthly payments." + }, + "payment_frequency_interval": { + "$ref": "#/components/schemas/TimeInterval" + }, + "price": { + "type": "integer", + "format": "int32", + "description": "The payment amount. Represented in the lowest denomination of the currency (e.g., cents for USD).\nFor example, to charge $1.00, pass `100`." + }, + "purchasing_power_parity": { + "type": "boolean", + "description": "Indicates if purchasing power parity adjustments are applied to the price.\nPurchasing power parity feature is not available as of now" + }, + "subscription_period_count": { + "type": "integer", + "format": "int32", + "description": "Number of units for the subscription period.\nFor example, a value of `12` with a `subscription_period_interval` of `month` represents a one-year subscription." + }, + "subscription_period_interval": { + "$ref": "#/components/schemas/TimeInterval" + }, + "tax_inclusive": { + "type": "boolean", + "description": "Indicates if the price is tax inclusive", + "nullable": true + }, + "trial_period_days": { + "type": "integer", + "format": "int32", + "description": "Number of days for the trial period. A value of `0` indicates no trial period." + } + } + }, + "RefundResponse": { + "type": "object", + "required": [ + "refund_id", + "payment_id", + "business_id", + "status", + "created_at" + ], + "properties": { + "amount": { + "type": "integer", + "format": "int32", + "description": "The refunded amount.", + "nullable": true + }, + "business_id": { + "type": "string", + "description": "The unique identifier of the business issuing the refund." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The timestamp of when the refund was created in UTC." + }, + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ], + "nullable": true + }, + "payment_id": { + "type": "string", + "description": "The unique identifier of the payment associated with the refund." + }, + "reason": { + "type": "string", + "description": "The reason provided for the refund, if any. Optional.", + "nullable": true + }, + "refund_id": { + "type": "string", + "description": "The unique identifier of the refund." + }, + "status": { + "$ref": "#/components/schemas/RefundStatus" + } + } + }, + "RefundStatus": { + "type": "string", + "enum": [ + "succeeded", + "failed", + "pending", + "review" + ] + }, + "SubscriptionResponse": { + "type": "object", + "description": "Response struct representing subscription details", + "required": [ + "subscription_id", + "recurring_pre_tax_amount", + "tax_inclusive", + "currency", + "status", + "created_at", + "product_id", + "quantity", + "trial_period_days", + "subscription_period_interval", + "payment_frequency_interval", + "subscription_period_count", + "payment_frequency_count", + "next_billing_date", + "customer", + "metadata" + ], + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the subscription was created" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "customer": { + "$ref": "#/components/schemas/CustomerLimitedDetailsResponse" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "next_billing_date": { + "type": "string", + "format": "date-time", + "description": "Timestamp of the next scheduled billing" + }, + "payment_frequency_count": { + "type": "integer", + "format": "int32", + "description": "Number of payment frequency intervals" + }, + "payment_frequency_interval": { + "$ref": "#/components/schemas/TimeInterval" + }, + "product_id": { + "type": "string", + "description": "Identifier of the product associated with this subscription" + }, + "quantity": { + "type": "integer", + "format": "int32", + "description": "Number of units/items included in the subscription" + }, + "recurring_pre_tax_amount": { + "type": "integer", + "format": "int32", + "description": "Amount charged before tax for each recurring payment in smallest currency unit (e.g. cents)" + }, + "status": { + "$ref": "#/components/schemas/SubscriptionStatus" + }, + "subscription_id": { + "type": "string", + "description": "Unique identifier for the subscription" + }, + "subscription_period_count": { + "type": "integer", + "format": "int32", + "description": "Number of subscription period intervals" + }, + "subscription_period_interval": { + "$ref": "#/components/schemas/TimeInterval" + }, + "tax_inclusive": { + "type": "boolean", + "description": "Indicates if the recurring_pre_tax_amount is tax inclusive" + }, + "trial_period_days": { + "type": "integer", + "format": "int32", + "description": "Number of days in the trial period (0 if no trial)" + } + } + }, + "SubscriptionStatus": { + "type": "string", + "enum": [ + "pending", + "active", + "on_hold", + "paused", + "cancelled", + "failed", + "expired" + ] + }, + "TaxCategory": { + "type": "string", + "description": "Represents the different categories of taxation applicable to various products and services.", + "enum": [ + "digital_products", + "saas", + "e_book" + ] + }, + "TimeInterval": { + "type": "string", + "enum": [ + "Day", + "Week", + "Month", + "Year" + ] + }, + "UpdateProductImageResponse": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string" + } + } + }, + "ValidateLicenseKeyRequest": { + "type": "object", + "required": [ + "license_key" + ], + "properties": { + "license_key": { + "type": "string", + "example": "2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43" + }, + "license_key_instance_id": { + "type": "string", + "example": "lki_123", + "nullable": true + } + } + }, + "ValidateLicenseKeyResponse": { + "type": "object", + "required": [ + "valid" + ], + "properties": { + "valid": { + "type": "boolean", + "example": true + } + } + }, + "WebhookEventLogResponse": { + "type": "object", + "required": [ + "event_id", + "business_id", + "event_type", + "object_id", + "created_at" + ], + "properties": { + "business_id": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "event_id": { + "type": "string" + }, + "event_type": { + "type": "string" + }, + "latest_attempted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "object_id": { + "type": "string" + }, + "request": { + "type": "string", + "nullable": true + }, + "response": { + "type": "string", + "nullable": true + } + } + } + }, + "securitySchemes": { + "API_KEY": { + "type": "http", + "scheme": "bearer" + } + } + }, + "tags": [ + { + "name": "Products" + }, + { + "name": "Payments" + }, + { + "name": "Subscriptions" + }, + { + "name": "Customers" + }, + { + "name": "Refunds" + }, + { + "name": "Disputes" + }, + { + "name": "License Keys" + }, + { + "name": "Licenses" + }, + { + "name": "Outgoing Webhooks" + }, + { + "name": "Checkout" + }, + { + "name": "Webhook Events" } - } + ] } \ No newline at end of file diff --git a/api-reference/outgoing-webhooks/post-your-webhook-url.mdx b/api-reference/outgoing-webhooks/post-your-webhook-url.mdx new file mode 100644 index 0000000..6acf82e --- /dev/null +++ b/api-reference/outgoing-webhooks/post-your-webhook-url.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /your-webhook-url +--- \ No newline at end of file diff --git a/api-reference/payments/get-payments-1.mdx b/api-reference/payments/get-payments-1.mdx new file mode 100644 index 0000000..269ab88 --- /dev/null +++ b/api-reference/payments/get-payments-1.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /payments/{payment_id} +--- \ No newline at end of file diff --git a/api-reference/payments/get-payments.mdx b/api-reference/payments/get-payments.mdx new file mode 100644 index 0000000..6daf40d --- /dev/null +++ b/api-reference/payments/get-payments.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /payments +--- \ No newline at end of file diff --git a/api-reference/payments/post-payments.mdx b/api-reference/payments/post-payments.mdx new file mode 100644 index 0000000..a2bc4d2 --- /dev/null +++ b/api-reference/payments/post-payments.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /payments +--- \ No newline at end of file diff --git a/api-reference/payouts/get-payouts.mdx b/api-reference/payouts/get-payouts.mdx new file mode 100644 index 0000000..5542961 --- /dev/null +++ b/api-reference/payouts/get-payouts.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /payouts +--- \ No newline at end of file diff --git a/api-reference/post-plants.mdx b/api-reference/post-plants.mdx deleted file mode 100644 index ebdb49e..0000000 --- a/api-reference/post-plants.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /plants ---- \ No newline at end of file diff --git a/api-reference/products/delete-products.mdx b/api-reference/products/delete-products.mdx new file mode 100644 index 0000000..965f514 --- /dev/null +++ b/api-reference/products/delete-products.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /products/{id} +--- \ No newline at end of file diff --git a/api-reference/products/get-products-1.mdx b/api-reference/products/get-products-1.mdx new file mode 100644 index 0000000..2078d02 --- /dev/null +++ b/api-reference/products/get-products-1.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /products/{id} +--- \ No newline at end of file diff --git a/api-reference/products/get-products.mdx b/api-reference/products/get-products.mdx new file mode 100644 index 0000000..8259346 --- /dev/null +++ b/api-reference/products/get-products.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /products +--- \ No newline at end of file diff --git a/api-reference/products/patch-products.mdx b/api-reference/products/patch-products.mdx new file mode 100644 index 0000000..e0e7685 --- /dev/null +++ b/api-reference/products/patch-products.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /products/{id} +--- \ No newline at end of file diff --git a/api-reference/products/post-products.mdx b/api-reference/products/post-products.mdx new file mode 100644 index 0000000..09eeba7 --- /dev/null +++ b/api-reference/products/post-products.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /products +--- \ No newline at end of file diff --git a/api-reference/products/put-products-images.mdx b/api-reference/products/put-products-images.mdx new file mode 100644 index 0000000..7fb03dc --- /dev/null +++ b/api-reference/products/put-products-images.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /products/{id}/images +--- \ No newline at end of file diff --git a/api-reference/refunds/get-refunds-1.mdx b/api-reference/refunds/get-refunds-1.mdx new file mode 100644 index 0000000..bbed228 --- /dev/null +++ b/api-reference/refunds/get-refunds-1.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /refunds/{refund_id} +--- \ No newline at end of file diff --git a/api-reference/refunds/get-refunds.mdx b/api-reference/refunds/get-refunds.mdx new file mode 100644 index 0000000..fd29a8d --- /dev/null +++ b/api-reference/refunds/get-refunds.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /refunds +--- \ No newline at end of file diff --git a/api-reference/refunds/post-refunds.mdx b/api-reference/refunds/post-refunds.mdx new file mode 100644 index 0000000..1c60568 --- /dev/null +++ b/api-reference/refunds/post-refunds.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /refunds +--- \ No newline at end of file diff --git a/api-reference/subscriptions/get-subscriptions-1.mdx b/api-reference/subscriptions/get-subscriptions-1.mdx new file mode 100644 index 0000000..d3872f5 --- /dev/null +++ b/api-reference/subscriptions/get-subscriptions-1.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /subscriptions/{subscription_id} +--- \ No newline at end of file diff --git a/api-reference/subscriptions/get-subscriptions.mdx b/api-reference/subscriptions/get-subscriptions.mdx new file mode 100644 index 0000000..22b6992 --- /dev/null +++ b/api-reference/subscriptions/get-subscriptions.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /subscriptions +--- \ No newline at end of file diff --git a/api-reference/subscriptions/patch-subscriptions.mdx b/api-reference/subscriptions/patch-subscriptions.mdx new file mode 100644 index 0000000..e715ca6 --- /dev/null +++ b/api-reference/subscriptions/patch-subscriptions.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /subscriptions/{subscription_id} +--- \ No newline at end of file diff --git a/api-reference/subscriptions/post-subscriptions.mdx b/api-reference/subscriptions/post-subscriptions.mdx new file mode 100644 index 0000000..9dedfb8 --- /dev/null +++ b/api-reference/subscriptions/post-subscriptions.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /subscriptions +--- \ No newline at end of file diff --git a/api-reference/webhook-events/get-webhook_events-1.mdx b/api-reference/webhook-events/get-webhook_events-1.mdx new file mode 100644 index 0000000..3a48094 --- /dev/null +++ b/api-reference/webhook-events/get-webhook_events-1.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /webhook_events/{webhook_event_id} +--- \ No newline at end of file diff --git a/api-reference/webhook-events/get-webhook_events.mdx b/api-reference/webhook-events/get-webhook_events.mdx new file mode 100644 index 0000000..2245de7 --- /dev/null +++ b/api-reference/webhook-events/get-webhook_events.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /webhook_events +--- \ No newline at end of file diff --git a/mint.json b/mint.json index e2d0560..9d09613 100644 --- a/mint.json +++ b/mint.json @@ -78,11 +78,105 @@ "group": "api reference", "pages": [ { - "group": "API Reference", + "group": "Checkout", "pages": [ - "api-reference/get-plants", - "api-reference/post-plants", - "api-reference/delete-plants" + "api-reference/checkout/get-checkoutsupported_countries" + ] + }, + { + "group": "Customers", + "pages": [ + "api-reference/customers/get-customers", + "api-reference/customers/post-customers", + "api-reference/customers/get-customers-1", + "api-reference/customers/patch-customers" + ] + }, + { + "group": "Disputes", + "pages": [ + "api-reference/disputes/get-disputes", + "api-reference/disputes/get-disputes-1" + ] + }, + { + "group": "Invoices", + "pages": [ + "api-reference/invoices/get-invoicespayments" + ] + }, + { + "group": "License Keys", + "pages": [ + "api-reference/license-keys/get-license_key_instances", + "api-reference/license-keys/get-license_key_instances-1", + "api-reference/license-keys/patch-license_key_instances", + "api-reference/license-keys/get-license_keys", + "api-reference/license-keys/get-license_keys-1", + "api-reference/license-keys/patch-license_keys" + ] + }, + { + "group": "Licenses", + "pages": [ + "api-reference/licenses/post-licensesactivate", + "api-reference/licenses/post-licensesdeactivate", + "api-reference/licenses/post-licensesvalidate" + ] + }, + { + "group": "Payments", + "pages": [ + "api-reference/payments/get-payments", + "api-reference/payments/post-payments", + "api-reference/payments/get-payments-1" + ] + }, + { + "group": "Payouts", + "pages": [ + "api-reference/payouts/get-payouts" + ] + }, + { + "group": "Products", + "pages": [ + "api-reference/products/get-products", + "api-reference/products/post-products", + "api-reference/products/get-products-1", + "api-reference/products/delete-products", + "api-reference/products/patch-products", + "api-reference/products/put-products-images" + ] + }, + { + "group": "Refunds", + "pages": [ + "api-reference/refunds/get-refunds", + "api-reference/refunds/post-refunds", + "api-reference/refunds/get-refunds-1" + ] + }, + { + "group": "Subscriptions", + "pages": [ + "api-reference/subscriptions/get-subscriptions", + "api-reference/subscriptions/post-subscriptions", + "api-reference/subscriptions/get-subscriptions-1", + "api-reference/subscriptions/patch-subscriptions" + ] + }, + { + "group": "Webhook Events", + "pages": [ + "api-reference/webhook-events/get-webhook_events", + "api-reference/webhook-events/get-webhook_events-1" + ] + }, + { + "group": "Outgoing Webhooks", + "pages": [ + "api-reference/outgoing-webhooks/post-your-webhook-url" ] } ] @@ -100,5 +194,15 @@ "x": "https://x.com/mintlify", "github": "https://github.com/mintlify", "linkedin": "https://www.linkedin.com/company/mintsearch" + }, + "api": { + "request": { + "example": { + "languages": [ + "bash", + "PHP" + ] + } + } } } \ No newline at end of file