Pay by Bank

PaySuite Payment Page

Use the PaySuite Payment Page to let customers pay by bank without building your own payment form.

No special actions are required to create a hosted session that supports Pay by Bank; If it is enabled on your account, it appears on the payment form for eligible transactions. It is the first, pre-selected payment method by default.

Controlling the payment methods shown

The payment methods available, and their order, can be customised when creating the hosted session using features.paymentMethods. The array should contain the names of the methods you want to display, for example card and openbanking.

{
  "session": {
    "features": {
      "paymentMethods": ["openbanking", "card"]
    }
  }
}

Returning to your site after the redirect

When using the PaySuite payment page inside an iframe, you can use the restoreUrl field to return the customer to your own web page after the transaction is complete. If restoreUrl is specified, the customer is returned to that URL with a query parameter containing the URL to load in the frame. When the PaySuite payment page is not placed inside an iframe, the returnUrl is used.

Create a payment session

Creating a hosted session for a payment
EndpointDefinition
POST /hosted/rest/sessions/{instId}/payments
Request body
{
  "session": {
    "transactionNotification": {
      "url": "http://www.example.com/notification"
    },
    "returnUrl": {
      "url": "http://www.example.com/transactionResult?MERCHANTREF=761585761585"
    }
  },
  "transaction": {
    "merchantReference": "761585761585",
    "money": {
      "amount": {
        "fixed": 10.30
      },
      "currency": "GBP"
    }
  }
}
cURL
curl -X POST "{targetEnvironmentPath}/hosted/rest/sessions/{instId}/payments" \
  -u "{apiUser}:{apiPassword}" \
  -H "Content-Type: application/json" \
  -d '{
  "session": {
    "transactionNotification": {
      "url": "http://www.example.com/notification"
    },
    "returnUrl": {
      "url": "http://www.example.com/transactionResult?MERCHANTREF=761585761585"
    }
  },
  "transaction": {
    "merchantReference": "761585761585",
    "money": {
      "amount": {
        "fixed": 10.30
      },
      "currency": "GBP"
    }
  }
}'
Response
HTTP/1.1 200
{
  "sessionId": "5280f295-b7ea-4eaa-8e3b-ebd6fa67cc58",
  "redirectUrl": "https://secure.mite.pay360.com/hosted/8f2c9ec4-f9e6-44a7-b14a-39a47d3aeb65/begin/5280f295-b7ea-4eaa-8e3b-ebd6fa67cc58",
  "status": "SUCCESS"
}
Notes:
  • transactionNotification is not required — it is one of the common features with Cards & Wallets. For every field the payment session creation request accepts, see the endpoint's definition using the button at the top of this example.

Create payment session when using an iFrame

Creating a hosted session when iFraming payment page
EndpointDefinition
POST /hosted/rest/sessions/{instId}/payments
Request body
{
  "session": {
    "transactionNotification": {
      "url": "http://www.example.com/notification"
    },
    "returnUrl": {
      "url": "http://www.example.com/transactionResult?MERCHANTREF=761585761585"
    },
    "restoreUrl": {
      "url": "http://www.example.com/restore"
    }
  },
  "transaction": {
    "merchantReference": "761585761585",
    "money": {
      "amount": {
        "fixed": 10.30
      },
      "currency": "GBP"
    }
  }
}
cURL
curl -X POST "{targetEnvironmentPath}/hosted/rest/sessions/{instId}/payments" \
  -u "{apiUser}:{apiPassword}" \
  -H "Content-Type: application/json" \
  -d '{
  "session": {
    "transactionNotification": {
      "url": "http://www.example.com/notification"
    },
    "returnUrl": {
      "url": "http://www.example.com/transactionResult?MERCHANTREF=761585761585"
    },
    "restoreUrl": {
      "url": "http://www.example.com/restore"
    }
  },
  "transaction": {
    "merchantReference": "761585761585",
    "money": {
      "amount": {
        "fixed": 10.30
      },
      "currency": "GBP"
    }
  }
}'
Response
HTTP/1.1 200
{
  "sessionId": "0c26a3f7-3f52-4a1a-bb01-5f0dcb1f70a3",
  "redirectUrl": "https://secure.mite.pay360.com/hosted/8f2c9ec4-f9e6-44a7-b14a-39a47d3aeb65/begin/0c26a3f7-3f52-4a1a-bb01-5f0dcb1f70a3",
  "status": "SUCCESS"
}
Notes:
  • The customer is returned to the restoreUrl with a query parameter containing the URL to load in the frame, so use it when the payment page is embedded in an iframe. See more details at Resuming a session inside an iframe.

Refund a payment

A Pay by Bank payment can be refunded once it has reached SUCCESS, in full or as multiple partial refunds up to the original amount. Refunds work the same way as for cards and wallets — from the merchant portal, or with the refund request described in Refund a payment.

Best practices

Use notifications or poll for the transaction result to ensure you receive the final status of the transaction. Notifications are one of the common features with Cards & Wallets; for more detail on them specifically, see Notifications.