Refund
This service allows you to create refunds of an existing payment.
HTTP Request¶
POST /v1/payments/charges/refund
Response
{
    "transferStatusCode": 200,
    "transferErrorMsg": null,
    "idempotencyKey": "2022030214000007-1",
    "referenceId": "2022030214000007",
    "paymentMethod": "CARD",
    "amount": 300,
    "currency": "USD",
    "country": "SV",
    "finalAmount": 300,
    "finalCurrency": "USD",
    "createTime": "2022-03-01 21:18:56 GMT-08:00",
    "scheduledTime": "2022-03-01 21:18:56 GMT-08:00",
    "finalStatusTime": "2022-03-01 21:18:57 GMT-08:00",
    "payer": {
        "document":{
            "documentId":"012345678",
            "type":"DUI"
        },
        "name": "username",
        "email": "username@liquido.com",
        "phone": "+50381987654321",
        "billingAddress": {  
            "zipCode": "1001",
            "state": "Buenos Aires",
            "city": "Buenos Aires",
            "district": "Jardim Gaivotas",
            "street": "Rua 9 de setembro",
            "number": "5940",
            "complement": "casa",
            "country": "SV"
        }
    },
    "transferStatus": "SETTLED",
    "description": "refund test",
    "callbackUrl": "https://api.client.comcallback/"
}
Notification / Callback¶
Notification / Callback
{
    "eventType": "CHARGE_REFUND_SUCCEEDED",
    "data": {
        "chargeDetails" : {
            "amount" : 300,
            "callbackUrl" : "https://api.client.com/callback/",
            "country" : "SV",
            "finalAmount": 100,
            "finalCurrency": "USD",
            "createTime" : "2022-03-01 15:10:35 GMT+08:00",
            "currency" : "USD",
            "description" : "refund test",
            "finalStatusTime" : "2022-03-01 15:10:37 GMT+08:00",
            "idempotencyKey" : "2022030114000005-1",
            "payer" : {
                  "document":{
                    "documentId":"012345678",
                    "type":"DUI"
                  },
                  "name": "username",
                  "email": "username@liquido.com",
                  "phone": "+50381987654321",
                  "billingAddress": {
                        "zipCode": "1001",
                        "state": "Buenos Aires",
                        "city": "Buenos Aires",
                        "district": "Jardim Gaivotas",
                        "street": "Rua 9 de setembro",
                        "number": "5940",
                        "complement": "casa",
                        "country": "SV"
                  }
            },
            "paymentMethod" : "CARD",
            "referenceId" : "2022030214000007",
            "scheduledTime" : "2022-03-01 15:10:35 GMT+08:00",
            "transferStatus" : "SETTLED",
            "transferStatusCode" : 200
        }
    }
}
HTTP Headers Details¶
| Key | Value | 
|---|---|
| Authorization | "Bearer" + " " + {{access_token}} | 
| x-api-key | {{api_key}} | 
Request Body Parameters¶
| Parameter | Required | Type | Description | 
|---|---|---|---|
| idempotencyKey | String | idempotencyKey of refund transation, generate by merchant. | |
| referenceId | String | idempotencyKey of payment which need to refund. | |
| amount | Long | The refund amount. The minimum settlement granularity of the current currency, such as 100=1USD | |
| country | String | country code | |
| currency | String | The currency code of the transferred fund | |
| description | String | description of refund transation | |
| additionalInfo | JSON | Additional refund information | |
| callbackUrl | String | URL where Liquido will send notifications associated to changes to this payment. will receive a post request. | 
Response Body Details¶
| Parameter | Type | Description | 
|---|---|---|
| idempotencyKey | String | idempotencyKey of refund record, generate by merchant. | 
| referenceId | String | idempotencyKey of the payment which need to refund. | 
| amount | Long | The refund amount | 
| country | String | country code | 
| currency | String | The currency code of the refund | 
| finalAmount | Long | The final amount that is used for creating the charge order. EX: for charge orders with FX conversion, this field represents the converted amount from the original requested amount. | 
| finalCurrency | String | The currency code of the finalAmount. | 
| description | String | reason for refund | 
| callbackUrl | String | URL where Liquido will send notifications associated to changes to this refund. | 
| createTime | String | refund ticket created time | 
| scheduledTime | String | refund ticket scheduled time | 
| finalStatusTime | String | refund final status update time, final status include SETTLED, FAILED | 
| transferStatus | String | refund status, SETTLED, IN_PROGRESS, FAILED | 
| transferStatusCode | Integer | refund status code, 200 transaction SETTLED or IN_PROGRESS, other FAILED | 
| transferErrorMsg | String | refund error message if failed |