---
title: "Get purchase by transaction_id"
method: GET
path: "/v2/console/iap/purchase/{transaction_id}"
tags: ["Console"]
---

# Get purchase by transaction_id

`GET /v2/console/iap/purchase/{transaction_id}`

## Request

- Base URL: `http://127.0.0.1:7351`
- URL: `http://127.0.0.1:7351/v2/console/iap/purchase/{transaction_id}`
- Auth: API key in header `Authorization`

## Path parameters

- `transaction_id` string, required

## Response `200`

A successful response.

- ValidatedPurchase: Validated Purchase stored by Nakama.
  - `user_id` string: Purchase User ID.
  - `product_id` string: Purchase Product ID.
  - `transaction_id` string: Purchase Transaction ID.
  - `store` 'APPLE_APP_STORE' | 'GOOGLE_PLAY_STORE' | 'HUAWEI_APP_GALLERY' | 'FACEBOOK_INSTANT_STORE' | 'SAMSUNG_GALAXY_STORE': - APPLE_APP_STORE: Apple App Store - GOOGLE_PLAY_STORE: Google Play Store - HUAWEI_APP_GALLERY: Huawei App Gallery - FACEBOOK_INSTANT_STORE: Facebook Instant Store - SAMSUNG_GALAXY_STORE: Samsung Galaxy Store
  - `purchase_time` string, date-time: Timestamp when the purchase was done.
  - `create_time` string, date-time: Timestamp when the receipt validation was stored in DB.
  - `update_time` string, date-time: Timestamp when the receipt validation was updated in DB.
  - `refund_time` string, date-time
  - `provider_response` string: Raw provider validation response.
  - `environment` 'UNKNOWN' | 'SANDBOX' | 'PRODUCTION': - UNKNOWN: Unknown environment. - SANDBOX: Sandbox/test environment. - PRODUCTION: Production environment.
  - `seen_before` boolean: Whether the purchase had already been validated by Nakama before.

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/heroiclabs/apis/nakama-console-api-v2.md) - [All operations](https://skmtc.dev/heroiclabs/apis/nakama-console-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/heroiclabs/apis/nakama-console-api-v2/revisions/fbde2e3c5ead?raw)
