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

# Get Transaction Detail

> Endpoint to view the details of a transaction based on its ID

```bash Request Example theme={null}
curl --request GET 'https://api.mayar.id/hl/v2/transactions/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here'
```

```json Response Example 200 theme={null}
{
    "statusCode": 200,
    "messages": "success",
    "data": {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "extraData": null,
        "amount": 150000,
        "createdAt": 1768375011056,
        "updatedAt": 1768375112056,
        "status": "paid",
        "expirationDate": 1768461411056,
        "invoiceCode": "INV-202607-XXXX",
        "isCrossSell": false,
        "orderVariant": null,
        "paymentMethod": "QRIS",
        "paymentLink": {
            "id": "6e9f587d-8a8a-4a4e-b745-28c71d94ed9d",
            "amount": 150000,
            "status": "active",
            "expiredAt": null,
            "link": "contoh-produk",
            "type": "payment_link"
        },
        "customer": {
            "id": "c1a2b3c4-d5e6-4789-a012-3456789abcde",
            "email": "andi.pratama@example.com",
            "status": "active",
            "name": "Andi Pratama",
            "mobile": "081200000001",
            "userId": "a0000000-0000-4000-8000-000000000001"
        },
        "givenCustomer": {
            "id": "c1a2b3c4-d5e6-4789-a012-3456789abcde",
            "email": "andi.pratama@example.com",
            "status": "active",
            "name": "Andi Pratama",
            "mobile": "081200000001",
            "userId": "a0000000-0000-4000-8000-000000000001"
        },
        "user": {
            "id": "a0000000-0000-4000-8000-000000000001",
            "name": "Toko Online",
            "email": "merchant@example.com",
            "account": {
                "email": "merchant@example.com",
                "name": "Toko Online",
                "mobile": "081234567890",
                "address": "Jl. Merdeka No. 123, Jakarta",
                "logo": {
                    "url": "https://cdn.mayar.id/logo/example.png"
                }
            }
        }
    }
}
```

Endpoint:

```Production Production theme={null}
https://api.mayar.id/hl/v2/transactions/{id}
```

```Sandbox Sandbox theme={null}
https://api.mayar.io/hl/v2/transactions/{id}
```

## Authorization

**Authorization** `string` *required*

Example:

`Authorization | Bearer Paste-Your-API-Key-Here`

## Path Parameters

**id** `string\<uuid\>` *required*

A unique identifier of the transaction.

Example:

`a1b2c3d4-e5f6-7890-abcd-ef1234567890`

## Response

Successful Response

### Main Structure (Root)

**statusCode** `integer`

Status code form API.

**messages** `string`

Status message that describes the status code.

**data** `object`

The transaction detail object.

### data Structure (Object)

**id** `string\<uuid\>`

Unique transaction ID.

**extraData** `object | null`

Additional custom data attached to the transaction, can be null.

**amount** `integer`

Total transaction amount.

**createdAt** `number (timestamp)`

Transaction creation time in epoch format (ms).

**updatedAt** `number (timestamp)`

Transaction last update time in epoch format (ms).

**status** `string`

Transaction status (e.g. `paid`, `unpaid`, `created`, `expired`).

**expirationDate** `number (timestamp)`

Transaction expiration time in epoch format (ms).

**invoiceCode** `string`

Invoice code associated with the transaction (if any).

**isCrossSell** `boolean`

Indicates whether the transaction is a cross-sell.

**orderVariant** `string | null`

Selected order variant (if any).

**paymentMethod** `string`

Payment method used (e.g. `QRIS`, `Virtual Account`, `EWallet`).

**paymentLink** `object`

Payment link information used for this transaction.

**customer** `object`

Customer data that made the purchase.

**givenCustomer** `object`

Gift recipient data if the purchase is a gift for someone else.

**user** `object`

Merchant data (the store owner).

### paymentLink Structure (Object)

**id** `string \<uuid\>`

ID payment link.

**amount** `integer`

Payment link price or nominal value.

**status** `string`

Payment link status (e.g. `active`).

**expiredAt** `number | null`

Payment link expiration time in epoch format (ms), can be null.

**link** `string`

Payment link slug/short URL.

**type** `string`

Payment link type (e.g. `payment_link`, `digital_product`, `webinar`).

### customer Structure (Object)

**id** `string \<uuid\>`

Unique customer ID.

**email** `string`

Customer's email address.

**status** `string`

Customer status (e.g. `active`).

**name** `string`

Customer's name.

**mobile** `string`

Customer's mobile phone number.

**userId** `string \<uuid\>`

Merchant user ID that owns this customer.

### givenCustomer Structure (Object)

**id** `string \<uuid\>`

Unique customer ID of the gift recipient.

**email** `string`

Gift recipient's email address.

**status** `string`

Gift recipient status.

**name** `string`

Gift recipient's name.

**mobile** `string`

Gift recipient's mobile phone number.

**userId** `string \<uuid\>`

Merchant user ID that owns this customer.

### user Structure (Object)

**id** `string \<uuid\>`

Unique merchant user ID.

**name** `string`

Merchant store name.

**email** `string`

Merchant email address.

**account** `object`

Merchant account details.

### account Structure (Object)

**email** `string`

Merchant account email.

**name** `string`

Merchant account name.

**mobile** `string`

Merchant account phone number.

**address** `string`

Merchant account address.

**logo** `object`

Merchant account logo information.

### logo Structure (Object)

**url** `string`

URL of the merchant logo image.

### Errors

**401 Unauthorized** `object`

Returned when the API key is missing or invalid:
`{ "statusCode": 401, "messages": "Unauthorized" }`.

**404 Not Found** `object`

Returned when no transaction matches the provided ID:
`{ "statusCode": 404, "messages": "Transaction not found" }`.


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