Payment methods

创建支付方式以及客户信息,并作关联操作

创建支付方式接口请求报文示例

createPaymentMethod.sh
curl --request POST \
  --url https://{paymentApiUrl}/V2022-03/payment_methods \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
  --data '{
    "billingDetail": {
        "address": {
            "city": "NEWARK VALLEY",
            "country": "US",
            "line1": "4348  Calico Drive",
            "postalCode": "13811",
            "state": "NY"
        },
        "email": "indubio@gmail.com",
        "firstName": "Di Mo",
        "lastName": "Shi",
        "phone": "509-675-8948"
    },
    "card": {
        "cardNo": "5333302221254276",
        "cardExpireMonth": "12",
        "cardExpireYear": "2025",
        "cardSecurityCode": "123"
    },
    "customerId": "cus_1526760517237616640"
}'

更新支付方式接口请求报文示例

updatePaymentMethod.sh
curl --request POST \
  --url https://{paymentApiUrl}/V2022-03/payment_methods/update \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
  --data '{
    "billingDetail": {
        "address": {
            "city": "NEWARK VALLEY",
            "country": "US",
            "line1": "4349  Calico Drive",
            "postalCode": "13811",
            "state": "NY"
        },
        "email": "indubio@gmail.com",
        "firstName": "Di Ma",
        "lastName": "Shi",
        "phone": "509-675-8948"
    },
    "customerPaymentMethodId": "pm_1526760521989763072"
}'

获取支付方式接口请求报文示例

curl --request GET \
  --url https://{paymentApiUrl}/V2022-03/payment_methods/pm_1526760521989763072 \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

获取支付方式接口请求报文示例

getPaymentMethod
curl --request GET \
  --url https://{paymentApiUrl}/V2022-03/payment_methods/pm_1526760521989763072 \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

根据客户获取所有支付方式接口请求报文示例

getPaymentMethodListByCustomerId.sh
curl --request GET \
  --url https://{paymentApiUrl}/V2022-03/payment_methods/list/cus_1526760517237616640 \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

客户附加支付方式接口请求报文示例

curl --request GET \
  --url https://{paymentApiUrl}/V2022-03/payment_methods/pm_1526760521989763072/cus_1526760517237616640/attach \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

解绑支付方式接口请求报文示例

curl --request GET \
  --url https://{paymentApiUrl}/V2022-03/payment_methods/pm_1526760521989763072/detach \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

以上接口,【根据客户获取所有支付方式】【解绑支付方式】返回结构差异外,其他均返回如下结构(由于数据字段并无差别所以不再展示)

结果对象属性描述

Last updated