Skip to main content

Get payment

A GET:/epayment/v1/payments/{reference} request will return the state of the payment at the current time.

This is the recommended way to get the current information about a payment.

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"
}

Payments with profile infoโ€‹

If the merchant includes scope in the Create payment request, the profile object will include a sub that identifies the customerโ€”once 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?

In the case where the merchant sent metadata in the Create payment request, the response object will contain the same information metadata that was sent earlier.

For example (truncated):

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

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?