Docs
Payment
.pay(cb,opts)
Parameters
Parameter | Type | Description | Required |
|
| ID of the order | Yes |
|
| Expand event tracking fields | No |
Callback
Field | Type | Description |
|
| Whether the payment was successful |
|
| Order ID |
|
| Return when failure |
type PayBeansCallback = (result: Result) => void;
interface Result {
is_success: boolean;
error?: {
error_code: number;
error_msg: string;
error_extra: Record<string, unkown>;
};
}Options
interface Options {
trade_order_id: string;
}Example
Minis.pay((result)=>{
if(result.is_success){
// do something
} else {
// do something
}
},{trade_order_id: "demo"}).openbalance(cb,opts)
Jump to the balance page.
Parameter
Parameter | Type | Description | Required |
|
| Balance type | Yes |
Callback
Field | Type | Description |
|
| Whether the opening was successful |
|
| Return on failure |
type Callback = (result: Result) => void;
interface Result {
is_success: boolean;
error?: {
error_code: number;
error_msg: string;
error_extra: Record<string, unknown>;
};
}Options
interface Options {
type: 'BEANS'
}Example
TTMinis.openBalance(Was this document helpful?