Create a Mandate with the Open Finance Journey

Send your customer a mandate link, and let them pick their bank, enter the account and approve.


Use this to send your customer a link. You create it with what you know, send it to the customer, and the Open Finance journey asks for the rest. POST /v2/mandates always returns a link and never goes to the bank; to go to the bank yourself, use Create a Mandate Directly at the Bank.

Step 1: Create Token

Endpoint: POST https://api.open-finance.ai/oauth/token

{
  "userId": "your-user-id",
  "clientId": "your-client-id",
  "clientSecret": "your-client-secret"
}

Step 2: Create the Mandate Link

Endpoint: POST https://api.open-finance.ai/v2/mandates

Security: Bearer token with create:mandates scope

Request Example

{
  "providerIds": ["hapoalim", "mizrahi"],
  "redirectUrl": "https://yourapp.com/mandate-complete",
  "mandateInformation": {
    "creditorInstitutionCode": "23954",
    "maxAmount": 1000,
    "endDate": "2027-10-19",
    "mandateReference": "SUB-1042"
  }
}

Request Fields

FieldRequiredDescription
mandateInformation.creditorInstitutionCodeYesYour institution code (קוד מוסד) at Masav. The only required field.
mandateInformation.maxAmountNoLimit per charge, at least 1. Omit it for a mandate without a limit.
mandateInformation.frequencyNoHow often you charge. Requires providerIds (see below).
mandateInformation.startDateNoFirst charge date, YYYY-MM-DD. Requires providerIds.
mandateInformation.endDateNoExpiry date, YYYY-MM-DD. Without it the mandate is valid until cancelled.
mandateInformation.mandateReferenceNoYour reference (מספר אסמכתא), up to 35 characters.
mandateInformation.debtorAccountType, debtorAccountNumberNoThe account to charge, sent together: bban (e.g. 12-134-064543) or iban. Its bank becomes the only bank offered.
providerIdsNoThe banks the customer can choose from, e.g. ["hapoalim", "mizrahi"]. Without it, every bank that takes mandates is offered.
providerBankNumbersNoThe same, as bank numbers, e.g. [12, 20]. Merged with providerIds.
psuIdNoThe customer's ID number. Required with psuCorporateId.
psuCorporateIdNoCompany number, for a business account. A business always sends both the company number and the ID number of the person who approves.
allowBusinessNoLet the customer choose a business account and enter a company number. Set automatically when you send psuCorporateId.
includeFakeProvidersNoOffer sandbox banks in the journey.
redirectUrlNoWhere the customer goes when the journey ends. Must be in your allowed domains.
requestedCollectionDayNoDay of the month the customer asked to be charged on: "3", "10", "18" or "24". Saved on the mandate for your records, never sent to the bank.

Response (201)

{
  "mandateId": "01J9ZK2P7R4V1W6X3M5L0A8B7C",
  "mandateStatus": "INACTIVE",
  "mandateUrl": "https://api.open-finance.ai/su/01J9ZK2P9S3T0U5V2W4X6Y8Z1A"
}

The link is valid for 24 hours.

What You Send Is Locked in the Journey

As in payment and connection links, every value you send is shown prefilled and cannot be changed by the customer:

You sendIn the journey
psuIdThe ID number is filled in and locked, for a private and a business customer alike.
psuCorporateIdThe customer is a business; the company number is filled in and locked.
A debtor accountThe bank, branch and account number are filled in and locked.
One bank in providerIdsThat bank is selected and locked.

The journey checks the ID number and the company number (check digit; a company number has 8 or 9 digits) before it calls the bank.

Or create the link from the Dashboard

In the Dashboard, open Debit mandates and click New mandate. The form sends the same request as this step and returns the mandate link to send to your customer.

The New direct debit mandate form in the Dashboard, with institution code, limit per charge, bank, frequency, first charge date, valid until, customer ID and business and sandbox options

Dashboard → Debit mandates → New mandate (sample values)

  • Institution code is mandateInformation.creditorInstitutionCode. Limit per charge is maxAmount. Turn on No limit to leave it out.
  • Bank sets providerIds. Frequency and First charge date can only be set after you choose a bank that supports them.
  • Valid until is endDate. Without it the mandate is valid until cancelled.
  • Customer ID (psuId), Allow businesses (allowBusiness) and Include Sandbox Providers (includeFakeProviders) work as in the table above. Advanced settings holds redirectUrl.

Step 3: The Customer Completes the Journey

  1. The customer reads what a mandate is and their rights, and accepts the terms.
  2. They see your terms (charge limit, frequency, expiry), pick their bank, and enter their ID, branch and account number.
  3. The journey creates the mandate at the bank (POST https://api.open-finance.ai/v2/mandates/open-banking-init with the mandateId, called by the journey, not by you) and sends the customer to the bank to approve.
  4. After approval, the customer returns to redirectUrl and you receive the webhook.

If the customer leaves before approving at the bank and opens the link again, the journey goes straight back to the bank approval step.

When the customer goes to the bank

With Open Finance screensStraight to the bank (init)
The momentThe customer picks the bank and enters the account in the journey. The journey creates the mandate at the bank and sends the customer thereYou redirect the customer to scaOAuth, right after the init call
Status and webhookThe bank's status, usually RCVD, with a Mandate Status Change webhook. Until then the mandate is INACTIVEThe bank's status, usually RCVD, with a Mandate Status Change webhook
Link valid formandateUrl: 24 hours from creationscaOAuth: a few minutes, and the time differs per bank. Redirect the customer at once

In the sandbox there is no RCVD: the mandate stays INACTIVE until the customer returns. To compare every flow, see Open Finance screens or straight to the bank.

What Is Checked, and When

CheckWhenMessage
maxAmount at least 1Link creation400 validation error
endDate after today and after startDateLink creation, and again when the customer startsmandateInformation.endDate must be after today (YYYY-MM-DD).
frequency or startDate without providerIdsLink creationproviderIds is required when mandateInformation.frequency is set, because a time period is supported only by some providers: hapoalim, mizrahi.
A bank in providerIds that does not support a term or does not take mandatesLink creationPARAMETER_NOT_SUPPORTED, naming the supported banks
A debtor account whose bank is not in providerIdsLink creation400, naming the account's bank
psuCorporateId without psuIdLink creation400 validation error

Without providerIds, the journey hides the banks that do not support the frequency or first charge date you set. A bank that cannot take another term is refused when the customer picks it, with the same message.

Step 4: Track the Mandate

Listen to the webhook, or call GET https://api.open-finance.ai/v2/mandates/{mandateId}/status for the live status. See Overview for the statuses.

Next steps


Did this page help you?