订阅申请
curl --request POST \
--url https://uat-interface.haipay.asia/subscription/apply \
--header 'Content-Type: application/json' \
--data '
{
"country": "USA",
"website": "https://test.com",
"amount": "0.5",
"callBackUrl": "https://www.google.com",
"inBankCode": "CREDIT_CARD",
"subject": "Test subscription",
"subscriptionOrderId": "1736739758574",
"recurringIntervalCount": 1,
"sign": "JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==",
"partnerUserId": "H20241231",
"payType": "SUBSCRIPTION",
"phone": "0845632145871",
"appId": 1724,
"name": "howard",
"notifyUrl": "https://www.google.com",
"currency": "USD",
"email": "howard@gmail.com",
"recurringInterval": "D"
}
'import requests
url = "https://uat-interface.haipay.asia/subscription/apply"
payload = {
"country": "USA",
"website": "https://test.com",
"amount": "0.5",
"callBackUrl": "https://www.google.com",
"inBankCode": "CREDIT_CARD",
"subject": "Test subscription",
"subscriptionOrderId": "1736739758574",
"recurringIntervalCount": 1,
"sign": "JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==",
"partnerUserId": "H20241231",
"payType": "SUBSCRIPTION",
"phone": "0845632145871",
"appId": 1724,
"name": "howard",
"notifyUrl": "https://www.google.com",
"currency": "USD",
"email": "howard@gmail.com",
"recurringInterval": "D"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
country: 'USA',
website: 'https://test.com',
amount: '0.5',
callBackUrl: 'https://www.google.com',
inBankCode: 'CREDIT_CARD',
subject: 'Test subscription',
subscriptionOrderId: '1736739758574',
recurringIntervalCount: 1,
sign: 'JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==',
partnerUserId: 'H20241231',
payType: 'SUBSCRIPTION',
phone: '0845632145871',
appId: 1724,
name: 'howard',
notifyUrl: 'https://www.google.com',
currency: 'USD',
email: 'howard@gmail.com',
recurringInterval: 'D'
})
};
fetch('https://uat-interface.haipay.asia/subscription/apply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://uat-interface.haipay.asia/subscription/apply",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country' => 'USA',
'website' => 'https://test.com',
'amount' => '0.5',
'callBackUrl' => 'https://www.google.com',
'inBankCode' => 'CREDIT_CARD',
'subject' => 'Test subscription',
'subscriptionOrderId' => '1736739758574',
'recurringIntervalCount' => 1,
'sign' => 'JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==',
'partnerUserId' => 'H20241231',
'payType' => 'SUBSCRIPTION',
'phone' => '0845632145871',
'appId' => 1724,
'name' => 'howard',
'notifyUrl' => 'https://www.google.com',
'currency' => 'USD',
'email' => 'howard@gmail.com',
'recurringInterval' => 'D'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://uat-interface.haipay.asia/subscription/apply"
payload := strings.NewReader("{\n \"country\": \"USA\",\n \"website\": \"https://test.com\",\n \"amount\": \"0.5\",\n \"callBackUrl\": \"https://www.google.com\",\n \"inBankCode\": \"CREDIT_CARD\",\n \"subject\": \"Test subscription\",\n \"subscriptionOrderId\": \"1736739758574\",\n \"recurringIntervalCount\": 1,\n \"sign\": \"JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==\",\n \"partnerUserId\": \"H20241231\",\n \"payType\": \"SUBSCRIPTION\",\n \"phone\": \"0845632145871\",\n \"appId\": 1724,\n \"name\": \"howard\",\n \"notifyUrl\": \"https://www.google.com\",\n \"currency\": \"USD\",\n \"email\": \"howard@gmail.com\",\n \"recurringInterval\": \"D\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://uat-interface.haipay.asia/subscription/apply")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"USA\",\n \"website\": \"https://test.com\",\n \"amount\": \"0.5\",\n \"callBackUrl\": \"https://www.google.com\",\n \"inBankCode\": \"CREDIT_CARD\",\n \"subject\": \"Test subscription\",\n \"subscriptionOrderId\": \"1736739758574\",\n \"recurringIntervalCount\": 1,\n \"sign\": \"JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==\",\n \"partnerUserId\": \"H20241231\",\n \"payType\": \"SUBSCRIPTION\",\n \"phone\": \"0845632145871\",\n \"appId\": 1724,\n \"name\": \"howard\",\n \"notifyUrl\": \"https://www.google.com\",\n \"currency\": \"USD\",\n \"email\": \"howard@gmail.com\",\n \"recurringInterval\": \"D\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://uat-interface.haipay.asia/subscription/apply")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"USA\",\n \"website\": \"https://test.com\",\n \"amount\": \"0.5\",\n \"callBackUrl\": \"https://www.google.com\",\n \"inBankCode\": \"CREDIT_CARD\",\n \"subject\": \"Test subscription\",\n \"subscriptionOrderId\": \"1736739758574\",\n \"recurringIntervalCount\": 1,\n \"sign\": \"JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==\",\n \"partnerUserId\": \"H20241231\",\n \"payType\": \"SUBSCRIPTION\",\n \"phone\": \"0845632145871\",\n \"appId\": 1724,\n \"name\": \"howard\",\n \"notifyUrl\": \"https://www.google.com\",\n \"currency\": \"USD\",\n \"email\": \"howard@gmail.com\",\n \"recurringInterval\": \"D\"\n}"
response = http.request(request)
puts response.read_body{
"status": "1",
"error": "00000000",
"msg": "",
"data": {
"subscriptionNo": "4025011311423010028",
"subscriptionOrderId": "1736739758574",
"appId": 1724,
"subject": "Test subscription",
"payType": "SUBSCRIPTION",
"inBankCode": "CREDIT_CARD",
"amount": 0.5,
"recurringInterval": "D",
"recurringIntervalCount": 1,
"status": "2",
"sign": "QrOo7yPJMTRk92bP9WU8P0ATdRvCm8dWElhbxqV6qmZEWZDRXeJAwUvd3839zErg+3tN/U4Rwyru219AkXg9CJZtocna3fiYj7uLxwD6bpAp+i9DGz5ZKV9ab5mwIEPWIQXKuY6wATzmlz6W4TvAkRqgGtqLkwYUaeqsmgJrh4WlIMK13GW/zvoCmYfFD6pNZUByVixpll8JPeZG7F9d+x7yjDigJZ2S1wm4F307OzZJkUSKSvQn6Q0lOvp1JS0feXSC+hwCfrdllFXIE10TDV0itoPY5G7+3QdmHpINWp3kWmepR/1pOsN+09hLxe8xKAIZrX2GFHY00xo3QnxBIw=="
}
}信用卡订阅
订阅申请
创建订阅订单
POST
/
subscription
/
apply
订阅申请
curl --request POST \
--url https://uat-interface.haipay.asia/subscription/apply \
--header 'Content-Type: application/json' \
--data '
{
"country": "USA",
"website": "https://test.com",
"amount": "0.5",
"callBackUrl": "https://www.google.com",
"inBankCode": "CREDIT_CARD",
"subject": "Test subscription",
"subscriptionOrderId": "1736739758574",
"recurringIntervalCount": 1,
"sign": "JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==",
"partnerUserId": "H20241231",
"payType": "SUBSCRIPTION",
"phone": "0845632145871",
"appId": 1724,
"name": "howard",
"notifyUrl": "https://www.google.com",
"currency": "USD",
"email": "howard@gmail.com",
"recurringInterval": "D"
}
'import requests
url = "https://uat-interface.haipay.asia/subscription/apply"
payload = {
"country": "USA",
"website": "https://test.com",
"amount": "0.5",
"callBackUrl": "https://www.google.com",
"inBankCode": "CREDIT_CARD",
"subject": "Test subscription",
"subscriptionOrderId": "1736739758574",
"recurringIntervalCount": 1,
"sign": "JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==",
"partnerUserId": "H20241231",
"payType": "SUBSCRIPTION",
"phone": "0845632145871",
"appId": 1724,
"name": "howard",
"notifyUrl": "https://www.google.com",
"currency": "USD",
"email": "howard@gmail.com",
"recurringInterval": "D"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
country: 'USA',
website: 'https://test.com',
amount: '0.5',
callBackUrl: 'https://www.google.com',
inBankCode: 'CREDIT_CARD',
subject: 'Test subscription',
subscriptionOrderId: '1736739758574',
recurringIntervalCount: 1,
sign: 'JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==',
partnerUserId: 'H20241231',
payType: 'SUBSCRIPTION',
phone: '0845632145871',
appId: 1724,
name: 'howard',
notifyUrl: 'https://www.google.com',
currency: 'USD',
email: 'howard@gmail.com',
recurringInterval: 'D'
})
};
fetch('https://uat-interface.haipay.asia/subscription/apply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://uat-interface.haipay.asia/subscription/apply",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country' => 'USA',
'website' => 'https://test.com',
'amount' => '0.5',
'callBackUrl' => 'https://www.google.com',
'inBankCode' => 'CREDIT_CARD',
'subject' => 'Test subscription',
'subscriptionOrderId' => '1736739758574',
'recurringIntervalCount' => 1,
'sign' => 'JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==',
'partnerUserId' => 'H20241231',
'payType' => 'SUBSCRIPTION',
'phone' => '0845632145871',
'appId' => 1724,
'name' => 'howard',
'notifyUrl' => 'https://www.google.com',
'currency' => 'USD',
'email' => 'howard@gmail.com',
'recurringInterval' => 'D'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://uat-interface.haipay.asia/subscription/apply"
payload := strings.NewReader("{\n \"country\": \"USA\",\n \"website\": \"https://test.com\",\n \"amount\": \"0.5\",\n \"callBackUrl\": \"https://www.google.com\",\n \"inBankCode\": \"CREDIT_CARD\",\n \"subject\": \"Test subscription\",\n \"subscriptionOrderId\": \"1736739758574\",\n \"recurringIntervalCount\": 1,\n \"sign\": \"JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==\",\n \"partnerUserId\": \"H20241231\",\n \"payType\": \"SUBSCRIPTION\",\n \"phone\": \"0845632145871\",\n \"appId\": 1724,\n \"name\": \"howard\",\n \"notifyUrl\": \"https://www.google.com\",\n \"currency\": \"USD\",\n \"email\": \"howard@gmail.com\",\n \"recurringInterval\": \"D\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://uat-interface.haipay.asia/subscription/apply")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"USA\",\n \"website\": \"https://test.com\",\n \"amount\": \"0.5\",\n \"callBackUrl\": \"https://www.google.com\",\n \"inBankCode\": \"CREDIT_CARD\",\n \"subject\": \"Test subscription\",\n \"subscriptionOrderId\": \"1736739758574\",\n \"recurringIntervalCount\": 1,\n \"sign\": \"JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==\",\n \"partnerUserId\": \"H20241231\",\n \"payType\": \"SUBSCRIPTION\",\n \"phone\": \"0845632145871\",\n \"appId\": 1724,\n \"name\": \"howard\",\n \"notifyUrl\": \"https://www.google.com\",\n \"currency\": \"USD\",\n \"email\": \"howard@gmail.com\",\n \"recurringInterval\": \"D\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://uat-interface.haipay.asia/subscription/apply")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"USA\",\n \"website\": \"https://test.com\",\n \"amount\": \"0.5\",\n \"callBackUrl\": \"https://www.google.com\",\n \"inBankCode\": \"CREDIT_CARD\",\n \"subject\": \"Test subscription\",\n \"subscriptionOrderId\": \"1736739758574\",\n \"recurringIntervalCount\": 1,\n \"sign\": \"JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==\",\n \"partnerUserId\": \"H20241231\",\n \"payType\": \"SUBSCRIPTION\",\n \"phone\": \"0845632145871\",\n \"appId\": 1724,\n \"name\": \"howard\",\n \"notifyUrl\": \"https://www.google.com\",\n \"currency\": \"USD\",\n \"email\": \"howard@gmail.com\",\n \"recurringInterval\": \"D\"\n}"
response = http.request(request)
puts response.read_body{
"status": "1",
"error": "00000000",
"msg": "",
"data": {
"subscriptionNo": "4025011311423010028",
"subscriptionOrderId": "1736739758574",
"appId": 1724,
"subject": "Test subscription",
"payType": "SUBSCRIPTION",
"inBankCode": "CREDIT_CARD",
"amount": 0.5,
"recurringInterval": "D",
"recurringIntervalCount": 1,
"status": "2",
"sign": "QrOo7yPJMTRk92bP9WU8P0ATdRvCm8dWElhbxqV6qmZEWZDRXeJAwUvd3839zErg+3tN/U4Rwyru219AkXg9CJZtocna3fiYj7uLxwD6bpAp+i9DGz5ZKV9ab5mwIEPWIQXKuY6wATzmlz6W4TvAkRqgGtqLkwYUaeqsmgJrh4WlIMK13GW/zvoCmYfFD6pNZUByVixpll8JPeZG7F9d+x7yjDigJZ2S1wm4F307OzZJkUSKSvQn6Q0lOvp1JS0feXSC+hwCfrdllFXIE10TDV0itoPY5G7+3QdmHpINWp3kWmepR/1pOsN+09hLxe8xKAIZrX2GFHY00xo3QnxBIw=="
}
}密钥私钥(生成签名)
相关主题
请求体
application/json
业务ID(后台获取,需要根据参数currency传递对应的业务ID)
商户订单号(必须保证唯一性,长度不超过48)
Maximum string length:
48交易金额(精确到小数点后两位;禁止添加标点符号,例如:",")
Pattern:
^\d+\.\d{2}$真实手机号(格式参考电话号码格式)
订阅标题
支付方式编码,与 paymentMethods 二选一
可用选项:
CREDIT_CARD, GOOGLE_PAY, APPLE_PAY 支付方式类型
可用选项:
SUBSCRIPTION 用户支付成功后跳转地址
异步通知地址
国家
币种,目前支持:USD
可用选项:
USD 用户唯一标识(如用户ID userId),用于风控系统,必须真实有效,否则会影响交易。格式要求:数字、大小写字母或常用符号-~!@#$%&*()_。
Pattern:
^[A-Za-z0-9\-~!@#$%&*()_]+$循环周期类型 D(天),W(周),M(月),Y(年)
可用选项:
D, W, M, Y 循环周期间隔
必填范围:
x >= 1最大循环次数,无论循环周期是哪个,最长时间不能超过三年,到期订阅自动取消
必填范围:
x >= 1交易网站
定期扣款失败重试次数,默认为3
必填范围:
x >= 0签名
用户姓名,推荐使用真实姓名,格式:包含firstName和lastName,以空格分割的,示例:John Doe
真实电子邮件
备注详情
用户取消支付URL,如果传递,用户可在支付页面点击返回到此页面
优惠期数(暂时只支持首期优惠与全期优惠,即couponPeriod只能等于1或者等于recurringMaxNumber)
每期优惠金额
Pattern:
^\d+\.\d{2}$支持的支付方式列表,英文逗号分隔,如 CREDIT_CARD,GOOGLE_PAY,APPLE_PAY,与 inBankCode 二选一,暂时仅支持前置组件组合模式使用
最后修改于 2026年5月20日
此页面对您有帮助吗?
⌘I

