---
updatedAt: 2025-03-06T23:33:33.000Z
agentTools:
  projectIndex: https://developer-gigpay.readme.io/llms.txt
---

# Create payment token (Auth policies: AppUserAuthorizationPolicy)

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "GigPay.Core.Host",
    "version": "1.0"
  },
  "paths": {
    "/v1/payment-tokens": {
      "post": {
        "tags": [
          "PaymentTokens"
        ],
        "summary": "Create payment token (Auth policies: AppUserAuthorizationPolicy)",
        "requestBody": {
          "description": "Create payment token request model",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentTokenAppRequestModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentTokenAppRequestModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentTokenAppRequestModel"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Payment token is created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedPaymentTokenAppResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request model",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": [
              "AppUserAuthorizationPolicy"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AssetType": {
        "enum": [
          "usd"
        ],
        "type": "string"
      },
      "CreatePaymentTokenAppRequestModel": {
        "required": [
          "amount",
          "assetType"
        ],
        "type": "object",
        "properties": {
          "assetType": {
            "$ref": "#/components/schemas/AssetType"
          },
          "amount": {
            "minimum": 0,
            "exclusiveMinimum": true,
            "type": "number",
            "format": "double"
          },
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "memo": {
            "maxLength": 200,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreatedPaymentTokenAppResponseModel": {
        "type": "object",
        "properties": {
          "paymentTokenId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Put access token in the box below.<br>For example: <b>Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6I</b>",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```