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.

🚧

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 name

Data type

Description

id

string

The ID of the checkout session.

paymentIntentId

string

The unique identifier for the payment transaction.

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

paymentIntentStatus

string

The current status of the payment intent.

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

referenceId

string

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

referenceType

enumerated

An identifier to determine the type of transaction or service related to this session.

paymentMethod

object

The payment method used 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 the partner's merchant.

subMerchant.reference

string

The partner's merchant's ID provided by partners.

subMerchant.merchantCategoryCode

string

The merchant category code of the merchant.

subMerchant.state

string

The state that the merchant resides in.

capture

boolean

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

More information can be found in the capture method page.

amount

string

The total amount of all items after discounts and taxes.

currency

string

The three-letter ISO currency code of the payment.

Currently, only supports MYR.

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.

referenceMeta.customFee

object

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

string

The ID of the customer.

customer.email

string

The email of the customer.

customer.name

string

The name of the customer.

redirect

object

Redirects to a URL when the customer finishes a session.

redirect.successUrl

string

The URL to be redirected upon a successful checkout session.

redirect.cancelUrl

string

The URL to be redirected upon the cancellation of the checkout session.

webhook

object

The webhook URL to send session information.

webhook.url

string

The URL that will receive updates about the checkout session.

locale

string

Stores the name of the location/region.

description

string

Additional information about the order.

createdAt

date string

The time the checkout session was created.

updatedAt

date string

The time the checkout session was last updated.

Language
Credentials
Click Try It! to start a request and see the response here!