Get payment
A GET:/payments/{reference}
request will return a point in time snapshot of a given payment.
This is the recommended way to get the current information about a payment.
GET:/payments/{reference}/events
may be used to get all the details.
An example response would look like this:
{
    "aggregate": {
        "authorizedAmount": {
            "currency": "NOK",
            "value": 49900
        },
        "cancelledAmount": {
            "currency": "NOK",
            "value": 49900
        },
        "capturedAmount": {
            "currency": "NOK",
            "value": 0
        },
        "refundedAmount": {
            "currency": "NOK",
            "value": 0
        }
    },
    "amount": {
        "currency": "NOK",
        "value": 49900
    },
    "state": "AUTHORIZED",
    "paymentMethod": {
        "type": "WALLET"
    },
    "profile": {},
    "pspReference": "37c34d8c-2649-448e-864b-060d5d93e4c4",
    "reference": "acme-shop-123-order123abc"
}
In the case where the merchant requested scopes in the
Create payment
request, the profile object will contain a sub identifying the customer,
after the customer has authorized the payment.
For example (truncated):
{
  "state": "AUTHORIZED",
  "profile" : {
    "sub": "c06c4afe-d9e1-4c5d-939a-177d752a0944"
  }
}
The sub can then be used to retrieve the user's info with the
Userinfo API:
GET:/userinfo/{sub}.
See:
What is the sub?