Periodic Payment Initialization
Initialize periodic payments (standing orders) directly with a specific bank, bypassing the Open Finance UI. Use this when you know which bank the user will authorize with.
When to Use This Method
Use Payment Initialization when:
- You already know which bank the user will use
- You're building a custom bank selection UI
- You want to skip the Open Finance journey for a faster experience
- You have the user's bank provider ID from a previous connection
For general payment flows where the bank is unknown, use Periodic Payment Creation instead.
Prerequisites
- API credentials from the Open Finance dashboard
- Valid
clientIdandclientSecret - Bank
providerIdfor the user's bank
Step 1: Create Token
Create an access token to authenticate your API requests.
Endpoint: POST https://api.open-finance.ai/oauth/token
Request
{
"userId": "your-user-id",
"clientId": "your-client-id",
"clientSecret": "your-client-secret"
}Response
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 86400
}Step 2: Initialize Periodic Payment
Initialize a periodic payment directly with the bank. Returns the bank's authorization URL.
Endpoint: POST https://api.open-finance.ai/v2/pay/open-banking-init
Security: Bearer token with create:payments scope
Request Example
{
"providerId": "hapoalim",
"psuId": "123456789",
"redirectUrl": "https://yourapp.com/payment-complete",
"periodicPaymentInformation": {
"amount": 500,
"currency": "ILS",
"description": "Quarterly tax payment",
"creditorAccountNumber": "IL620108000000099999999",
"creditorAccountType": "iban",
"creditorName": "Tax Authority",
"debtorAccountNumber": "IL620108000000088888888",
"debtorAccountType": "iban",
"startDate": "2024-01-15",
"endDate": "2024-12-15",
"frequency": "Quarterly",
"dayOfExecution": "15",
"executionRule": "following"
}
}Request Parameters
| Key | Type | Description | Example | Required |
|---|---|---|---|---|
providerId | string | Bank provider identifier | "hapoalim" | Yes |
psuId | string | Payment service user identifier (national ID) | "123456789" | Yes |
redirectUrl | string | URL to redirect after authorization | "https://yourapp.com/callback" | No |
paymentId | string | Existing payment ID to resume | "01HQ..." | No |
periodicPaymentInformation | object | Periodic payment details | See below | Yes |
periodicPaymentInformation Object
| Key | Type | Description | Example | Required |
|---|---|---|---|---|
amount | number | Payment amount per execution | 500 | Yes |
currency | string | ISO 4217 currency code | "ILS" | Yes |
description | string | Payment reference | "Quarterly tax" | Yes |
startDate | string | ISO date when payments begin | "2024-01-15" | Yes |
frequency | string | Payment frequency | "Quarterly" | Yes |
debtorAccountNumber | string | Sender account number | "IL620108..." | Yes |
debtorAccountType | string | Sender account type | "iban" or "bban" | Yes |
creditorAccountNumber | string | Recipient account number | "IL620108..." | Conditional |
creditorAccountType | string | Recipient account type | "iban" or "bban" | Conditional |
creditorName | string | Recipient name | "Tax Authority" | Conditional |
endDate | string | ISO date when payments stop | "2024-12-15" | Conditional |
executionRule | string | Holiday handling | "following" or "preceding" | Conditional |
dayOfExecution | string | Day of month for execution | "1" to "31" | No |
monthsOfExecution | array | Specific months for MonthlyVariable | ["3", "6", "9"] | Conditional |
Important: Unlike the Payment Creation endpoint, the Init endpoint requires
debtorAccountNumberanddebtorAccountType.
Supported Frequencies
| Frequency | Description |
|---|---|
Daily | Every day |
Weekly | Once per week |
EveryTwoWeeks | Every two weeks |
Monthly | Once per month |
EveryTwoMonths | Every two months |
Quarterly | Every three months |
SemiAnnual | Every six months |
Annual | Once per year |
MonthlyVariable | Specific months only (requires monthsOfExecution) |
Response
{
"paymentId": "01HQXYZ123456789ABCDEF",
"status": "RCVD",
"scaOAuth": "https://bank-provider.com/oauth/authorize?client_id=..."
}| Key | Type | Description |
|---|---|---|
paymentId | string | Unique payment identifier |
status | string | Initial payment status |
scaOAuth | string | Direct URL to bank's authorization page |
Step 3: Redirect User
Redirect the user directly to the scaOAuth URL. The user will:
- Authenticate with their bank
- Authorize the standing order
- Be redirected to your
redirectUrl
Payment Flow
Your App Bank
| |
|-- POST /pay/open-banking-init |
| (with providerId) |
| |
|<-- { paymentId, scaOAuth } ---|
| |
|-- Redirect to scaOAuth ------>|
| |
| User authenticates & ------>|
| authorizes standing order |
| |
|<-- Redirect to redirectUrl ---|
| |
Provider-Specific Rules
Different banks have specific requirements:
Leumi
| Rule | Description |
|---|---|
endDate | Required - Must specify when payments end |
executionRule | Forbidden - Do not include this parameter |
Hapoalim
| Rule | Description |
|---|---|
amount | Must be greater than 9 |
Validation Rules
Date Validation
startDatemust be today or a future dateendDate(if provided) must be afterstartDate
Frequency Rules
dayOfExecutionmust be between 1 and 31monthsOfExecutionis required only forMonthlyVariablefrequencymonthsOfExecutionvalues must be unique (1-12), maximum 11 months
Account Validation
- Creditor and debtor accounts cannot be the same
- Debtor account information is required for this endpoint
Error Responses
| Status | Error | Description |
|---|---|---|
| 400 | startDate is required for periodic payments | Missing start date |
| 400 | frequency is required for periodic payments | Missing frequency |
| 400 | startDate must be today or in the future | Start date in the past |
| 400 | endDate must be after startDate | Invalid date range |
| 400 | endDate is required for leumi provider | Leumi requires end date |
| 400 | executionRule is not allowed for leumi provider | Leumi forbids execution rule |
| 400 | amount must be greater than 9 for hapoalim | Hapoalim minimum amount |
| 400 | Creditor and debtor accounts are the same | Same account error |
| 401 | Unauthorized | Invalid or expired token |
| 404 | Provider not found | Invalid provider ID |
Examples
Quarterly Tax Payment (Hapoalim)
{
"providerId": "hapoalim",
"psuId": "987654321",
"redirectUrl": "https://myapp.com/tax-complete",
"periodicPaymentInformation": {
"amount": 2500,
"currency": "ILS",
"description": "Quarterly VAT payment",
"creditorAccountNumber": "IL620108000000055555555",
"creditorAccountType": "iban",
"creditorName": "Israel Tax Authority",
"debtorAccountNumber": "IL620108000000066666666",
"debtorAccountType": "iban",
"startDate": "2024-01-15",
"endDate": "2024-12-15",
"frequency": "Quarterly",
"dayOfExecution": "15",
"executionRule": "following"
}
}Monthly Payment (Leumi)
{
"providerId": "leumi",
"psuId": "123456789",
"redirectUrl": "https://myapp.com/payment-complete",
"periodicPaymentInformation": {
"amount": 1500,
"currency": "ILS",
"description": "Monthly service fee",
"creditorAccountNumber": "IL620108000000011111111",
"creditorAccountType": "iban",
"creditorName": "Service Provider Ltd",
"debtorAccountNumber": "IL620108000000022222222",
"debtorAccountType": "iban",
"startDate": "2024-02-01",
"endDate": "2024-12-31",
"frequency": "Monthly",
"dayOfExecution": "1"
}
}Note: Leumi example does not include
executionRuleas it's forbidden for this provider.
Resume Existing Payment
If a payment was started but not completed, you can resume it:
{
"providerId": "hapoalim",
"psuId": "123456789",
"paymentId": "01HQXYZ123456789ABCDEF",
"redirectUrl": "https://myapp.com/payment-complete"
}Get Payment Status
Check the status of a periodic payment.
Endpoint: GET https://api.open-finance.ai/v2/payments/{PAYMENT_ID}
Response
{
"paymentId": "01HQXYZ123456789ABCDEF",
"status": "ACCC",
"paymentProduct": "periodic-payments"
}For a complete list of payment statuses, see Payment Statuses.
Cancel Periodic Payment
Cancel an active standing order.
Endpoint: DELETE https://api.open-finance.ai/v2/payments/{PAYMENT_ID}
Note: Only authorized periodic payments can be cancelled.
Updated 3 days ago
