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

Attributes

Type

Description

id

string

Unique identifier for the object.

status

enum

The status of the payment.

amount

string

The payment amount to be received.

createdAt

timestamp

Time at which the object was created.

expiredAt

timestamp

Time at which the Payment object should no longer be able to successfully receive any payments.

referenceId

string

The referenceId that was used to request for the Payment. Typically an "order id", "invoice id" or "cart id".

fees

string

The amount of fees charged to your platform to process this payment if the payment comes through.

paymentMethod

object

The Payment Method to be used to capture the payment.

qrCodedisplayImage

string

Base64 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=="
      }
    }
  }
}