client/docs/wallet/wallet.md

5.3 KiB
Raw Permalink Blame History

Basic

/wallet.Basic/GetWallet

获取钱包信息

Request

{
    is_total_today_in: false, // type<bool>, 是否统计今日收入
    is_total_today_out: false, // type<bool>, 是否统计今日支出
    is_total_month_in: false, // type<bool>, 是否统计本月收入
    is_total_month_out: false, // type<bool>, 是否统计本月支出
    is_total_all_in: false, // type<bool>, 是否统计全部收入
    is_total_all_out: false, // type<bool>, 是否统计全部支出
}

Reply

{
    passport_identity: "", // type<string>, 用户唯一标识
    wallet_identity: "", // type<string>, 钱包唯一标识
    balance: "0", // type<int64>, 余额
    withdrawal_balance: "0", // type<int64>, 可提现余额
    status: 0, // type<int32>, 状态 -1禁用1正常
    alipay_id: "", // type<string>, 支付宝ID
    alipay_name: "", // type<string>, 支付宝账户名
    wxpay_id: "", // type<string>, 微信ID
    wxpay_name: "", // type<string>, 微信支付账户名
    total: {
        "": "0"
    }, // map<string,int64>, 统计数据输出
    created: "", // type<string>, 创建时间
}

/wallet.Basic/SetPayPassword

设置支付密码

Request

{
    passport_identity: "", // type<string>, 用户唯一标识
    password: "", // type<string>, 支付密码
}

Reply

{
    code: 0, // type<int32>, 状态码
}

/wallet.Basic/BindPaymentId

绑定微信或支付宝账户

Request

{
    pay_type: 0, // type<int32>, 支付类型1微信支付2支付宝
    auth_code: "", // type<string>, 微信授权码
}

Reply

{
    code: 0, // type<int32>, 状态码
}

/wallet.Basic/Transactions

查询交易记录

Request

{
    trans_type: "0", // type<int64>, 收支类型:-1支出1收入
    trade_type: "0", // type<int64>, 交易类型1充值2提现3消费4退款5收益
    start: "", // type<string>, 账单起始日期
    end: "", // type<string>, 账单截止日期
    page: "0", // type<int64>, 分页
    page_size: "0", // type<int64>, 单页容量
}

Reply

{
    total: "0", // type<int64>, 总记录数
    records: [{
        trans_type: 0, // type<int32>, 收支类型:-1支出1收入
        trade_type: 0, // type<int32>, 交易类型1充值2提现3消费4退款5收益
        in_trade_no: "", // type<string>, 内部流水号
        out_trade_no: "", // type<string>, 外部流水号eg微信、支付宝、银行等
        money: "0", // type<int64>, 交易金额,单位:分
        fee: "0", // type<int64>, 手续费,单位:分
        pay_channel: 0, // type<int32>, 支付模型WECHATALIPAY,BALANCE
        pay_type: "", // type<string>, 支付类型 JSAPI:微信浏览器内支付 APP:app支付  MINI:小程序  NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付
        created: "", // type<string>, 创建时间
        remark: "", // type<string>, 备注信息
    }], // list<Transaction>, 数据
}

/wallet.Basic/AddBankCard

添加银行卡

Request

{
    wallet_identity: "", // type<string>, 钱包唯一标识
    card_no: "", // type<string>, 银行卡号
    card_owner: "", // type<string>, 持卡人姓名
    id_card: "", // type<string>, 持卡人身份证
    phone: "", // type<string>, 银行预留的手机号
}

Reply

{
    code: 0, // type<int32>, 状态码
}

/wallet.Basic/GetBankCard

获取用户银行卡列表

Request

{}

Reply

{
    data: [{
        id: "0", // type<int64>
        bank_number: "", // type<string>, 银行卡号
        bank_name: "", // type<string>, 银行名
        card_owner: "", // type<string>, 持卡人姓名
        id_card: "", // type<string>, 持卡人身份证号
        phone: "", // type<string>, 银行预留的手机号
        bind_id: "", // type<string>, 绑定银行卡返回的绑定id
        bank_type: "", // type<string>, 银行卡类型 DC为储蓄卡CC为信用卡
        bank: "", // type<string>, 银行卡所属行
        created: "", // type<string>, 添加日期
    }], // list<BankCardInfo>
}

/wallet.Basic/RmBankCard

删除银行卡

Request

{
    identity: "", // type<string>, 银行卡Identity
}

Reply

{
    code: 0, // type<int32>, 状态码
}

/wallet.Basic/ApplyCash

申请提现

Request

{
    channel: 0, // type<int32>, 提现的平台 1、微信 2、支付宝 3、银行卡
    amount: "0", // type<int64>, 提现金额 单位为分
    remark: "", // type<string>, 备注
}

Reply

{
    code: 0, // type<int32>, 状态码
}