API ReferenceapipaymentsPOST /v1/billing/gifts/redeem

POST /v1/billing/gifts/redeem

Service: payments · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "minLength": 1
    },
    "recipient_email": {
      "type": "string",
      "format": "email"
    }
  },
  "required": [
    "code",
    "recipient_email"
  ]
}

Responses

200 Gift redeemed

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "recipient_email": {
      "type": "string",
      "format": "email"
    },
    "recipient_name": {
      "type": "string"
    },
    "tier": {
      "type": "string"
    },
    "duration_months": {
      "type": "number"
    },
    "redeemed_by_user_id": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "code",
    "status",
    "recipient_email",
    "recipient_name",
    "tier",
    "duration_months",
    "redeemed_by_user_id"
  ]
}

400 Authenticated email required

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

404 Gift not found

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

409 Gift already redeemed

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

412 Gift cannot be redeemed

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

Example

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