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

# Authorization Code

This webhook is triggered when an authorization code is generated for a card. The event type is `authorization.code`

The `data.object.code` field contains the authorization code, and `data.object.card` carries the card the code was issued for.

<CodeGroup>
  ```json json theme={null}
  {
      "_id": "6624b1f0c3a94b1a2d8f5e11",
      "environment": "production",
      "business": "5f3a1b2c4d5e6f7a8b9c0d1e",
      "data": {
          "object": {
              "code": "734715",
              "card": {
                  "_id": "a50c294e-7482-4c79-9bcf-7e9eb1c5e30b",
                  "business": "5f3a1b2c4d5e6f7a8b9c0d1e",
                  "customer": {
                      "_id": "62b1c9f4e8d7a6b5c4d3e2f1",
                      "business": "5f3a1b2c4d5e6f7a8b9c0d1e",
                      "type": "individual",
                      "name": "John Doe",
                      "phoneNumber": "+2348012345678",
                      "emailAddress": "john.doe@example.com",
                      "status": "active",
                      "individual": {},
                      "billingAddress": {
                          "line1": "12 Admiralty Way",
                          "city": "Lekki",
                          "state": "Lagos",
                          "country": "NG",
                          "postalCode": "105102"
                      },
                      "isDeleted": false,
                      "createdAt": "2024-01-15T10:22:41.000Z",
                      "updatedAt": "2024-01-15T10:22:41.000Z",
                      "__v": 0
                  },
                  "account": {
                      "_id": "62b1ca10e8d7a6b5c4d3e2f5",
                      "business": "5f3a1b2c4d5e6f7a8b9c0d1e",
                      "customer": "62b1c9f4e8d7a6b5c4d3e2f1",
                      "type": "wallet",
                      "currency": "USD",
                      "accountName": "John Doe",
                      "accountType": "current",
                      "accountNumber": "1000123456",
                      "currentBalance": 250.75,
                      "availableBalance": 250.75,
                      "provider": "SudoHUSMC",
                      "isDefault": true,
                      "isDeleted": false,
                      "createdAt": "2024-01-15T10:22:42.000Z",
                      "updatedAt": "2025-04-24T06:20:11.000Z",
                      "__v": 0
                  },
                  "fundingSource": {
                      "_id": "61a0b2c3d4e5f60718293a4b",
                      "business": "5f3a1b2c4d5e6f7a8b9c0d1e",
                      "type": "gateway",
                      "status": "active",
                      "jitGateway": {
                          "url": "https://api.yourcompany.com/sudo/jit",
                          "authorizationHeader": "Bearer <your-jit-token>",
                          "authorizeByDefault": false
                      },
                      "isDefault": true,
                      "isDeleted": false,
                      "createdAt": "2023-11-26T09:04:00.000Z",
                      "updatedAt": "2023-11-26T09:04:00.000Z",
                      "__v": 0
                  },
                  "type": "virtual",
                  "brand": "MasterCard",
                  "currency": "USD",
                  "maskedPan": "539983******4021",
                  "last4": "4021",
                  "expiryMonth": "07",
                  "expiryYear": "2028",
                  "status": "active",
                  "metadata": {
                      "employeeId": "EMP-2291"
                  },
                  "spendingControls": {
                      "channels": {
                          "atm": false,
                          "pos": true,
                          "web": true,
                          "mobile": true
                      },
                      "allowedCategories": [],
                      "blockedCategories": [],
                      "spendingLimits": [
                          {
                              "amount": 1000,
                              "interval": "monthly",
                              "categories": []
                          }
                      ]
                  },
                  "is2FAEnabled": true,
                  "is2FAEnrolled": true,
                  "isDefaultPINChanged": true,
                  "disposable": false,
                  "isDigitalized": false,
                  "failedTransactionCount": 0,
                  "minimumBalance": 0,
                  "version": "v1",
                  "isDeleted": false,
                  "createdAt": "2024-02-01T08:15:33.000Z",
                  "updatedAt": "2025-04-24T06:22:58.000Z",
                  "__v": 0
              }
          }
      },
      "type": "authorization.code",
      "pendingWebhook": true,
      "webhookArchived": false,
      "createdAt": 1745475786,
      "__v": 0
  }
  ```
</CodeGroup>
