API ReferenceapipaymentsPOST /v1/billing/gifts/checkout-session

POST /v1/billing/gifts/checkout-session

Service: payments · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "recipient_email": {
      "type": "string",
      "format": "email"
    },
    "recipient_name": {
      "type": "string",
      "minLength": 1
    },
    "message": {
      "type": [
        "string",
        "null"
      ]
    },
    "tier": {
      "type": "string",
      "enum": [
        "member",
        "founder"
      ]
    },
    "duration_months": {
      "anyOf": [
        {
          "type": "number",
          "enum": [
            3
          ]
        },
        {
          "type": "number",
          "enum": [
            6
          ]
        },
        {
          "type": "number",
          "enum": [
            12
          ]
        }
      ]
    },
    "price_id": {
      "type": "string",
      "minLength": 1
    },
    "promo_code": {
      "type": "string",
      "minLength": 1
    },
    "success_url": {
      "type": "string",
      "format": "uri"
    },
    "cancel_url": {
      "type": "string",
      "format": "uri"
    }
  },
  "required": [
    "recipient_email",
    "recipient_name",
    "tier",
    "duration_months",
    "success_url",
    "cancel_url"
  ]
}

Responses

200 Gift checkout session created

{
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "code": {
      "type": "string"
    },
    "status": {
      "type": "string"
    }
  },
  "required": [
    "session_id",
    "url",
    "code",
    "status"
  ]
}

400 Validation error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://payments.platform.loop.health/v1/billing/gifts/checkout-session \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'