openapi: 3.2.0 info: version: 1.6.0 title: iBanFirst Financial movements API description: "iBanFirst API for cross-border payments, FX trades, account management, beneficiaries, and webhooks.\n\n**Try it out in Postman:** [View Postman Collection](https://www.postman.com/productibf/ibanfirst-rest-api-workspace/collection/d24hl8d/ibanfirst-rest-api?action=share&creator=44872188)\n\n---\n\n## Authentication — X-WSSE\n\nEvery request must include an `X-WSSE` header. Plain HTTP calls will fail. The token is **stateless and expires after ~5 minutes**, so it must be computed fresh for each request.\n\n### Header format\n\n```\nX-WSSE: UsernameToken Username=\"\", PasswordDigest=\"\", Nonce=\"\", Created=\"\"\n```\n\n### Fields\n\n| Field | Description |\n|---|---|\n| `Username` | The username assigned during onboarding. |\n| `Nonce` | A Base64-encoded random hex string (≥ 32 hex characters). |\n| `Created` | Current UTC timestamp in ISO 8601: `YYYY-MM-DDTHH:MM:SSZ`. |\n| `PasswordDigest` | `Base64( SHA-1( nonce_bytes ∥ created_bytes ∥ secret_bytes ) )` — SHA-1 **binary** digest, then Base64. |\n\n### Algorithm (step-by-step)\n\n1. Generate a random nonce: at least 32 lowercase hexadecimal characters (e.g. `d36e3162829ed4c89851497a717f0001`).\n2. Get the current UTC timestamp as an ISO-8601 string (e.g. `2026-05-12T10:30:00Z`).\n3. Encode the nonce string as UTF-8 bytes, the timestamp as UTF-8 bytes, and the API secret as UTF-8 bytes.\n4. Compute `SHA-1( nonce_bytes + created_bytes + secret_bytes )`. The hash **must** be the raw binary digest (not hex).\n5. `PasswordDigest` = `Base64( sha1_binary_digest )`\n6. `Nonce` = `Base64( nonce_utf8_bytes )`\n\n### Code samples\n\n**Python**\n```python\nimport base64, hashlib, os, binascii\nfrom datetime import datetime, timezone\n\ndef generate_xwsse(username: str, secret: str) -> str:\n nonce = binascii.b2a_hex(os.urandom(16)) # 32 hex bytes\n created = datetime.now(timezone.utc).strftime(\"%Y-%m-%dT%H:%M:%SZ\")\n digest = base64.b64encode(\n hashlib.sha1(nonce + created.encode() + secret.encode()).digest()\n ).decode()\n nonce_b64 = base64.b64encode(nonce).decode()\n return f'UsernameToken Username=\"{username}\", PasswordDigest=\"{digest}\", Nonce=\"{nonce_b64}\", Created=\"{created}\"'\n```\n\n**JavaScript (Node.js)**\n```javascript\nconst crypto = require('crypto');\nfunction generateXWSSE(username, secret) {\n const nonce = crypto.randomBytes(16);\n const created = new Date().toISOString();\n const digest = crypto.createHash('sha1')\n .update(nonce)\n .update(Buffer.from(created))\n .update(Buffer.from(secret))\n .digest('base64');\n return `UsernameToken Username=\"${username}\", PasswordDigest=\"${digest}\", Nonce=\"${nonce.toString('base64')}\", Created=\"${created}\"`;\n}\n```\n\n**PHP**\n```php\nfunction generateXWSSE(string $username, string $secret): string {\n $nonce = bin2hex(random_bytes(16)); // 32 hex chars\n $created = gmdate('Y-m-d\\TH:i:s\\Z');\n $digest = base64_encode(sha1($nonce . $created . $secret, true));\n return sprintf('UsernameToken Username=\"%s\", PasswordDigest=\"%s\", Nonce=\"%s\", Created=\"%s\"',\n $username, $digest, base64_encode($nonce), $created);\n}\n```\n\n### Environments\n\n| Environment | Base URL |\n|---|---|\n| Demo (testing) | `https://api-demo.ibanfirst.com/api` |\n| Live (production) | `https://api.ibanfirst.com/api` |\n\n### Forbidden characters in input fields\n\nThe following characters are rejected in route parameters, query parameters, and JSON bodies: `&` `<` `>` `%` `?` `\\` `/` `|`" servers: - url: https://api-demo.ibanfirst.com/api security: - X-WSSE: [] tags: - name: Financial movements description: 'The API allows you to retrieve all financial movements from your accounts. ' paths: /financialMovements: get: summary: Get financial movements tags: - Financial movements description: "Retrieve a list of financial movements that has been received or sent for the last 12 months. \n" parameters: - name: walletId in: query description: 'The unique id of an account. ' required: false schema: type: string - name: fromDate in: query description: 'The starting date to search financial movements on your accounts. ' required: false schema: type: string format: YYYY-MM-DD - name: toDate in: query description: 'The ending date to search financial movements on your accounts. ' required: false schema: type: string format: YYYY-MM-DD - name: page in: query description: 'Index of the page. ' required: false schema: type: string default: '1' - name: per_page in: query description: 'Number of items returned. ' required: false schema: type: string default: '50' - name: sort in: query description: 'A code representing the order of rendering objects. ' required: false schema: type: string enum: - ASC - DESC responses: '200': description: OK content: application/json: schema: type: object properties: financialMovements: type: array items: type: object properties: id: $ref: '#/components/schemas/ID' bookingDate: $ref: '#/components/schemas/Datetime' walletId: $ref: '#/components/schemas/ID' valueDate: $ref: '#/components/schemas/Date' amount: $ref: '#/components/schemas/Amount' description: description: Description of the financial movement. type: string maxLength: 76 '204': description: No financial movements found default: description: ERROR content: application/json: schema: $ref: '#/components/schemas/Error' /financialMovements/{id}: get: summary: Get financial movement details tags: - Financial movements description: "Request information on a particular financial movement that has been credited or debited to a wallet.\nThe `typeLabel` field may contain these values:\n - **rejectOperation**: Payment returned by the bank counterparty\n - **DebitForExchange**: Debit for an FX operation\n - **DebitForTransfer**: Debit linked to a transfer\n - **CreditForExchange**: Credit linked to an FX operation\n - **Immobilize**: Payment registered but not debited on value date\n - **ExternalCounterpartCredit**: Account credit\n - **debitForAccountGuaranteeCredit**: Movement related to the deposit for forward exchange transaction\n - **debitAccountGuarantee**: Movement related to the deposit for forward exchange transaction\n - **internalGuaranteeTransfer**: Movement related to the deposit for forward exchange transaction\n - **corrective**: Corrective\n - **rejectCreditDepositAccount**: Rejection of a flow credited to the account / after liquidation\n - **returnFund**: Payment returned by the recipient counterparty\n - **rejectDebit**: Rejection of an automatic debit on iBanFirst account (SDD)\n - **PrepaidCardDepositAccountDebit**: Initialization of a virtual payment card\n - **PrepaidCardDepositAccountCredit**: Recredit funds stored on a virtual payment card that expires\n - **clientFee**: Fees for using iBanFirst accounts\n - **cancelClientFee**: Commercial gesture\n - **DirectDebit**: Direct debit on iBanFirst account" parameters: - name: id in: path description: 'The id referring the financial movement. ' required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: financialMovement: $ref: '#/components/schemas/FinancialMovement' default: description: ERROR content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: Currency: type: string pattern: ^[A-Z]{3}$ format: ^[A-Z]{3}$ example: USD description: 'A String representing the Three-digit ISO 4217 Currency Code of a currency. This String only contains capitalized letters. ' QuotedDecimal: type: string pattern: ^((\-)?)[0-9]{12}((\.[0-9]{1,7})?)$ format: ^((\-)?)[0-9]{12}((\.[0-9]{1,7})?)$ example: '2.257' description: 'A String representing a formatted floating number. ' FinancialMovement: type: object description: 'Representation of a financial movement ' properties: id: $ref: '#/components/schemas/ID' bookingDate: $ref: '#/components/schemas/Date' valueDate: $ref: '#/components/schemas/Date' orderingAccountNumber: type: string maxLength: 40 description: 'The number referring the ordering account of the transfer. ' orderingCustomer: type: string description: 'A free formatted String representing the ordering customer with it''s name and it''s address. ' orderingInstitution: type: string description: 'A free formatted String representing the ordering institution with it''s name and it''s address. ' orderingAmount: $ref: '#/components/schemas/Amount' beneficiaryAccountNumber: type: string maxLength: 40 description: 'The number referring the beneficiary account. ' beneficiaryCustomer: type: string description: 'A free formatted String representing the beneficiary customer with it''s name and it''s address. ' beneficiaryInstitution: type: string description: 'A free formatted String representing the beneficiary institution with it''s name and it''s address. ' beneficiaryAmount: $ref: '#/components/schemas/Amount' remittanceInformation: type: string description: 'The communication field. ' chargesDetails: type: string description: 'The charges details related to the transfer. ' exchangeRate: type: number format: float description: 'The exchange rate applied on the transfer. ' typeLabel: type: string description: 'The type of the financial movement. ' internalReference: type: string description: 'Internal Reference of the financial movement. ' description: type: string description: 'Description of the financial movement. ' Date: type: string pattern: ^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$ format: ^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$ example: '2016-01-01' description: "A String representing a date by its year, month and day in month.\n \n" ID: type: string pattern: ^[A-Za-z0-9]+$ format: ^[A-Za-z0-9]+$ example: Na5Dv6E description: 'A String representing the id of an object. This string contains alpha-numeric characters, including the capital ones. ' Error: type: object description: 'Representation of an error. ' properties: errorCode: type: number format: int description: 'The code referring the error. ' errorType: type: string description: 'A short description identifying a general category for the error that occurred. ' errorMessage: type: string description: Error description. link: type: string description: 'An hyperlink to access the page that describes more accurately the error. ' Datetime: type: string pattern: ^((19[0,99]|2[0-9]{3})\-(0[1-9]|1[012])\-([012][0-9]|3[01])\ ([01][0-9]|2[0-3])\:([0-5][0-9])\:([0-5][0-9]))$ format: ^((19[0,99]|2[0-9]{3})\-(0[1-9]|1[012])\-([012][0-9]|3[01])\ ([01][0-9]|2[0-3])\:([0-5][0-9])\:([0-5][0-9]))$ example: '2016-01-01 00:00:00' description: 'A String representing a date by its year, month, day in month, hour, minute and second. ' Amount: type: - object - 'null' description: 'Representation of an amount. ' required: - value - currency properties: value: $ref: '#/components/schemas/QuotedDecimal' currency: $ref: '#/components/schemas/Currency' securitySchemes: X-WSSE: type: apiKey in: header name: X-WSSE description: 'X-WSSE token-based authentication. The header value must be computed fresh for every request (tokens expire in ~5 minutes). Header value format: ``` UsernameToken Username="", PasswordDigest="", Nonce="", Created="" ``` Algorithm: 1. Generate a random nonce: ≥ 32 lowercase hex characters. 2. Get current UTC timestamp in ISO 8601: `YYYY-MM-DDTHH:MM:SSZ`. 3. Compute `PasswordDigest = Base64( SHA-1( nonce_bytes + created_bytes + secret_bytes ) )` — SHA-1 over the raw UTF-8 bytes concatenated in that order, result must be the binary digest before Base64 encoding. 4. Compute `Nonce = Base64( nonce_utf8_bytes )`. See the `info.description` field at the top of this spec for full code samples in Python, JavaScript, PHP, Java, and Go.'