GET api/vipps/epayment/refund?terminalId={terminalId}&paymentId={paymentId}&amount={amount}&currencyCode={currencyCode}&accessToken={accessToken}&bioCode={bioCode}

Refund a payment. It is possible to refund partial amount

Request Information

URI Parameters

NameDescriptionTypeAdditional information
terminalId

Required: terminalId

integer

None.

paymentId

Required: The paymentId

string

None.

amount

Required: amount to be captured, <para></para> in format double ex. 20.00

string

None.

currencyCode

Currency code

string

None.

accessToken

string

None.

bioCode

string

None.

Body Parameters

None.

Response Information

Resource Description

paymentRefundResponse if success is true, otherwise errors

VippsEPaymentRefundViewModel
NameDescriptionTypeAdditional information
paymentRefundResponse

Payment refund details

GetEPaymentRefundResponse

None.

success

boolean

None.

errors

Collection of string

None.

Response Formats

application/xml, text/xml

Sample:
<VippsEPaymentRefundViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS.Models">
  <errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS_ViewModels.ViewModels">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </errors>
  <success xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS_ViewModels.ViewModels">true</success>
  <paymentRefundResponse xmlns:d2p1="http://schemas.datacontract.org/2004/07/_1SA.VippsMobilePay.Library">
    <d2p1:Aggregated>
      <d2p1:AggregatedPayment>
        <d2p1:Amount>1</d2p1:Amount>
        <d2p1:Currency>sample string 2</d2p1:Currency>
        <d2p1:State>sample string 3</d2p1:State>
      </d2p1:AggregatedPayment>
      <d2p1:AggregatedPayment>
        <d2p1:Amount>1</d2p1:Amount>
        <d2p1:Currency>sample string 2</d2p1:Currency>
        <d2p1:State>sample string 3</d2p1:State>
      </d2p1:AggregatedPayment>
    </d2p1:Aggregated>
    <d2p1:Amount>2</d2p1:Amount>
    <d2p1:Currency>sample string 3</d2p1:Currency>
    <d2p1:PspReference>sample string 4</d2p1:PspReference>
    <d2p1:Reference>sample string 1</d2p1:Reference>
    <d2p1:State>sample string 5</d2p1:State>
  </paymentRefundResponse>
</VippsEPaymentRefundViewModel>

application/json, text/json

Sample:
{
  "paymentRefundResponse": {
    "Reference": "sample string 1",
    "Amount": 2.0,
    "Currency": "sample string 3",
    "PspReference": "sample string 4",
    "State": "sample string 5",
    "Aggregated": [
      {
        "Amount": 1.0,
        "Currency": "sample string 2",
        "State": "sample string 3"
      },
      {
        "Amount": 1.0,
        "Currency": "sample string 2",
        "State": "sample string 3"
      }
    ]
  },
  "success": true,
  "errors": [
    "sample string 1",
    "sample string 2"
  ]
}