Tokenization event
This webhook event is triggered when a tokenization request has been successfully completed during a payment, indicating that a new payment token has been created and is ready for use in future transactions. The event includes the generated token along with transaction details and payment method information for secure payment processing.
Webhook Example
{
"checkoutReference": "w4znp75zopqwfpg60jhdz6sjhrgz210zefd5o2bcnmn3i8uu5w",
"payfacReference": "OOJWITWVQV42PSE8",
"merchantReference": "63666423116709",
"amount": "250000",
"currency": "ISK",
"reason": "773206:1111:03/2030",
"success": "true",
"hmacSignature": "ag8i/dlOLFtGTFlDWo0NMhltf6iV4RM7NuNr7wwoUTE=",
"additionalData": {
"eventType": "Tokenization",
"authCode": "123456",
"cardExpiryDate": "03/2030",
"cardNumber": "411111******1111",
"cardSummary": "1111",
"cardUsage": "Debit",
"originalPayfacReference": "OOJWITWVQV42PSE8",
"paymentMethod": "VI",
"paymentMethodType": "Cards",
"threeDAuthenticated": "false",
"token": "69RX6F0Z8119CAB6",
"paymentLinkReference": "78c5ec6ea95477",
"paymentLinkDescription": "Payment for Custom T-shirt Design",
"shopperInformation": {
"ssn": "1111111119",
"fullName": "Jón Jónsson",
"emailAddress": ""
}
}
}
HMAC key: 1dbaa6a7462fe112bbb9ccf5f9fcade62a9016f1b44069e1
Headers
In the Authorization header, we will set the matching Api key for your webhook.
Fields
You will always get these fields.
| Field | Type | Description |
|---|---|---|
| checkoutReference | nullable string | Unique identifier for the payment that was done through a checkout. |
| payfacReference | string | Unique identifier for the payment generated by the payment service provider. |
| merchantReference | nullable string | The identifier for the payment provided by you, the merchant, allowing for correlation with the merchant’s system. |
| amount | string | The payment amount in the minor currency unit. |
| currency | string | The three-letter ISO currency code. |
| reason | nullable string | A field that provides additional context in case of payment errors or declines, helping diagnose specific issues. |
| success | string | Indicates the payment status (true/false). |
| hmacSignature | string | A cryptographic signature generated using a secret, enabling verification of the message authenticity and ensuring it hasn’t been tampered with. |
| additionalData | object | An object for the additional details included in the event. |
Additional Data Fields
Fields you will get depend on the event type of the webhook.
| Field | Type | Description |
|---|---|---|
| eventType | string | A string representing the type of event that occurred. |
| authCode | nullable string | An authorization code is a unique series of letters or numbers generated by a card issuer or bank to validate a card payment. |
| cardExpiryDate | nullable string | Card expiration date in "MM/yyyy" format. |
| cardNumber | nullable string | A partially masked PAN. |
| cardSummary | nullable string | Last 4 digits of PAN. |
| cardUsage | nullable string | The source of funds used for a authorization. |
| originalPayfacReference | nullable string | This field indicates the payment request associated with the original payment. |
| paymentMethod | nullable string | The payment method used in the authorization. See Payment method codes. |
| paymentMethodType | nullable string | How the shopper paid: Cards, ApplePay, GooglePay, WeChatPay, AliPay or Kortalan. A wallet payment still reports its card brand in paymentMethod. Omitted when it cannot be determined. |
| threeDAuthenticated | nullable string | Indicates if 3D Secure authentication was completed for this authorization. |
| untokenizedCardSummary | nullable string | Last 4 digits of original PAN in case of network payment. |
| token | string | A payment token you can use for future payments through the API. Store it against the shopper: it is bound to this merchant and shopper, has no expiry, and stays valid until disabled. See Token scope and validity. |
| paymentLinkReference | nullable string | A unique identifier for the payment link used to create authorization. |
| paymentLinkDescription | nullable string | A human-readable description of the payment link. |
| shopperInformation | nullable object | The shopper's answers to the Payment Link's form. See Shopper Information. Only present for Payment Link payments. |
Shopper Information
When a payment comes from a Payment Link, shopperInformation holds the values submitted with the link's form, one property per field:
- A field on the form has the value the shopper entered, or an empty string (
"") if they left it empty. - A prefilled field has the value you set on the link. On Tokenize by Link the shopper cannot change it; on Pay by Link they can edit it, so you get the value they submitted.
- A field that is not on the link's form is left out, like other optional webhook fields.
If the link has no form fields, shopperInformation is left out.
| Field | Type | Description | Example |
|---|---|---|---|
| ssn | nullable string | The shopper's kennitala. | 1111111119 |
| fullName | nullable string | The shopper's full name. | Jón Jónsson |
| address | nullable string | Street address. | Laugavegur 1 |
| postCode | nullable string | Postal code. | 101 |
| city | nullable string | City. | Reykjavík |
| country | nullable string | Country. | Iceland |
| telephone | nullable string | Phone number. | 5555555 |
| emailAddress | nullable string | Email address. | "" |
| comments | nullable string | Free-text comments. | Leave at door |