Request to Pay

Send a payment request to the payer's bank, follow the payer's answer, and cancel the request if you need to.

A request-to-pay sends a payment request to the payer's bank. There is no redirect: the payer approves or rejects the request at their bank, and you follow the result through the payment status and webhooks.

📘

No link to send

The customer gets an SMS from their bank and approves the request in the bank's app or website.

At a glance

  • What you'll do: create the request with POST /v2/pay/open-banking-init and an rtpPaymentInformation object, then follow the result. You can cancel it while it is INIT or RCVD.
  • What you need: a token with create:payments, and the payer's bank (providerId), ID number (psuId) and account.
  • What you get back: a paymentId, the transfer status and the payer's decision in requestStatus. The response has no scaOAuth link, because the payer is not redirected.

To test the flow without a real bank, use the sandbox.

When the customer goes to the bank

The payer, your customer, is never redirected. There is no payUrl and no link to send. The request opens directly in the customer's bank, in the payment-requests area (אזור בקשות התשלום) of the bank's website or app.

1. You create the request

Call POST /v2/pay/open-banking-init with rtpPaymentInformation. Open Finance sends the request to the customer's bank.

2. The bank sends an SMS

The bank, not Open Finance, texts the customer that a payment request is waiting in its payment-requests area.

3. The customer answers at the bank

The customer approves or declines the request in the bank's app or website. You get the status by webhook.

So "going to the bank" means that the customer opens their bank's app or website, finds the request under payment requests, and approves or declines it there.

What happens
The momentThe request reaches the bank during the init call. The customer answers it whenever they open the bank's app or website
The SMSThe bank sends it to the mobile number it has on file for the customer. You can't choose or change that number through Open Finance
Status and webhookRight after the call: the bank's transfer status in status (RCVD when the bank sends none) and the customer's decision in requestStatus, with a Payment Status Change webhook. Another webhook follows when either status changes
How long it lastsThere is no link. The request expires at the bank at expiryDateTime, by default 7 days after it is created. A request the customer did not answer in time shows EXPD

Request-to-pay starts only with init: POST /v2/payments rejects rtpPaymentInformation with 400. To compare every flow, see Open Finance screens or straight to the bank.

Bank support

Request-to-pay works only when the payer's bank supports it.

Available at: Hapoalim (hapoalim), Leumi (leumi), Mizrahi-Tefahot (mizrahi), Discount (discount), Mercantile (mercantile), Beinleumi (beinleumi) and Yahav (yahav). Check with support before you go live with a bank.

1. Create a request

POST https://api.open-finance.ai/v2/pay/open-banking-init, with a bearer token that has the create:payments scope. Open Finance sends the request to the payer's bank (providerId).

{
  "providerId": "leumi",
  "psuId": "000000018",
  "externalId": "invoice-1234",
  "rtpPaymentInformation": {
    "amount": 250,
    "currency": "ILS",
    "description": "Invoice 1234",
    "debtorAccountType": "bban",
    "debtorAccountNumber": "10-944-50151142",
    "creditorAccountType": "iban",
    "creditorAccountNumber": "IL730200040000000552717",
    "creditorName": "Example Ltd",
    "expiryDateTime": "2027-01-15T12:00:00.000Z"
  }
}
Request fields
KeyTypeDescriptionRequired
providerIdstringThe payer's bankYes
psuIdstringThe payer's national ID or passport number. It is sent to the bank to identify the payerYes
psuCorporateIdstringThe payer's business ID. Sent with the request to Leumi, Discount and MercantileNo
paymentProductstringrequest-to-pay. Sending rtpPaymentInformation already selects itNo
externalIdstringYour own reference, returned on the paymentNo
callbackInformationobjectA webhook for this request only. See WebhooksNo
includeFakeProvidersbooleantrue for the sandboxNo
rtpPaymentInformationobjectThe request. See the next sectionYes
The rtpPaymentInformation object
KeyTypeDescriptionRequired
amountnumberGreater than 0Yes
currencystringThree-letter currency code, for example ILSYes
descriptionstring1 to 34 charactersYes
debtorAccountNumberstringThe payer's accountYes
debtorAccountTypestringiban or bbanYes
creditorAccountNumberstringThe account that receives the moneySee note
creditorAccountTypestringiban or bbanSee note
creditorNamestringUp to 36 characters: letters, digits and spaces onlySee note
expiryDateTimestringWhen the request expires, as YYYY-MM-DDTHH:mm:ss.sssZ. Without it, the bank gets an expiry 7 days after the request is createdNo
requestedExecutionDatestringExecution date, as YYYY-MM-DDNo
requestedExecutionDateTimestringExecution date and time, as YYYY-MM-DDTHH:mm:ss.sssZ. Must be a date after today. Cannot be sent with requestedExecutionDateNo
📘

Creditor

Send creditorAccountNumber, creditorAccountType and creditorName. If you leave out both the creditor account and the name, your organization's default merchant is used, when one is set. Otherwise the request is rejected with 400 Creditor account and name are required.

A successful response is HTTP 201:

{
  "paymentId": "example-payment-id",
  "status": "RCVD",
  "requestStatus": "PENDING"
}
KeyDescription
paymentIdThe payment ID. Use it to follow and to cancel the request
statusThe transaction status from the bank. RCVD when the bank did not return one
requestStatusThe payer's decision on the request, as returned by the bank

If the bank does not accept the request, the call fails and the payment is saved with status ERROR. See Failure Details.

2. Follow the result

A request-to-pay has two statuses:

FieldWhat it tracks
statusThe transfer itself, as reported by the bank
requestStatusThe payer's decision on the request, as reported by the bank

Open Finance returns requestStatus as the bank sends it, except for one change:

The bank sendsrequestStatusThe webhook goes to
PNDG or PDNGPENDINGsuccessUrl
RJCTRJCTfailUrl
CANCCANCfailUrl
EXPDEXPDsuccessUrl
Any other valueThe same valuesuccessUrl

status gets the same change: PNDG and PDNG become PENDING. The webhook goes to failUrl when either status or requestStatus is ERROR, RJCT or CANC.

🚧

An expired request goes to successUrl

EXPD is sent to successUrl. Always check the status.

When the bank sends a reason code, a decision time or an accepted amount, GET /v2/payments/{paymentId} returns them in requestReasonCode, requestDebtorDecisionDateTime and requestAcceptedAmount. It returns the paymentProduct as "product": "request-to-pay".

Following the request

  • Open Finance reads the request from the bank right after it is created, and then about once an hour while status is INIT, RCVD, PENDING, PATC or ERROR. See Status re-checks.
  • GET /v2/payments/{paymentId}/status reads the status from the bank when you call it.
  • The payment webhook includes requestStatus, and is sent when either status changes. See Event Types.

3. Cancel a request

DELETE https://api.open-finance.ai/v2/payments/{paymentId}, with a bearer token that has the delete:payments scope.

You can cancel a request while its status is INIT or RCVD. If the request already reached the bank, Open Finance cancels it at the bank first. The payment then becomes CANC, and a webhook is sent to failUrl.

A successful response is HTTP 200:

{
  "paymentId": "example-payment-id",
  "status": "CANC"
}
StatusErrorDescription
400Cannot cancel RTP with status ...The status is not INIT or RCVD
404No payment was foundNo payment with this ID for the token's user

Sandbox

Use providerId: "open-finance-sandbox" with includeFakeProviders: true. The debtor account decides the result. The approval in the bank's app cannot be simulated, so the request gets its status when it is created, and it is not re-checked later.

Debtor account (debtorAccountNumber)statusMeaning
IL070311140000000435694ACSCPaid
IL630310640000000406821ACSPAccepted for execution
IL060311140000000436488RCVDWaiting for the payer
IL120311140000000436283EXPDExpired
IL490311240000000272604RJCTRejected
IL060311140000000436682CANCCancelled

Any other debtor account is rejected with 400 Debtor account is not an rtp sandbox account.

{
  "providerId": "open-finance-sandbox",
  "includeFakeProviders": true,
  "psuId": "000000018",
  "rtpPaymentInformation": {
    "amount": 250,
    "currency": "ILS",
    "description": "Invoice 1234",
    "debtorAccountType": "iban",
    "debtorAccountNumber": "IL070311140000000435694",
    "creditorAccountType": "iban",
    "creditorAccountNumber": "IL900311140000000111111",
    "creditorName": "Example Ltd"
  }
}

The response has paymentId and status (here ACSC). GET /v2/payments/{paymentId} returns the same value in requestStatus, and a webhook is sent when the request is created.

Next steps


Did this page help you?