createOrderV2(data: CreateOrderV2Params)
Requires:
@tuya-miniapp/cloud-api≥1.6.1
Description
Create a value-added service order in the specified mall and return the order ID for subsequent payment.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Yes | Request parameters |
Return Value
Type: Promise<CreateOrderV2Result>
Order information, including order ID and amounts
Referenced Types
interface
CreateOrderV2ResultResult of creating an order| Property | Type | Description |
|---|---|---|
orderId | string | Order number |
amountOrigin | number | Original order amount |
amountTrade | number | Order amount after discounts |
enum
VasPaymentScope| Value | Actual Value | Description |
|---|---|---|
VasPaymentScope.ALL | 0 | All |
VasPaymentScope.ONLY_IAP | 1 | IAP only |
VasPaymentScope.ONLY_NON_IAP | 2 | Non-IAP only |
VasPaymentScope.AUTO_IAP | 99 | Auto-select whether to use IAP |
enum
VasOptionType| Value | Actual Value | Description |
|---|---|---|
VasOptionType.NORMAL | 0 | Standard payment |
VasOptionType.SUBSCRIPTION | 2 | Subscription payment |
Valid Values
VasPaymentScope
| Value | Description | Since |
|---|---|---|
0 | All | - |
1 | IAP only | - |
2 | Non-IAP only | - |
99 | Auto-select whether to use IAP | - |
VasOptionType
| Value | Description | Since |
|---|---|---|
0 | Standard payment | - |
2 | Subscription payment | - |