|
| 1 | +# CyberSource\InstructionsApi |
| 2 | + |
| 3 | +All URIs are relative to *https://apitest.cybersource.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**cancelPurchaseIntent**](InstructionsApi.md#cancelPurchaseIntent) | **PUT** /acp/v1/instructions/{instructionId}/cancel | Cancel a purchase intent |
| 8 | +[**confirmTransactionEvents**](InstructionsApi.md#confirmTransactionEvents) | **POST** /acp/v1/instructions/{instructionId}/confirmations | Confirm transaction events |
| 9 | +[**initiatePurchaseIntent**](InstructionsApi.md#initiatePurchaseIntent) | **POST** /acp/v1/instructions | Initiate a purchase intent |
| 10 | +[**retrievePaymentCredentials**](InstructionsApi.md#retrievePaymentCredentials) | **POST** /acp/v1/instructions/{instructionId}/credentials | Retrieve payment credentials |
| 11 | +[**updatePurchaseIntent**](InstructionsApi.md#updatePurchaseIntent) | **PUT** /acp/v1/instructions/{instructionId} | Update a purchase intent |
| 12 | + |
| 13 | + |
| 14 | +# **cancelPurchaseIntent** |
| 15 | +> \CyberSource\Model\AgenticCreatePurchaseIntentResponse200 cancelPurchaseIntent($instructionId, $agenticCancelPurchaseIntentRequest) |
| 16 | +
|
| 17 | +Cancel a purchase intent |
| 18 | + |
| 19 | +Cancels an existing purchase intent identified by the transaction ID. |
| 20 | + |
| 21 | +### Example |
| 22 | +```php |
| 23 | +<?php |
| 24 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 25 | + |
| 26 | +$api_instance = new CyberSource\Api\InstructionsApi(); |
| 27 | +$instructionId = "instructionId_example"; // string | |
| 28 | +$agenticCancelPurchaseIntentRequest = new \CyberSource\Model\AgenticCancelPurchaseIntentRequest(); // \CyberSource\Model\AgenticCancelPurchaseIntentRequest | Unique identifier for the purchase intent instruction. |
| 29 | + |
| 30 | +try { |
| 31 | + $result = $api_instance->cancelPurchaseIntent($instructionId, $agenticCancelPurchaseIntentRequest); |
| 32 | + print_r($result); |
| 33 | +} catch (Exception $e) { |
| 34 | + echo 'Exception when calling InstructionsApi->cancelPurchaseIntent: ', $e->getMessage(), PHP_EOL; |
| 35 | +} |
| 36 | +?> |
| 37 | +``` |
| 38 | + |
| 39 | +### Parameters |
| 40 | + |
| 41 | +Name | Type | Description | Notes |
| 42 | +------------- | ------------- | ------------- | ------------- |
| 43 | + **instructionId** | **string**| | |
| 44 | + **agenticCancelPurchaseIntentRequest** | [**\CyberSource\Model\AgenticCancelPurchaseIntentRequest**](../Model/AgenticCancelPurchaseIntentRequest.md)| Unique identifier for the purchase intent instruction. | |
| 45 | + |
| 46 | +### Return type |
| 47 | + |
| 48 | +[**\CyberSource\Model\AgenticCreatePurchaseIntentResponse200**](../Model/AgenticCreatePurchaseIntentResponse200.md) |
| 49 | + |
| 50 | +### Authorization |
| 51 | + |
| 52 | +No authorization required |
| 53 | + |
| 54 | +### HTTP request headers |
| 55 | + |
| 56 | + - **Content-Type**: application/json;charset=utf-8 |
| 57 | + - **Accept**: application/hal+json;charset=utf-8 |
| 58 | + |
| 59 | +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) |
| 60 | + |
| 61 | +# **confirmTransactionEvents** |
| 62 | +> \CyberSource\Model\AgenticConfirmTransactionEventsResponse202 confirmTransactionEvents($instructionId, $agenticConfirmTransactionEventsRequest) |
| 63 | +
|
| 64 | +Confirm transaction events |
| 65 | + |
| 66 | +Agents send the confirm transaction events to notify the payment processing is done |
| 67 | + |
| 68 | +### Example |
| 69 | +```php |
| 70 | +<?php |
| 71 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 72 | + |
| 73 | +$api_instance = new CyberSource\Api\InstructionsApi(); |
| 74 | +$instructionId = "instructionId_example"; // string | Unique identifier for the purchase intent instruction. |
| 75 | +$agenticConfirmTransactionEventsRequest = new \CyberSource\Model\AgenticConfirmTransactionEventsRequest(); // \CyberSource\Model\AgenticConfirmTransactionEventsRequest | |
| 76 | + |
| 77 | +try { |
| 78 | + $result = $api_instance->confirmTransactionEvents($instructionId, $agenticConfirmTransactionEventsRequest); |
| 79 | + print_r($result); |
| 80 | +} catch (Exception $e) { |
| 81 | + echo 'Exception when calling InstructionsApi->confirmTransactionEvents: ', $e->getMessage(), PHP_EOL; |
| 82 | +} |
| 83 | +?> |
| 84 | +``` |
| 85 | + |
| 86 | +### Parameters |
| 87 | + |
| 88 | +Name | Type | Description | Notes |
| 89 | +------------- | ------------- | ------------- | ------------- |
| 90 | + **instructionId** | **string**| Unique identifier for the purchase intent instruction. | |
| 91 | + **agenticConfirmTransactionEventsRequest** | [**\CyberSource\Model\AgenticConfirmTransactionEventsRequest**](../Model/AgenticConfirmTransactionEventsRequest.md)| | |
| 92 | + |
| 93 | +### Return type |
| 94 | + |
| 95 | +[**\CyberSource\Model\AgenticConfirmTransactionEventsResponse202**](../Model/AgenticConfirmTransactionEventsResponse202.md) |
| 96 | + |
| 97 | +### Authorization |
| 98 | + |
| 99 | +No authorization required |
| 100 | + |
| 101 | +### HTTP request headers |
| 102 | + |
| 103 | + - **Content-Type**: application/json;charset=utf-8 |
| 104 | + - **Accept**: application/hal+json;charset=utf-8 |
| 105 | + |
| 106 | +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) |
| 107 | + |
| 108 | +# **initiatePurchaseIntent** |
| 109 | +> \CyberSource\Model\AgenticCreatePurchaseIntentResponse200 initiatePurchaseIntent($agenticCreatePurchaseIntentRequest) |
| 110 | +
|
| 111 | +Initiate a purchase intent |
| 112 | + |
| 113 | +Creates a new purchase intent with the provided details. |
| 114 | + |
| 115 | +### Example |
| 116 | +```php |
| 117 | +<?php |
| 118 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 119 | + |
| 120 | +$api_instance = new CyberSource\Api\InstructionsApi(); |
| 121 | +$agenticCreatePurchaseIntentRequest = new \CyberSource\Model\AgenticCreatePurchaseIntentRequest(); // \CyberSource\Model\AgenticCreatePurchaseIntentRequest | |
| 122 | + |
| 123 | +try { |
| 124 | + $result = $api_instance->initiatePurchaseIntent($agenticCreatePurchaseIntentRequest); |
| 125 | + print_r($result); |
| 126 | +} catch (Exception $e) { |
| 127 | + echo 'Exception when calling InstructionsApi->initiatePurchaseIntent: ', $e->getMessage(), PHP_EOL; |
| 128 | +} |
| 129 | +?> |
| 130 | +``` |
| 131 | + |
| 132 | +### Parameters |
| 133 | + |
| 134 | +Name | Type | Description | Notes |
| 135 | +------------- | ------------- | ------------- | ------------- |
| 136 | + **agenticCreatePurchaseIntentRequest** | [**\CyberSource\Model\AgenticCreatePurchaseIntentRequest**](../Model/AgenticCreatePurchaseIntentRequest.md)| | |
| 137 | + |
| 138 | +### Return type |
| 139 | + |
| 140 | +[**\CyberSource\Model\AgenticCreatePurchaseIntentResponse200**](../Model/AgenticCreatePurchaseIntentResponse200.md) |
| 141 | + |
| 142 | +### Authorization |
| 143 | + |
| 144 | +No authorization required |
| 145 | + |
| 146 | +### HTTP request headers |
| 147 | + |
| 148 | + - **Content-Type**: application/json;charset=utf-8 |
| 149 | + - **Accept**: application/hal+json;charset=utf-8 |
| 150 | + |
| 151 | +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) |
| 152 | + |
| 153 | +# **retrievePaymentCredentials** |
| 154 | +> \CyberSource\Model\AgenticRetrievePaymentCredentialsResponse200 retrievePaymentCredentials($instructionId, $agenticRetrievePaymentCredentialsRequest) |
| 155 | +
|
| 156 | +Retrieve payment credentials |
| 157 | + |
| 158 | +Retrieve a customer's tokenized payment credentials to complete the transaction. |
| 159 | + |
| 160 | +### Example |
| 161 | +```php |
| 162 | +<?php |
| 163 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 164 | + |
| 165 | +$api_instance = new CyberSource\Api\InstructionsApi(); |
| 166 | +$instructionId = "instructionId_example"; // string | Unique identifier for the purchase intent instruction. |
| 167 | +$agenticRetrievePaymentCredentialsRequest = new \CyberSource\Model\AgenticRetrievePaymentCredentialsRequest(); // \CyberSource\Model\AgenticRetrievePaymentCredentialsRequest | |
| 168 | + |
| 169 | +try { |
| 170 | + $result = $api_instance->retrievePaymentCredentials($instructionId, $agenticRetrievePaymentCredentialsRequest); |
| 171 | + print_r($result); |
| 172 | +} catch (Exception $e) { |
| 173 | + echo 'Exception when calling InstructionsApi->retrievePaymentCredentials: ', $e->getMessage(), PHP_EOL; |
| 174 | +} |
| 175 | +?> |
| 176 | +``` |
| 177 | + |
| 178 | +### Parameters |
| 179 | + |
| 180 | +Name | Type | Description | Notes |
| 181 | +------------- | ------------- | ------------- | ------------- |
| 182 | + **instructionId** | **string**| Unique identifier for the purchase intent instruction. | |
| 183 | + **agenticRetrievePaymentCredentialsRequest** | [**\CyberSource\Model\AgenticRetrievePaymentCredentialsRequest**](../Model/AgenticRetrievePaymentCredentialsRequest.md)| | |
| 184 | + |
| 185 | +### Return type |
| 186 | + |
| 187 | +[**\CyberSource\Model\AgenticRetrievePaymentCredentialsResponse200**](../Model/AgenticRetrievePaymentCredentialsResponse200.md) |
| 188 | + |
| 189 | +### Authorization |
| 190 | + |
| 191 | +No authorization required |
| 192 | + |
| 193 | +### HTTP request headers |
| 194 | + |
| 195 | + - **Content-Type**: application/json;charset=utf-8 |
| 196 | + - **Accept**: application/hal+json;charset=utf-8 |
| 197 | + |
| 198 | +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) |
| 199 | + |
| 200 | +# **updatePurchaseIntent** |
| 201 | +> \CyberSource\Model\AgenticCreatePurchaseIntentResponse200 updatePurchaseIntent($instructionId, $agenticUpdatePurchaseIntentRequest) |
| 202 | +
|
| 203 | +Update a purchase intent |
| 204 | + |
| 205 | +Updates an existing purchase intent identified by the transaction ID. |
| 206 | + |
| 207 | +### Example |
| 208 | +```php |
| 209 | +<?php |
| 210 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 211 | + |
| 212 | +$api_instance = new CyberSource\Api\InstructionsApi(); |
| 213 | +$instructionId = "instructionId_example"; // string | Unique identifier for the purchase intent instruction. |
| 214 | +$agenticUpdatePurchaseIntentRequest = new \CyberSource\Model\AgenticUpdatePurchaseIntentRequest(); // \CyberSource\Model\AgenticUpdatePurchaseIntentRequest | |
| 215 | + |
| 216 | +try { |
| 217 | + $result = $api_instance->updatePurchaseIntent($instructionId, $agenticUpdatePurchaseIntentRequest); |
| 218 | + print_r($result); |
| 219 | +} catch (Exception $e) { |
| 220 | + echo 'Exception when calling InstructionsApi->updatePurchaseIntent: ', $e->getMessage(), PHP_EOL; |
| 221 | +} |
| 222 | +?> |
| 223 | +``` |
| 224 | + |
| 225 | +### Parameters |
| 226 | + |
| 227 | +Name | Type | Description | Notes |
| 228 | +------------- | ------------- | ------------- | ------------- |
| 229 | + **instructionId** | **string**| Unique identifier for the purchase intent instruction. | |
| 230 | + **agenticUpdatePurchaseIntentRequest** | [**\CyberSource\Model\AgenticUpdatePurchaseIntentRequest**](../Model/AgenticUpdatePurchaseIntentRequest.md)| | |
| 231 | + |
| 232 | +### Return type |
| 233 | + |
| 234 | +[**\CyberSource\Model\AgenticCreatePurchaseIntentResponse200**](../Model/AgenticCreatePurchaseIntentResponse200.md) |
| 235 | + |
| 236 | +### Authorization |
| 237 | + |
| 238 | +No authorization required |
| 239 | + |
| 240 | +### HTTP request headers |
| 241 | + |
| 242 | + - **Content-Type**: application/json;charset=utf-8 |
| 243 | + - **Accept**: application/hal+json;charset=utf-8 |
| 244 | + |
| 245 | +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) |
| 246 | + |
0 commit comments