5 - Web service
Information and URLs for testing the web service can be found in chapter 2.
5.1 - EndurgreidaSolu (RefundSale)
This function refunds a sale which was made with the Web Payments Page.
Please note
Sales that have already been refunded or voided can not be refunded.
5.1.1 - Definitions
5.1.1.1 - Request
Field | Type | Len. min | Len. max | Usage | Description |
---|---|---|---|---|---|
VefverslunID | N | 1 | 9 | M | Unique merchant/online store identification issued by Rapyd (MerchantID). |
Oryggisnumer | S | 1 | 50 | M | Verification code. |
VefverslunSalaID | S | 36 | 36 | M | Unique ID of sale. When the merchant's URL is called (PaymentSuccessfulServerSideURL) this value is put in the SaleID parameter. See section 4.1.2. |
5.1.1.2 - Response
Field | Type | Len. min | Len. max | Usage | Description |
---|---|---|---|---|---|
Villunumer | N | - | - | - | Error number. If 0 then there was no error and the refund was successful. |
VilluTexti | S | - | - | - | Error description. |
5.1.2 - Examples
5.1.2.1 - Request
``` XML tab="XML"
#### 5.1.2.2 - Response
``` XML tab="XML"
<?xml version="1.0" encoding="utf-8"?>
<EndurgreidaSolu xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://greidslusida.valitor.is">
<Villunumer>0</Villunumer>
<VilluTexti />
</EndurgreidaSolu>
5.1.2.3 - Response error
``` XML tab="XML"
### 5.1.3 - Errors
Errors that may occur can be found with descriptions [here](Errors.md#71-errortable).
## 5.2 - OgildaSolu (VoidSale)
This function voids a sale that was made with the Web Payments Page.
!!! attention "Please note"
Sales that have already been refunded or voided can not be voided.
### 5.2.1 - Definitions
#### 5.2.1.1 - Request
<table>
<tr>
<th>Field</th>
<th>Type</th>
<th>Len. min</th>
<th>Len. max</th>
<th>Usage</th>
<th>Description</th>
</tr>
<tr>
<td>VefverslunID</td>
<td>N</td>
<td>1</td>
<td>9</td>
<td>M</td>
<td>Unique merchant/online store identification issued by Rapyd (MerchantID).</td>
</tr>
<tr>
<td>Oryggisnumer</td>
<td>S</td>
<td>1</td>
<td>50</td>
<td>M</td>
<td>Verification code.</td>
</tr>
<tr>
<td>VefverslunSalaID</td>
<td>S</td>
<td>36</td>
<td>36</td>
<td>M</td>
<td>Unique ID of sale. </br>When the merchant's URL is called (PaymentSuccessfulServerSideURL) this value is put in the SaleID parameter. See section 4.1.2.</td>
</tr>
</table>
#### 5.2.1.2 - Response
<table>
<tr>
<th>Field</th>
<th>Type</th>
<th>Len. min</th>
<th>Len. max</th>
<th>Usage</th>
<th>Description</th>
</tr>
<tr>
<td>Villunumer</td>
<td>N</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>Error number. </br>If 0 then there was no error and the refund was successful.</td>
</tr>
<tr>
<td>Villutexti</td>
<td>S</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>Error description.</td>
</tr>
</table>
### 5.2.2 - Examples
#### 5.2.2.1 - Request
``` XML tab="XML"
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<OgildaSolu xmlns="https://greidslusida.valitor.is">
<VefverslunID>123</VefverslunID>
<Oryggisnumer>abc123</Oryggisnumer>
<VefverslunSalaID>E1052BA1-EF88-4809-AF0A-000092577CD5</VefverslunSalaID>
</OgildaSolu>
</soap:Body> </soap:Envelope>
5.2.2.2 - Response
``` XML tab="XML"
#### 5.2.2.3 - Response error
``` XML tab="XML"
<?xml version="1.0" encoding="utf-8"?>
<OgildaSolu xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://greidslusida.valitor.is">
<VilluTexti>Vefverslun ekki til.</VilluTexti>
<Villunumer>1</Villunumer>
</OgildaSolu>
5.2.3 - Errors
Errors that may occur can be found with descriptions here.
5.3 - SkilaMd5
This function calculates an MD5 hash for a string.
This function can be used to verify that the correct MD5 hash is being used during testing.
5.3.1 - Definitions
5.3.1.1 - Request
Field | Type | Len. min | Len. max | Usage | Description |
---|---|---|---|---|---|
inp | S | - | - | O | String to hash. |
5.3.1.2 - Response
Field | Type | Len. min | Len. max | Usage | Description |
---|---|---|---|---|---|
SkilaMd5Result | S | - | - | O | MD5 hash of the string. |
5.3.2 - Examples
5.3.2.1 - Request
``` XML tab="XML"
#### 5.3.2.2 - Response
``` XML tab="XML"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SkilaMd5Response xmlns="https://greidslusida.valitor.is/">
<SkilaMd5Result>CE1473CF80C6B3FDA8E3DFC006ADC315</SkilaMd5Result>
</SkilaMd5Response>
</soap:Body>
</soap:Envelope>
5.4 - SkilaMd5ASCII
This function calculates an MD5 hash for a string.
This function can be used to verify that the correct MD5 hash is being used during testing.
5.4.1 - Definitions
5.4.1.1 - Request
Field | Type | Len. min | Len. max | Usage | Description |
---|---|---|---|---|---|
inp | S | - | - | O | String to hash. |
5.4.1.2 - Response
Field | Type | Len. min | Len. max | Usage | Description |
---|---|---|---|---|---|
SkilaMd5ASCIIResult | S | - | - | O | MD5 hash of the string. |
5.4.2 - Examples
5.4.2.1 - Request
``` XML tab="XML"
#### 5.4.2.2 - Response
``` XML tab="XML"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SkilaMd5ASCIIResponse xmlns="https://greidslusida.valitor.is/">
<SkilaMd5ASCIIResult>900150983cd24fb0d6963f7d28e17f72</SkilaMd5ASCIIResult>
</SkilaMd5ASCIIResponse>
</soap:Body>
</soap:Envelope>
5.5 - SkilaSha256
This function calculates an SHA256 (unicode) hash for a string.
This function can be used to verify that the correct SHA256 hash is being used during testing.
5.5.1 - Definitions
5.5.1.1 - Request
Field | Type | Len. min | Len. max | Usage | Description |
---|---|---|---|---|---|
inp | S | - | - | O | String to hash. |
5.5.1.2 - Response
Field | Type | Len. min | Len. max | Usage | Description |
---|---|---|---|---|---|
SkilaSha256Result | S | - | - | - | SHA256 hash of the string. |
5.5.2 - Examples
5.5.2.1 - Request
``` XML tab="XML"
#### 5.5.2.2 - Response
``` XML tab="XML"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SkilaSha256Response xmlns="https://greidslusida.valitor.is/">
<SkilaSha256Result>13e228567e8249fce53337f25d7970de3bd68ab2653424c7
b8f9fd05e33caedf</SkilaSha256Result>
</SkilaSha256Response>
</soap:Body>
</soap:Envelope>
5.6 - SkilaSha256ASCII
This function calculates an SHA256 (ASCII) hash for a string.
This function can be used to verify that the correct SHA256 hash is being used during testing.
5.6.1 - Definitions
5.6.1.1 - Request
Field | Type | Len. min | Len. max | Usage | Description |
---|---|---|---|---|---|
inp | S | - | - | O | String to hash. |
5.6.1.2 - Response
Field | Type | Len. min | Len. max | Usage | Description |
---|---|---|---|---|---|
inp | S | - | - | O | SHA256 hash of the string. |
5.6.2 - Examples
5.6.2.1 - Request
``` XML tab="XML"
#### 5.6.2.2 - Response
``` XML tab="XML"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SkilaSha256ASCIIResponse xmlns="https://greidslusida.valitor.is/">
<SkilaSha256ASCIIResult>13e228567e8249fce53337f25d7970de3bd68ab2653424c7
b8f9fd05e33caedf</SkilaSha256ASCIIResult>
</SkilaSha256ASCIIResponse>
</soap:Body>
</soap:Envelope>