LogoLogo
Document ValidationsPayment Methods
Latest
Latest
  • D24 APIs
  • Getting Started with D24
  • API Documentation
    • Deposits API
      • Technical and Security Aspects
        • Calculating the Signature
      • Endpoints
        • Deposit Creation Endpoint
          • Notifications
        • PCI Deposit Creation Endpoint
        • Deposit Status Endpoint
        • Payment Methods Endpoint
        • Currency Exchange Endpoint
        • Crypto Exchange Endpoint
        • Country States Codes Endpoint
        • Refund Creation Endpoint
          • Notifications
        • Refund Status Endpoint
      • Payment Methods
        • 🌎America
          • 🇦🇷Argentina
          • 🇧🇴Bolivia
          • 🇧🇷Brazil
          • 🇨🇱Chile
          • 🇨🇦Canada
          • 🇨🇴Colombia
          • 🇪🇨Ecuador
          • 🇬🇹Guatemala
          • 🇲🇽Mexico
          • 🇵🇾Paraguay
          • 🇵🇪Peru
        • 🌍Africa
          • 🇧🇼Botswana
          • 🇨🇲Cameroon
          • 🇨🇬Congo Brazzaville
          • 🇨🇩Congo DRC
          • 🇪🇬Egypt
          • 🇬🇦Gabon
          • 🇬🇭Ghana
          • 🇨🇮Ivory Coast
          • 🇰🇪Kenya
          • 🇳🇬Nigeria
          • 🇲🇼Malawi
          • 🇷🇼Rwanda
          • 🇿🇦South Africa
          • 🇺🇬Uganda
          • 🇿🇲Zambia
          • 🇹🇿Tanzania
        • 🌏Asia
          • 🇧🇩Bangladesh
          • 🇨🇳China
          • 🇭🇰Hong Kong
          • 🇮🇳India
          • 🇮🇩Indonesia
          • 🇯🇵Japan
          • 🇲🇾Malaysia
          • 🇵🇰Pakistan
          • 🇹🇭Thailand
          • 🇹🇷Turkey
          • 🇻🇳Vietnam
      • API Codes
    • Cashouts API
      • Technical and Security Aspects
        • Calculating the Payload-Signature
      • Endpoints
        • Cashout Creation Endpoint
          • Notifications
        • Cashout Status Endpoint
        • Cashout Update Status Endpoint
        • Cashout Cancellation Endpoint
        • Cashout Bank Codes
      • Countries Validations
        • American Countries
          • 🇧🇴Bolivia
          • 🇧🇷Brazil
          • 🇨🇦Canada
          • 🇨🇱Chile
          • 🇨🇴Colombia
          • 🇪🇨Ecuador
          • 🇲🇽Mexico
          • 🇵🇪Peru
          • 🇦🇷Argentina
          • 🇵🇾Paraguay
        • African Countries
          • 🇧🇼Botwsana
          • 🇨🇲Cameroon
          • 🇨🇬Congo Brazzaville
          • 🇨🇩Congo DRC
          • 🇪🇬Egypt
          • 🇬🇦Gabon
          • 🇬🇭Ghana
          • 🇰🇪Kenya
          • 🇲🇼Malawi
          • 🇳🇬Nigeria
          • 🇷🇼Rwanda
          • 🇿🇦SOUTH AFRICA
          • 🇿🇲Zambia
        • Asian Countries
          • 🇧🇩Bangladesh
          • 🇨🇳China
          • 🇮🇳India
          • 🇮🇩Indonesia
          • 🇯🇵Japan
          • 🇲🇾Malaysia
          • 🇹🇭Thailand
          • 🇹🇷Turkey
          • 🇵🇰Pakistan
          • 🇻🇳Vietnam
        • Oceania Countries
          • 🇦🇺Australia
      • API Codes
    • Subscriptions API
      • Technical and Security Aspects
        • Calculating the Signature
      • Subscription Creation Endpoints
        • OneShot Subscription Creation
        • PCI Subscription Creation Endpoint
        • Notifications
      • Subscription Cancellation Endpoint
      • Subscription Status Endpoint
    • Card-On-File API
      • Technical and Security Aspects
        • Calculating the Signature
      • Create Card Token Endpoint
      • Retrieve Card Token Endpoint
      • Delete Card Token Endpoint
    • Bank Accounts Validation API
      • Technical and Security Aspects
        • Calculating the Signature
      • Endpoints
        • Bank Account Validation Endpoint
        • Pix Key Validation Endpoint
      • API Codes
    • KYC API
      • Technical and Security Aspects
        • Calculating the Signature
      • KYC Endpoint
      • API Codes
    • Reconciliation API
      • Technical and Security Aspects
      • Endpoints
      • API Codes
    • Quickpay
      • Endpoints
        • Deposit creation endpoint
          • Notifications
        • Deposit Status Endpoint
    • Tools for Platforms
      • Technical and Security Aspects
        • Calculating the Signature
      • SubMerchant Creation
        • Notifications
      • SubMerchant Status Endpoint
      • Commission Update Endpoint
  • PLUGINS
    • Shopify
      • Installation
      • Onboarding
      • Customer flow
      • Admin Flow
      • Tutorials
      • FAQ
    • WooCommerce
      • Installation
      • Configuration
  • Deposits Tools
    • Cards SDK
      • With User Interface
        • 🚀Color Customization
      • Without User Interface
    • Java SDK
    • PHP SDK
  • Knowledge Base
    • Countries Specifications
    • Subscriptions with Card On File
    • Deposits with Cards SDK
      • With User Interface
      • Without User Interface
    • Deposits with 3DS Authentication
    • Deposits with Installments
  • v1 Developers Guide
  • Status Page
Powered by GitBook
On this page
  • Refund Status
  • Description
  • Refunds Status Request
  • Example response
  • Response fields
  • Proof of refund
  • Status Flow
  • Refund Status Flow
  • Status codes

Was this helpful?

  1. API Documentation
  2. Deposits API
  3. Endpoints

Refund Status Endpoint

Retrieve the status of a previously created refund

Refund Status

GET https://api-stg.directa24.com/v3/refunds/{refund_id}

This endpoint allows you to retrieve the status of a refund request.

Path Parameters

Name
Type
Description

refund_id*

Integer

Directa24 refund_id. It is obtained when creating the refund

Query Parameters

Name
Type
Description

voucher

Boolean

true / false value, The request with True value will return the refund invoice in base64 to be decoded to create a .pdf.

Headers

Name
Type
Description

X-Date*

String

ISO8601 Datetime with Timezone: yyyy-MM-dd'T'HH:mm:ssZ

X-Login*

String

Merchant X-Login API Key

Authorization*

String

Authentication signature hash

{
    "deposit_id": 300533646,
    "merchant_invoice_id": "newIUnit45328731",
    "status": "PENDING"
}
{
    "code": 208,
    "description": "Resource not found",
    "type": "RESOURCE_NOT_FOUND"
}

Description

Refunds Status Request

In order to check the status of the refunds, you need to:

  1. Send the request with GET method.

  2. Specify a valid refund_id in the URL of the request as PATH PARAMETERS.

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 --location --request GET 'https://api-stg.directa24.com/v3/refunds/1682844' \
--header 'X-Login: {{X-Login}}' \
--header 'X-Date: {{X-Date}}' \
--header 'Authorization: {{Authorization}}' \
--header 'Content-Type: application/json' \
--data-raw ''

import java.io.*;
import okhttp3.*;
public class main {
  public static void main(String []args) throws IOException{
    OkHttpClient client = new OkHttpClient().newBuilder()
      .build();
    Request request = new Request.Builder()
      .url("https://api-stg.directa24.com/v3/refunds/1682844")
      .method("GET", null)
      .addHeader("X-Login", "{{X-Login}}")
      .addHeader("X-Date", "{{X-Date}}")
      .addHeader("Authorization", "{{Authorization}}")
      .addHeader("Content-Type", "application/json")
      .build();
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
  }
}

using System;
using RestSharp;
namespace HelloWorldApplication {
    class HelloWorld {
        static void Main(string[] args) {
            var client = new RestClient("https://api-stg.directa24.com/v3/refunds/1682844");
            client.Timeout = -1;
            var request = new RestRequest(Method.GET);
            request.AddHeader("X-Login", "{{X-Login}}");
            request.AddHeader("X-Date", "{{X-Date}}");
            request.AddHeader("Authorization", "{{Authorization}}");
            request.AddHeader("Content-Type", "application/json");
            request.AddParameter("application/json", "",  ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
            Console.WriteLine(response.Content);
        }
    }
}

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-stg.directa24.com/v3/refunds/1682844",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-Login: {{X-Login}}",
    "X-Date: {{X-Date}}",
    "Authorization: {{Authorization}}",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Example response

{
    "deposit_id": 300533569,
    "merchant_invoice_id": "84044",
    "status": "COMPLETED",
    "amount": 100.00
}
{
    "deposit_id": 300502126,
    "merchant_invoice_id": "84121",
    "status": "PENDING"
}

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

voucher

String

Proof of refund in base64 coding for generation of .pdf file. Included in response only if voucher is sent as true in query params.

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.

Proof of refund

In order to generate an invoice as proof of refund, you need to:

  1. Send the request with GET method.

  2. Specify a valid refund_id in the URL of the request as PATH PARAMETERS.

  3. Send the query parameter voucher as true.

Requesting a Refund and including the field voucher as a query parameter with value true will generate a voucher in base64, this voucher will need to be decoded to create the .pdf

Status Flow

Refund Status Flow

  1. DECLINED is not a status by itself. It means the refund failed to be created.

  2. As soon as the refund request is created, its status will be PENDING.

  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. The status CANCELLED means the refund was manually cancelled by you. Only refunds in PENDING or INCORRECT_DETAILS can be cancelled. Final status.

  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. As soon as the processor/bank confirms the refund, it will be marked as COMPLETED or REJECTED (by the bank).

  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:

PreviousNotificationsNextPayment Methods

Last updated 1 year ago

Was this helpful?

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 containing the ID of the refund so that you can check its status back to retrieve the new refund's status.

Use the headers described .

Send the Authorization header, as .

Status of the refund.

Use the headers described .

Send the Authorization header, as .

to see each Refund Status meaning.

notification
explained here
explained here
API Codes
here
here
Click here
Click here for the full list of refund codes.