Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 2.46 KB

File metadata and controls

61 lines (41 loc) · 2.46 KB

zipMoney\TokensApi

All URIs are relative to https://api.zipmoney.com.au/merchant/v1

Method HTTP request Description
tokensCreate POST /tokens Create token

tokensCreate

\zipMoney\Model\Token tokensCreate($body, $idempotency_key)

Create token

Tokenises a zip account allowing a charge to be performed at a later date without direct customer involvement. In order to create a token you will first need to request customer approval by implementing one of the online checkout flows. The checkout id will then be provided as the authority when tokenising. | Error code | Description | |------------------------------------|--------------------------------------------------------------------------------------------------| | account_inoperative | The account is in arrears or closed and cannot be charged | | account_locked | The account is locked |

Example

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

// Configure API key authorization: Authorization
zipMoney\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// zipMoney\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new zipMoney\Api\TokensApi();
$body = new \zipMoney\Model\CreateTokenRequest(); // \zipMoney\Model\CreateTokenRequest | 
$idempotency_key = "idempotency_key_example"; // string | The unique idempotency key.

try {
    $result = $api_instance->tokensCreate($body, $idempotency_key);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TokensApi->tokensCreate: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \zipMoney\Model\CreateTokenRequest [optional]
idempotency_key string The unique idempotency key. [optional]

Return type

\zipMoney\Model\Token

Authorization

Authorization

HTTP request headers

  • Content-Type: application/json
  • Accept: application/javascript

[Back to top] [Back to API list] [Back to Model list] [Back to README]