api-charges

Create Charge

Create Charge to attempt to pay into your Beam account by providing a valid PaymentMethod.

post/api/v1/charges

Request

  • Base URL: https://api.beamcheckout.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.beamcheckout.com/api/v1/charges
  • Auth: HTTP basic

Request body

amountinteger required

Amount in the smallest units of that currency: 1 == 1 Satang == 0.01 THB. 2125 == 2125 Satang == 21.25 THB.

currency'THB' required
deviceType'ANDROID' | 'IOS' | 'WEB'
referenceIdstring

ReferenceID is a free text field for merchants to optionally provide for reconciliation purposes. Beam does not provide any unique constraints for this field. Maximum 100 characters.

returnUrlstring

ReturnURL is the URL to redirect customers back to after they authenticate or cancel their payment on the payment method’s app or site. If you’d prefer to redirect to a mobile app, you can supply an application URI scheme. Required for charges that redirect out of Beam, such as CARD and CARD_INSTALLMENT payments.

skip3dsFlowboolean

Skip3DSFlow indicates whether to skip the 3DS flow.

Example request

{
  "amount": 10000,
  "paymentMethod": {
    "card": {
      "cardHolderName": "CARDHOLDER NAME",
      "expiryMonth": 12,
      "expiryYear": 30,
      "pan": "4111111111111111",
      "securityCode": "123"
    },
    "cardInstallments": {
      "cardHolderName": "CARDHOLDER NAME",
      "expiryMonth": 12,
      "expiryYear": 30,
      "pan": "4111111111111111",
      "securityCode": "123"
    },
    "cardNetworkToken": {
      "cardHolderName": "CARDHOLDER NAME",
      "expiryMonth": 12,
      "expiryYear": 30
    },
    "cardToken": {
      "securityCode": "123"
    },
    "cardTokenInstallments": {
      "securityCode": "123"
    }
  },
  "referenceId": "order_190821",
  "returnUrl": "https://www.beamcheckout.com"
}

Response

success

actionRequired'NONE' | 'REDIRECT' | 'ENCODED_IMAGE'

the action required to complete the payment process. For ChargeActionNone, no further action is required. For ChargeActionRedirect, redirect the paying customer to the given URL to complete the process. For ChargeActionEncodedImage, decode the encoded image and present it to the paying customer to complete the process.

chargeIdstring
paymentMethodType'CARD' | 'CARD_INSTALLMENTS' | 'CARD_TOKEN' | 'CARD_TOKEN_INSTALLMENTS' | 'CARD_NETWORK_TOKEN' | 'QR_PROMPT_PAY' | 'ALIPAY' | 'ALIPAY_PLUS' | 'WECHAT_PAY' | 'TRUE_MONEY' | 'LINE_PAY' | 'SHOPEE_PAY' | 'BANGKOK_BANK_APP' | 'KPLUS' | 'MAKE' | 'KRUNGSRI_APP' | 'SCB_EASY' | 'KRUNGTHAI_NEXT' | 'SPAY_LATER'

PaymentMethodType represents the supported payment method types from all charge sources.

Changes

No recorded changes to this operation across all 1 revision of this API.