Skip to content

Checkout Create (Hosted Checkout Order)

This API creates a checkout order and returns a cashier URL and JWT token. The hosted checkout currently supports INTERNATIONAL_CARD only.

1. Endpoint

ItemDescription
HTTP MethodPOST
URL/payIn/orders/create
Content-Typeapplication/json
AuthMerchant signature (X-Merchant-Id / X-Timestamp / X-Nonce / X-Sign)

Signing rules: Signing and Verification.

2. Request

2.1 Top-level fields

FieldTypeRequiredDescription
merchantOrderNoStringYesMerchant order number (idempotent)
amountDecimalYesOrder amount (>= 0.01)
currencyStringYesCurrency (e.g., USD)
methodCodeStringNoPayment method code (only INTERNATIONAL_CARD, default)
productNameStringNoProduct name
productDescStringNoProduct description
billingAddressObjectNoBilling address
shippingAddressObjectNoShipping address
remarkStringNoRemark
returnUrlStringNoSync redirect URL (lower priority than merchant config)
extParamsObjectNoExtended parameters (JSON)
lineItemsArrayNoOrder line items

2.2 Address object (billingAddress / shippingAddress)

FieldTypeRequiredDescription
countryStringNoCountry (ISO-3166-1 alpha-2)
stateStringNoState or province
cityStringNoCity
postalCodeStringNoPostal code
addressLine1StringNoAddress line 1
addressLine2StringNoAddress line 2
nameStringNoRecipient / cardholder name

2.4 lineItems (order line items)

FieldTypeRequiredDescription
nameStringNoProduct name
quantityIntegerNoQuantity
skuStringNoSKU
unitPriceLongNoUnit price (minor units)
totalAmountLongNoTotal amount (minor units)
taxAmountLongNoTax amount (minor units)
taxPercentageLongNoTax rate (percentage * 100)

3. Response

Unified response:

json
{
  "success": true,
  "data": {
    "payNo": "P202412220002",
    "cashierUrl": "https://cashier.example.com/pay?token=xxx",
    "token": "eyJhbGciOi..."
  },
  "errCode": null,
  "errMsg": null
}

data fields

FieldTypeDescription
payNoStringPlatform order number
cashierUrlStringCashier URL (includes token)
tokenStringCashier JWT (used by frontend)

4. Request example

json
{
  "merchantOrderNo": "M202412220001",
  "amount": "100.00",
  "currency": "USD",
  "methodCode": "INTERNATIONAL_CARD",
  "productName": "T-shirt",
  "billingAddress": {
    "country": "US",
    "state": "CA",
    "city": "San Francisco",
    "postalCode": "94102",
    "addressLine1": "123 Test Street"
  }
}

5. Notes

  • merchantOrderNo is idempotent. Repeated creation returns the existing payNo and a new cashierUrl/token.
  • Redirect the user to cashierUrl to complete payment.
  • Checkout supports INTERNATIONAL_CARD only; card data is encrypted and submitted by the checkout frontend.