Create a checkout session that grants loyalty points to user

This API endpoint creates a checkout session that allows user to collect loyalty points when making a payment for their purchases.

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

Alert

Please provide a unique referenceId to avoid multiple payments and for a successful reconciliation.

Related guide(s): How payment intents work, Payment intent status and Capture method.

Successful response payload data

Parameter nameData typeDescription
idstringThe ID of the checkout session.
paymentIntentIdstring

The unique identifier for the payment transaction.

More information can be found in the How payment intents work page.

paymentIntentStatusstring

The current status of the payment intent.

The full list of statuses can be found in the Payment intent status page.

referenceIdstringThe partner’s generated ID, which generated this transaction.
referenceTypeenumeratedAn identifier to determine the type of transaction or service related to this session.
paymentMethodobjectThe payment method used 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 the partner's merchant.
subMerchant.referencestringThe partner's merchant's ID provided by partners.
subMerchant.merchantCategoryCodestringThe merchant category code of the merchant.
subMerchant.statestringThe state that the merchant resides in.
captureboolean

An identifier to see if the transaction is a captured transaction.

More information can be found in the capture method page.

amountstringThe total amount of all items after discounts and taxes.
currencystring

The three-letter ISO currency code of the payment.

Currently, only supports MYR.

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.
referenceMeta.customFeeobject

The object containing the information on any type of predefined custom fee for this transaction.

Custom fee is a Setel-defined object and should be agreed upon prior between Setel and integrators.

customer.idstringThe ID of the customer.
customer.emailstringThe email of the customer.
customer.namestringThe name of the customer.
redirectobjectRedirects to a URL when the customer finishes a session.
redirect.successUrlstringThe URL to be redirected upon a successful checkout session.
redirect.cancelUrlstringThe URL to be redirected upon the cancellation of the checkout session.
webhookobjectThe webhook URL to send session information.
webhook.urlstringThe URL that will receive updates about the checkout session.
localestringStores the name of the location/region.
descriptionstringAdditional information about the order.
createdAtdate stringThe time the checkout session was created.
updatedAtdate stringThe time the checkout session was last updated.
Body Params
string
required

The reference ID for the checkout session. This can be an order ID, a cart ID, or something similar generated from the merchant’s side.

paymentMethod
object

The payment method used by the user for the checkout session.

subMerchant
object
required

⚠️ Required for third-party acquirers. Stores partner's merchant information (lowest level merchant). This will be displayed on our checkout page and e-receipt.

boolean
Defaults to true

Used to check whether the transaction is a captured transaction. For more information on capture transactions, refer to the Holding and capturing payments page.

string
required

The total price amount of all items after discounts and taxes are applied.

string
required
Defaults to MYR

The three-letter ISO currency code of the payment. Currently only supports MYR.

referenceMeta
object

Additional information about the transaction such as discount amount, total amount before tax and discounts, shipping fees, and/or custom fees.

customer
object

Details of the user (such as name and email) that has been provided by the merchant.

string

The user's preferred language. Accepted values are: 'en' (English), 'ms_my' (Bahasa Melayu), 'ta' (Tamil), zh_hans (Chinese Simplified), zh_hant (Chinese Traditional).

redirect
object

The URL that redirects the user when a checkout session is completed.

webhook
object

The webhook URL to store session information.

string

Additional information provided by partners about the transaction.

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