> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Status Webhooks

**v2.1 → v2.2**

* `customer` object added
* `isVaulted` field is added and if set to `true` then `paymentMethodToken` will be the multi-use token. If `false`, it’ll be the single-use token. Previously, `paymentMethodToken` was always the single-use token.

*Example webhook when payment is created:*

```json theme={"dark"}
{
    "eventType": "PAYMENT.STATUS",
    "date": "2023-07-05 14:27:08.447375",
    "notificationConfig": {
        "id": "abc5a760-1562-445b-bae4-60cbd53aaec3",
        "description": "Webhook"
    },
    "payment": {
        "id": "7XekuJBI",
        "date": "2023-07-05T14:27:08.371546",
        "amount": 1000,
        "currencyCode": "EUR",
        "customerId": "customer-123",
        "orderId": "79383",
        "status": "PENDING",
        "customer": {
            "emailAddress": "test@test.com",
            "mobileNumber": "0351235412",
            "billingAddress": {
                "firstName": "John",
                "lastName": "Smith",
                "postalCode": "123123",
                "addressLine1": "123",
                "countryCode": "GB",
                "city": "Bucharest",
                "state": "Bucharest"
            },
            "shippingAddress": {
                "firstName": "John",
                "lastName": "Smith",
                "postalCode": "123123",
                "addressLine1": "123",
                "countryCode": "GB",
                "city": "Bucharest",
                "state": "Bucharest"
            },
            "nationalDocumentId": "9011211234567"
        },
        "paymentMethod": {
            "paymentType": "FIRST_PAYMENT",
            "authorizationType": "FINAL",
            "paymentMethodToken": "ucRRRwmZQc6M0OkbeTdlJHwxNjg4NTY3MjI4",
            "isVaulted": false,
            "analyticsId": "eD-OFajuWsa9fPW83iRyYjZz",
            "paymentMethodType": "PAYMENT_CARD",
            "paymentMethodData": {
                "last4Digits": "4242",
                "expirationMonth": "11",
                "expirationYear": "2023",
                "cardholderName": "asd",
                "network": "Visa",
                "binData": {
                    "network": "AMEX",
                    "issuerCountryCode": "US",
                    "regionalRestriction": "UNKNOWN",
                    "accountNumberType": "UNKNOWN",
                    "accountFundingType": "UNKNOWN",
                    "prepaidReloadableIndicator": "NOT_APPLICABLE",
                    "productUsageType": "UNKNOWN",
                    "productCode": "UNKNOWN",
                    "productName": "UNKNOWN"
                },
                "isNetworkTokenized": false
            },
            "threeDSecureAuthentication": {
                "responseCode": "NOT_PERFORMED"
            }
        },
        "processor": {
            "amountCaptured": 0,
            "amountRefunded": 0
        },
        "transactions": []
    },
    "version": "2.2",
    "signedAt": "1688567229"
}
```

**v2.0 → v2.1**

> [!NOTE]
>
> v2.01 is the same as v2.0, so this migration guide applies for v2.01 as well.

* no longer return the `order` object
* `paymentMethod.vaultedPaymentMethodToken` is no longer returned. `paymentMethodToken` is now returned but this is always the single-use token (*If you are keen to retrieve the multi-use token from the webhook, see the [v2.2 updates](#v21-v22)*).
* Transaction objects now include `date`, `amount` and `currencyCode`
* no longer return the following fields from `paymentMethod` object:

  * `cryptogram`
  * `eci`
  * `threeDsVersion`
  * `domainServerTransactionId`
  * `networkTransactionId`
  * `cvvAvailable`
  * `transStatus`

*Example webhook when payment is created:*

```json theme={"dark"}
{
    "eventType": "PAYMENT.STATUS",
    "date": "2023-07-17 08:53:44.737529",
    "notificationConfig": {
        "id": "d9ad7ba8-97fa-4364-9aec-16ddb3c68b86",
        "description": "2.1"
    },
    "payment": {
        "id": "qn4enwNNG",
        "date": "2023-07-17T08:53:44.491798",
        "amount": 10000,
        "currencyCode": "EUR",
        "customerId": "customer-123",
        "orderId": "76743",
        "status": "PENDING",
        "paymentMethod": {
            "paymentType": "UNSCHEDULED",
            "paymentMethodToken": "zRxJcDoxSr2WOLY5YNpTdXwxNjg5NTg0MDIz",
            "analyticsId": "fTO3A_LXUcy_PHe02_w6QFFY",
            "paymentMethodType": "PAYMENT_CARD",
            "paymentMethodData": {
                "last4Digits": "4242",
                "first6Digits": "424242",
                "firstDigits": "42424242",
                "expirationMonth": "01",
                "expirationYear": "2028",
                "cardholderName": "Joe Bloggs",
                "network": "Visa",
                "binData": {
                    "network": "VISA",
                    "issuerCountryCode": "US",
                    "regionalRestriction": "UNKNOWN",
                    "accountNumberType": "UNKNOWN",
                    "accountFundingType": "UNKNOWN",
                    "prepaidReloadableIndicator": "NOT_APPLICABLE",
                    "productUsageType": "UNKNOWN",
                    "productCode": "UNKNOWN",
                    "productName": "UNKNOWN"
                },
                "isNetworkTokenized": false
            }
        },
        "processor": {
            "name": "STRIPE",
            "processorMerchantId": "acct_test_1",
            "amountCaptured": 0,
            "amountRefunded": 0
        },
        "transactions": []
    },
    "version": "2.1",
    "signedAt": "1689584025"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.