> **Description:** Retrieve detailed payment information including current status, amount, timestamps, and transaction metadata.

# Get payment details

## Authorization

All ePayment API requests must include a valid Bearer token in the `Authorization` header.
See [Authorization](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/concepts.md#authorization) for how to obtain one.

## Payment detail request

To get the current information about a payment, use the
[`GET:/epayment/v1/payments/{reference}`](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml)
endpoint.
Replace `{reference}` with the value you specified in your *create payment* request.

This will return the state of the payment at the current time.

*Example request:*

```bash
curl -X GET https://apitest.vipps.no/epayment/v1/payments/PAYMENT-REFERENCE-ID
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H "Merchant-Serial-Number: YOUR-MSN" \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-H "Vipps-System-Plugin-Name: acme-webshop" \
-H "Vipps-System-Plugin-Version: 4.5.6"
```

*Example response:*

```json
{
    "aggregate": {
        "authorizedAmount": {
            "currency": "NOK",
            "value": 6000
        },
        "cancelledAmount": {
            "currency": "NOK",
            "value": 0
        },
        "capturedAmount": {
            "currency": "NOK",
            "value": 0
        },
        "refundedAmount": {
            "currency": "NOK",
            "value": 0
        }
    },
    "amount": {
        "currency": "NOK",
        "value": 6000
    },
    "state": "AUTHORIZED",
    "paymentMethod": {
        "type": "WALLET"
    },
    "profile": {},
    "pspReference": "37c34d8c-2649-448e-864b-060d5d93e4c4",
    "reference": "acme-shop-123-1234589"
}
```

## `userDetails`

When `scope` is added to the *create payment* request, `userDetails` and `sub` may also be returned in the *Get payment details* response.
The user will need to consent to sharing the profile information and then select to pay before the information will be shared.

For more details, see [Profile sharing](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/profile-sharing.md).

## Special features

The [special features](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/README.md) may return extra information in the
[`GET:/epayment/v1/payments/{reference}`](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml) response. Notably:

* [Express](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/express.md) -
  Upon consent from the user, this will return [`shippingDetails` and `userDetails`](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/express.md#get-payment-details).
* [Profile sharing](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/profile-sharing.md) -
  Upon consent from the user, this will return [`userDetails` and `sub`](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/profile-sharing.md#retrieving-profile-data).
* [Metadata](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/metadata.md) -
  If `metadata` was included in the [Create payment](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml) request,
  it will be returned in this response.

## Rate limiting

There is rate limiting applied to our APIs to increase their stability and security.

* [Rate limits](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/errors.md#rate-limiting)
* [Polling guidelines](https://developer.vippsmobilepay.com/docs/knowledge-base/polling-guidelines.md)

> **Full site overview:** For every page in this documentation, read [https://developer.vippsmobilepay.com/llms.txt](https://developer.vippsmobilepay.com/llms.txt).
