Skip to main content
POST
Create a Terminal Payment Session

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

idempotency-key
string
required

Idempotency key to ensure the request is not processed multiple times

for-user-id
string

The sub-account user-id to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information.

with-split-rule
string

The XenPlatform split rule ID that will be applied to this transaction. This header is only used if you have access to xenPlatform.

Body

application/json
currency
enum<string>
required
Available options:
IDR,
VND,
THB,
MYR
amount
number<decimal>
required
Required range: x >= 1
country
enum<string>
required
Available options:
ID,
VN,
TH,
MY
session_type
enum<string>
required
Available options:
PAY
mode
enum<string>
required
Available options:
TERMINAL
channel_properties
object
required
reference_id
string
Example:

"ref_123456789"

customer_id
string
Example:

"cus_123456789"

customer
object
description
string | null
Example:

"Payment for order #123"

metadata
object

Response

Terminal Payment Session created successfully

payment_session_id
string
required
Pattern: ^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$
latest_payment_id
string
required
Pattern: ^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$
business_id
string
required
reference_id
string
required
Example:

"ref_123456789"

session_type
enum<string>
required
Available options:
PAY
currency
enum<string>
required
Available options:
IDR,
VND,
THB,
MYR
amount
number<decimal>
required
Required range: x >= 1
country
enum<string>
required
Available options:
ID,
VN,
TH,
MY
mode
enum<string>
required
Available options:
TERMINAL
status
enum<string>
required
Available options:
ACTIVE,
COMPLETED,
FAILED,
CANCELED
channel_properties
object
required
created
string<date-time>
required
Example:

"2024-11-06T15:32:42Z"

updated
string<date-time>
required
Example:

"2024-11-06T15:32:42Z"

customer_id
string
Example:

"cus_123456789"

description
string | null
Example:

"Payment for order #123"

metadata
object
canceled_at
string<date-time> | null