Skip to main content

Get payment event log

You can see history of the payment events with the GET:/epayment/v1/payments/{reference}/events. This will return a list of all events for a given payment.

This is the authoritative data for all details and operations for a payment.

Example request:

curl -X GET https://apitest.vipps.no/epayment/v1/payments/UNIQUE-PAYMENT-REFERENCE/events \
-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 "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"

Response example:

An example response would look like this:

[
{ // Create Payment example event
"reference": "acme-shop-123-order123abc",
"pspReference": "83b3fdb0-9547-4ec5-bdb7-5600ce70e792",
"name": "CREATED",
"amount": {
"currency": "NOK",
"value": 49900
},
"timestamp": "2023-03-27T10:51:44.5333258Z",
"idempotencyKey": "19986263-dedf-4b8e-a424-8d042eee4013",
"success": true
},
{ // Payment authorized example event
"reference": "acme-shop-123-order123abc",
"pspReference": "1304787731",
"name": "AUTHORIZED",
"amount": {
"currency": "NOK",
"value": 49900
},
"timestamp": "2023-03-27T10:51:59.378Z",
"idempotencyKey": "19986263-dedf-4b8e-a424-8d042eee4013",
"success": true
},
{ // Captured Payment example event
"reference": "acme-shop-123-order123abc",
"pspReference": "2018200034",
"name": "CAPTURED",
"amount": {
"currency": "NOK",
"value": 10000
},
"timestamp": "2023-03-27T10:52:07.748Z",
"idempotencyKey": "19986263-dedf-4b8e-a424-8d042eee4013",
"success": true
},
{ // Cancelled Payment example event
"reference": "acme-shop-123-order123abc",
"pspReference": "2019200034",
"name": "CANCELLED",
"amount": {
"currency": "NOK",
"value": 750
},
"timestamp": "2023-03-27T10:52:15.616Z",
"success": true
}
]

Response schema:

reference
required
string (ReferenceType) [ 8 .. 64 ] characters ^[a-zA-Z0-9-]{8,64}$

The reference is the unique identifier for the payment, specified when initiating the payment. The reference must be unique for the sales unit (MSN), but is not globally unique, so several MSNs may use the same reference. See the recommendations.

pspReference
required
string (PspReference)

Each payment operation (i.e., create, capture, refund, cancel) will have a unique pspReference, defined by Vipps MobilePay. One of:

  • The Get event log response contains each event and its unique pspReference value.
  • The Get payment response contains the pspReference for the payment creation event.
  • The Adjustment response, returned by Cancel, Capture, and Refund requests, contains the pspReference for the payment creation event.
name
string (PaymentEventName)
Enum: "CREATED" "ABORTED" "EXPIRED" "CANCELLED" "CAPTURED" "REFUNDED" "AUTHORIZED" "TERMINATED"
required
object (Amount)

Amount object, containing a value and a currency.

timestamp
required
string <date-time>
idempotencyKey
string or null <= 50 characters

The idempotency key of the request. Specified by the merchant/partner making the API request.

success
required
boolean

The outcome of the event

Note that the response is not identical across all operations. For example, the Cancel operation does not supply a value for idempotencyKey.

Polling guidelinesโ€‹

We have added rate limiting to our APIs to increase the stability and security of our APIs. Please see:

Help us improve our documentation

Did you find what you were looking for?