创建卡信息
将卡的信息存储在Liquido的服务器上,并返回一个卡的标识,可用于以后付款。
HTTP请求
POST
/v1/payments/vault/card
Request Headers{
"Content-Type": "application/json",
"Authorization": "Bearer {{access_token}}",
"x-api-key": "{{api_key}}"
}
Request Body{
"country": "CO",
"card": {
"cardHolderName": "card_holder_name",
"cardNumber": "4581243338680000",
"expirationMonth": "09",
"expirationYear": "2024",
"cvc": "123"
}
}
Response{
"cardId": "123121123",
"card": {
"cardHolderName": "card_holder_name",
"expirationMonth": 9,
"expirationYear": 2024,
"brand": "VISA",
"bin": "458124",
"last4": "0000"
}
}
Key |
Value |
Authorization |
"bearer" + " " + {{access_token}} |
x-api-key |
{{api_key}} |
Request Body 字段说明
Parameter |
Required |
Type |
Description |
country |
|
String |
国家编码. |
card |
|
JSON |
卡信息. |
Card 对象字段说明
Parameter |
Required |
Type |
Description |
cardHolderName |
|
String |
持卡人全称. |
cardNumber |
|
String |
卡号, 16位纯数字字符串,不能有横杠空格等分隔符. |
cvc |
|
String |
信用卡安全码. |
expirationMonth |
|
Integer |
信用卡过期月份, 2位数. |
expirationYear |
|
String |
信用卡有效期年份,4位数。 |
Response Body 字段说明
Parameter |
Type |
Description |
cardId |
String |
保存的卡ID. |
card |
JSON |
卡详细信息. |
Card (响应)对象字段说明
参数 |
类型 |
描述 |
cardHolderName |
String |
持卡人姓名 |
bin |
String |
卡号前6位数字 |
last4 |
String |
卡号后4位数字 |
brand |
String |
信用卡组织. 如 VISA, MASTERCARD |
expirationMonth |
Integer |
1位数或者2位数的信用卡有效期月份。 |
expirationYear |
Integer |
信用卡有效期年份,4位数。 |
创建一个卡ID付款的信用卡支付
HTTP请求
POST
/v1/payments/charges/card
Request Headers{
"Content-Type": "application/json",
"Authorization": "Bearer {{access_token}}",
"x-api-key": "{{api_key}}"
}
Request Body{
"idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
"amount": 100000,
"currency": "COP",
"country": "CO",
"paymentMethod": "CREDIT_CARD",
... # other basic request fields
"cardId": "8736453a-dad0-4f26-85f0-95e8787d0237",
}
Response{
"transferStatusCode": 200,
"idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
"referenceId": "1ec983fa-1a37-679b-809b-067861d87ab0",
"paymentMethod": "CREDIT_CARD",
"amount": 100000,
"currency": "COP",
"finalAmount": 100000,
"finalCurrency": "COP",
"country": "CO",
... # other basic response fields
"transferDetails": {
"card": {
"cardInfo": {
"cardHolderName": "card_holder_name",
"expirationMonth": 9,
"expirationYear": 2024,
"brand": "VISA",
"bin": "458124",
"last4": "0000"
},
"cardId": "8736453a-dad0-4f26-85f0-95e8787d0237"
}
},
}