API Reference
API Reference

Object


FieldTypeDesc
trade_idstringTrade ID
access_nostringThird-party access number
merchant_idstringMerchant ID
amountstringPayment amount, truncated to two decimal places
currencystringCurrency
customer_idstringPlatform customer ID
callback_urlstringWebhook notification callback URL
metadatamap[string]stringA set of key-value pairs that can be attached to an object, allowing you to store additional information in a structured format.
last_payment_errorLastPaymentErrorLast payment error information, if this field has a value, it indicates payment failure.
next_actionNextActionNext action
order_idstringThird-party order number
last_trans_idstringOrder transaction ID
paid_atstringPayment success time
payment_modestringPayment 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_tokenstringPayment token returned for subscription payment, used for subsequent subscription renewals
payment_methodstringPayment method
payment_channelstringPayment channel
return_urlstringRedirect page after payment channel accepts successfully in scenarios like 3DS redirect payment
trade_statusstringPayment status:
  • requires_payment_method: Initial order status. The customer has not completed payment (may not have initiated it or is still in process), or a subscription renewal charge has been initiated but the result is not yet available.
  • payment_failed: The provider declined the payment request due to reasons such as insufficient funds, failed card verification, or risk control restrictions. The customer can try again.
  • processing: The payment has been submitted by the customer and is being processed by the provider. The result is pending — possibly under risk review, bank processing, or delayed settlement.
  • succeeded: The payment has been confirmed successfully by the provider, and the funds have been credited.
  • closed: The trade order is closed when its status is no longer expected to change positively, such as after a subscription renewal fails (after multiple retries) or when no payment result is returned for over 7 days.
txn_timestringTrade initiation time, time when client initiates the interface
created_atstringCreation time
refund_statusstringRefund status:
  • no_refund: No refund
  • partially_refunded: A partial refund has been successfully issued, and the refunded amount is less than the total trade order value.
  • refunded: The full amount of the trade order has been successfully refunded.
total_refunded_amountstringRefund amount, truncated to two decimal places
session_idstringSession id
session_urlstringSession url
refer_infoReferInfoSource information of the customer
order_typestringOrder 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_itemsLineItem[]The line items purchased by the customer
discountsDiscountsDiscounts applied to the trade, including all discount information for this trade
closed_atstringTrade closed time
closed_reasonstringThe reason for the order being closed
  • timeout: Payment timed out
  • renewal_failed: Subscription renewal failed (including retries)
first_source_channelstringThe source where this checkout session was initially created
last_source_channelstringThe source where this checkout session was last accessed
billing_addressBillingAddressThe customer's billing address

ReferInfo

FieldTypeDesc
country_codestringThe country code of the client (ISO 2 format)
ipstringThe customer's IP address
devicestringThe 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_agentstringThe customer's user agent

NextAction

FieldTypeDesc
typestringType of next action required by client:
  • redirect: Redirect
redirectNextActionRedirectRedirect information
clientNextActionClientClient 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

BillingAddress

FieldTypeDesc
namestringRecipient's full name (e.g: John Smith)
address_line1stringAddress line 1, primary street address
address_line2stringAddress line 2, additional address information
country_codestringCountry code in ISO2 format (e.g: US, GB, CN)
province_codestringProvince/state code (e.g: CA for California)
citystringCity name
areastringArea/district/county name for more granular address
postal_codestringPostal code/ZIP code, format varies by country
phonestringPhone number without country code
phone_area_codestringPhone country code (e.g: +1, +44, +86)
emailstringEmail address for billing notifications and contact