---
updatedAt: 2026-06-18T17:13:28.000Z
agentTools:
  projectIndex: https://docs.heylight.com/llms.txt
---

# Auth Token

No-op api-view, which simply extends the common HeidiAPIView

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "HeidiPay Checkout API",
    "version": "v0.1",
    "description": "This is the documentation for HeidiPay's Checkout API, which can be used for integration with your ecommerce platform or website.",
    "contact": {
      "name": "Heidi Pay AG"
    }
  },
  "paths": {
    "/auth/v1/generate/": {
      "post": {
        "operationId": "auth_v1_generate_create",
        "description": "No-op api-view, which simply extends the common HeidiAPIView",
        "summary": "Auth Token",
        "tags": [
          "auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/get_token"
              },
              "examples": {
                "GenerateToken": {
                  "value": {
                    "merchant_key": "your-merchant-api-key-here"
                  },
                  "summary": "Exchange merchant key for a bearer token",
                  "description": "Send your merchant API key to receive a JWT for authenticating further requests."
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/token_status"
                },
                "examples": {
                  "SuccessfulTokenResponse": {
                    "value": {
                      "status": "success",
                      "data": {
                        "token": "<jwt-bearer-token>"
                      }
                    },
                    "summary": "Token generated successfully",
                    "description": "The returned token should be used as a Bearer token in the Authorization header."
                  }
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OASSchemaOnlyAuthFailureResponse"
                },
                "examples": {
                  "InvalidMerchantKey": {
                    "value": {
                      "status": "failure"
                    },
                    "summary": "Authentication failed",
                    "description": "Returned when the merchant_key does not match any active key."
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "NestedData": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "JWT bearer token to use in the Authorization header."
          }
        },
        "required": [
          "token"
        ]
      },
      "OASSchemaOnlyAuthFailureResponse": {
        "properties": {
          "status": {
            "description": "Always \"failure\" for authentication errors.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "OASSchemaOnlyAuthFailureResponse",
        "type": "object"
      },
      "get_token": {
        "type": "object",
        "properties": {
          "merchant_key": {
            "type": "string",
            "description": "Your merchant API key."
          }
        },
        "required": [
          "merchant_key"
        ]
      },
      "token_status": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Always \"success\" for valid keys."
          },
          "data": {
            "$ref": "#/components/schemas/NestedData"
          }
        },
        "required": [
          "data",
          "status"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://sbx-origination.heidipay.io",
      "description": "Text"
    }
  ]
}
```