請(qǐng)求(POST 或者 GET)
https://api.ihuyi.com/f/recharge?action=buy
參數(shù)名稱 | 參數(shù)值描述 | 示例 | 類型 | 必填 |
Content-Type | 內(nèi)容類型,固定值 | application/x-www-form-urlencoded | string | 是 |
參數(shù)名稱 | 參數(shù)值描述 | 示例 | 類型 | 必填 |
username | API ID | 123456 | string | 是 |
orderid | 商家訂單 ID | DD20253995959 | string | 是 |
timestamp | 時(shí)間戳格式如:yyyyMMddHHmmss 允許 10分鐘統(tǒng)一以東 8 時(shí)間 | 20240321150546 | string | 是 |
account | 充值賬號(hào) | xxxxxxx | string | 是 |
productid | 產(chǎn)品 ID | k111-1 | string | 是 |
quantity | 購買數(shù)量-固定數(shù)量1 | 1 | string | 是 |
extend | 擴(kuò)展參數(shù)(必須 json 格式,無此值請(qǐng)保持為“[]”),針對(duì)不同商品可能不同,參見 8.擴(kuò)展參數(shù)說明 | [] | string | 是 |
return | 商家自定義參數(shù),回調(diào)回傳 | string | 是 | |
callback | 商家回調(diào) url 地址 | http://***** | string | 是 |
buyerip | 買家真實(shí) IP(區(qū)域商品須傳) | string | 是 | |
sign | 簽名 | 81ed625f338277f1bd7f27b9339e302c | string | 是 |
參數(shù)名稱 | 參數(shù)值描述 | 示例 | 類型 | 必返 |
code | 返回值為1時(shí),表示提交成功 | 1|1001 | int | |
message | 提交結(jié)果描述 | 查詢成功|API ID 為空 | string | |
taskid | 系統(tǒng)任務(wù) id,提交失敗則沒有 | 16236437872836|0 | string |
code | msg |
1000 | 無此操作類型(action 為空或不存在) |
1001 | API ID 為空 |
1002 | API ID 錯(cuò)誤 |
1003 | 手機(jī)號(hào)碼為空 |
1004 | 手機(jī)號(hào)碼錯(cuò)誤 |
1005 | 產(chǎn)品 ID 不能為空 |
1006 | 時(shí)間戳不能為空 |
1007 | 不存在的產(chǎn)品 |
1008 | 簽名不能為空 |
1009 | 簽名錯(cuò)誤 |
1010 | 簽名過期 |
1011 | 賬號(hào)被凍結(jié) |
1012 | 余額不足 |
1013 | 訪問 ip 與備案 ip 不相同 |
1014 | 訂單 ID 不能為空 |
1015 | 訂單 ID 已存在 |
1016 | 客戶訂單號(hào)格式錯(cuò)誤 |
1017 | 產(chǎn)品未配置,聯(lián)系商務(wù) |
1018 | 購買數(shù)量為空 |
1019 | 購買數(shù)量錯(cuò)誤 |
1020 | 產(chǎn)品資金異常 |
1021 | 通道故障 |
1024 | 擴(kuò)展參數(shù)錯(cuò)誤 |
2001 | 不支持的手機(jī)號(hào)碼 |
2002 | 手機(jī)號(hào)碼已加入黑名單 |
2003 | 不支持的地區(qū) |
2005 | 請(qǐng)求失敗 |
2008 | 訂單 ID 不存在 |
3001 | 扣費(fèi)失敗 |
4001 | 系統(tǒng)內(nèi)部故障 |
不支持
示例(成功)
{"code":1,"message":"查詢成功","taskid":"16236437872836"}
示例(失敗)
{"code":1001,}
$account = 'xxxxxxx'; $apikey = 'xxxxxxxxxxxxxxxx'; //可登錄用戶中心查看 $buyerip = ''; $callback = 'http://*****'; $extend = '[]'; $orderid = 'DD20253995959'; $productid = 'k111-1'; $quantity = '1'; $return = ''; $timestamp = '20240321150546'; $username = '123456'; $password=md5('account='.$account.'&apikey='.$apikey.'&buyerip='.$buyerip.'&callback='.$callback.'&extend='.$extend.'&orderid='.$orderid.'&productid='.$productid.'&quantity='.$quantity.'&return='.$return.'×tamp='.$timestamp.'&username='.$username); $password=md5('account=xxxxxxx&apikey=xxxxxxxxxxxxxxxx&buyerip=&callback=http://*****&extend=[]&orderid=DD20253995959&productid=k111-1&quantity=1&return=×tamp=20240321150546&username=123456'); //注意:所有字符編碼統(tǒng)一為UTF-8
國內(nèi)專業(yè)互聯(lián)網(wǎng)團(tuán)隊(duì)
21年行業(yè)經(jīng)驗(yàn)
7x24小時(shí)售后支持
豐富的行業(yè)經(jīng)驗(yàn)
互 億 無 線 官 方 微 信 號(hào)
Copyright ? 2004-2025 上海思銳信息技術(shù)有限公司 All rights reserved. 滬ICP備07035915號(hào)-15 電信增值業(yè)務(wù)許可證:B2-20160082
服務(wù)熱線:
4008 808 898
服務(wù)熱線(工作時(shí)間):
4008 808 898
業(yè)務(wù)咨詢(非工作時(shí)間):
售后咨詢(非工作時(shí)間):
驗(yàn)證碼已發(fā)送到您的手機(jī),請(qǐng)查收!
輸入驗(yàn)證碼后,點(diǎn)擊“開通體驗(yàn)賬戶”按鈕可立即開通體驗(yàn)賬戶。