# Vend202601\StoreCreditsApi



All URIs are relative to https://example.retail.lightspeed.app/api/2026-01, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**bulkStoreCreditList()**](StoreCreditsApi.md#bulkStoreCreditList) | **POST** /store_credits/bulk | Store credit bulk list |
| [**createStoreCreditTransaction()**](StoreCreditsApi.md#createStoreCreditTransaction) | **POST** /store_credits/{customerId}/transactions | Create a store credit transaction |
| [**listStoreCredit()**](StoreCreditsApi.md#listStoreCredit) | **GET** /store_credits | Store credit list |
| [**listStoreCreditForCustomer()**](StoreCreditsApi.md#listStoreCreditForCustomer) | **GET** /store_credits/{customerId} | Store credit list for the given customer id |
| [**storeCreditReport()**](StoreCreditsApi.md#storeCreditReport) | **GET** /store_credits/report | Store credit report |


## `bulkStoreCreditList()`

```php
bulkStoreCreditList($request_body): \Vend202601\Model\StoreCreditBulkResponse
```

Store credit bulk list

Returns a list of store credit for multiple customers.  🔒 Requires: `store_credits:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\StoreCreditsApi(
    // 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
);
$request_body = array('request_body_example'); // string[] | The list of customer ids to get related store credit for.

try {
    $result = $apiInstance->bulkStoreCreditList($request_body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoreCreditsApi->bulkStoreCreditList: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **request_body** | [**string[]**](../Model/string.md)| The list of customer ids to get related store credit for. | |

### Return type

[**\Vend202601\Model\StoreCreditBulkResponse**](../Model/StoreCreditBulkResponse.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `createStoreCreditTransaction()`

```php
createStoreCreditTransaction($customer_id, $store_credit_transaction_params): \Vend202601\Model\StoreCreditTransaction
```

Create a store credit transaction

Creates a new store credit transaction. The type determines what sort of transaction it is.  * \"REDEMPTION\" - Use this type when you want to redeem a certain amount from the store credit balance. The amount MUST be negative. If you want to add an amount to the balance use the \"ISSUE\" type. * \"ISSUE\" - Use this type when you issue store credit to a customer. * \"REVERSE\" - Use this type when voiding an earlier ISSUE or REDEMPTION transaction.  If the customer account does not have enough credit to honour a REDEMPTION transaction a 422 HTTP status code will be returned.  ## Idempotency   Please populate the client_id field with a unique transaction identifier, to ensure that the transaction is safe from double-submit problems. See [the tutorial](/docs/store_credit#idempotency) for more information.  🔒 Requires: `store_credits:write:issue` `customers:read` scopes

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\StoreCreditsApi(
    // 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
);
$customer_id = 'customer_id_example'; // string | The customer id to apply the store transaction to.
$store_credit_transaction_params = new \Vend202601\Model\StoreCreditTransactionParams(); // \Vend202601\Model\StoreCreditTransactionParams | The store credit transaction details

try {
    $result = $apiInstance->createStoreCreditTransaction($customer_id, $store_credit_transaction_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoreCreditsApi->createStoreCreditTransaction: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **customer_id** | **string**| The customer id to apply the store transaction to. | |
| **store_credit_transaction_params** | [**\Vend202601\Model\StoreCreditTransactionParams**](../Model/StoreCreditTransactionParams.md)| The store credit transaction details | |

### Return type

[**\Vend202601\Model\StoreCreditTransaction**](../Model/StoreCreditTransaction.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `listStoreCredit()`

```php
listStoreCredit($page_size, $includes): \Vend202601\Model\StoreCreditCustomer
```

Store credit list

Returns a list of store credit customers.  🔒 Requires: `store_credits:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\StoreCreditsApi(
    // 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
);
$page_size = 56; // int | The maximum number of items to be returned in the response.
$includes = 'includes_example'; // string | Include supplementary data. The only valid value for includes[] is 'customer'.

try {
    $result = $apiInstance->listStoreCredit($page_size, $includes);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoreCreditsApi->listStoreCredit: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **page_size** | **int**| The maximum number of items to be returned in the response. | [optional] |
| **includes** | **string**| Include supplementary data. The only valid value for includes[] is &#39;customer&#39;. | [optional] |

### Return type

[**\Vend202601\Model\StoreCreditCustomer**](../Model/StoreCreditCustomer.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `listStoreCreditForCustomer()`

```php
listStoreCreditForCustomer($customer_id, $includes): \Vend202601\Model\StoreCreditCustomer
```

Store credit list for the given customer id

Returns a list of store credits for the given customer id.  🔒 Requires: `store_credits:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\StoreCreditsApi(
    // 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
);
$customer_id = 'customer_id_example'; // string | Find by customer id.
$includes = 'includes_example'; // string | Include supplementary data. The only valid value for includes[] is 'customer'.

try {
    $result = $apiInstance->listStoreCreditForCustomer($customer_id, $includes);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoreCreditsApi->listStoreCreditForCustomer: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **customer_id** | **string**| Find by customer id. | |
| **includes** | **string**| Include supplementary data. The only valid value for includes[] is &#39;customer&#39;. | [optional] |

### Return type

[**\Vend202601\Model\StoreCreditCustomer**](../Model/StoreCreditCustomer.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `storeCreditReport()`

```php
storeCreditReport(): \Vend202601\Model\StoreCreditReport
```

Store credit report

Returns a report of store credits.  🔒 Requires: `store_credits:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\StoreCreditsApi(
    // 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
);

try {
    $result = $apiInstance->storeCreditReport();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoreCreditsApi->storeCreditReport: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**\Vend202601\Model\StoreCreditReport**](../Model/StoreCreditReport.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
