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 sendThe 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-initand anrtpPaymentInformationobject, then follow the result. You can cancel it while it isINITorRCVD. - 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 transferstatusand the payer's decision inrequestStatus. The response has noscaOAuthlink, 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.
Call POST /v2/pay/open-banking-init with rtpPaymentInformation. Open Finance sends the request to the customer's bank.
The bank, not Open Finance, texts the customer that a payment request is waiting in its payment-requests area.
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 moment | The request reaches the bank during the init call. The customer answers it whenever they open the bank's app or website |
| The SMS | The 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 webhook | Right 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 lasts | There 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
| Key | Type | Description | Required |
|---|---|---|---|
providerId | string | The payer's bank | Yes |
psuId | string | The payer's national ID or passport number. It is sent to the bank to identify the payer | Yes |
psuCorporateId | string | The payer's business ID. Sent with the request to Leumi, Discount and Mercantile | No |
paymentProduct | string | request-to-pay. Sending rtpPaymentInformation already selects it | No |
externalId | string | Your own reference, returned on the payment | No |
callbackInformation | object | A webhook for this request only. See Webhooks | No |
includeFakeProviders | boolean | true for the sandbox | No |
rtpPaymentInformation | object | The request. See the next section | Yes |
The rtpPaymentInformation object
| Key | Type | Description | Required |
|---|---|---|---|
amount | number | Greater than 0 | Yes |
currency | string | Three-letter currency code, for example ILS | Yes |
description | string | 1 to 34 characters | Yes |
debtorAccountNumber | string | The payer's account | Yes |
debtorAccountType | string | iban or bban | Yes |
creditorAccountNumber | string | The account that receives the money | See note |
creditorAccountType | string | iban or bban | See note |
creditorName | string | Up to 36 characters: letters, digits and spaces only | See note |
expiryDateTime | string | When the request expires, as YYYY-MM-DDTHH:mm:ss.sssZ. Without it, the bank gets an expiry 7 days after the request is created | No |
requestedExecutionDate | string | Execution date, as YYYY-MM-DD | No |
requestedExecutionDateTime | string | Execution date and time, as YYYY-MM-DDTHH:mm:ss.sssZ. Must be a date after today. Cannot be sent with requestedExecutionDate | No |
CreditorSend
creditorAccountNumber,creditorAccountTypeandcreditorName. 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 with400Creditor account and name are required.
A successful response is HTTP 201:
{
"paymentId": "example-payment-id",
"status": "RCVD",
"requestStatus": "PENDING"
}| Key | Description |
|---|---|
paymentId | The payment ID. Use it to follow and to cancel the request |
status | The transaction status from the bank. RCVD when the bank did not return one |
requestStatus | The 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:
| Field | What it tracks |
|---|---|
status | The transfer itself, as reported by the bank |
requestStatus | The 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 sends | requestStatus | The webhook goes to |
|---|---|---|
PNDG or PDNG | PENDING | successUrl |
RJCT | RJCT | failUrl |
CANC | CANC | failUrl |
EXPD | EXPD | successUrl |
| Any other value | The same value | successUrl |
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 tosuccessUrl
EXPDis sent tosuccessUrl. 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
statusisINIT,RCVD,PENDING,PATCorERROR. See Status re-checks. GET /v2/payments/{paymentId}/statusreads 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"
}| Status | Error | Description |
|---|---|---|
| 400 | Cannot cancel RTP with status ... | The status is not INIT or RCVD |
| 404 | No payment was found | No 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) | status | Meaning |
|---|---|---|
IL070311140000000435694 | ACSC | Paid |
IL630310640000000406821 | ACSP | Accepted for execution |
IL060311140000000436488 | RCVD | Waiting for the payer |
IL120311140000000436283 | EXPD | Expired |
IL490311240000000272604 | RJCT | Rejected |
IL060311140000000436682 | CANC | Cancelled |
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
Updated about 3 hours ago
