Cancel a checkout session

This API endpoint cancels the checkout session and stops processing payment for the session.

Related guide(s): Capture method

Successful response payload data

Param NameTypeDescription
idstringThe ID of the checkout session.
amountstringThe total amount of all items after discounts and taxes.
currencystringThe three-letter ISO currency code of the payment.

Currently, only supports MYR which is the default value.
referenceIdstringA unique string to reference the wallet transaction.

This can be an order ID, a cart ID, or something similar generated by the merchant’s side.
paymentMethodobjectThe payment method for this session.
paymentMethod.familystringThe family the payment method belongs to.
paymentMethod.typestringThe payment method type.
paymentMethod.brandstringThe payment method brand.
subMerchantobject⚠️Required for Third-Party Acquirers
Partner's merchant information (lowest level merchant).

This will be used to display on our checkout page and e-receipt.
subMerchant.namestringThe name of partner's merchant.
subMerchant.referencestringThe partner's merchant's ID provided by partners.
capturebooleanAn identifier to see if the transaction is a captured transaction.

More information can be found in the capture method page.
referenceMetaobjectAn object to store additional information about the transaction (e.g., order details, etc.).
referenceMeta.itemsobjectStores an array of items that is included in the transaction.
referenceMeta.items.itemNamestringName and description of the item.
referenceMeta.items.variationNamestringItem variation.
E.g: M, Red.
referenceMeta.items.unitPricefloatThe price per item.
referenceMeta.items.quantityintegerThe number of this product purchased.
referenceMeta.items.totalPricefloatTotal price = item quantity x item unit price
referenceMeta.items.totalDiscountedPricefloatThe total price after discount.
referenceMeta.totalDiscountfloatThe total amount of discount given.
referenceMeta.subtotalfloatThe total amount before applying any taxes or discount, fee, etc.
referenceMeta.shippingFeefloatThe shipping fee (applicable for e-commerce).
referenceMeta.pumpNumberstringThe code for the pump being operated.
referenceMeta.stationNamestringThe name of the station where the operating pump is located.
Language
Authorization
Click Try It! to start a request and see the response here!