Type Definitions
MonetaryToken
Type:
Properties:
Name | Type | Description |
---|---|---|
Token |
String | Token of user-entered account data. |
Brand |
String | Card brand of account represented by token. |
ExpirationMonth |
String | Expiration month of account represented by token. |
ExpirationYear |
String | Expiration year of account represented by token. |
Last4 |
String | Last four digits of account represented by token |
Methods
(static) init(publicAuthenticator, iframeID, callbackFunction, css)
Initialize an iframe to request a token from the Monetary Token API.
Parameters:
Name | Type | Description |
---|---|---|
publicAuthenticator |
String | A Monetary public key. |
iframeID |
String | The name of the iframe element to initailize. |
callbackFunction |
Function | The function which to call with tokenization results. |
css |
String (Optional) | Custom CSS stylesheet which to apply to iframe contents. |
Returns:
No return value.
(static) requestToken() → {callbackFunction(MonetaryToken)}
Trigger tokenization event within iframe.
Returns:
No return value. Tokenization result will trigger
callbackFunction
passing a MonetaryToken
object containing the token properties of the tokenized user-entered account data.
- Type
-
MonetaryToken