openapi: 3.0.3 info: title: ChargeDesk REST Charges Products API description: 'RESTful API for managing charges, customers, subscriptions, products, and webhooks across multiple payment gateways including Stripe, Braintree, PayPal, Authorize.Net, WooCommerce, Shopify, Square, GoCardless, and 14+ others. Supports creating and capturing charges, processing refunds, cancelling subscriptions, requesting payments, and managing customer data. ' version: v1 contact: name: ChargeDesk Support url: https://chargedesk.com/api-docs termsOfService: https://chargedesk.com/terms servers: - url: https://api.chargedesk.com/v1 description: Production API security: - basicAuth: [] tags: - name: Products description: Manage products and pricing plans paths: /products: get: operationId: listProducts summary: List all products tags: - Products parameters: - name: count in: query schema: type: integer minimum: 1 maximum: 500 default: 20 - name: offset in: query schema: type: integer minimum: 0 maximum: 50000 default: 0 responses: '200': description: A list of products content: application/json: schema: $ref: '#/components/schemas/ProductList' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createProduct summary: Create a product tags: - Products requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ProductInput' responses: '200': description: Product created content: application/json: schema: $ref: '#/components/schemas/Product' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /products/{product_id}: get: operationId: getProduct summary: Retrieve a product tags: - Products parameters: - $ref: '#/components/parameters/ProductId' responses: '200': description: Product record content: application/json: schema: $ref: '#/components/schemas/Product' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' post: operationId: updateProduct summary: Update a product tags: - Products parameters: - $ref: '#/components/parameters/ProductId' requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ProductInput' responses: '200': description: Updated product content: application/json: schema: $ref: '#/components/schemas/Product' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: responses: NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Authentication failed content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Invalid request parameters content: application/json: schema: $ref: '#/components/schemas/Error' schemas: ProductInput: type: object required: - product_id properties: product_id: type: string name: type: string description: type: string url: type: string format: uri amount: type: number currency: type: string interval: type: string enum: - day - week - month - year trial_period_days: type: integer billing_cycles_total: type: integer setup_amount: type: number chargeable: type: boolean ProductList: type: object properties: object: type: string example: list data: type: array items: $ref: '#/components/schemas/Product' total_count: type: integer Product: type: object properties: id: type: string object: type: string example: product product_id: type: string name: type: string description: type: string url: type: string format: uri amount: type: number currency: type: string interval: type: string enum: - day - week - month - year trial_period_days: type: integer billing_cycles_total: type: integer setup_amount: type: number chargeable: type: boolean Error: type: object properties: error: type: object properties: message: type: string type: type: string code: type: string parameters: ProductId: name: product_id in: path required: true schema: type: string description: Unique product identifier securitySchemes: basicAuth: type: http scheme: basic description: 'Use your ChargeDesk secret key as the username with an empty password. Format: Authorization: YOUR_SECRET_KEY: '