Reference
Sometimes you might encounter an object of the special reference class. This has been created in order to avoid circular references, for example when making a server-2-server token creation including an initial payment where a token includes a payment which also includes the token this payment was made on. In this case the token in the payment object will be a reference.
Object
| Name | Type | Mandatory | Description |
|---|---|---|---|
| class | string | Y | The type of object which is being returned. In this case it will be reference. |
| type | string | Y | The actual class of the object being referenced. |
| id | string | Y | The id of the object. |
| link | string | N | If our API provides a service to access this object’s details, this property will include the link to retrieve it. |
Example
{
"class": "reference",
"type": "token",
"id": 7,
"link": "https://www.syspay.com/api/v2/merchant/token/1"
}