Source API

To accept payments through non-credit-card channels, you need to first create the source then use that source to create the charge. The API can be used either from a server with the secret key as usual or from a client with the public key.

Attribute

Name Type Description
object string

The string source.

id string

A SOURCE_ID matching /src(_test)?_[1-9a-z]+/.

type string

The source payment type. Value can be one of the following:

  • internet_banking_bay: BAY - Krungsri Online (Thailand)
  • internet_banking_ktb: KTB - KTB Netbank (Thailand)
  • internet_banking_scb: SCB - SCB Easy Net (Thailand)
  • internet_banking_bbl: BBL - Bualuang iBanking (Thailand)
  • alipay: Alipay online (Thailand)
  • bill_payment_tesco_lotus: Tesco lotus Bill Payment (Thailand)
The available types vary depending on account and country.

flow string

The payment flow customers need to go through to complete the payment. Value can be one of the following:

  • redirect: a customer needs to be redirected to the external website with authorize_uri in the charge to complete the payment, e.g. internet banking.
  • offline: a customer will receive payment information in the charge to pay offline, e.g. bill payment at a department store.

amount integer

A positive integer of the amount charged in the smallest currency unit. (e.g. 100 satangs to charge THB 1) #Maximum and Minimum amount by supported currencies

currency string

The currency as its lower-cased international 3-letter code, defined by the ISO 4217 standard. #Supported Currencies

Example

  • Json Response

Create a source

- POST https://api.omise.co/sources

Request Parameter

Name Type Description
type string

(required) The source payment type. See attribute section above for the available types.

amount integer

(required) The amount in the smallest subunits of the currency used. For thb (Thai Baht) you'll need to pass the amount in satangs. #Maximum and Minimum amount by supported currencies

currency string

(required) The currency in which you want the payment to be done. #Supported Currencies

Example

  • Create a source