api-charges

Get Charge by ID

Retrieves a Charge by chargeId.

get/api/v1/charges/{chargeId}

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/{chargeId}
  • Auth: HTTP basic

Path parameters

chargeIdstring required

chargeId

Response

success

amountinteger
chargeIdstring
createdAtstring date-time
currency'THB'
failureCode'CH_PROCESSING_FAILED' | 'CH_INSUFFICIENT_FUNDS' | 'CH_CARD_EXPIRED' | 'CH_CARD_DECLINED' | 'CH_CARD_RESTRICTED' | 'CH_CARD_INCORRECT_DETAILS' | 'CH_CARD_INCORRECT_PIN' | 'CH_CARD_PIN_ATTEMPT_EXCEEDED' | 'CH_AUTHENTICATION_FAILED'

In the event that the ChargeStatus is ChargeStatusFailed, one of the following failure codes would be present. ChargeFailureCodeFailed denotes generic failure due to processing, please retry with a new Charge. ChargeFailureCodeInsufficientFunds denotes a failure due to insufficient funds from the customer's payment method. The following codes are for card and card installment payments only. ChargeFailureCodeCardExpired denotes a failure because the card has expired. ChargeFailureCodeCardDeclined denotes a failure because the card issuer declined the payment. ChargeFailureCodeCardRestricted denotes a failure because the card is restricted from making this payment. ChargeFailureCodeCardIncorrectDetails denotes a failure due to incorrect card details (ex. card number, expiry date, cvv). ChargeFailureCodeCardIncorrectPIN denotes a failure due to an incorrect PIN. ChargeFailureCodeCardPINAttemptExceeded denotes a failure because the allowed number of PIN attempts was exceeded. ChargeFailureCodeAuthenticationFailed denotes a failure due to the customer authentication.

merchantIdstring
referenceIdstring
source'PAYMENT_LINK' | 'STORE_LINK' | 'QR_PROMPT_PAY_LINK' | 'API' | 'BOLT'

Is the source of where the Charge was created from. For Charges created via the CreateCharge endpoint, the source is ChargeSourceAPI.

sourceIdstring
status'PENDING' | 'SUCCEEDED' | 'FAILED'
transactionTimestring date-time

TransactionTime is the time when the Charge is recorded as SUCCEEDED or FAILED.

updatedAtstring date-time

Example response

{
  "amount": 10000,
  "paymentMethod": {
    "card": {
      "brand": "VISA",
      "countryAlpha2": "TH",
      "last4": "1111",
      "networkTransactionId": "NETWORK_TRANSACTION_ID"
    },
    "cardInstallments": {
      "brand": "VISA",
      "countryAlpha2": "TH",
      "last4": "1111",
      "networkTransactionId": "NETWORK_TRANSACTION_ID"
    },
    "cardNetworkToken": {
      "brand": "VISA",
      "countryAlpha2": "TH",
      "last4": "1111",
      "networkTransactionId": "NETWORK_TRANSACTION_ID"
    }
  },
  "referenceId": "order_190821",
  "sourceId": "source_123"
}

Changes

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