API Reference
API Reference

Object


Field

Type

Desc

trade_id

string

Trade ID

access_no

string

Third-party access number

merchant_id

string

Merchant ID

amount

string

Payment amount, truncated to two decimal places

currency

string

Currency

customer_id

string

Platform customer ID

callback_url

string

Webhook notification callback URL

metadata

map[string]string

A set of key-value pairs that can be attached to an object, allowing you to store additional information in a structured format.

last_payment_error

LastPaymentError

Last payment error information, if this field has a value, it indicates payment failure.

next_action

NextAction

Next action

order_id

string

Third-party order number

last_trans_id

string

Order transaction ID

paid_at

string

Payment success time

payment_mode

string

Payment business mode:

  • subscription: Initial subscription payment, requires collecting customer payment information, pass payment_method_data field, returns payment_token for subsequent subscription renewals upon successful payment
  • recurring_payment: Subscription renewal payment, requires passing payment_token to complete payment, no need to collect user payment information

payment_token

string

Payment token returned for subscription payment, used for subsequent subscription renewals

payment_method

string

Payment method

payment_channel

string

Payment channel

return_url

string

Redirect page after payment channel accepts successfully in scenarios like 3DS redirect payment

trade_status

string

Payment status:

  • requires_payment_method: Initial state
  • requires_action: Indicates that the trade requires additional operations, such as 3DS redirect verification
  • processing: Payment processing
  • succeeded: Payment successful

txn_time

string

Trade initiation time, time when client initiates the interface

created_at

string

Creation time

refund_status

string

Refund status:

  • no_refund: No refund
  • partially_refunded: Partially refunded
  • refunded: Refund completed

total_refunded_amount

string

Refund amount, truncated to two decimal places

session_id

string

Session id

session_url

string

Session url

refer_info

ReferInfo

Source information of the customer

order_type

string

Order types generated under different purchase or billing scenarios:

  • onetime_payment: The trade order is created for a one-time payment request.
  • subscription: The trade order is created for initiating a subscription payment request.
  • recurring_payment: The trade order is created by the Subotiz subscription renewal service.
  • token_payment: The trade order is created when the merchant charges a customer using an existing subscription contract token.

line_items

LineItem[]

The line items purchased by the customer

discounts

Discounts

Discounts applied to the trade, including all discount information for this trade

ReferInfo

Field

Type

Desc

country_code

string

The country code of the client (ISO 2 format)

ip

string

The customer's IP address

device

string

The type of the customer's equipment

  • pc: Refers to the types of personal computer devices including desktops and laptops.
  • mobile: Refers to portable device types that have wireless connection capabilities and include smart phones and tablets.

user_agent

string

The customer's user agent

NextAction

Field

Type

Desc

type

string

Type of next action required by client:

  • redirect: Redirect

redirect

NextActionRedirect

Redirect information

client

NextActionClient

Client operation information

NextActionRedirect

FieldTypeDesc
urlstringRedirect URL

NextActionClient

FieldTypeDesc
confirm_urlstringConfirm payment URL
apple_pay_sessionstringApplePay session data for creation

LastPaymentError

FieldTypeDesc
codestringSystem returned transaction return code
messagestringSystem returned transaction return description

LineItem

FieldTypeDesc
product_idstringThe product ID of the item being purchased
price_idstringThe price ID associated with the purchased item
pricestringThe price before any discounts are applied
quantityintThe quantity of products being purchased

Discounts

FieldTypeDesc
current_periodCurrentPeriodDiscount[]The current period's discount details

CurrentPeriodDiscount

FieldTypeDesc
discount_idstringThe unique identifier for the discount
discount_amountstringThe amount discounted
discount_codestringThe discount code used