首先,在接下来的操作,你可能先需要得到支付宝的userId,获取方式如下:
1、电脑访问并登陆支付宝:https://www.alipay.com/2、查看源码,Ctrl+F搜索userId,如图
收款码(中文需UTF8编码):
- alipays://platformapi/startapp?appId=20000123&actionType=scan&biz_data={"s": "money","u": "你的支付宝userId","a": "金额","m": "备注"}
转账(中文需UTF8编码):
- alipays://platformapi/startapp?appId=09999988&actionType=toAccount&goBack=NO&userId=你的支付宝userId&amount=金额&memo=备注
红包(红包模式正规个人业务没必要使用,量大怕风控者用的):
需先执行加好友,支付宝需在设置-隐私-常用隐私设置中关闭加好友需要验证,实例:
- alipays://platformapi/startapp?appId=20000186&actionType=addfriend&userId=支付宝userId&loginId=支付宝账号&source=by_f_v&alert=true
仅支持普通红包,目前h5中可一键拉起,同样url的中文(如支付宝昵称)需经过UTF8编码,实例
- alipays://platformapi/startapp?appId=88886666&appLaunchMode=3&canSearch=false&chatLoginId=支付宝账号&chatUserId=支付宝userId&chatUserName=支付宝昵称&chatUserType=1&entryMode=personalStage&prevBiz=chat&schemaMode=portalInside&target=personal&money=金额&amount=金额&remark=备注
银行卡转账
- 转银行卡模式正规个人业务没必要使用,量大怕风控者用的
- 支付宝内打开该web应用,同样url的中文(如支付宝昵称)需经过UTF8编码,实例:
- https://ds.alipay.com/?from=pc&appId=09999988&actionType=toCard&sourceId=bill&cardNo=银行卡卡号&bankAccount=持卡人姓名&money=金额&amount=金额&bankMark=银行缩写简写&bankName=银行完整名称&tdsourcetag=s_pctim_aiomsg