Refund Status Endpoint
Retrieve the status of a previously created refund
get
https://api-stg.directa24.com
/v3/refunds/{refund_id}
Refund Status

Description

You can trigger the check of the status of a refund at any moment you consider pertinent. However, every time a refund changes its status, we will send you a notification containing the ID of the refund so that you can check its status back to retrieve the new refund's status.

Refunds Status Request

In order to check the status of the refunds, you need to:
  1. 1.
    Send the request with GET method.
  2. 2.
    Use the headers described here.
  3. 3.
    Specify a valid refund_id in the URL of the request as PATH PARAMETERS.
  4. 4.
    Send the Authorization header, as explained here.
Regarding the Authorization value, since the body of the requests will be empty, you should use an empty ("") string or nothing as the jsonPayload field.
cURL
JAVA
C#
PHP
1
curl --location --request GET 'https://api-stg.directa24.com/v3/refunds/1682844' \
2
--header 'X-Login: {{X-Login}}' \
3
--header 'X-Date: {{X-Date}}' \
4
--header 'Authorization: {{Authorization}}' \
5
--header 'Content-Type: application/json' \
6
--data-raw ''
7
8
Copied!
1
import java.io.*;
2
import okhttp3.*;
3
public class main {
4
public static void main(String []args) throws IOException{
5
OkHttpClient client = new OkHttpClient().newBuilder()
6
.build();
7
Request request = new Request.Builder()
8
.url("https://api-stg.directa24.com/v3/refunds/1682844")
9
.method("GET", null)
10
.addHeader("X-Login", "{{X-Login}}")
11
.addHeader("X-Date", "{{X-Date}}")
12
.addHeader("Authorization", "{{Authorization}}")
13
.addHeader("Content-Type", "application/json")
14
.build();
15
Response response = client.newCall(request).execute();
16
System.out.println(response.body().string());
17
}
18
}
19
20
Copied!
1
using System;
2
using RestSharp;
3
namespace HelloWorldApplication {
4
class HelloWorld {
5
static void Main(string[] args) {
6
var client = new RestClient("https://api-stg.directa24.com/v3/refunds/1682844");
7
client.Timeout = -1;
8
var request = new RestRequest(Method.GET);
9
request.AddHeader("X-Login", "{{X-Login}}");
10
request.AddHeader("X-Date", "{{X-Date}}");
11
request.AddHeader("Authorization", "{{Authorization}}");
12
request.AddHeader("Content-Type", "application/json");
13
request.AddParameter("application/json", "", ParameterType.RequestBody);
14
IRestResponse response = client.Execute(request);
15
Console.WriteLine(response.Content);
16
}
17
}
18
}
19
20
Copied!
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://api-stg.directa24.com/v3/refunds/1682844",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "GET",
14
CURLOPT_HTTPHEADER => array(
15
"X-Login: {{X-Login}}",
16
"X-Date: {{X-Date}}",
17
"Authorization: {{Authorization}}",
18
"Content-Type: application/json"
19
),
20
));
21
22
$response = curl_exec($curl);
23
24
curl_close($curl);
25
echo $response;
26
27
Copied!

Example response

COMPLETED
PENDING
1
{
2
"deposit_id": 300533569,
3
"merchant_invoice_id": "84044",
4
"status": "COMPLETED",
5
"amount": 100.00
6
}
Copied!
1
{
2
"deposit_id": 300502126,
3
"merchant_invoice_id": "84121",
4
"status": "COMPLETED"
5
}
Copied!

Response fields

Field name
Format
Description
deposit_id
Integer
ID of the deposit refunded
merchant_invoice_id
String
Merchant invoice id of the deposit refunded
status
Enum
amount
Number
Amount of the refund
In order to make the experience more personalized, we may add more fields to this response's object in the future. Please develop your integration to be able to ignore new fields considering that it will continue working fine no matter if we add new fields.

Status Flow

Click here to see each Refund Status meaning.

Refund Status Flow

  1. 1.
    DECLINED is not a status by itself. It means the refund failed to be created.
  2. 2.
    As soon as the refund request is created, its status will be PENDING.
  3. 3.
    In case we need more information to complete the request or any of the details were incorrect, we will change the status to INCORRECT_DETAILS and you will need to provide the correct details. Once the details have been provided, its status will be PENDING again.
  4. 4.
    The status CANCELLED means the refund was manually cancelled by you. Only refunds in PENDING or INCORRECT_DETAILS can be cancelled. Final status.
  5. 5.
    If everything is fine we will send the refund for processing and the status will be marked as DELIVERED. It can't be cancelled at this point.
  6. 6.
    As soon as the processor/bank confirms the refund, it will be marked as COMPLETED or REJECTED (by the bank).
  7. 7.
    There are some corner cases in which the receiver's bank tell us that the refund was completed but days after it gets rejected. In those cases the status changes from COMPLETED to REJECTED.

Status codes

Check all the possible status in the following page: