Create an external order

This API endpoint allows user to collect Mesra points even without using Setel's payment methods.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

Alert

Customers who used a physical card to redeem or PETRONAS non-PDRM SmartPay card to pay are not eligible for loyalty points.

The isEligibleForPoint value will be false.

Successful response payload data

Parameter nameData typeDescription
idstringThe ID of the external checkout order.
userIdstringThe ID of the Setel user.
referenceIdstring

A 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.

amountstringThe amount to be charged.
currencystring

The three-letter ISO currency code of the payment.

Currently, only supports MYR.

taxInvoiceNumberstringThe tax invoice number.
paymentMethodobjectThe payment method for this session.
paymentMethod.familystringThe family the payment method belongs to.
paymentMethod.typestringThe payment method type.
paymentMethod.brandstringThe payment method brand.
isEligibleForPointbooleanThe parameter that decides if the user will be granted points.
productsarray<object>Stores information about the product.
products.loyaltyCategoryCodestringA 4 digit code of the loyal category the product belongs to.
products.unitPricefloatThe price per item.
products.quantityintegerThe number of items.
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 = quantityxunit 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 about the loyalty card.
loyalty.issuedBystringThe entity that issued the loyalty points.
loyalty.statusstringThe status of granting the loyalty points (failed / succeeded).
loyalty.loyaltyCardNumberstringThe card number the points will be awarded to.
loyalty.earnedPointsintegerThe amount of points earned.
loyalty.loyaltyCardBalanceintegerThe new card balance after the points are added.
loyalty.errorstringDisplays the reason if granting loyalty points fail.
Body Params
string
required

The ID of the Setel user.

string
required

The partner’s generated ID, which generates this charge transaction.

string
required

The desired amount.

string
required
Defaults to MYR

The currency type of the transaction. Currently, supports MYR only.

string
required

The tax invoice number.

paymentMethod
object
required

The payment method used to complete the payment. The values will be provided by Setel.

boolean
Defaults to false

A variable that decides if points will be granted.

products
array of objects
required

Extra information about this payment.

products*
referenceMeta
object

The object that stores additional information about the transaction (e.g: order details, etc.).

Headers
string

A unique ID to reference the interface the request is sent from. Default value is setel but a proper value will be advised by Setel during onboarding.

string

The interface type the request is sent from. This value will be provided by Setel during onboarding.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json