Create a Mandate with the Open Finance Journey

Send your customer a link; they pick their bank, enter the account and approve


Use this when you do not know your customer's bank or account. You create a link, send it to the customer, and the Open Finance journey does the rest.

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

{
  "useJourney": true,
  "redirectUrl": "https://yourapp.com/mandate-complete",
  "mandateInformation": {
    "creditorInstitutionCode": "23954",
    "maxAmount": 1000,
    "endDate": "2027-10-19",
    "mandateReference": "SUB-1042"
  }
}

Request Fields

FieldRequiredDescription
useJourneyYestrue to get a journey link.
mandateInformation.creditorInstitutionCodeYesYour institution code (קוד מוסד) at Masav.
mandateInformation.maxAmountNoLimit per charge, at least 1. Omit it for a mandate without a limit.
mandateInformation.frequencyNoHow often you charge. Requires providerId (see below).
mandateInformation.startDateNoFirst charge date, YYYY-MM-DD. Requires providerId.
mandateInformation.endDateNoExpiry date, YYYY-MM-DD. Without it the mandate is valid until cancelled.
mandateInformation.mandateReferenceNoYour reference (מספר אסמכתא), up to 35 characters.
providerIdNoPin the bank the customer must use, e.g. hapoalim.
psuIdNoThe customer's ID number. Prefilled in the journey, and the customer must use it.
allowBusinessNoLet the customer choose a business account and enter a company number.
includeFakeProvidersNoOffer sandbox banks in the journey.
redirectUrlNoWhere the customer goes when the journey ends. Must be in your allowed domains.

Response (201)

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

The link is valid for 24 hours.

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 /v2/mandates/{mandateId}/init, 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.

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 providerIdLink creationproviderId is required when mandateInformation.frequency is set, because a time period is supported only by some providers: hapoalim, mizrahi.
A pinned bank that does not support a termLink creationPARAMETER_NOT_SUPPORTED, naming the supported banks

Without a pinned bank, 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.


Did this page help you?