> ## Documentation Index
> Fetch the complete documentation index at: https://docs.v2.topup.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Merchant API

> The Merchant API lets you access your merchant profile and query transactions by various filters or identifiers.

# Merchant API

This API provides information about the merchant and allows for transaction searches. With these endpoints, you can retrieve merchant profile data and search for specific transactions using their unique identifiers.

## Endpoints

### Retrieve Merchant Information

> [card] /api/v1/merchant/me
>
> Provides a concise summary of the registered merchant's corporate and financial profile.
> The response includes key data such as tax ID, electronic contact information, operating currency, and current e-wallet balance.

#### Request Headers

**Token-Top** `string` *required*

Token for authentication

#### Response

**code** `string` *required*

Response code (e.g., "01")

**status** `string` *required*

Status of the response (e.g., "SUCCESS")

**message** `string`

Additional message about the response

**data** `object` *required*

**Merchant data object**

**name** `string`

Merchant's registered name (e.g., "Acme Corporation")

**nit** `string`

Merchant's tax ID (e.g., "2523423")

**email** `string`

Merchant's registered email (e.g., "[example@tumipay.co](mailto:example@tumipay.co)")

**currency** `string`

Operating currency (e.g., "COP")

**wallet** `integer`

Current e-wallet balance (e.g., 954943500)

```bash theme={null}
curl --request GET 'https://api-empresas.uat.topup.com.co/production/api/v1/merchant/me' \
--header 'Token-Top: your_auth_token'
```

```json theme={null}
{
  "code": "01",
  "status": "SUCCESS",
  "message": "",
  "data": {
    "name": "Acme Corporation",
    "nit": "2523423",
    "email": "example@tumipay.co",
    "currency": "COP",
    "wallet": 954943500
  }
}
```

### Search Transactions

> [card] /api/v1/transaction/\{ticket}
>
> Search for transaction details using either the ticket provided by TumiPay or the reference supplied by the merchant.
> The "ticket" parameter accepts both the TumiPay ticket and the merchant's reference for payin or payout transactions.

#### Request Headers

**Token-Top** `string` *required*

Token for authentication

#### Request Body

**ticket** `string` *required*

Ticket or reference of the transaction (e.g., "1740ed7e-bbab-11ee-8335-02530a7dec0f")

#### Response

**code** `string` *required*

Response code (e.g., "01")

**status** `string` *required*

Status of the transaction (e.g., "SUCCESS")

**data** `object` *required*

**Transaction data object**

**ticket** `string`

TumiPay ticket for the transaction (e.g., "41ac80c3-2f50-11ef-a534-02530a7dec0f")

**reference** `string`

Reference provided by the merchant (e.g., "uel7aWiavpwR8uXBkqMH3AiC165855")

**amount** `integer`

Transaction amount (e.g., 5000000)

**currency** `string`

Transaction currency (e.g., "COP", "PEN")

**type\_transaction** `string`

Type of transaction (e.g., "Deposit")

**customer** `object`

**Customer details object**

**legal\_doc\_type** `string`

Type of customer's legal document (e.g., "CC")

**legal\_doc** `string`

Customer's legal document number (e.g., "9012286480")

**phone\_code** `string`

Country code for the customer's phone number (e.g., "57")

**phone\_number** `string`

Customer's phone number (e.g., "3216132616")

**email** `string`

Customer's email address (e.g., "[approved@tumipay.co](mailto:approved@tumipay.co)")

**full\_name** `string`

Full name of the customer (e.g., "3013540830")

**status** `string`

Current status of the transaction (e.g., "APPROVED")

**response\_message** `string`

Message associated with the transaction's status (e.g., "Transaction approved")

**date** `string`

Timestamp of the transaction (e.g., "2024-06-20 16:58:55")

```bash theme={null}
curl --request POST 'https://api-empresas.uat.topup.com.co/production/api/v1/transaction/{ticket}' \
--header 'Token-Top: your_auth_token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ticket": "1740ed7e-bbab-11ee-8335-02530a7dec0f"
}'
```

```javascript theme={null}
// Using fetch API
const response = await fetch('https://api-empresas.uat.topup.com.co/production/api/v1/transaction/{ticket}', {
  method: 'POST',
  headers: {
    'Token-Top': 'your_auth_token',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    ticket: '1740ed7e-bbab-11ee-8335-02530a7dec0f'
  })
});
const data = await response.json();
```

```json theme={null}
{
  "code": "01",
  "status": "SUCCESS",
  "data": {
    "ticket": "41ac80c3-2f50-11ef-a534-02530a7dec0f",
    "reference": "uel7aWiavpwR8uXBkqMH3AiC165855",
    "amount": 5000000,
    "currency": "COP",
    "type_transaction": "Deposit",
    "customer": {
      "legal_doc_type": "CC",
      "legal_doc": "9012286480",
      "phone_code": "57",
      "phone_number": "3216132616",
      "email": "approved@tumipay.co",
      "full_name": "3013540830"
    },
    "status": "APPROVED",
    "response_message": "Transaction approved",
    "date": "2024-06-20 16:58:55"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.