> **Description:** Add custom metadata to your payment transactions to facilitate tracking, reconciliation, and integration with your existing systems.

# Add metadata

Add custom metadata to your payment transactions to facilitate tracking, reconciliation, and integration with your existing systems.
We'll store it as provided and return it in the `GetPaymentResponse` of [`GET:/epayment/v1/payments/{reference}`](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml).

This feature allows you to attach additional information to each payment, making it easier to integrate with your other systems.

## 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.

## Create a payment with metadata

Call the [`POST:/epayment/v1/payments`](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml) with `metadata`.

For example:

```bash
curl -X POST https://apitest.vipps.no/epayment/v1/payments \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H "Merchant-Serial-Number: YOUR-MSN" \
-H "Idempotency-Key: YOUR-IDEMPOTENCY-KEY" \
-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" \
-d '{
    "metadata" : {
        "location" : "Q-Park Magasin du Nord",
        "date" : "2026-01-05 12:00 - 14:34 "
    },
    "amount": {
        "value": 15000,
        "currency": "DKK"
    },
    "paymentMethod": {
        "type": "WALLET"
    },
    "customer": {
        "phoneNumber": "4512345678"
    },
    "reference": 21203831704360461822,
    "userFlow": "PUSH_MESSAGE",
    "paymentDescription": "QPark",
    "receiptUrl":"https://example.com/link/to/my.pdf"
}'
```

## Get payment details

When you include `metadata` in the [Create payment](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml) request,
you'll find the same `metadata` returned in the
[`GET:/epayment/v1/payments/{reference}`](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml) response.

For example (truncated):

```json
{
  "metadata" : {
        "key1" : "value1",
        "key2" : 12345
    }
}
```

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