Capture a payment intent and grant loyalty points based on product

This API endpoint processes the payment intent authorised by the user, and grants loyalty points to the user based on the product type (identified by the loyalty category code). This action is only valid for sessions where capture is false.

🚧

Alert

The payment will only be captured when the status of an existing uncaptured payment intent is authorised.

Any uncaptured PaymentIntents will be cancelled exactly 30 minutes after they are created.

For external orders, product information and taxInvoiceNumber must be provided for recording purposes on the backend.

For more information on capturing payment intents, please refer to the Placing a hold and capturing payments page.

Related guide(s): Payment intent ID and Capture method.

Successful response payload data

Parameter nameTypeDescription
idstringThe ID of the payment intent.

More information can be found in the Payment intent ID page.
amountstringThe total amount of all items after discounts and taxes.
succeededAmountstringThe total amount processed.
currencystringThe three-letter ISO currency code of the payment.

Currently, only supports MYR.
referenceIdstringThe partner’s generated ID, which generated this transaction.
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
Partners' merchant information (lowest level merchant).

This will be used to display on our checkout page and e-receipt.
subMerchant.namestringThe name of partners' 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.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 items 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.
loyaltyobjectStores information related to the loyalty card.
loyalty.issuedBystringThe entity that issued the loyalty point.
loyalty.statusstringThe status of granting the loyalty points (failed / succeeded).
loyalty.mesraCardNumberstringThe card number to receive loyalty points.
loyalty.earnedPointsintegerThe amount of loyalty points earned.
loyalty.mesraCardBalanceintegerThe new card balance after adding the loyalty points.
loyalty. ErrorstringDetails the error if the loyalty points are not granted.
succeededAtdate stringThe time the payment intent was received.
createdAtdate stringThe time the payment intent was created.
updatedAtdate stringThe time the payment intent was last updated.
Language
Authorization
Click Try It! to start a request and see the response here!