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

# Process a campaign checkout

> Completes public campaign, peer-to-peer or trip checkout and creates or reuses the donor record. Existing donor emails require a verified donor session before payment; checkout accepts a single recipient or a designation cart plus optional extra gifts. Payment admission, fixed-level sponsorship selections and public donor-form rules are checked before creating donations or commitments. A future start date can defer charging, and bank accounts awaiting verification produce a pending success state rather than a completed payment.



## OpenAPI

````yaml post /frontend/checkout/campaign/{client_id}/{program_id}/{session_id}
openapi: 3.0.0
info:
  title: Gratona API
  description: >-
    REST API for the Gratona fundraising platform, including donor, donation,
    sponsorship, program, event, and integration workflows. Endpoints are
    organized by tag. Most endpoints require either a Passport bearer token or
    an issued API key — see the Security Schemes section.
  contact:
    name: Gratona Engineering
    url: https://gratona.com
    email: devs@gratona.com
  version: 1.0.0
servers:
  - url: https://api.gratona.com/v1
    description: Server Version 1.0.0
security: []
tags:
  - name: Auth
    description: >-
      Login, signup, logout, password reset, and email verification for admin
      users and donors.
  - name: Donors
    description: >-
      Donor records: CRUD, profile fields, household linkage, search, filters,
      merge, and duplicate detection.
  - name: Donations
    description: >-
      Individual donation records, recurring commitments, soft credits, refunds,
      designations, and exports.
  - name: Sponsorships
    description: >-
      Donor-to-entity sponsorship relationships, lifecycle transitions, and
      sponsorship-specific filters.
  - name: Entities
    description: >-
      Recipient records (children, families, projects, animals, etc.), their
      status, and entity-level fields.
  - name: Programs
    description: >-
      Program / campaign configuration: hierarchy, settings, and program-level
      metadata.
  - name: Forms
    description: >-
      Custom form builder (HysForm), form fields, standardized donor fields, and
      field migrations.
  - name: Trips
    description: >-
      Mission-trip management: trips, participants, budgets, tasks,
      e-signatures, fundraising milestones, and background checks.
  - name: Communications
    description: >-
      Email templates, SMS, newsletters, donor email manager, and per-donor
      notes.
  - name: Payments
    description: >-
      Payment-gateway management (Stripe, PayPal, Flutterwave, QuickBooks).
      Excludes inbound webhooks — see the Webhooks tag.
  - name: Reports
    description: Dashboards, analytics, scheduled reports, and exports.
  - name: Admin
    description: >-
      Client-account administration: users, groups/permissions, settings,
      integrations, and account lifecycle.
  - name: Donor Portal
    description: >-
      Endpoints consumed by the donor-facing portal (donor login, dashboard,
      donation history, messages).
  - name: Recipient Portal
    description: Endpoints consumed by the recipient-facing portal.
  - name: Public
    description: >-
      Unauthenticated public endpoints: donor signup, public trip pages,
      peer-to-peer campaigns, public checkout.
  - name: Webhooks
    description: >-
      Inbound webhooks from third parties (Stripe, PayPal, Flutterwave, Checkr,
      DropboxSign). Annotated minimally for reference; payload shapes are owned
      by the upstream provider.
  - name: Client
    description: Client
  - name: Email Settings
    description: Email Settings
  - name: Admin Dashboard
    description: Admin Dashboard
  - name: Historical Archived Updates
    description: Historical Archived Updates
  - name: Team & access
    description: Team & access
  - name: Files
    description: Files
  - name: Wrapped
    description: Wrapped
  - name: Donor SignUp
    description: Donor SignUp
  - name: Frontend
    description: Frontend
  - name: User
    description: User
paths:
  /frontend/checkout/campaign/{client_id}/{program_id}/{session_id}:
    post:
      tags:
        - Public
      summary: Process a campaign checkout
      description: >-
        Completes public campaign, peer-to-peer or trip checkout and creates or
        reuses the donor record. Existing donor emails require a verified donor
        session before payment; checkout accepts a single recipient or a
        designation cart plus optional extra gifts. Payment admission,
        fixed-level sponsorship selections and public donor-form rules are
        checked before creating donations or commitments. A future start date
        can defer charging, and bank accounts awaiting verification produce a
        pending success state rather than a completed payment.
      operationId: postCheckoutCampaign
      parameters:
        - name: client_id
          in: path
          description: >-
            Client owning the program, recipients, donor form and payment
            configuration.
          required: true
          schema:
            type: integer
          example: 207
        - name: program_id
          in: path
          description: >-
            Campaign or trip program used to resolve checkout settings and the
            public donor form.
          required: true
          schema:
            type: integer
          example: 11
        - name: session_id
          in: path
          description: >-
            Frontend session containing checkout state. Existing donors must use
            the session that verified their email/account; the response returns
            the resulting donor session.
          required: true
          schema:
            type: string
          example: checkout-session
      requestBody:
        description: >-
          Email and method_signup are always required. Supply a non-empty
          designations cart, or entity_id plus amount or donation_amount. Public
          donor identity and custom form fields can be required for
          unverified/new donors; payment fields depend on the chosen processor
          and whether a verified saved method or completed charge is supplied.
        required: true
        content:
          application/json:
            schema:
              required:
                - email
                - method_signup
              properties:
                email:
                  description: >-
                    Required donor email; existing accounts require verification
                    before completing checkout.
                  type: string
                  format: email
                  example: jane@example.org
                method_signup:
                  description: >-
                    Required payment-method code passed to the configured
                    donation processor.
                  type: string
                  example: '3'
                type:
                  description: >-
                    Normalized donor identity type. Public identity validation
                    applies when the donor is not already verified.
                  type: string
                  enum:
                    - INDIVIDUAL
                    - ORGANIZATION
                  example: INDIVIDUAL
                organization_name:
                  description: >-
                    Organization donor name; required by identity validation for
                    organization records.
                  type: string
                  maxLength: 255
                  example: Acme Foundation
                policy_revision:
                  description: >-
                    Optional public donor-form revision; a stale supplied
                    revision returns 409 when standardized field policy is
                    checked.
                  type: string
                  example: current-form-revision
                entity_id:
                  description: >-
                    Recipient id required when a designations cart is not
                    supplied.
                  type: integer
                  example: 4711
                amount:
                  description: >-
                    Single-recipient decimal amount. Required without
                    donation_amount unless a designation cart is supplied.
                  type: number
                  minimum: 0.01
                  example: 35
                donation_amount:
                  description: >-
                    Legacy single-recipient amount alias; required without
                    amount unless a designation cart is supplied.
                  type: number
                  minimum: 0.01
                  example: 35
                frequency:
                  description: >-
                    Frequency label for a single-recipient gift; absent values
                    normalize to one time.
                  type: string
                  example: Every Month
                designations:
                  description: >-
                    Recipient cart. When non-empty, every row requires
                    entity_id, amount and frequency.
                  type: array
                  items:
                    required:
                      - entity_id
                      - amount
                      - frequency
                    properties:
                      entity_id:
                        description: Required recipient id admitted by this campaign.
                        type: integer
                        example: 4711
                      amount:
                        description: >-
                          Required positive decimal amount; recurring selections
                          must satisfy the program's amount policy.
                        type: number
                        minimum: 0.01
                        example: 35
                      frequency:
                        description: Required payment-frequency label.
                        type: string
                        example: one time
                      is_custom_amount:
                        description: Optional custom per-period amount selection.
                        type: boolean
                        example: false
                        nullable: true
                    type: object
                  minItems: 1
                additional_gifts:
                  description: >-
                    Extra gifts permitted by the checkout program and donor
                    form.
                  type: array
                  items:
                    required:
                      - designation_id
                      - amount
                    properties:
                      designation_id:
                        description: Required client-owned designation id.
                        type: integer
                        example: 88
                      amount:
                        description: Required positive decimal gift amount.
                        type: number
                        minimum: 0.01
                        example: 10
                      attach_to_other_entity:
                        description: >-
                          Whether program routing should attach this gift to
                          another recipient.
                        type: boolean
                        example: false
                        nullable: true
                      other_entity_id:
                        description: >-
                          Optional recipient id admitted by additional-gift
                          routing.
                        type: integer
                        example: 4711
                        nullable: true
                    type: object
                  nullable: true
                paymentMethod:
                  description: >-
                    Payment family. credit_card requires card details unless
                    payment_method or a verified Flutterwave completion is
                    supplied.
                  type: string
                  example: credit_card
                payment_method:
                  description: >-
                    Saved/provider payment method. For credit_card, this
                    replaces the raw card-field requirement.
                  type: string
                  example: pm_saved_method
                first_name:
                  description: >-
                    Required for direct credit-card entry without
                    payment_method; may also be required by the public donor
                    form.
                  type: string
                  example: Jane
                last_name:
                  description: >-
                    Required for direct credit-card entry without
                    payment_method; may also be required by the public donor
                    form.
                  type: string
                  example: Donor
                number:
                  description: >-
                    Card number required for direct credit-card entry without
                    payment_method.
                  type: string
                  example: '4242424242424242'
                cvv:
                  description: >-
                    Card verification value required for direct credit-card
                    entry without payment_method.
                  type: string
                  example: '123'
                expiryMonth:
                  description: >-
                    Card expiry month required for direct credit-card entry
                    without payment_method.
                  type: string
                  example: '12'
                expiryYear:
                  description: >-
                    Card expiry year required for direct credit-card entry
                    without payment_method.
                  type: string
                  example: '2030'
                check_number:
                  description: >-
                    Optional check reference; validator rule
                    nullable|string|max:100.
                  type: string
                  maxLength: 100
                  example: '1042'
                  nullable: true
                next:
                  description: >-
                    Future recurring start date. A valid date after today defers
                    the immediate charge.
                  type: string
                  format: date
                  example: '2027-01-15'
                flutterwave_v4_charge_id:
                  description: >-
                    Completed Flutterwave charge id; server-held state and
                    provider status must match the checkout.
                  type: string
                  example: chg_checkout
              type: object
              additionalProperties: true
      responses:
        '200':
          description: >-
            Checkout accepted, scheduled for a future date or saved pending bank
            verification. Inspect success_state before treating the payment as
            completed.
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Success: Donation has been Added'
                  donor:
                    properties:
                      id:
                        type: integer
                        example: 12345
                      username:
                        type: string
                        example: jane@example.org
                      email:
                        type: string
                        example: jane@example.org
                    type: object
                  session_id:
                    type: string
                    example: donor-session
                  session_logged_in:
                    type: boolean
                    example: true
                  redirect:
                    type: string
                    example: /frontend/donor_view/207/11/donor-session
                  success_state:
                    description: >-
                      Checkout receipt/status details, including deferred or
                      pending bank-verification outcomes.
                    type: object
                type: object
        '400':
          description: >-
            Donor form or payment method is missing, provider payment was not
            accepted, or donation creation failed.
        '401':
          description: PayPal client authentication failed.
        '404':
          description: >-
            Program, recipient, checkout charge state or campaign selection was
            not found.
        '406':
          description: >-
            The existing donor has no usable payment method for the requested
            card checkout.
        '409':
          description: >-
            The public donor-form revision changed or the Stripe account is
            restricted.
        '422':
          description: >-
            Input, donor verification, designation, recurring amount or
            completed-charge validation failed.
        '500':
          description: An unexpected checkout or provider failure occurred.
        '502':
          description: Flutterwave completed-charge verification failed.
        '503':
          description: The selected Stripe payment processor is unavailable.
      security: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.