Smartpay tokens are a simple and secure way for charging a consumer's Smartpay account without requiring the consumer to complete Smartpay checkout every time. A token object represents a link to the consumer's Smartpay account that you can use to charge in the future.

Attributes
idstring
Unique identifier for the object
objectstring, value is "token"
A string representing the object’s type. Objects of the same type share the same value.
createdAttimestamp
The moment at which the object was created. Measured in milliseconds since the Unix epoch.
metadatahash
Set of key-value pairs that you can attach to an object for storing additional information in a structured format.
referencestring
A - ideally unique - string to reference the Token in your system (e.g. a token ID, etc.).
statusstring
The current status of the token.
Possible enum values
  • requires_authorization

    When the token is created and requires the consumer to authorize it.

  • active

    When the token has been authorized by the consumer and Smartpay and is ready to be used.

  • rejected

    When the token has been declined and can not be used.

  • disabled

    When the token is disabled and can not be used to create orders until it is re-enabled.

  • deleted

    When the token is deleted and can not be used to create orders anymore.

testboolean
A flag with a value false if the object exists in live mode or true if the object exists in test mode.
updatedAttimestamp
The moment at which the object was last updated. Measured in milliseconds since the Unix epoch.