The Payment object represents the life cycle of a payment from the time it was requested to the completion of it. It is used for accepting one-time payments from customers. Here, each Virtual Account or PayNow QR is associated to a transaction.


Payment attributes

AttributesTypeDescription
idstringUnique identifier for the object.
statusenumThe status of the payment.
amountstringThe payment amount to be received.
createdAttimestampTime at which the object was created.
expiredAttimestampTime at which the Payment object should no longer be able to successfully receive any payments.
referenceIdstringThe referenceId that was used to request for the Payment. Typically an "order id", "invoice id" or "cart id".
feesstringThe amount of fees charged to your platform to process this payment if the payment comes through.
paymentMethodobjectThe Payment Method to be used to capture the payment.
qrCodedisplayImagestringBase64 string to be converted into a image (QR code)

Payment object

{
  "data": {
    "id": "contract_e5855b3297304ec78b904bdb08ae1685",
    "type": "payment",
    "attributes": {
      "status": "pending",
      "amount": "0.1",
      "createdAt": "2020-12-03T17:19:15+08:00",
      "description": null,
      "expiredAt": "2020-12-03T20:03:53+07:00",
      "referenceId": "pennytest_1",
      "fees": "0.0",
      "paymentMethod": {
        "id": "paynow_5e9f826617f35e45ea3a1e5464ee28b4",
        "type": "paynow",
        "qrCodeDisplayImage": "iVBORw0KGgoAAAANSUhEUgAAAMMAAADDCAYAAAA/f6WqAAAABGdBTUEAALGPC...//wNy78pYJ3AiFQAAAABJRU5ErkJggg=="
      }
    }
  }
}