# Deposit Status Endpoint

## Deposit Status

<mark style="color:blue;">`GET`</mark> `https://api-stg.tupayonline.com/v3/deposits/{deposit_id}`

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

#### Path Parameters

| Name                                          | Type    | Description                                                 |
| --------------------------------------------- | ------- | ----------------------------------------------------------- |
| deposit\_id<mark style="color:red;">\*</mark> | integer | TuPay deposit\_id. It is obtained when creating the deposit |

#### Headers

| Name                                            | Type   | Description                                              |
| ----------------------------------------------- | ------ | -------------------------------------------------------- |
| X-Date<mark style="color:red;">\*</mark>        | string | ISO8601 Datetime with Timezone: `yyyy-MM-dd'T'HH:mm:ssZ` |
| X-Login<mark style="color:red;">\*</mark>       | string | Merchant X-Login API Key                                 |
| Authorization<mark style="color:red;">\*</mark> | string | Authentication signature hash                            |

{% tabs %}
{% tab title="200 Deposit status successfully retrieved." %}

```json
{
    "deposit_id": 301178393,
    "invoice_id": "19574-2023284901097729168",
    "country": "PE",
    "currency": "PEN",
    "usd_amount": 2.54,
    "local_amount": 10.00,
    "payment_method": "XA",
    "payment_type": "VOUCHER",
    "status": "PENDING",
    "payer": {
        "document": "78596049",
        "document_type": "DNI",
        "email": "prueba@gmail.com",
        "first_name": "Nombre",
        "last_name": "Apellido"
    },
    "fee_amount": 0.13,
    "fee_currency": "USD",
    "refunded": false,
    "current_payer_verification": "NO_CURRENT_PAYER_DATA",
    "completed_payment_method_code": "YP"
}
```

{% endtab %}

{% tab title="400 The deposit\_id specified is not valid" %}

```json
{
    "code": 207,
    "description": "Invalid request parameter type",
    "type": "INVALID_REQUEST_PARAMETER_TYPE"
}
```

{% endtab %}
{% endtabs %}

## <mark style="color:green;">Response</mark>

<table><thead><tr><th width="234">Name</th><th width="134">Format</th><th>Descriptions</th></tr></thead><tbody><tr><td><code>user_id</code></td><td>String</td><td>Identifier of the user generator on the Tupay side.</td></tr><tr><td><code>deposit_id</code></td><td>Number</td><td>Identifier of the deposit generated on the Tupay side.</td></tr><tr><td><code>invoice_id</code></td><td>String</td><td>Identifier of the repository generated on the Tupay side.</td></tr><tr><td><code>country</code></td><td>String</td><td>Country</td></tr><tr><td><code>currency</code></td><td>String</td><td>Money PEN/USD</td></tr><tr><td><code>local_amount</code></td><td>Number</td><td>Amount in local currency.</td></tr><tr><td><code>usd_amount</code></td><td>Number</td><td>Amount in USD.</td></tr><tr><td><code>payment_method</code></td><td>String</td><td>Payment Methods</td></tr><tr><td><code>status</code></td><td>String</td><td>Tank status</td></tr><tr><td><code>payer[]</code></td><td>Object</td><td>Object containing information about the payer. Only the data you have submitted or we have collected will be displayed.</td></tr><tr><td><code>payer.document</code></td><td>String</td><td>Identity document of the payer.</td></tr><tr><td><code>payer.document_type</code></td><td>String</td><td>Type of identity document of the payer.</td></tr><tr><td><code>payer.email</code></td><td>String</td><td>Payer's email address.</td></tr><tr><td><code>payer.first_name</code></td><td>String</td><td>Name of payer.</td></tr><tr><td><code>payer.last_name</code></td><td>String</td><td>Last Name of payer</td></tr><tr><td><code>payer.address[]</code></td><td>Object</td><td>Object containing details of the payer's address. Only data you have submitted or we have collected will be displayed.</td></tr><tr><td><code>payer.address.city</code></td><td>String</td><td>Payer city</td></tr><tr><td><code>payer.address.state</code></td><td>String</td><td>Payer status in ISO format.</td></tr><tr><td><code>payer.address.street</code></td><td>String</td><td>Street of payer</td></tr><tr><td><code>payer.address.zip_code</code></td><td>String</td><td>Code Address zip</td></tr><tr><td><code>fee_amount</code></td><td>Number</td><td>Deposit fee in the currency of the balance sheet.</td></tr><tr><td><code>fee_currency</code></td><td>String</td><td>Fee currency</td></tr><tr><td><code>completed_payment_method_code</code></td><td>String</td><td>Payment method used by the customer to complete the transaction. The codes can be found <a href="https://docs.tupayonline.com/documentacion-de-la-api/depositos/endpoint-estado-de-deposito#codigos-de-metodo-completado">(Method code completed)</a>.</td></tr></tbody></table>

## <mark style="color:green;">Examples for developers</mark>

{% tabs %}
{% tab title="JAVA" %}

```java
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.tupayonline.com/v3/deposits/300004285")
      .method("GET", null)
      .addHeader("X-Login", "xxxxxxx")
      .addHeader("X-Date", "2020-06-24T17:13:21Z")
      .addHeader("Authorization", "D24 e339247fb57b10c053159cf87d3a88415f9be567beb46a93f6839d9fc45d2c8a")
      .build();
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
  }
}
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using RestSharp;

namespace HelloWorldApplication {
    class HelloWorld {
        static void Main(string[] args) {
            var client = new RestClient("https://api-stg.tupayonline.com/v3/deposits/300004285");
            client.Timeout = -1;
            var request = new RestRequest(Method.GET);
            request.AddHeader("X-Login", "xxxxxxx");
            request.AddHeader("X-Date", "2020-06-24T17:13:21Z");
            request.AddHeader("Authorization", "D24 e339247fb57b10c053159cf87d3a88415f9be567beb46a93f6839d9fc45d2c8a");
            request.AddParameter("application/json", "",  ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
            Console.WriteLine(response.Content);
        }
    }
}


```

{% endtab %}

{% tab title="PHP" %}

<pre class="language-php"><code class="lang-php"><strong>&#x3C;?php
</strong>
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-stg.tupayonline.com/v3/deposits/300004285",
  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: xxxxxxxx",
    "X-Date: 2020-06-24T17:13:21Z",
    "Authorization: D24 e339247fb57b10c053159cf87d3a88415f9be567beb46a93f6839d9fc45d2c8a"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


</code></pre>

{% endtab %}
{% endtabs %}

## <mark style="color:green;">**Method Code Completed**</mark> <a href="#codigos-de-metodo-completado" id="codigos-de-metodo-completado"></a>

| completed\_payment\_method\_code | Description    |
| -------------------------------- | -------------- |
| `VI`                             | Visa           |
| `MC`                             | Mastercard     |
| `YP`                             | Yape           |
| `IL`                             | Plin           |
| `IB`                             | Interbank      |
| `BC`                             | BCP            |
| `ST`                             | Scotia         |
| `BAB`                            | Banbif         |
| `RY`                             | Banco Ripley   |
| `RDP`                            | Red Digital    |
| `WU`                             | Western Union  |
| `BP`                             | BBVA           |
| `KE`                             | Kasnet         |
| `TM`                             | Tambo          |
| `HC`                             | Caja Huancayo  |
| `US`                             | Caja Cusco     |
| `JA`                             | Caja Arequipa  |
| `JI`                             | Caja ICA       |
| `JP`                             | Caja Piura     |
| `JT`                             | Caja Tacna     |
| `DG`                             | Digital Wallet |

## <mark style="color:green;">State Codes</mark>

<table><thead><tr><th width="169" align="center">Estado</th><th>Descripción</th></tr></thead><tbody><tr><td align="center">​<img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-MDBDtVvWt-UNvKHZsDY%2F-MDBHnzNY05ffYAzGwV_%2FCREATED.svg?alt=media&#x26;token=0fb1ead7-6fc0-45e4-bcbf-e0f865150a72" alt="">​</td><td>The repository was created, but the user has not opened the link yet.</td></tr><tr><td align="center">​<img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-MDBDtVvWt-UNvKHZsDY%2F-MDBHD__gsa_CT3H-8Z2%2FINITIATED.svg?alt=media&#x26;token=3627f922-3209-4bc7-b575-96023baa0278" alt="">​</td><td>The deposit was created and the user has opened the link, but has not completed the payment flow with their personal information or the provider has not been able to process the request.</td></tr><tr><td align="center">​<img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-M9UZX6c7bK760aeWd8v%2F-M9Uq6hh3MZ301JtlBh4%2FUntitled%20Diagram.svg?alt=media&#x26;token=41bf91d1-9560-4eca-ae31-31076fa4318a" alt="">​</td><td>The deposit was created with all the required information waiting to be completed by the user.</td></tr><tr><td align="center">​<img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-M9UZX6c7bK760aeWd8v%2F-M9Usf-KMOsFfbQJ_ZoQ%2FFOR_REVIEW.svg?alt=media&#x26;token=5e16e936-8504-4809-b0ef-696ead0cda3a" alt="">​</td><td>The deposit did not pass our anti-fraud systems and will be held until it is manually reviewed.</td></tr><tr><td align="center">​<img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-MDBDtVvWt-UNvKHZsDY%2F-MDBH_7RIHxUC25-qIS1%2FEXPIRED.svg?alt=media&#x26;token=23f5a18e-0b54-4c5e-9421-0070b2fb212d" alt="">​</td><td>The deposit has reached its expiration date and the user has not paid.</td></tr><tr><td align="center">​<img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-M9UZX6c7bK760aeWd8v%2F-M9UsJ4Co_cg-RzJZT6c%2FCANCELLED.svg?alt=media&#x26;token=740308bc-8d16-47b4-b463-5dcb696664f5" alt="">​</td><td>The deposit was canceled by the user or 7 days have passed since its expiration.</td></tr><tr><td align="center">​<img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-M9UZX6c7bK760aeWd8v%2F-M9UsDlL5PDQXBDL5CUD%2FCOMPLETED.svg?alt=media&#x26;token=92d1f295-7b3c-4ad5-b0ce-eb123df5b7ed" alt="">​</td><td>The deposit has been completed and the money was credited to the merchant's account.</td></tr></tbody></table>

<figure><img src="/files/4qxpeMjOoBvVwflTvCHo" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tupayonline.com/english/api-documentation/deposit/deposit-status-endpoint.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
