Internet Banking

Internet banking enables customers of a bank to easily conduct financial transactions through a bank-operated website. In order to pay via internet Banking, the customer is required to have a registered account with their respective bank.

Registering for an account can be done online using an ATM or Debit Card, or offline at a branch.

The payment flow

Customers that choose to pay via internet banking go through a redirect payment flow. This means that they are redirected from the merchant's website to a secure bank-operated page in order to authorize and confirm the payment amount. Upon completion, the customer is automatically redirected back to the merchant's website.

internet banking 1

The customer selects internet banking as their preferred payment method and is redirected to the bank's page.

internet banking 2

Payment amound and referrence numbers are already filled out. The customer only has to review the information and confirm the payment.

Creating a charge

Creating an offsite internet banking charge is similar to creating a charge for credit cards. Instead of passing card or customer as described in Charging Cards we pass offsite which is just the name of the bank.

The valid fields for offsite are internet_banking_bay, internet_banking_bbl, internet_banking_ktb and internet_banking_scb.

Below is a cURL snippet for creating an internet banking charge:


curl https://api.omise.co/charges \
  -X POST \
  -u skey_test_4xsjvwfnvb2g0l81sjz: \
  -d "amount=100000" \
  -d "currency=thb" \
  -d "offsite=internet_banking_scb" \
  -d "return_uri=http://example.com/orders/345678/complete"

return_uri - is the URI where the customer is redirected back to upon charge completion.

An example of JSON response is shown below.

{
  "object": "charge",
  "id": "chrg_test_56m8kzmmdazjse9jget",
  "livemode": false,
  "location": "/charges/chrg_test_56m8kzmmdazjse9jget",
  "amount": 100000,
  "currency": "thb",
  "description": "test offsite charge",
  "status": "pending",
  "capture": true,
  "authorized": false,
  "reversed": false,
  "paid": false,
  "transaction": null,
  "source_of_fund": "offsite",
  "refunded": 0,
  "refunds": {
    "object": "list",
    "from": "1970-01-01T00:00:00+00:00",
    "to": "2017-01-10T09:23:11+00:00",
    "offset": 0,
    "limit": 20,
    "total": 0,
    "order": null,
    "location": "/charges/chrg_test_56m8kzmmdazjse9jget/refunds",
    "data": []
  },
  "return_uri": "http://example.com/orders/345678/complete",
  "offsite": "internet_banking_scb",
  "reference": "ofsp_test_56m8kzms4wzqd525jsd",
  "authorize_uri": "https://pay.omise.co/offsites/ofsp_test_56m8kzms4wzqd525jsd/pay",
  "failure_code": null,
  "failure_message": null,
  "card": null,
  "customer": null,
  "ip": null,
  "dispute": null,
  "created": "2017-01-10T09:23:11Z"
}

To proceed to the bank for payment, the merchant would need to redirect the customer to the authorize_uri.

*Note: In test mode, copy the URL returned in the authorize_uri and paste it to your browser to proceed with testing.

At any time the merchant can check the status of the charge by retrieving the charge as described in Charges API.

  • If both authorized and paid are true, the charge succeeded.
  • If both authorized and paid are false, the charge failed. For detailed explanation on the reason the charge failed, check the failurecode and failuremessage in the Charge object.
  • There is no scenario where authorized or paid can have different values.

Webhooks

Rather than relying on the redirect back to the return_uri, we suggest merchants to make use of our Webhook API . Whenever a transaction is completed a webhook is sent to the URL that is specified in the dashboard with the event name charge.complete

Note

- Internet Banking is only available for merchants with a Thai-registered Omise account.

- For users with a live account, you will be required to review Terms & Conditions before testing the API.