All URIs are relative to https://webpayinstoreapi.svea.com
Method | HTTP request | Description |
---|---|---|
cancelOrder | POST /api/v1/orders/{merchantOrderNumber}/cancel | Cancel the entire order. If the order has been delivered the invoice will be credited. |
createOrder | POST /api/v1/orders | Creates an order. A SMS message will be sent to the provided mobile phone number where the checkout can be completed. |
getOrderStatus | GET /api/v1/orders/{merchantOrderNumber}/status | Gets order status for a created order. When the order has been finalized customer information is added to the order status response. |
returnOrder | POST /api/v1/orders/{merchantOrderNumber}/return |
\Svea\Instore\Model\RevokeOrderResponse cancelOrder($merchantOrderNumber)
Cancel the entire order. If the order has been delivered the invoice will be credited.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Svea\Instore\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Svea\Instore\Api\OrderApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$merchantOrderNumber = "merchantOrderNumber_example"; // string | The unique merchant order number used when creating the order
try {
$result = $apiInstance->cancelOrder($merchantOrderNumber);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->cancelOrder: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
merchantOrderNumber | string | The unique merchant order number used when creating the order |
\Svea\Instore\Model\RevokeOrderResponse
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Svea\Instore\Model\CreateOrderResponse createOrder($body)
Creates an order. A SMS message will be sent to the provided mobile phone number where the checkout can be completed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Svea\Instore\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Svea\Instore\Api\OrderApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Svea\Instore\Model\CreateOrderRequest(); // \Svea\Instore\Model\CreateOrderRequest |
try {
$result = $apiInstance->createOrder($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->createOrder: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Svea\Instore\Model\CreateOrderRequest | [optional] |
\Svea\Instore\Model\CreateOrderResponse
- Content-Type: application/json, text/json, application/_*+json
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Svea\Instore\Model\GetOrderStatusResponse getOrderStatus($merchantOrderNumber)
Gets order status for a created order. When the order has been finalized customer information is added to the order status response.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Svea\Instore\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Svea\Instore\Api\OrderApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$merchantOrderNumber = "merchantOrderNumber_example"; // string | The unique merchant order number used when creating the order
try {
$result = $apiInstance->getOrderStatus($merchantOrderNumber);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->getOrderStatus: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
merchantOrderNumber | string | The unique merchant order number used when creating the order |
\Svea\Instore\Model\GetOrderStatusResponse
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Svea\Instore\Model\RevokeOrderResponse returnOrder($merchantOrderNumber, $body)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Svea\Instore\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Svea\Instore\Api\OrderApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$merchantOrderNumber = "merchantOrderNumber_example"; // string | The unique merchant order number used when creating the order
$body = new \Svea\Instore\Model\RevokeOrderRequest(); // \Svea\Instore\Model\RevokeOrderRequest | Order rows to credit. Doesn't have to match the order rows on the invoice.
try {
$result = $apiInstance->returnOrder($merchantOrderNumber, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->returnOrder: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
merchantOrderNumber | string | The unique merchant order number used when creating the order | |
body | \Svea\Instore\Model\RevokeOrderRequest | Order rows to credit. Doesn't have to match the order rows on the invoice. | [optional] |
\Svea\Instore\Model\RevokeOrderResponse
- Content-Type: application/json, text/json, application/_*+json
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]