openapi: 3.2.0 info: title: Rest Integrations API description: 'Justt official REST api, you can find our docs here: https://justt.readme.io/' version: 1.0.0 contact: {} servers: - url: https://api.justt.ai/v1 tags: - name: Integrations paths: /integrations: get: description: Retrieve a list of integrations with optional filtering and pagination operationId: IntegrationsController_getIntegrations parameters: - name: reference-account-id in: header description: If your account encompasses multiple merchants, you should use this header to specify the account you are working on (https://developers.justt.ai/docs/reference-accounts) required: false schema: type: string - name: limit required: false in: query description: The number of items to return between 10 to 100 schema: default: 10 example: '10' type: number - name: page required: false in: query description: The offset of the first item to return schema: default: 1 example: '1' type: number responses: '200': description: List of integrations retrieved successfully content: application/json: schema: type: array items: $ref: '#/components/schemas/IntegrationResponseDto' '400': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '404': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '500': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' security: - bearer: [] summary: Get integrations tags: - Integrations post: description: Create a new payment integration operationId: IntegrationsController_createIntegration parameters: - name: reference-account-id in: header description: If your account encompasses multiple merchants, you should use this header to specify the account you are working on (https://developers.justt.ai/docs/reference-accounts) required: false schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateIntegrationDto' responses: '201': description: Integration created successfully content: application/json: schema: $ref: '#/components/schemas/CreateIntegrationResponseDto' '400': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '404': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '500': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' security: - bearer: [] summary: Create integration tags: - Integrations /integrations/{id}: get: description: Retrieve a single integration by its ID operationId: IntegrationsController_getIntegration parameters: - name: reference-account-id in: header description: If your account encompasses multiple merchants, you should use this header to specify the account you are working on (https://developers.justt.ai/docs/reference-accounts) required: false schema: type: string - name: id required: true in: path description: Integration ID schema: type: string responses: '200': description: Integration retrieved successfully content: application/json: schema: $ref: '#/components/schemas/IntegrationResponseDto' '400': description: Invalid integration ID format '404': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '500': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' security: - bearer: [] summary: Get integration by ID tags: - Integrations delete: description: 'Deactivate an integration (note: integration is not removed, only deactivated)' operationId: IntegrationsController_deactivateIntegration parameters: - name: reference-account-id in: header description: If your account encompasses multiple merchants, you should use this header to specify the account you are working on (https://developers.justt.ai/docs/reference-accounts) required: false schema: type: string - name: id required: true in: path description: Integration ID schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DeactivateIntegrationDto' responses: '200': description: Integration deactivated successfully '400': description: Invalid input provided or invalid UUID format '404': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '500': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' security: - bearer: [] summary: Deactivate integration tags: - Integrations components: schemas: MerchantIntegrationStatusEnum: type: string enum: - PENDING - SUCCESSFUL - FAILED - INACTIVE description: Current status of the integration DeactivateIntegrationDto: type: object properties: integrationId: type: string description: Integration ID to deactivate example: '446655440000' deactivationType: description: Type of deactivation example: postingDate allOf: - $ref: '#/components/schemas/DeactivationType' deactivationDate: format: date-time type: string description: Date when the deactivation should take effect example: '2024-01-01T00:00:00.000Z' required: - integrationId - deactivationType - deactivationDate IntegrationConnectionTypeEnum: type: string enum: - APIKEY_ONLY - PUBLIC_SECRET_KEY - BASIC_AUTH - USERNAME_PASSWORD - HMAC - APIKEY - sftp description: "Secret type for the PSP integration. Each secret type has specific authentication requirements:\n\n**Available Secret Types:**\n\n**APIKEY_ONLY**: Single API key authentication\n Required fields: apiKey\n Example:\n ```json\n {\n \"apiKey\": \"APIKEY280PRO22\"\n}\n ```\n\n**PUBLIC_SECRET_KEY**: Public and secret key pair authentication\n Required fields: secretKey Optional: publicKey\n Example:\n ```json\n {\n \"secretKey\": \"SECRET_KEY_HERE\",\n \"publicKey\": \"PUBLIC_KEY_HERE\"\n}\n ```\n\n**BASIC_AUTH**: Basic authentication with client credentials\n Required fields: clientId, clientSecret\n Example:\n ```json\n {\n \"clientId\": \"your_client_id\",\n \"clientSecret\": \"your_client_secret\"\n}\n ```\n\n**USERNAME_PASSWORD**: Username and password authentication\n Required fields: username, password\n Example:\n ```json\n {\n \"username\": \"your_username\",\n \"password\": \"your_password\"\n}\n ```\n\n**HMAC**: HMAC signature based authentication\n Required fields: hmac, apiKey Optional: merchantCode, accountCode\n Example:\n ```json\n {\n \"hmac\": \"HMAC92749798124\",\n \"apiKey\": \"APIKEY280PRO22\",\n \"merchantCode\": \"MERCHANT_CODE\",\n \"accountCode\": \"ACCOUNT_CODE\"\n}\n ```\n\n**APIKEY**: API key authentication with additional fields\n Required fields: apiKey Optional: storeUrl, shopName\n Example:\n ```json\n {\n \"apiKey\": \"shpca_your_api_key\",\n \"storeUrl\": \"https://your-store.myshopify.com\",\n \"shopName\": \"your-store\"\n}\n ```\n\n**sftp**: SFTP authentication: username with either a password or a private key. Paste the raw private key (PEM) — it is base64-encoded automatically on save. An optional passphrase may accompany the key.\n Required fields: username Optional: password, privateKey, passphrase\n Example:\n ```json\n {\n \"username\": \"sftp_user\",\n \"privateKey\": \"REDACTED_PRIVATE_KEY_EXAMPLE\",\n \"passphrase\": \"optional-key-passphrase\"\n}\n ```" ErrorResponseDTO: type: object properties: status: type: number example: 500 description: Error status of the response message: type: string example: Internal Server Error description: Description of the error that occurred errorId: type: string example: 04318fb0-e4ff-4712-972e-4db99b3fb23c description: A unique identifier you can provide to our support for a better troubleshooting process required: - status - message DeactivationType: type: string enum: - postingDate - dueDate description: Type of deactivation IntegrationResponseDto: type: object properties: integrationId: type: string description: Integration ID example: '446655440000' source: description: PSP source type example: stripe allOf: - $ref: '#/components/schemas/SupportedPSP' status: description: Current status of the integration example: SUCCESSFUL allOf: - $ref: '#/components/schemas/MerchantIntegrationStatusEnum' goLiveDate: format: date-time type: string description: Go live date of the integration example: '2024-01-01T00:00:00.000Z' required: - integrationId - source - status CreateIntegrationResponseDto: type: object properties: integrationId: type: string description: Integration ID example: '446655440000' required: - integrationId SupportedPSP: type: string enum: - stripe - braintree - paypal - adyen - justt_sandbox description: PSP source type CreateIntegrationDto: type: object properties: externalIdentifier: type: string description: External identifier for the integration example: INT_001 minLength: 1 maxLength: 255 integrationName: type: string description: Name of the integration example: My PSP Integration source: description: PSP source type. Each PSP supports different connection types. example: stripe allOf: - $ref: '#/components/schemas/SupportedPSP' secretType: description: "Secret type for the PSP integration. Each secret type has specific authentication requirements:\n\n**Available Secret Types:**\n\n**APIKEY_ONLY**: Single API key authentication\n Required fields: apiKey\n Example:\n ```json\n {\n \"apiKey\": \"APIKEY280PRO22\"\n}\n ```\n\n**PUBLIC_SECRET_KEY**: Public and secret key pair authentication\n Required fields: secretKey Optional: publicKey\n Example:\n ```json\n {\n \"secretKey\": \"SECRET_KEY_HERE\",\n \"publicKey\": \"PUBLIC_KEY_HERE\"\n}\n ```\n\n**BASIC_AUTH**: Basic authentication with client credentials\n Required fields: clientId, clientSecret\n Example:\n ```json\n {\n \"clientId\": \"your_client_id\",\n \"clientSecret\": \"your_client_secret\"\n}\n ```\n\n**USERNAME_PASSWORD**: Username and password authentication\n Required fields: username, password\n Example:\n ```json\n {\n \"username\": \"your_username\",\n \"password\": \"your_password\"\n}\n ```\n\n**HMAC**: HMAC signature based authentication\n Required fields: hmac, apiKey Optional: merchantCode, accountCode\n Example:\n ```json\n {\n \"hmac\": \"HMAC92749798124\",\n \"apiKey\": \"APIKEY280PRO22\",\n \"merchantCode\": \"MERCHANT_CODE\",\n \"accountCode\": \"ACCOUNT_CODE\"\n}\n ```\n\n**APIKEY**: API key authentication with additional fields\n Required fields: apiKey Optional: storeUrl, shopName\n Example:\n ```json\n {\n \"apiKey\": \"shpca_your_api_key\",\n \"storeUrl\": \"https://your-store.myshopify.com\",\n \"shopName\": \"your-store\"\n}\n ```\n\n**sftp**: SFTP authentication: username with either a password or a private key. Paste the raw private key (PEM) — it is base64-encoded automatically on save. An optional passphrase may accompany the key.\n Required fields: username Optional: password, privateKey, passphrase\n Example:\n ```json\n {\n \"username\": \"sftp_user\",\n \"privateKey\": \"REDACTED_PRIVATE_KEY_EXAMPLE\",\n \"passphrase\": \"optional-key-passphrase\"\n}\n ```" example: APIKEY_ONLY allOf: - $ref: '#/components/schemas/IntegrationConnectionTypeEnum' secretPayload: type: object description: Secret payload containing PSP-specific configuration. Required fields depend on the selected secret type. example: apiKey: your-api-key secretKey: your-secret-key additionalProperties: true merchantAccountCodes: description: Array of merchant account codes associated with this integration example: - ACCT_001 - ACCT_002 - ACCT_003 type: array items: type: string required: - externalIdentifier - integrationName - source - secretType - secretPayload securitySchemes: bearer: scheme: bearer bearerFormat: JWT type: http