openapi: 3.1.0 info: title: HEVN 2FA Merchant API description: Backend API for HEVN mobile neobank version: 0.1.2 servers: - url: https://api.hevn.finance description: Production tags: - name: Merchant paths: /api/v1/merchant/products: post: tags: - Merchant summary: Create Product operationId: create_product_api_v1_merchant_products_post security: - HTTPBearer: [] parameters: - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProductCreateRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ProductResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Merchant summary: List Products operationId: list_products_api_v1_merchant_products_get security: - HTTPBearer: [] parameters: - name: active_only in: query required: false schema: type: boolean default: true title: Active Only - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/ProductResponse' title: Response List Products Api V1 Merchant Products Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/merchant/products/{product_id}: get: tags: - Merchant summary: Get Product operationId: get_product_api_v1_merchant_products__product_id__get security: - HTTPBearer: [] parameters: - name: product_id in: path required: true schema: type: string format: uuid title: Product Id - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ProductResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Merchant summary: Update Product operationId: update_product_api_v1_merchant_products__product_id__patch security: - HTTPBearer: [] parameters: - name: product_id in: path required: true schema: type: string format: uuid title: Product Id - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProductUpdateRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ProductResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Merchant summary: Deactivate Product operationId: deactivate_product_api_v1_merchant_products__product_id__delete security: - HTTPBearer: [] parameters: - name: product_id in: path required: true schema: type: string format: uuid title: Product Id - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/merchant/products/{product_id}/payments: get: tags: - Merchant summary: List Product Payments operationId: list_product_payments_api_v1_merchant_products__product_id__payments_get security: - HTTPBearer: [] parameters: - name: product_id in: path required: true schema: type: string format: uuid title: Product Id - name: limit in: query required: false schema: type: integer default: 50 title: Limit - name: offset in: query required: false schema: type: integer default: 0 title: Offset - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/PaymentTransactionResponse' title: Response List Product Payments Api V1 Merchant Products Product Id Payments Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/transactions/merchant/products: post: tags: - Merchant summary: Create Product Package Alias operationId: create_product_package_alias_api_v1_transactions_merchant_products_post security: - HTTPBearer: [] parameters: - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProductCreateRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ProductResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Merchant summary: List Products Package Alias operationId: list_products_package_alias_api_v1_transactions_merchant_products_get security: - HTTPBearer: [] parameters: - name: active_only in: query required: false schema: type: boolean default: true title: Active Only - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/ProductResponse' title: Response List Products Package Alias Api V1 Transactions Merchant Products Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/transactions/merchant/products/{product_id}: get: tags: - Merchant summary: Get Product Package Alias operationId: get_product_package_alias_api_v1_transactions_merchant_products__product_id__get security: - HTTPBearer: [] parameters: - name: product_id in: path required: true schema: type: string format: uuid title: Product Id - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ProductResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Merchant summary: Update Product Package Alias operationId: update_product_package_alias_api_v1_transactions_merchant_products__product_id__patch security: - HTTPBearer: [] parameters: - name: product_id in: path required: true schema: type: string format: uuid title: Product Id - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProductUpdateRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ProductResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Merchant summary: Deactivate Product Package Alias operationId: deactivate_product_package_alias_api_v1_transactions_merchant_products__product_id__delete security: - HTTPBearer: [] parameters: - name: product_id in: path required: true schema: type: string format: uuid title: Product Id - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/transactions/merchant/products/{product_id}/payments: get: tags: - Merchant summary: List Product Payments Package Alias operationId: list_product_payments_package_alias_api_v1_transactions_merchant_products__product_id__payments_get security: - HTTPBearer: [] parameters: - name: product_id in: path required: true schema: type: string format: uuid title: Product Id - name: limit in: query required: false schema: type: integer default: 50 title: Limit - name: offset in: query required: false schema: type: integer default: 0 title: Offset - name: x-api-key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/PaymentTransactionResponse' title: Response List Product Payments Package Alias Api V1 Transactions Merchant Products Product Id Payments Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError ProductResponse: properties: id: type: string format: uuid title: Id name: type: string title: Name description: anyOf: - type: string - type: 'null' title: Description images: items: type: string type: array title: Images default: [] url: anyOf: - type: string - type: 'null' title: Url price: anyOf: - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Price currency: type: string title: Currency minAmount: anyOf: - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Minamount maxAmount: anyOf: - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Maxamount presetAmount: anyOf: - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Presetamount maxQuantity: anyOf: - type: integer - type: 'null' title: Maxquantity soldCount: type: integer title: Soldcount metadata: additionalProperties: true type: object title: Metadata default: {} webhookUrl: anyOf: - type: string - type: 'null' title: Webhookurl successUrl: anyOf: - type: string - type: 'null' title: Successurl cancelUrl: anyOf: - type: string - type: 'null' title: Cancelurl active: type: boolean title: Active createdAt: type: string format: date-time title: Createdat updatedAt: type: string format: date-time title: Updatedat type: object required: - id - name - currency - soldCount - active - createdAt - updatedAt title: ProductResponse ProductCreateRequest: properties: name: type: string title: Name description: anyOf: - type: string - type: 'null' title: Description images: items: type: string type: array title: Images default: [] url: anyOf: - type: string - type: 'null' title: Url price: anyOf: - type: number - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Price currency: type: string title: Currency default: USD minAmount: anyOf: - type: number - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Minamount maxAmount: anyOf: - type: number - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Maxamount presetAmount: anyOf: - type: number - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Presetamount maxQuantity: anyOf: - type: integer - type: 'null' title: Maxquantity metadata: additionalProperties: true type: object title: Metadata default: {} webhookUrl: anyOf: - type: string - type: 'null' title: Webhookurl successUrl: anyOf: - type: string - type: 'null' title: Successurl cancelUrl: anyOf: - type: string - type: 'null' title: Cancelurl type: object required: - name title: ProductCreateRequest HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ProductUpdateRequest: properties: name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description images: anyOf: - items: type: string type: array - type: 'null' title: Images url: anyOf: - type: string - type: 'null' title: Url price: anyOf: - type: number - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Price currency: anyOf: - type: string - type: 'null' title: Currency minAmount: anyOf: - type: number - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Minamount maxAmount: anyOf: - type: number - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Maxamount presetAmount: anyOf: - type: number - type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ - type: 'null' title: Presetamount maxQuantity: anyOf: - type: integer - type: 'null' title: Maxquantity metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata webhookUrl: anyOf: - type: string - type: 'null' title: Webhookurl successUrl: anyOf: - type: string - type: 'null' title: Successurl cancelUrl: anyOf: - type: string - type: 'null' title: Cancelurl active: anyOf: - type: boolean - type: 'null' title: Active type: object title: ProductUpdateRequest PaymentTransactionResponse: properties: id: type: string format: uuid title: Id productId: type: string format: uuid title: Productid ocQuoteId: type: string title: Ocquoteid clientReferenceId: anyOf: - type: string - type: 'null' title: Clientreferenceid memo: anyOf: - type: string - type: 'null' title: Memo usdAmount: type: string pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ title: Usdamount transactionId: anyOf: - type: string - type: 'null' title: Transactionid buyerEmail: anyOf: - type: string - type: 'null' title: Buyeremail invoiceId: anyOf: - type: string format: uuid - type: 'null' title: Invoiceid metadata: additionalProperties: true type: object title: Metadata default: {} expiresAt: anyOf: - type: string format: date-time - type: 'null' title: Expiresat status: type: string title: Status createdAt: type: string format: date-time title: Createdat type: object required: - id - productId - ocQuoteId - usdAmount - status - createdAt title: PaymentTransactionResponse securitySchemes: HTTPBearer: type: http scheme: bearer x-default: Bearer ApiKeyAuth: type: apiKey in: header name: x-api-key description: Alternative HEVN API key header. The CLI defaults to Authorization Bearer unless configured with HEVN_API_KEY_HEADER=X-Api-Key.