Get payment
A GET:/epayment/v1/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:/epayment/v1/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
?
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
}
}
Rate limiting
See: Rate limiting.