Create a Refund
POST
/charges/{id}/Refund
Refund a charge. If charge is captured it will be refunded, if charge has status Registered or Authorized it will be annulled.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Location
Host
string
E.g. pay.caspeco.net
Example
pay.caspeco.netDate
string
E.g. Tue, 15 Nov 2014 08:12:31 GMT
Example
Tue, 15 Nov 2014 08:12:31 GMTDigest
string
E.g. SHA-256=7oaYBB1oQVPy1BvP2ndYtxdD5EWNynt9lxCHzOdXb1A=
Example
SHA-256=7oaYBB1oQVPy1BvP2ndYtxdD5EWNynt9lxCHzOdXb1A=Request Body
Section titled “Request Body”Media typeapplication/json
object
id
string
Amount
decimal
Example
{ "id": "384f6560-40e3-4e2f-a99e-1e9dce5f376d", "Amount": 100}Responses
Section titled “Responses”OK
Media typeapplication/json
object
Id
string
Amount
number
AmountVat
number
Captured
boolean
Refunded
boolean
Customer
string
Currency
string
Order
string
OrderDescription
string
Merchant
number
ReturnUrl
string
MaskedCardNumber
string
PaymentMethod
string
Status
number
AuthenticationToken
string
Error
string
HasError
boolean
Examples
Exampleresponse
{ "Id": "aaa111", "Amount": 10000, "AmountVat": 2500, "Captured": false, "Refunded": false, "Customer": "9d211740", "Currency": "SEK", "Order": "ABC123", "OrderDescription": "Test Purchase", "Merchant": 1234, "ReturnUrl": "https://www.example-shop.com/payment-done", "MaskedCardNumber": "5413******1000", "PaymentMethod": "card", "Status": 1, "AuthenticationToken": "25fd41b0-8694-4046-9e6d-360065eabfb0", "Error": "", "HasError": "false"}