Delete payment method
curl --request DELETE \
--url https://uat-api.clinkbill.com/agent/platform/payment-methods/{paymentInstrumentId} \
--header 'Authorization: Bearer <token>'HttpResponse<String> response = Unirest.delete("https://uat-api.clinkbill.com/agent/platform/payment-methods/{paymentInstrumentId}")
.header("Authorization", "Bearer <token>")
.asString();import requests
url = "https://uat-api.clinkbill.com/agent/platform/payment-methods/{paymentInstrumentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://uat-api.clinkbill.com/agent/platform/payment-methods/{paymentInstrumentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"msg": "Success",
"data": {
"deleted": true
}
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}Payment Methods
删除支付方式
Deletes one of the token’s customer’s payment methods. Requires portal:write.
DELETE
/
agent
/
platform
/
payment-methods
/
{paymentInstrumentId}
Delete payment method
curl --request DELETE \
--url https://uat-api.clinkbill.com/agent/platform/payment-methods/{paymentInstrumentId} \
--header 'Authorization: Bearer <token>'HttpResponse<String> response = Unirest.delete("https://uat-api.clinkbill.com/agent/platform/payment-methods/{paymentInstrumentId}")
.header("Authorization", "Bearer <token>")
.asString();import requests
url = "https://uat-api.clinkbill.com/agent/platform/payment-methods/{paymentInstrumentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://uat-api.clinkbill.com/agent/platform/payment-methods/{paymentInstrumentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"msg": "Success",
"data": {
"deleted": true
}
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}{
"code": 123,
"msg": "<string>"
}删除成功返回
200 和 deleted: true。删除立即生效,响应不返回用户操作页面链接。支付方式不存在,或属于其他用户时,都返回相同的 404,因此响应不会泄露其他用户的卡是否存在。默认卡可以删除。删除成功后重复发起该请求会返回 404。