### POST /v1 - Create an instalment Source: https://docs.enfuce.com/payment/api/instalment-controller Creates a new instalment plan. ```APIDOC ## POST /v1 ### Description Creates a new instalment plan. ### Method POST ### Endpoint /v1 ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **amount** (number) - Required - The total amount of the instalment. - **currency** (string) - Required - The currency of the instalment. - **numberOfPortions** (integer) - Required - The number of portions the instalment will be divided into. - **accountId** (string) - Required - The ID of the account associated with the instalment. - **cardId** (string) - Optional - The ID of the card to be used for the instalment. - **transactionId** (string) - Optional - The ID of the transaction associated with the instalment. ### Request Example ```json { "amount": 10000, "currency": "EUR", "numberOfPortions": 3, "accountId": "acc_12345", "cardId": "card_abcde" } ``` ### Response #### Success Response (201) - **instalmentId** (string) - The ID of the created instalment. - **status** (string) - The status of the instalment. #### Response Example ```json { "instalmentId": "inst_67890", "status": "active" } ``` ``` -------------------------------- ### GET /websites/enfuce/instalmentPortions Source: https://docs.enfuce.com/payment/api/instalment-controller/get-instalment-portions Retrieves a list of instalment portions with detailed financial information and status. Supports pagination. ```APIDOC ## GET /websites/enfuce/instalmentPortions ### Description Retrieves a list of instalment portions associated with an enfuce project. This endpoint provides comprehensive details about each portion, including amounts paid, due dates, and current status. It also supports pagination to manage large result sets. ### Method GET ### Endpoint /websites/enfuce/instalmentPortions ### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **size** (integer) - Optional - The number of elements per page. ### Response #### Success Response (200) - **getInstalmentPortionResponse** (object) - An array of instalment portion objects. - **id** (string) - The instalment portion identifier. - **index** (integer) - The current portion number. - **total** (integer) - The total number of portions. - **openDate** (string) - The open date (format: date). - **dueDate** (string) - The due date (format: date). - **currency** (string) - The currency of the amounts. - **amount** (number) - The total amount for the portion. - **principalAmount** (number) - The principal amount for the portion. - **feeAmount** (number) - The fee amount (deprecated, use `interestAmount`). - **interestAmount** (number) - The predicted interest amount. - **paidAmount** (number) - The amount already paid (deprecated, use `interestPaidAmount`). - **interestPaidAmount** (number) - The interest paid amount. - **principalPaidAmount** (number) - The principal paid amount. - **writtenOffAmount** (number) - The written-off amount (deprecated, use `reversed`). - **reversed** (number) - The reversed amount. - **instalmentId** (string) - The identifier of the associated instalment. - **status** (string) - The status of the instalment portion (enum: INACTIVE, WAITING, OPEN, PAID, PAID_PARTIALLY, OVERDUE, REVISED, CLOSED). - **pagination** (object) - Pagination details. - **page** (integer) - Current page number. - **pages** (integer) - Total number of pages. - **elements** (integer) - Total number of items. - **size** (integer) - Number of items per page. #### Response Example { "getInstalmentPortionResponse": [ { "id": "564233", "index": 1, "total": 38, "openDate": "2023-01-01", "dueDate": "2023-01-15", "currency": "EUR", "amount": 550.57, "principalAmount": 500, "feeAmount": 90, "interestAmount": 90, "paidAmount": 20, "interestPaidAmount": 20.57, "principalPaidAmount": 500, "writtenOffAmount": 1000, "reversed": 1000, "instalmentId": "inst_abc123", "status": "OPEN" } ], "pagination": { "page": 1, "pages": 7, "elements": 15, "size": 1 } } ``` -------------------------------- ### Instalment API Source: https://docs.enfuce.com/payment/api Manages instalment payment plans and related data. ```APIDOC ## Instalment API ### Description Manages instalment payment plans and related data. ### Method GET ### Endpoint /payment/api/instalment ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **instalmentDetails** (object) - Information about instalment plans. #### Response Example ```json { "instalmentDetails": {} } ``` ``` -------------------------------- ### Instalment POST /v1 Endpoint - OpenAPI Definition Source: https://docs.enfuce.com/payment/api/instalment-controller/create-an-instalment Defines the POST /v1 endpoint for creating instalments. It includes server URLs, authentication requirements, request body schema with examples for different instalment types (BUY_NOW_PAY_LATER, INTEREST_FREE, FIXED_INTEREST), and success/error response schemas. ```yaml paths: path: /v1 method: post servers: - url: >- https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/instalment - url: https://integration-api-cat2.live.ext.prod.cia.enfuce.com/instalment description: Live environment request: security: - title: basicAuth parameters: query: {} header: Authorization: type: http scheme: basic description: >- Basic authentication is used to authenticate towards Enfuce API. It is described in more detail in RFC 7617. cookie: {} parameters: path: {} query: auditUser: schema: - type: string required: true description: The audit user to log the request header: {} cookie: {} body: application/json: schemaArray: - type: object properties: from: allOf: - type: string example: TRANSACTION enum: - TRANSACTION description: The source type for the instalment. description: allOf: - $ref: '#/components/schemas/description' transactionId: allOf: - description: Transaction that will be converted into instalments $ref: '#/components/schemas/transactionId' planOptions: allOf: - $ref: '#/components/schemas/planOptions' required: true refIdentifier: '#/components/schemas/createInstalmentRequest' requiredProperties: - from - transactionId - planOptions examples: BUY_NOW_PAY_LATER: summary: Instalment from transaction - BNPL value: from: TRANSACTION transactionId: '12345678' description: Buy now, pay in 2 months planOptions: type: BUY_NOW_PAY_LATER shift: 2 INTEREST_FREE: summary: Instalment from transaction - Interest Free value: from: TRANSACTION transactionId: '12345678' description: Interest Free with 3 payments planOptions: type: INTEREST_FREE paymentPlan: type: TENOR value: 3 FIXED_INTEREST: summary: Instalment from transaction - Fixed interest value: from: TRANSACTION transactionId: '12345678' description: Fixed interest planOptions: type: FIXED_INTEREST interest: 9.9 paymentPlan: type: PORTION value: 12.2 response: '201': application/json: schemaArray: - type: object properties: description: allOf: - type: string description: Short description of the result of the action id: allOf: - type: string description: >- Will contain the ID of the resource that has been created or updated title: resourceResponse refIdentifier: '#/components/schemas/resourceResponse' examples: example: value: description: id: description: Successful creation of an instalment '400': application/json: schemaArray: - type: object properties: code: allOf: - type: string description: >- An error code indicating what kind of error. I.e. HTTP error code message: allOf: - type: string description: Error message in human-readable format id: allOf: - type: string format: uuid description: Unique error identifier errorCode: allOf: - type: string description: Enfuce code for a specific error type errorType: allOf: - type: string description: Error type enum: - STATIC_VALIDATION_ERROR - DYNAMIC_VALIDATION_ERROR - INTEGRATION_ERROR - SECURITY_ERROR - UNEXPECTED_ERROR ``` -------------------------------- ### Product Code Schema Definition Source: https://docs.enfuce.com/payment/api/create-card/create-a-debit-visa-branded-card Defines a string schema for product codes, specifying a pattern for valid codes that start with an uppercase letter followed by alphanumeric characters. Usage is dependent on institution setup and requires alignment with Enfuce. ```yaml productCode: type: string description: > This field is used when the institution has multiple card products setup. The productCode is used to determine the specific card product. Use of this field as well as the values of the field, is dependent on institution setup and should be aligned with Enfuce prior to use. pattern: '^[A-Z][A-Z_0-9]{1,64}$' example: MC_CARD_2, VISA_CARD1, VISA_VIRTUAL_3, MC_VIRTUAL_2, VISA_CARD ``` -------------------------------- ### GET /v1/{instalmentId} - Get Instalment by id Source: https://docs.enfuce.com/payment/api/instalment-controller Retrieves a specific instalment plan by its ID. ```APIDOC ## GET /v1/{instalmentId} ### Description Retrieves a specific instalment plan by its ID. ### Method GET ### Endpoint /v1/{instalmentId} ### Parameters #### Path Parameters - **instalmentId** (string) - Required - The ID of the instalment plan to retrieve. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **instalmentId** (string) - The ID of the instalment plan. - **amount** (number) - The total amount of the instalment. - **currency** (string) - The currency of the instalment. - **numberOfPortions** (integer) - The number of portions the instalment will be divided into. - **remainingPortions** (integer) - The number of remaining portions. - **status** (string) - The status of the instalment. - **accountId** (string) - The ID of the account associated with the instalment. - **createdAt** (string) - The date and time the instalment was created. #### Response Example ```json { "instalmentId": "inst_67890", "amount": 10000, "currency": "EUR", "numberOfPortions": 3, "remainingPortions": 2, "status": "active", "accountId": "acc_12345", "createdAt": "2023-11-15T10:00:00Z" } ``` ``` -------------------------------- ### GET /v1/{instalmentId}/portions/ - Get instalment portions Source: https://docs.enfuce.com/payment/api/instalment-controller Retrieves the portions of a specific instalment plan. ```APIDOC ## GET /v1/{instalmentId}/portions/ ### Description Retrieves the portions of a specific instalment plan. ### Method GET ### Endpoint /v1/{instalmentId}/portions/ ### Parameters #### Path Parameters - **instalmentId** (string) - Required - The ID of the instalment plan. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **portions** (array) - A list of instalment portions. - **portionId** (string) - The ID of the portion. - **dueDate** (string) - The due date of the portion. - **amount** (number) - The amount of the portion. - **paid** (boolean) - Indicates if the portion has been paid. #### Response Example ```json { "portions": [ { "portionId": "port_abc", "dueDate": "2023-12-01T00:00:00Z", "amount": 3333, "paid": false }, { "portionId": "port_def", "dueDate": "2024-01-01T00:00:00Z", "amount": 3333, "paid": false }, { "portionId": "port_ghi", "dueDate": "2024-02-01T00:00:00Z", "amount": 3334, "paid": false } ] } ``` ``` -------------------------------- ### Create Account API Source: https://docs.enfuce.com/payment/api/account-details Provides the endpoint for creating a new account. ```APIDOC ## POST /payment/api/create-an-account ### Description Creates a new account. ### Method POST ### Endpoint /payment/api/create-an-account ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **accountDetails** (object) - Required - Details of the account to be created. - **name** (string) - Required - The name of the account. - **email** (string) - Required - The email address for the account. ### Request Example ```json { "accountDetails": { "name": "John Doe", "email": "john.doe@example.com" } } ``` ### Response #### Success Response (201) - **accountId** (string) - The unique identifier for the newly created account. #### Response Example ```json { "accountId": "acc_12345abcde" } ``` ``` -------------------------------- ### Website Project Configuration Source: https://docs.enfuce.com/payment/api/create-card/create-a-fleet-card Details the configuration parameters for a website project, including country, address, and embossing options. ```APIDOC ## Website Project Configuration Details ### Description This section details the structure and properties for configuring a website project, including address information and embossing settings for physical cards. ### Method N/A (Schema Definition) ### Endpoint N/A (Schema Definition) ### Parameters #### Request Body - **country** (string) - Required - A valid ISO 3166-1 alpha-3 country code, except for QZZ and ROM. Pattern: `[A-Z]{3}`. Example: `FIN` - **address** (object) - Required - Contains detailed address information. - **address1** (string) - Required - The primary street address. Min length: 1, Max length: 255. Example: `Kings street 12` - **address2** (string) - Optional - Secondary address line. Max length: 255. - **address3** (string) - Optional - Tertiary address line. Max length: 255. - **address4** (string) - Optional - Quaternary address line. Max length: 255. - **city** (string) - Required - The city name. Min length: 1, Max length: 255. Example: `Mariehamn` - **country** (string) - Required - The country code for the address. Refers to `#/components/schemas/country`. - **region** (string) - Optional - The region or state. Max length: 32. Example: `Ă…land Islands` - **zipCode** (string) - Required - The postal code. Min length: 1, Max length: 32. Example: `22100` - **embossing** (object) - Optional - Configuration for card embossing. - **additionalField1** (string) - Optional - Additional embossing line 1. Max length: 32. - **additionalField2** (string) - Optional - Additional embossing line 2. Max length: 32. - **additionalField3** (string) - Optional - Additional embossing line 3. Max length: 32. - **additionalField4** (string) - Optional - Additional embossing line 4. Max length: 32. - **additionalField5** (string) - Optional - Additional embossing line 5. Max length: 32. - **companyName** (string) - Optional - Company name for embossing. Max length: 26. Example: `Enfuce Financial Services` - **externalLayoutCode** (string) - Optional - Code for external card layout. Max length: 32. Example: `BlueCard` - **firstName** (string) - Optional - First name for embossing. Max length: 26. Combined length with lastName should not exceed 26. - **lastName** (string) - Optional - Last name for embossing. Max length: 26. Combined length with firstName should not exceed 26. - **manufacturer** (string) - Optional - Name of the card manufacturer. Pattern: `[A-Z0-9_\-]{1,32}`. Example: `FACTORY_X` - **physical** (boolean) - Optional - Indicates if a physical card representation is required. ### Request Example ```json { "country": "FIN", "address": { "address1": "Kings street 12", "city": "Mariehamn", "country": "FIN", "zipCode": "22100" }, "embossing": { "companyName": "Enfuce Financial Services", "firstName": "Monica", "lastName": "Liikamaa", "physical": true } } ``` ### Response #### Success Response (200) - **message** (string) - A success message indicating the project configuration was updated or created. #### Response Example ```json { "message": "Project configuration updated successfully." } ``` ``` -------------------------------- ### GET /v1/transaction/{transactionId} - Get Instalment by transactionId Source: https://docs.enfuce.com/payment/api/instalment-controller Retrieves an instalment plan associated with a specific transaction ID. ```APIDOC ## GET /v1/transaction/{transactionId} ### Description Retrieves an instalment plan associated with a specific transaction ID. ### Method GET ### Endpoint /v1/transaction/{transactionId} ### Parameters #### Path Parameters - **transactionId** (string) - Required - The ID of the transaction to retrieve the instalment for. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **instalmentId** (string) - The ID of the instalment plan. - **amount** (number) - The total amount of the instalment. - **currency** (string) - The currency of the instalment. - **numberOfPortions** (integer) - The number of portions the instalment will be divided into. - **remainingPortions** (integer) - The number of remaining portions. - **status** (string) - The status of the instalment. - **accountId** (string) - The ID of the account associated with the instalment. - **createdAt** (string) - The date and time the instalment was created. #### Response Example ```json { "instalmentId": "inst_67890", "amount": 10000, "currency": "EUR", "numberOfPortions": 3, "remainingPortions": 2, "status": "active", "accountId": "acc_12345", "createdAt": "2023-11-15T10:00:00Z" } ``` ``` -------------------------------- ### Create Account Source: https://docs.enfuce.com/payment/api/create-an-account Creates a general account for a customer. This endpoint supports idempotency. ```APIDOC ## POST /v3/customer/{customerId} ### Description Creates a general account for a specified customer. Supports idempotent requests. ### Method POST ### Endpoint /v3/customer/{customerId} ### Parameters #### Path Parameters - **customerId** (string) - Required - The ID of the customer for whom to create the account. #### Headers - **x-idempotency-key** (string) - Required - A unique key generated by the client to ensure idempotency. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200 or 201) - **accountId** (string) - The unique identifier for the created account. #### Response Example ```json { "accountId": "acc_00112zabcde" } ``` ``` -------------------------------- ### GET /v1/account/{accountId} - Get instalment plans for a given account Source: https://docs.enfuce.com/payment/api/instalment-controller Retrieves all instalment plans associated with a specific account. ```APIDOC ## GET /v1/account/{accountId} ### Description Retrieves all instalment plans associated with a specific account. ### Method GET ### Endpoint /v1/account/{accountId} ### Parameters #### Path Parameters - **accountId** (string) - Required - The ID of the account to retrieve instalment plans for. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **instalments** (array) - A list of instalment plans. - **instalmentId** (string) - The ID of the instalment plan. - **amount** (number) - The total amount of the instalment. - **currency** (string) - The currency of the instalment. - **numberOfPortions** (integer) - The number of portions the instalment will be divided into. - **remainingPortions** (integer) - The number of remaining portions. - **status** (string) - The status of the instalment. #### Response Example ```json { "instalments": [ { "instalmentId": "inst_11111", "amount": 10000, "currency": "EUR", "numberOfPortions": 3, "remainingPortions": 2, "status": "active" }, { "instalmentId": "inst_22222", "amount": 5000, "currency": "USD", "numberOfPortions": 2, "remainingPortions": 0, "status": "closed" } ] } ``` ``` -------------------------------- ### Get Instalment Details (OpenAPI YAML) Source: https://docs.enfuce.com/payment/api/instalment-controller/get-instalment-by-transactionid This snippet defines the GET endpoint for retrieving instalment transaction details. It specifies the URL structure, authentication method (basicAuth), required path and query parameters, and the expected JSON response schema, including various fields related to the instalment plan and transaction. ```yaml instalment get /v1/transaction/{transactionId} paths: path: /v1/transaction/{transactionId} method: get servers: - url: >- https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/instalment - url: https://integration-api-cat2.live.ext.prod.cia.enfuce.com/instalment description: Live environment request: security: - title: basicAuth parameters: query: {} header: Authorization: type: http scheme: basic description: >- Basic authentication is used to authenticate towards Enfuce API. It is described in more detail in RFC 7617. cookie: {} parameters: path: transactionId: schema: - type: string required: true description: The transaction Id format: biginteger example: '8767653' query: auditUser: schema: - type: string required: true description: The audit user to log the request header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: object properties: id: allOf: - $ref: '#/components/schemas/instalmentId' instalmentOriginalId: allOf: - $ref: '#/components/schemas/instalmentOriginalId' accountId: allOf: - $ref: '#/components/schemas/accountId' creationDate: allOf: - $ref: '#/components/schemas/creationDate' firstPayment: allOf: - $ref: '#/components/schemas/firstPayment' lastPayment: allOf: - $ref: '#/components/schemas/lastPayment' currency: allOf: - $ref: '#/components/schemas/currency' effectiveRate: allOf: - $ref: '#/components/schemas/effectiveRate' deprecated: true totalAmount: allOf: - $ref: '#/components/schemas/totalAmount' principalAmount: allOf: - $ref: '#/components/schemas/principalAmount' feeAmount: allOf: - $ref: '#/components/schemas/feeAmount' interest: allOf: - $ref: '#/components/schemas/interestDetails' paidAmount: allOf: - $ref: '#/components/schemas/paidAmount' interestPaidAmount: allOf: - $ref: '#/components/schemas/interestPaidAmount' principalPaidAmount: allOf: - $ref: '#/components/schemas/principalPaidAmount' dueAmount: allOf: - $ref: '#/components/schemas/dueAmount' overdueAmount: allOf: - $ref: '#/components/schemas/overdueAmount' writtenOffAmount: allOf: - $ref: '#/components/schemas/writtenOffAmount' deprecated: true reversed: allOf: - $ref: '#/components/schemas/reversed' fullRepaymentAmount: allOf: - $ref: '#/components/schemas/fullRepaymentAmount' status: allOf: - description: The status of the instalment plan $ref: '#/components/schemas/status' lastUpdated: allOf: - $ref: '#/components/schemas/lastUpdated' transactionId: allOf: - $ref: '#/components/schemas/transactionId' description: allOf: - $ref: '#/components/schemas/description' planOptions: allOf: - $ref: '#/components/schemas/planOptionsResponse' refIdentifier: '#/components/schemas/getInstalmentResponse' examples: example: value: id: '678543' instalmentOriginalId: '678544' accountId: '677654434532' creationDate: '2023-11-07T05:31:56Z' firstPayment: '2023-12-25' lastPayment: '2023-12-25' currency: NOK effectiveRate: 10.46 totalAmount: 1000 principalAmount: 1000 feeAmount: 10 interest: interestRate: 9.9 effectiveRate: 10.46 interestAmount: 90 interestAmountBilled: 10 ``` -------------------------------- ### GET /websites/enfuce Source: https://docs.enfuce.com/payment/api/instalment-controller/get-instalment-by-id Retrieves information about enfuce websites. This endpoint allows you to fetch details related to enfuce website configurations and settings. ```APIDOC ## GET /websites/enfuce ### Description Retrieves information about enfuce websites. This endpoint allows you to fetch details related to enfuce website configurations and settings. ### Method GET ### Endpoint /websites/enfuce ### Parameters #### Query Parameters - **accountId** (string) - Required - The account identifier. - **transactionId** (string) - Required - The transaction identifier. ### Request Example ```json { "accountId": "677654434532", "transactionId": "8767653" } ``` ### Response #### Success Response (200) - **accountId** (string) - The account identifier. - **transactionId** (string) - The transaction identifier. - **tenor** (integer) - Number of instalments. - **instalmentId** (string) - Instalment id. - **instalmentOriginalId** (string) - The id which links the original instalment and the new instalment resulted after revise process. - **creationDate** (string) - The creation date. - **firstPayment** (string) - The day of the first payment. - **lastPayment** (string) - The day of the last payment. - **currency** (string) - The currency of the instalment. - **effectiveRate** (number) - The effective rate. Please use `interest.effectiveRate` instead. - **totalAmount** (number) - The total amount of the instalment plan. - **principalAmount** (number) - The principal amount. - **feeAmount** (number) - The fee amount. Please use `interest.interestAmount` instead. - **interestDetails** (object) - Details about the interest. - **interestRate** (number) - The interest rate. - **effectiveRate** (number) - The effective rate. - **interestAmount** (number) - The predicted interest. - **interestAmountBilled** (number) - The interest amount billed. - **paidAmount** (number) - The paid amount. Please use `interestPaidAmount` instead. - **interestPaidAmount** (number) - The interest paid amount. - **principalPaidAmount** (number) - The principal paid amount. - **dueAmount** (number) - The due amount of the instalment plan. - **overdueAmount** (number) - The overdue amount of the instalment plan. - **writtenOffAmount** (number) - The written-off amount. Please use `reversed` instead. - **reversed** (number) - The reversed amount. - **fullRepaymentAmount** (number) - The full repayment amount of the instalment plan. - **status** (string) - The status of the instalment. - **lastUpdated** (string) - The last updated date. - **portionAmount** (number) - The portion amount. #### Response Example ```json { "accountId": "677654434532", "transactionId": "8767653", "tenor": 12, "instalmentId": "678543", "instalmentOriginalId": "678544", "creationDate": "2023-11-07T05:31:56Z", "firstPayment": "2023-11-07", "lastPayment": "2024-10-07", "currency": "NOK", "effectiveRate": 10.46, "totalAmount": 1000, "principalAmount": 1000, "feeAmount": 10, "interestDetails": { "interestRate": 9.9, "effectiveRate": 10.46, "interestAmount": 90, "interestAmountBilled": 10 }, "paidAmount": 20, "interestPaidAmount": 20.57, "principalPaidAmount": 500, "dueAmount": 100, "overdueAmount": 200, "writtenOffAmount": 1000, "reversed": 1000, "fullRepaymentAmount": 900, "status": "OPEN", "lastUpdated": "2023-11-07T05:31:56Z", "portionAmount": 100 } ``` #### Error Response (404) - **code** (string) - Error code. - **message** (string) - Error message. - **id** (string) - Unique error identifier. - **errorCode** (string) - Specific error code. - **errorType** (string) - Type of error. - **errorReason** (string) - Reason for the error. - **timestamp** (string) - Timestamp of the error. #### Error Response Example (404) ```json { "code": "", "message": "", "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "errorCode": "INSTALMENT_API_ERROR", "errorType": "STATIC_VALIDATION_ERROR", "errorReason": "", "timestamp": "2023-11-07T05:31:56Z" } ``` #### Error Response (500) - **code** (string) - Error code. - **message** (string) - Error message. - **id** (string) - Unique error identifier. - **errorCode** (string) - Specific error code. - **errorType** (string) - Type of error. - **errorReason** (string) - Reason for the error. - **timestamp** (string) - Timestamp of the error. #### Error Response Example (500) ```json { "code": "", "message": "", "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "errorCode": "INSTALMENT_API_ERROR", "errorType": "STATIC_VALIDATION_ERROR", "errorReason": "", "timestamp": "2023-11-07T05:31:56Z" } ``` ``` -------------------------------- ### Instalment ID Schema Source: https://docs.enfuce.com/payment/api/instalment-controller/close-an-existing-instalment-plan Defines the schema for an instalment ID. It is a string with a description and an example value. ```yaml instalmentId: type: string description: Instalment id example: '678543' ``` -------------------------------- ### Create Credit Account Source: https://docs.enfuce.com/payment/api/create-an-account Creates a credit account for a customer. This endpoint supports idempotency. ```APIDOC ## POST /v4/CREDIT/customer/{customerId} ### Description Creates a credit account for a specified customer. Supports idempotent requests. ### Method POST ### Endpoint /v4/CREDIT/customer/{customerId} ### Parameters #### Path Parameters - **customerId** (string) - Required - The ID of the customer for whom to create the account. #### Headers - **x-idempotency-key** (string) - Required - A unique key generated by the client to ensure idempotency. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200 or 201) - **accountId** (string) - The unique identifier for the created credit account. #### Response Example ```json { "accountId": "acc_12345abcde" } ``` ``` -------------------------------- ### GET /websites/enfuce/instalments Source: https://docs.enfuce.com/payment/api/instalment-controller/get-instalment-by-transactionid Retrieves details for a specific instalment. Requires both account ID and instalment ID. ```APIDOC ## GET /websites/enfuce/instalments/{instalmentId} ### Description Retrieves details for a specific instalment. Requires both account ID and instalment ID. ### Method GET ### Endpoint /websites/enfuce/instalments/{instalmentId} ### Parameters #### Path Parameters - **instalmentId** (string) - Required - The unique identifier for the instalment. - **accountId** (string) - Required - The ID of the account associated with the instalment. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **instalmentId** (string) - The unique identifier for the instalment. - **accountId** (string) - The account to which the instalment belongs. - **tenor** (integer) - The number of instalments. - **creationDate** (string) - The creation date of the instalment plan. - **firstPayment** (string) - The date of the first payment. - **lastPayment** (string) - The date of the last payment. - **currency** (string) - The currency of the instalment. - **totalAmount** (number) - The total amount of the instalment plan. - **principalAmount** (number) - The principal amount of the instalment. - **interestDetails** (object) - Details about the interest. - **interestRate** (number) - The interest rate. - **effectiveRate** (number) - The effective interest rate. - **interestAmount** (number) - The predicted interest amount. - **interestAmountBilled** (number) - The interest amount that has been billed. - **paidAmount** (number) - The total amount paid so far. - **principalPaidAmount** (number) - The amount of principal paid so far. - **dueAmount** (number) - The outstanding amount due. - **overdueAmount** (number) - The amount that is overdue. - **writtenOffAmount** (number) - The amount that has been written off. - **fullRepaymentAmount** (number) - The amount required for full repayment. - **status** (string) - The current status of the instalment (e.g., OPEN, PAID, OVERDUE). - **lastUpdated** (string) - The date and time the instalment was last updated. #### Response Example ```json { "example": "{\n \"instalmentId\": \"678543\",\n \"accountId\": \"677654434532\",\n \"tenor\": 12,\n \"creationDate\": \"2023-01-01T00:00:00Z\",\n \"firstPayment\": \"2023-02-01\",\n \"lastPayment\": \"2024-01-01\",\n \"currency\": \"NOK\",\n \"totalAmount\": 1000,\n \"principalAmount\": 1000,\n \"interestDetails\": {\n \"interestRate\": 9.9,\n \"effectiveRate\": 10.46,\n \"interestAmount\": 90,\n \"interestAmountBilled\": 10\n },\n \"paidAmount\": 20,\n \"principalPaidAmount\": 500,\n \"dueAmount\": 100,\n \"overdueAmount\": 200,\n \"writtenOffAmount\": 1000,\n \"fullRepaymentAmount\": 900,\n \"status\": \"OPEN\",\n \"lastUpdated\": \"2023-11-07T05:31:56Z\"\n}" } ``` ### Error Handling - **404 Not Found**: Instalment not found. - **500 Internal Server Error**: An unexpected error occurred on the server. ```