post https://api-sandbox.setel.com/v1/payments/payment-intents//loyalty-capture
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 name | Type | Description |
---|---|---|
id | string | The ID of the payment intent. More information can be found in the Payment intent ID page. |
amount | string | The total amount of all items after discounts and taxes. |
succeededAmount | string | The total amount processed. |
currency | string | The three-letter ISO currency code of the payment. Currently, only supports MYR. |
referenceId | string | The partner’s generated ID, which generated this transaction. |
paymentMethod | object | The payment method for this session. |
paymentMethod.family | string | The family the payment method belongs to. |
paymentMethod.type | string | The payment method type. |
paymentMethod.brand | string | The payment method brand. |
subMerchant | object | ⚠️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.name | string | The name of partners' merchant. |
subMerchant.reference | string | The partner's merchant's ID provided by partners. |
capture | boolean | An identifier to see if the transaction is a captured transaction. More information can be found in the capture method page. |
referenceMeta | object | An object to store additional information about the transaction (e.g: order details, etc.). |
referenceMeta.items.itemName | string | Name and description of the item. |
referenceMeta.items.variationName | string | Item variation. E.g: M , Red . |
referenceMeta.items.unitPrice | float | The price per item. |
referenceMeta.items.quantity | integer | The number of items purchased. |
referenceMeta.items.totalPrice | float | Total price = item quantity x item unit price |
referenceMeta.items.totalDiscountedPrice | float | The total price after discount. |
referenceMeta.totalDiscount | float | The total amount of discount given. |
referenceMeta.subtotal | float | The total amount before applying any taxes or discount, fee, etc. |
referenceMeta.shippingFee | float | The shipping fee (applicable for e-commerce). |
referenceMeta.pumpNumber | string | The code for the pump being operated. |
referenceMeta.stationName | string | The name of the station where the operating pump is located. |
loyalty | object | Stores information related to the loyalty card. |
loyalty.issuedBy | string | The entity that issued the loyalty point. |
loyalty.status | string | The status of granting the loyalty points (failed / succeeded ). |
loyalty.mesraCardNumber | string | The card number to receive loyalty points. |
loyalty.earnedPoints | integer | The amount of loyalty points earned. |
loyalty.mesraCardBalance | integer | The new card balance after adding the loyalty points. |
loyalty. Error | string | Details the error if the loyalty points are not granted. |
succeededAt | date string | The time the payment intent was received. |
createdAt | date string | The time the payment intent was created. |
updatedAt | date string | The time the payment intent was last updated. |