POST api/pos/refund/create

Create a refund by a POST request

Request Information

URI Parameters

None.

Body Parameters

Refund Query parameters

QueryRefundCreate
NameDescriptionTypeAdditional information
amount

Required: amount to refund in double formation ex. 27.06

string

None.

currencyCode

currency code, default DKK

string

None.

paymentId

Required: paymentId. In case it has been lost use api/payment/id/retrieve to retrieve the paymentId (see the documentation)

string

None.

refundOrderId

Required: the orderId to refund

string

None.

accessToken

string

None.

bioCode

string

None.

Request Formats

application/xml, text/xml

Sample:
<QueryRefundCreate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS.Models">
  <accessToken xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS_ViewModels">sample string 5</accessToken>
  <bioCode xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS_ViewModels">sample string 6</bioCode>
  <amount>sample string 1</amount>
  <currencyCode>sample string 2</currencyCode>
  <paymentId>sample string 3</paymentId>
  <refundOrderId>sample string 4</refundOrderId>
</QueryRefundCreate>

application/json, text/json

Sample:
{
  "amount": "sample string 1",
  "currencyCode": "sample string 2",
  "paymentId": "sample string 3",
  "refundOrderId": "sample string 4",
  "accessToken": "sample string 5",
  "bioCode": "sample string 6"
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The refundId if success, otherwise errors. You can use the refundId to capture the initiated refund, query refund details or cancel a refund

PosRefundCreateViewModel
NameDescriptionTypeAdditional information
refundId

string

None.

success

boolean

None.

errors

Collection of string

None.

Response Formats

application/xml, text/xml

Sample:
<PosRefundCreateViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS_ViewModels.ViewModels">
  <errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </errors>
  <success>true</success>
  <refundId>sample string 1</refundId>
</PosRefundCreateViewModel>

application/json, text/json

Sample:
{
  "refundId": "sample string 1",
  "success": true,
  "errors": [
    "sample string 1",
    "sample string 2"
  ]
}