Authorization And Capture
Create A Credit Card Authorization
Authorizing a card payment allows you to reserve funds in a customer's bank account days before the actual payment occurs – for example when making hotel reservations.
To make it work, you need to create an authorization first, and then capture it.
HTTP Request
POST
/v1/payments/charges/card
Response
{
"transferStatusCode": 200,
"idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
"referenceId": "1ec983fa-1a37-679b-809b-067861d87ab0",
"paymentFlow": "DIRECT",
"paymentMethod": "CREDIT_CARD",
"amount": 300,
"currency": "CLP",
"finalAmount": 300,
"finalCurrency": "CLP",
"country": "CL",
"createTime": "2023-06-07 02:39:36 GMT-07:00",
"scheduledTime": "2023-06-07 02:39:37 GMT-07:00",
"finalStatusTime": "2023-06-07 02:39:37 GMT-07:00",
"payer": {
"name": "name",
"document": {
"documentId": "530315550",
"type": "RUT"
},
"email": "name@liquido.ccom"
},
"transferStatus": "AUTHORIZED",
"description": "this is a test pay",
"callbackUrl": "https://liquido.com/v1/test/callback/",
"transferDetails": {
"card": {
"cardInfo": {
"cardHolderName": "card holder",
"expirationMonth": 7,
"expirationYear": 2024,
"brand": "VISA",
"bin": "458124",
"last4": "0000"
}
}
}
}
HTTP Headers Details
Key | Value |
---|---|
Authorization | "bearer" + " " + {{access_token}} |
x-api-key | {{api_key}} |
Request Body Parameters
Parameter | Required | Type | Description |
---|---|---|---|
capture | Boolean | Must set to false to create an authorization. |
Capture An Authorization
HTTP Request
POST
/v1/payments/charges/card/capture/{{idempotencyKey}}
Response
{
"transferStatusCode": 200,
"idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
"referenceId": "1ec983fa-1a37-679b-809b-067861d87ab0",
"paymentFlow": "DIRECT",
"paymentMethod": "CREDIT_CARD",
"amount": 300,
"currency": "CLP",
"finalAmount": 150,
"finalCurrency": "CLP",
"country": "CL",
"createTime": "2023-06-07 02:39:36 GMT-07:00",
"scheduledTime": "2023-06-07 02:39:38 GMT-07:00",
"finalStatusTime": "2023-06-07 02:51:49 GMT-07:00",
"payer": {
"name": "name",
"document": {
"documentId": "530315550",
"type": "RUT"
},
"email": "name@liquido.ccom"
},
"transferStatus": "SETTLED",
"description": "this is a test pay",
"callbackUrl": "https://liquido.com/v1/test/callback/",
"transferDetails": {
"card": {
"cardInfo": {
"cardHolderName": "card holder",
"expirationMonth": 7,
"expirationYear": 2024,
"brand": "VISA",
"bin": "458124",
"last4": "0000"
}
}
}
}
HTTP Headers Details
Key | Value |
---|---|
Authorization | "bearer" + " " + {{access_token}} |
x-api-key | {{api_key}} |
Path and Query Parameters
Parameter | Type | Description |
---|---|---|
idempotencyKey | String | The idempotency key of the authorization which need to capture |
Request Body Parameters
Parameter | Required | Type | Description |
---|---|---|---|
amount | Long | Captured amount. By default, it will be the total amount of the authorization. It can be equal or less but not be greater than the authorized amount. |
Cancel An Authorization
HTTP Request
POST
/v1/payments/charges/cancel/{{idempotencyKey}}
Response
{
"transferStatusCode": 200,
"idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab09",
"referenceId": "1ec983fa-1a37-679b-809b-067861d87ab0",
"paymentFlow": "DIRECT",
"paymentMethod": "CREDIT_CARD",
"amount": 300,
"currency": "CLP",
"finalAmount": 300,
"finalCurrency": "CLP",
"country": "CL",
"createTime": "2023-06-07 02:54:55 GMT-07:00",
"scheduledTime": "2023-06-07 02:55:00 GMT-07:00",
"finalStatusTime": "2023-06-07 02:57:01 GMT-07:00",
"payer": {
"name": "name",
"document": {
"documentId": "530315550",
"type": "RUT"
},
"email": "name@liquido.ccom"
},
"transferStatus": "CANCELLED",
"description": "this is a test pay",
"callbackUrl": "https://liquido.com/v1/test/callback/",
"transferDetails": {
"card": {
"cardInfo": {
"cardHolderName": "card holder",
"expirationMonth": 7,
"expirationYear": 2024,
"brand": "VISA",
"bin": "458124",
"last4": "0000"
}
}
}
}
Path and Query Parameters
Parameter | Type | Description |
---|---|---|
idempotencyKey | String | The idempotency key of the authorization which need to cancel |