Download OpenAPI specification:Download
The full changelog can be found here:
This is the specification for a restful API for interfacing with the CAS payment gateway and customer information vault (CIV), enabling:
This specification conforms to the OpenAPI standard. There exist a number of tools to generate code stubs from an an OpenAPI specification, such as OpenAPI Generator and Swagger Codegen.
This API loosely conforms to the HAL
standard.
The only deviation from HAL is that the link relation types used in the
_links response fields have been simplified without the use of CURIES.
The API is only intended for use by a backend server. It should not be used by the frontend of a website. Please contact CAS if you have any questions or for frontend payment and tokenisation options.
In every request made to the API (other than lookups), a correlation ID must be supplied by the client. This ID should be uniquely generated for each request. Every response for these operations (again excepting lookups) will contain the correlation ID of the corresponding request. This allows for asynchronous requests to be matched with their responses on the client side.
Correlation IDs perform an additional role of ensuring idempotency in the case of transaction operations.
For transaction operations, correlation IDs must at least be uniquely
generated for each merchant ID, although it is recommended to use a
globally unique format such as UUID.
If a transaction request times out or recieves a 5XX response, the
correlation ID can be used to identify and lookup the status of any transaction
that may have been created by the request.
If that lookup returns a 404 Not Found response, the original transaction was
not processed and it is safe to be retried (remember to use a different
X-Correlation-Id).
Note that while the correlation ID can temporarily be used to identify a transaction, it is only cached in the gateway for a limited time (usually 24 hours). In all normal cases, the audit should be used to identify a transaction.
As tokenisation operations are much lower risk than transaction operations,
correlation IDs cannot be used in the same way.
If the server times out or a 5XX response is recieved, simply perform a
lookup on the relevant endpoint to see whether the previous request
succeeded or not.
For example, if a POST request to /customers returns a 5XX HTTP
status code or times out, make a GET request to /customers, optionally
searching by the details of the new customer, to see whether or not the new
customer was created.
The API only accepts a restricted set of ASCII characters in all string
fields, as shown in the pattern validation of this specification.
Accepted characters include all lower and upper case letters, all numeric
digits, the space character, and the following punctuation:
!#$%&()*+,-./:;<=>?@[]^_`{|}~.
The X-Correlation-Id field has a more restricted character set, excluding most punctuation and the space character.
KVP key names have a more restricted character set again, allowing only letters, digits and the underscore ( _ ) and period ( . ) characters.
The API will be updated over time to fix issues and introduce new functionality. To reflect this, each version is given a version number comprised of three parts: major, minor, and patch version.
The major version number of the API is reflected in the URI.
For example, the major version 1 of the API will use a URI similar to
http://api.cardaccess.com.au/live/etx/txn/v1.
Updates to the API are separated into non-breaking and breaking changes depending on how they affect the functionality of the API; see below for their definitions. Non-breaking changes involve changing only the minor or patch version numbers; these changes may be applied to the API at any time and do not require introducing a new URI. Breaking changes will always be associated with changing the major version number, and thus using a different URI to the previous version. When a breaking change is introduced, the previous major version of the API will continue to be supported for a reasonable period of time. Clients will be notified of the date after which the old version will no longer be available and that a new version has been released.
Non breaking changes may be implemented on existing versions of this API. Clients should ensure that their applications can handle the following types of non-breaking change without prior notice:
unknown or
Unknown.
In this case, the client application should treat any unrecognised value
as being equivalent to unknown or Unknown.-99 in status.gateway_status_code is considered
equivalent to unknown, and so addition of a new supported value to
this field is considered non-breaking.
An unrecognised value for this field should be treated as equivalent to
-99._message.
Message text is intended for human interpretation; system logic should
depend on the similar field ending in _code.Breaking changes will only be implemented in new major versions of this API. The following types of changes are considered breaking and do not need to be handled by client applications:
unknown or Unknown.-99 in status.gateway_status_code is considered
equivalent to unknown, and so addition of a new supported value to
this field is considered non-breaking.The behaviour of the API can be modified in fixed ways using plugins. Please contact CAS if you want to enable or configure any of these plugins.
Set a percentage surcharge to be added onto any payment transactions (purchases, preauthorisations and completions). The surcharge can be configured as a default percentage or specified for each payment method and card type.
In addition to modifying the total amount of the transaction, the following KVPs are added to describe the surcharge details:
| Key | Example | Description |
|---|---|---|
CAS.REQUEST.KVP.SURCHARGE.ORIGINAL_AMOUNT |
2000 |
Original amount in cents as submitted in the transaction |
CAS.REQUEST.KVP.SURCHARGE.PERCENT |
1.5 |
Percentage surcharge configured for this card type |
CAS.REQUEST.KVP.SURCHARGE.ADDED_AMOUNT |
30 |
Surcharge amount in cents |
CAS.REQUEST.KVP.SURCHARGE.TOTAL_AMOUNT |
2030 |
Total amount in cents including surcharge |
Transactions are stored in the gateway and identified by their audit (also referred to as audit number). Each successful transaction request will create a new audit of the pertinent type: purchase, preauthorisation, completion, standalone refund, refund by audit, and void. Completions, refunds by audit and voids act on and refer back to the original transaciton, but are still considered individual transactions themselves. Merchants should record the audit for each transaction as a permanent reference for later refunds etc. CAS staff require the audit to identify a transaction when providing support.
A 2XX HTTP response code does not denote an approved transaction.
It merely denotes that a response was received from the gateway.
In most cases, the status.transaction_status_code field can be used to
determine the outcome of the transaction request.
If its value is approved, the transaction has been approved.
If its value is declined, the transaction has been declined.
A value of pending denotes that the transaction is a direct debit
transaction and is waiting for confirmation from the acquirer; This will
usually take multiple working days.
If its value is error, the fields status.gateway_status_code and
status.acquirer.response_code can be used to diagnose the issue.
A 4XX HTTP response code denotes an improper request.
The transaction is never approved.
In the event of a 5XX HTTP response code for a transaction request, it
is strongly recommended that a lookup be called on either the audit, if
given, or the idempotency key.
An error may have occurred at any point in the chain between the client
and the acquirer, so the transaction may have been approved or declined.
If the lookup does not also return an error, it will show the status of
the transaction.
If the lookup returns a 404 HTTP response code, then the transaction
was not processed and it can safely be reattempted.
Lookup the details of an existing transaction.
| audit required | integer [ 1 .. 2147483647 ] Examples: 123456 Audit of the transaction. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| audit required | integer [ 1 .. 2147483647 ] The audit of this transaction. |
| gateway_timestamp required | string <date-time> Timestamp as recorded by the gateway in ISO8601 date-time format; Sydney time (changes with daylight savings). For transaction requests, this is approximated by the API. The exact gateway timestamp will only be returned in a lookup operation. |
required | object Information describing the merchant. |
required | object KVPs associated with the transaction. This includes KVPs submitted in the request by the merchant and those generated by the gateway in the response. Direct debit transactions may not return any KVPs. In that case, simply perform a lookup on the audit to get any required KVPs. |
required | object Details about the transaction. |
required | object The status of the transaction. |
required | object The hyperlinks to operations associated with this response. Links are generated and returned dynamically depending on the result of the transaction request. The API will attempt to return all valid links and no invalid links, but this is not guaranteed. |
{- "audit": 123456,
- "gateway_timestamp": "2024-03-26T12:14:51+11:00",
- "merchant": {
- "id": 2004
}, - "kvps": {
- "CAS.REQUEST.KVP.CUSTOMER.pmt_no": "123456789",
- "CAS.RESPONSE.KVP.EXAMPLE": "some response data"
}, - "transaction": {
- "reference": "2873eadd-fe37-4b17-adf2-adee3f5ea7ee",
- "transaction_type": "purchase",
- "target_audit": 123123,
- "amount_details": {
- "total_amount": "500",
- "currency": "AUD"
}, - "payment_method": {
- "creditcard": {
- "pan": "4000XXXXXXXX0002",
- "type": ""
}
}, - "directdebit_mode": "debit"
}, - "status": {
- "gateway_status_code": 0,
- "gateway_status_message": "Transaction successfully processed by gateway.",
- "transaction_status_code": "approved",
- "acquirer": {
- "response_code": "00",
- "response_message": "Approved",
- "settlement_date": "2024-03-26",
- "authorisation_code": "12345",
- "preauthorisation_code": "12345"
}
}, - "_links": {
}
}Search existing transactions by a recent correlation ID.
Transactions can only be searched in this way while the correlation ID is
cached, usually for 24 hours.
If no such transaction is found, an empty array will be returned with
HTTP status code 200.
Consider this operation to be a search that can return at most one
result.
| merchant_id required | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID. |
| correlation_id_lookup required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: correlation_id_lookup=48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID of the request to lookup. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
required | Array of objects [ 0 .. 1 ] items Search results. |
{- "results": [
- {
- "audit": 123456,
- "gateway_timestamp": "2024-03-26T12:14:51+11:00",
- "merchant": {
- "id": 2004
}, - "kvps": {
- "CAS.REQUEST.KVP.CUSTOMER.pmt_no": "123456789",
- "CAS.RESPONSE.KVP.EXAMPLE": "some response data"
}, - "transaction": {
- "reference": "2873eadd-fe37-4b17-adf2-adee3f5ea7ee",
- "transaction_type": "purchase",
- "target_audit": 123123,
- "amount_details": {
- "total_amount": "500",
- "currency": "AUD"
}, - "payment_method": {
- "creditcard": {
- "pan": "4000XXXXXXXX0002",
- "type": ""
}
}, - "directdebit_mode": "debit"
}, - "status": {
- "gateway_status_code": 0,
- "gateway_status_message": "Transaction successfully processed by gateway.",
- "transaction_status_code": "approved",
- "acquirer": {
- "response_code": "00",
- "response_message": "Approved",
- "settlement_date": "2024-03-26",
- "authorisation_code": "12345",
- "preauthorisation_code": "12345"
}
}, - "_links": {
}
}
]
}Make a purchase request.
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
required | object Information describing the merchant. |
object Default: {} KVPs associated with the transaction. KVPs submitted in a request may have the prefix Each KVP key must be at most 64 characters long and use only the following characters:
| |
required | object Details about the transaction. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| audit required | integer [ 1 .. 2147483647 ] The audit of this transaction. |
| gateway_timestamp required | string <date-time> Timestamp as recorded by the gateway in ISO8601 date-time format; Sydney time (changes with daylight savings). For transaction requests, this is approximated by the API. The exact gateway timestamp will only be returned in a lookup operation. |
required | object Information describing the merchant. |
required | object KVPs associated with the transaction. This includes KVPs submitted in the request by the merchant and those generated by the gateway in the response. Direct debit transactions may not return any KVPs. In that case, simply perform a lookup on the audit to get any required KVPs. |
required | object The status of the transaction. |
required | object The hyperlinks to operations associated with this response. Links are generated and returned dynamically depending on the result of the transaction request. The API will attempt to return all valid links and no invalid links, but this is not guaranteed. |
{- "merchant": {
- "id": 2004
}, - "kvps": {
- "CUSTOMER.pmt_no": "123456789"
}, - "transaction": {
- "reference": "2873eadd-fe37-4b17-adf2-adee3f5ea7ee",
- "amount_details": {
- "total_amount": "500",
- "currency": "AUD"
}, - "payment_method": {
- "creditcard": {
- "pan": "4000000000000002",
- "expiry_date": "0224",
- "cvv": "567"
}
}
}
}{- "audit": 123456,
- "gateway_timestamp": "2024-03-26T12:14:51+11:00",
- "merchant": {
- "id": 2004
}, - "kvps": {
- "CAS.REQUEST.KVP.CUSTOMER.pmt_no": "123456789",
- "CAS.RESPONSE.KVP.EXAMPLE": "some response data"
}, - "status": {
- "gateway_status_code": 0,
- "gateway_status_message": "Transaction successfully processed by gateway.",
- "transaction_status_code": "approved",
- "acquirer": {
- "response_code": "00",
- "response_message": "Approved",
- "settlement_date": "2024-03-26",
- "authorisation_code": "12345"
}
}, - "_links": {
}
}Make a completion request on an existing preuathorisation.
| audit required | integer [ 1 .. 2147483647 ] Examples: 123456 Audit of the transaction. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
required | object Information describing the merchant. |
object Default: {} KVPs associated with the transaction. KVPs submitted in a request may have the prefix Each KVP key must be at most 64 characters long and use only the following characters:
| |
required | object Details about the transaction. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| audit required | integer [ 1 .. 2147483647 ] The audit of this transaction. |
| gateway_timestamp required | string <date-time> Timestamp as recorded by the gateway in ISO8601 date-time format; Sydney time (changes with daylight savings). For transaction requests, this is approximated by the API. The exact gateway timestamp will only be returned in a lookup operation. |
required | object Information describing the merchant. |
required | object KVPs associated with the transaction. This includes KVPs submitted in the request by the merchant and those generated by the gateway in the response. Direct debit transactions may not return any KVPs. In that case, simply perform a lookup on the audit to get any required KVPs. |
required | object The status of the transaction. |
required | object The hyperlinks to operations associated with this response. Links are generated and returned dynamically depending on the result of the transaction request. The API will attempt to return all valid links and no invalid links, but this is not guaranteed. |
{- "merchant": {
- "id": 2004
}, - "kvps": {
- "CUSTOMER.pmt_no": "123456789"
}, - "transaction": {
- "reference": "2873eadd-fe37-4b17-adf2-adee3f5ea7ee",
- "amount_details": {
- "total_amount": "500",
- "currency": "AUD"
}
}
}{- "audit": 123456,
- "gateway_timestamp": "2024-03-26T12:14:51+11:00",
- "merchant": {
- "id": 2004
}, - "kvps": {
- "CAS.REQUEST.KVP.CUSTOMER.pmt_no": "123456789",
- "CAS.RESPONSE.KVP.EXAMPLE": "some response data"
}, - "status": {
- "gateway_status_code": 0,
- "gateway_status_message": "Transaction successfully processed by gateway.",
- "transaction_status_code": "approved",
- "acquirer": {
- "response_code": "00",
- "response_message": "Approved",
- "settlement_date": "2024-03-26",
- "authorisation_code": "12345"
}
}, - "_links": {
}
}Make a refund request on an existing transaction.
Multiple partial refunds can be made on the same transaction, but the total refunded amount can never exceed the original transaction amount.
| audit required | integer [ 1 .. 2147483647 ] Examples: 123456 Audit of the transaction. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
required | object Information describing the merchant. |
object Default: {} KVPs associated with the transaction. KVPs submitted in a request may have the prefix Each KVP key must be at most 64 characters long and use only the following characters:
| |
required | object Details about the transaction. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| audit required | integer [ 1 .. 2147483647 ] The audit of this transaction. |
| gateway_timestamp required | string <date-time> Timestamp as recorded by the gateway in ISO8601 date-time format; Sydney time (changes with daylight savings). For transaction requests, this is approximated by the API. The exact gateway timestamp will only be returned in a lookup operation. |
required | object Information describing the merchant. |
required | object KVPs associated with the transaction. This includes KVPs submitted in the request by the merchant and those generated by the gateway in the response. Direct debit transactions may not return any KVPs. In that case, simply perform a lookup on the audit to get any required KVPs. |
required | object The status of the transaction. |
required | object The hyperlinks to operations associated with this response. Links are generated and returned dynamically depending on the result of the transaction request. The API will attempt to return all valid links and no invalid links, but this is not guaranteed. |
{- "merchant": {
- "id": 2004
}, - "kvps": {
- "CUSTOMER.pmt_no": "123456789"
}, - "transaction": {
- "reference": "2873eadd-fe37-4b17-adf2-adee3f5ea7ee",
- "amount_details": {
- "total_amount": "500",
- "currency": "AUD"
}
}
}{- "audit": 123456,
- "gateway_timestamp": "2024-03-26T12:14:51+11:00",
- "merchant": {
- "id": 2004
}, - "kvps": {
- "CAS.REQUEST.KVP.CUSTOMER.pmt_no": "123456789",
- "CAS.RESPONSE.KVP.EXAMPLE": "some response data"
}, - "status": {
- "gateway_status_code": 0,
- "gateway_status_message": "Transaction successfully processed by gateway.",
- "transaction_status_code": "approved",
- "acquirer": {
- "response_code": "00",
- "response_message": "Approved",
- "settlement_date": "2024-03-26",
- "authorisation_code": "12345"
}
}, - "_links": {
}
}Make a refund request without reference to a previous transaction.
This operation is not recommended, as without reference to the original transaction it is possible to refund more than the original amount. Instead, refund by audit is recommended.
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
required | object Information describing the merchant. |
object Default: {} KVPs associated with the transaction. KVPs submitted in a request may have the prefix Each KVP key must be at most 64 characters long and use only the following characters:
| |
required | object Details about the transaction. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| audit required | integer [ 1 .. 2147483647 ] The audit of this transaction. |
| gateway_timestamp required | string <date-time> Timestamp as recorded by the gateway in ISO8601 date-time format; Sydney time (changes with daylight savings). For transaction requests, this is approximated by the API. The exact gateway timestamp will only be returned in a lookup operation. |
required | object Information describing the merchant. |
required | object KVPs associated with the transaction. This includes KVPs submitted in the request by the merchant and those generated by the gateway in the response. Direct debit transactions may not return any KVPs. In that case, simply perform a lookup on the audit to get any required KVPs. |
required | object The status of the transaction. |
required | object The hyperlinks to operations associated with this response. Links are generated and returned dynamically depending on the result of the transaction request. The API will attempt to return all valid links and no invalid links, but this is not guaranteed. |
{- "merchant": {
- "id": 2004
}, - "kvps": {
- "CUSTOMER.pmt_no": "123456789"
}, - "transaction": {
- "reference": "2873eadd-fe37-4b17-adf2-adee3f5ea7ee",
- "amount_details": {
- "total_amount": "500",
- "currency": "AUD"
}, - "payment_method": {
- "creditcard": {
- "pan": "4000000000000002",
- "expiry_date": "0224",
- "cvv": "567"
}
}
}
}{- "audit": 123456,
- "gateway_timestamp": "2024-03-26T12:14:51+11:00",
- "merchant": {
- "id": 2004
}, - "kvps": {
- "CAS.REQUEST.KVP.CUSTOMER.pmt_no": "123456789",
- "CAS.RESPONSE.KVP.EXAMPLE": "some response data"
}, - "status": {
- "gateway_status_code": 0,
- "gateway_status_message": "Transaction successfully processed by gateway.",
- "transaction_status_code": "approved",
- "acquirer": {
- "response_code": "00",
- "response_message": "Approved",
- "settlement_date": "2024-03-26",
- "authorisation_code": "12345"
}
}, - "_links": {
}
}Make a void request on an existing transaction.
| audit required | integer [ 1 .. 2147483647 ] Examples: 123456 Audit of the transaction. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
required | object Information describing the merchant. |
object Default: {} KVPs associated with the transaction. KVPs submitted in a request may have the prefix Each KVP key must be at most 64 characters long and use only the following characters:
| |
required | object Details about the transaction. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| audit required | integer [ 1 .. 2147483647 ] The audit of this transaction. |
| gateway_timestamp required | string <date-time> Timestamp as recorded by the gateway in ISO8601 date-time format; Sydney time (changes with daylight savings). For transaction requests, this is approximated by the API. The exact gateway timestamp will only be returned in a lookup operation. |
required | object Information describing the merchant. |
required | object KVPs associated with the transaction. This includes KVPs submitted in the request by the merchant and those generated by the gateway in the response. Direct debit transactions may not return any KVPs. In that case, simply perform a lookup on the audit to get any required KVPs. |
required | object The status of the transaction. |
required | object The hyperlinks to operations associated with this response. Links are generated and returned dynamically depending on the result of the transaction request. The API will attempt to return all valid links and no invalid links, but this is not guaranteed. |
{- "merchant": {
- "id": 2004
}, - "kvps": {
- "CUSTOMER.pmt_no": "123456789"
}, - "transaction": {
- "reference": "2873eadd-fe37-4b17-adf2-adee3f5ea7ee"
}
}{- "audit": 123456,
- "gateway_timestamp": "2024-03-26T12:14:51+11:00",
- "merchant": {
- "id": 2004
}, - "kvps": {
- "CAS.REQUEST.KVP.CUSTOMER.pmt_no": "123456789",
- "CAS.RESPONSE.KVP.EXAMPLE": "some response data"
}, - "status": {
- "gateway_status_code": 0,
- "gateway_status_message": "Transaction successfully processed by gateway.",
- "transaction_status_code": "approved",
- "acquirer": {
- "response_code": "00",
- "response_message": "Approved",
- "settlement_date": "2024-03-26",
- "authorisation_code": "12345"
}
},
}Tokenisation is only available to merchants with the CIV product. Please contact CAS for more information or to request use of this product.
A token, also known as a registered account, is a stored payment method which can be used in later transactions. Sensitive payment information is stored in the customer information vault (CIV), and identified by the token ID. The Virtual PAN (VPAN) can then be used in place of the payment information when performing transactions on CAS systems.
Each token is owned by a customer. Customers usually correspond with the real customers of a merchant, but may be used as an arbitrary collection of tokens. A customer may have zero, one or many tokens.
Currently tokens can store either credit card or bank account details, however the tokenisation system has the capability to store other customer information. Please contact CAS if you have a use for storing extended information.
Search customers by partial match on customer name and/or reference, or simply show all customers.
This operation makes use of pagination.
The limit query parameter may be specified to change the number of
results per page.
The offset query parameter may also be specified to return a
different page of results, although it is recommended to use the
_links.next.href link to browse the next pages instead of
manipulating offset directly.
This link will not be present when there are no more results to
show.
| merchant_id | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID from which to access customer data. Defaults to the merchant ID to which your user is assigned. This field can be a source of |
| ordering | string Default: "name" Enum: "name" "customer_id" "reference" Ordering key. |
| name | string [ 1 .. 60 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Examples: name=John Smith Customer name (partial match). |
| reference | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Examples: reference=078dec88-a5bf-4cfd-85bd-7a1974ae3712 Customer reference (partial match). |
| limit | integer [ 1 .. 100 ] Default: 100 Number of results to show per page. |
| offset | integer [ 0 .. 2147483547 ] Default: 0 Number of results to be omitted from the response before accumulating results up to the page limit. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
required | object The hyperlinks for iterating though the pages of the search results. |
required | Array of objects Search results. |
{- "_links": {
}, - "results": [
- {
- "id": 34567,
- "name": "John Smith",
- "reference": "078dec88-a5bf-4cfd-85bd-7a1974ae3712",
- "_links": {
}
}
]
}Lookup or create a customer.
If the reference field matches an existing customer, no customer will be
created and the details of the matching customer will be returned in
the response instead.
Note that the existing customer may not have the same name as given in
the request; in this case, the existing name will be preserved and the new
name will be ignored
| merchant_id | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID from which to access customer data. Defaults to the merchant ID to which your user is assigned. This field can be a source of |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
| reference required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique reference for the customer. |
| name required | string [ 1 .. 60 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Customer name. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| id required | integer [ 1 .. 2147483647 ] Customer ID. |
| name required | string [ 1 .. 60 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Customer name. |
| reference required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique reference for the customer. |
required | object The hyperlinks associated with this customer. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| id required | integer [ 1 .. 2147483647 ] Customer ID. |
| name required | string [ 1 .. 60 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Customer name. |
| reference required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique reference for the customer. |
required | object The hyperlinks associated with this customer. |
{- "reference": "078dec88-a5bf-4cfd-85bd-7a1974ae3712",
- "name": "John Smith"
}{- "id": 34567,
- "name": "John Smith",
- "reference": "078dec88-a5bf-4cfd-85bd-7a1974ae3712",
- "_links": {
}
}Lookup the details of a customer.
| customer_id required | integer [ 1 .. 2147483647 ] Examples: 34567 Customer ID. |
| merchant_id | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID from which to access customer data. Defaults to the merchant ID to which your user is assigned. This field can be a source of |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| id required | integer [ 1 .. 2147483647 ] Customer ID. |
| name required | string [ 1 .. 60 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Customer name. |
| reference required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique reference for the customer. |
required | object The hyperlinks associated with this customer. |
{- "id": 34567,
- "name": "John Smith",
- "reference": "078dec88-a5bf-4cfd-85bd-7a1974ae3712",
- "_links": {
}
}Update the details of a customer.
| customer_id required | integer [ 1 .. 2147483647 ] Examples: 34567 Customer ID. |
| merchant_id | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID from which to access customer data. Defaults to the merchant ID to which your user is assigned. This field can be a source of |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
| reference | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique reference for the customer. |
| name | string [ 1 .. 60 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Customer name. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| id required | integer [ 1 .. 2147483647 ] Customer ID. |
| name required | string [ 1 .. 60 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Customer name. |
| reference required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique reference for the customer. |
required | object The hyperlinks associated with this customer. |
{- "reference": "078dec88-a5bf-4cfd-85bd-7a1974ae3712",
- "name": "John Smith"
}{- "id": 34567,
- "name": "John Smith",
- "reference": "078dec88-a5bf-4cfd-85bd-7a1974ae3712",
- "_links": {
}
}Delete a customer.
| customer_id required | integer [ 1 .. 2147483647 ] Examples: 34567 Customer ID. |
| merchant_id | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID from which to access customer data. Defaults to the merchant ID to which your user is assigned. This field can be a source of |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
{- "errors": [
- {
- "error_code": "string",
- "error_message": "string",
- "location": [
- "string"
]
}
]
}List tokens owned by this customer.
This operation makes use of pagination.
The limit query parameter may be specified to change the number of
results per page.
The offset query parameter may also be specified to return a
different page of results, although it is recommended to use the
_links.next.href link to browse the next pages instead of
manipulating offset directly.
This link will not be present when there are no more results to
show.
| customer_id required | integer [ 1 .. 2147483647 ] Examples: 34567 Customer ID. |
| merchant_id | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID from which to access customer data. Defaults to the merchant ID to which your user is assigned. This field can be a source of |
| limit | integer [ 1 .. 100 ] Default: 100 Number of results to show per page. |
| offset | integer [ 0 .. 2147483547 ] Default: 0 Number of results to be omitted from the response before accumulating results up to the page limit. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
required | object The hyperlinks for iterating though the pages of the search results. |
required | Array of objects Search results. |
{- "_links": {
- "first": {
},
}, - "results": [
- {
- "id": "456789",
- "virtual_pan": "9988111111111111",
- "preferred_name": "b327170c-6a9f-4f34-b32a-7202f7e52aae",
- "active": true,
- "account": {
- "general_creditcard": {
- "CARD.PAN": "4000XXXXXXXX0002",
- "CARD.EXPIRY": "XXXX",
- "CARD.NAME": "John Smith",
- "CARD.TYPE": ""
}
}, - "_links": {
}
}
]
}Create a new token for this customer.
| customer_id required | integer [ 1 .. 2147483647 ] Examples: 34567 Customer ID. |
| merchant_id | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID from which to access customer data. Defaults to the merchant ID to which your user is assigned. This field can be a source of |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
| preferred_name required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique name of the token. This must be unique per customer. |
| active required | boolean Whether or not this token is active. |
required | object Tokenised account. CAS supports a number of different tokenisation account types. Please contact CAS if you would like to store and use information other than credit card details. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| id required | integer [ 1 .. 2147483647 ] Token account ID. |
| virtual_pan required | string [ 13 .. 19 ] characters ^[0-9]*$ Virtual PAN identifying a tokenised customer account. |
| preferred_name required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique name of the token. This must be unique per customer. |
| active required | boolean Whether or not this token is active. |
required | object Tokenised account. CAS supports a number of different tokenisation account types. Please contact CAS if you would like to store and use information other than credit card details. |
required | object The hyperlinks associated with this token. |
{- "preferred_name": "b327170c-6a9f-4f34-b32a-7202f7e52aae",
- "active": true,
- "account": {
- "general_creditcard": {
- "CARD.PAN": "4000000000000002",
- "CARD.EXPIRY": "0224",
- "CARD.NAME": "John Smith"
}
}
}{- "id": "456789",
- "virtual_pan": "9988111111111111",
- "preferred_name": "b327170c-6a9f-4f34-b32a-7202f7e52aae",
- "active": true,
- "account": {
- "general_creditcard": {
- "CARD.PAN": "4000XXXXXXXX0002",
- "CARD.EXPIRY": "XXXX",
- "CARD.NAME": "John Smith",
- "CARD.TYPE": ""
}
}, - "_links": {
}
}Lookup the details of a token.
| customer_id required | integer [ 1 .. 2147483647 ] Examples: 34567 Customer ID. |
| token_id required | integer [ 1 .. 2147483647 ] Examples: 456789 Token ID. |
| merchant_id | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID from which to access customer data. Defaults to the merchant ID to which your user is assigned. This field can be a source of |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| id required | integer [ 1 .. 2147483647 ] Token account ID. |
| virtual_pan required | string [ 13 .. 19 ] characters ^[0-9]*$ Virtual PAN identifying a tokenised customer account. |
| preferred_name required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique name of the token. This must be unique per customer. |
| active required | boolean Whether or not this token is active. |
required | object Tokenised account. CAS supports a number of different tokenisation account types. Please contact CAS if you would like to store and use information other than credit card details. |
required | object The hyperlinks associated with this token. |
{- "id": "456789",
- "virtual_pan": "9988111111111111",
- "preferred_name": "b327170c-6a9f-4f34-b32a-7202f7e52aae",
- "active": true,
- "account": {
- "general_creditcard": {
- "CARD.PAN": "4000XXXXXXXX0002",
- "CARD.EXPIRY": "XXXX",
- "CARD.NAME": "John Smith",
- "CARD.TYPE": ""
}
}, - "_links": {
}
}Update the detials of a token.
| customer_id required | integer [ 1 .. 2147483647 ] Examples: 34567 Customer ID. |
| token_id required | integer [ 1 .. 2147483647 ] Examples: 456789 Token ID. |
| merchant_id | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID from which to access customer data. Defaults to the merchant ID to which your user is assigned. This field can be a source of |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
| preferred_name | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique name of the token. This must be unique per customer. |
| active | boolean Whether or not this token is active. |
object Tokenised account. CAS supports a number of different tokenisation account types. Please contact CAS if you would like to store and use information other than credit card details. |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Example: "48ac4691-c203-4391-a5cc-52285b8f9c15" The correlation ID that was submitted in the request headers. |
| id required | integer [ 1 .. 2147483647 ] Token account ID. |
| virtual_pan required | string [ 13 .. 19 ] characters ^[0-9]*$ Virtual PAN identifying a tokenised customer account. |
| preferred_name required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9!#\$%&\(\)\*\+,\-\./:;<=>\?@\[\]\^... Unique name of the token. This must be unique per customer. |
| active required | boolean Whether or not this token is active. |
required | object Tokenised account. CAS supports a number of different tokenisation account types. Please contact CAS if you would like to store and use information other than credit card details. |
required | object The hyperlinks associated with this token. |
{- "preferred_name": "b327170c-6a9f-4f34-b32a-7202f7e52aae",
- "active": true,
- "account": {
- "general_creditcard": {
- "CARD.PAN": "4000000000000002",
- "CARD.EXPIRY": "0224",
- "CARD.NAME": "John Smith"
}
}
}{- "id": "456789",
- "virtual_pan": "9988111111111111",
- "preferred_name": "b327170c-6a9f-4f34-b32a-7202f7e52aae",
- "active": true,
- "account": {
- "general_creditcard": {
- "CARD.PAN": "4000XXXXXXXX0002",
- "CARD.EXPIRY": "XXXX",
- "CARD.NAME": "John Smith",
- "CARD.TYPE": ""
}
}, - "_links": {
}
}Delete a token.
| customer_id required | integer [ 1 .. 2147483647 ] Examples: 34567 Customer ID. |
| token_id required | integer [ 1 .. 2147483647 ] Examples: 456789 Token ID. |
| merchant_id | integer [ 1 .. 2147483647 ] Examples: merchant_id=2004 Merchant ID from which to access customer data. Defaults to the merchant ID to which your user is assigned. This field can be a source of |
| x-correlation-id required | string [ 1 .. 128 ] characters ^[a-zA-Z0-9\+\-_:\.,]*$ Examples: 48ac4691-c203-4391-a5cc-52285b8f9c15 Correlation ID. Must be uniquely generated for each request. Uniquely identifies this request-response pair. In operations which create a transaction, it also ensures idempotency. |
{- "errors": [
- {
- "error_code": "string",
- "error_message": "string",
- "location": [
- "string"
]
}
]
}Crab icon by Freepik - Flaticon