> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.crowdchange.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Process Transaction

> Submit a CrowdChange donation transaction with a payment token from your processor to charge the donor and record the donation against a campaign.

## Body

<ParamField body="amount" type="number" required>
  Full amount of transaction in xxx.xx format.
</ParamField>

<ParamField body="frequency" type="string" required>
  Payment frequency. Allowed values: `once`, `month`, `year`
</ParamField>

<ParamField body="email" type="string">
  User's email.
</ParamField>

<ParamField body="fundraiser_id" type="integer" required>
  Fundraiser / Campaign ID.
</ParamField>

<ParamField body="card" type="object" required>
  Card information.

  <Expandable title="properties">
    <ParamField body="type" type="string" required>
      Allowed values: `VI`, `VISA`, `MC`, `AMEX`, `DC`, `DISC`, `JCB`, `CUP`
    </ParamField>

    <ParamField body="token" type="string" required>
      Credit card token received from payment processor.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="billing" type="object" required>
  Billing information.

  <Expandable title="properties">
    <ParamField body="is_foundation" type="boolean">
      Whether the payment is on behalf of a foundation.
    </ParamField>

    <ParamField body="title" type="string">
      Title / Honorifics. For example, Mr. / Miss / Mrs.
    </ParamField>

    <ParamField body="business_name" type="string">
      Business Name
    </ParamField>

    <ParamField body="first_name" type="string" required>
      First Name.
    </ParamField>

    <ParamField body="last_name" type="string" required>
      Last Name.
    </ParamField>

    <ParamField body="address" type="string" required>
      Street Address.
    </ParamField>

    <ParamField body="city" type="string" required>
      City.
    </ParamField>

    <ParamField body="state" type="string" required>
      Two letter State or province..
    </ParamField>

    <ParamField body="zip" type="string" required>
      Zip or Postal code.
    </ParamField>

    <ParamField body="country" type="string" required>
      ISO 3166-1 alpha-2 country code.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="custom_data" type="object">
  Additional transaction data.
</ParamField>

<ParamField body="tax_receipt" type="object">
  Tax receipt on behalf of another person info.

  <Expandable title="properties">
    <ParamField body="title" type="string">
      Title / Honorifics. For example, Mr. / Miss / Mrs.
    </ParamField>

    <ParamField body="business_name" type="string">
      Business Name
    </ParamField>

    <ParamField body="first_name" type="string">
      First Name.
    </ParamField>

    <ParamField body="last_name" type="string">
      Last Name.
    </ParamField>

    <ParamField body="email" type="string">
      Email.
    </ParamField>

    <ParamField body="address" type="string">
      Street Address.
    </ParamField>

    <ParamField body="city" type="string">
      City.
    </ParamField>

    <ParamField body="state" type="string">
      Two letter State or province..
    </ParamField>

    <ParamField body="zip" type="string">
      Zip or Postal code.
    </ParamField>

    <ParamField body="country" type="string">
      ISO 3166-1 alpha-2 country code.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="tribute" type="object">
  Tax receipt on behalf of another person info.

  <Expandable title="properties">
    <ParamField body="fundraiser_tribute_id" type="integer">
      Tribute ID.
    </ParamField>

    <ParamField body="type" type="string">
      Tribute Type. Allowed values: `in_honor`, `in_memory`, `donation`
    </ParamField>

    <ParamField body="honoree" type="string">
      Honoree.
    </ParamField>

    <ParamField body="message" type="string">
      Message.
    </ParamField>

    <ParamField body="method" type="string">
      Delivery method Allowed values: `mail`, `email`, `sms`
    </ParamField>

    <ParamField body="address" type="object">
      Address.

      <Expandable title="properties">
        <ParamField body="address" type="string">
          Street Address.
        </ParamField>

        <ParamField body="city" type="string">
          City.
        </ParamField>

        <ParamField body="state" type="string">
          Two letter State or province..
        </ParamField>

        <ParamField body="zip" type="string">
          Zip or Postal code.
        </ParamField>

        <ParamField body="country" type="string">
          ISO 3166-1 alpha-2 country code.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="email" type="string">
      Email.
    </ParamField>

    <ParamField body="phone" type="string">
      Phone Number.
    </ParamField>

    <ParamField body="name" type="string">
      Name.
    </ParamField>

    <ParamField body="donor_copy" type="boolean">
      Send copy to donor.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="extra" type="object">
  Extra information.

  <Expandable title="properties">
    <ParamField body="mail_receipt" type="boolean">
      Send receipt by mail
    </ParamField>

    <ParamField body="donation_setting_item_id" type="integer">
      Impact Statement ID.
    </ParamField>

    <ParamField body="installments" type="object">
      Fixed installment payment. When enabled, the total donation is split into equal monthly payments. Requires `frequency` to be `once`, the fundraiser to have installment payments enabled, and a recurring-capable payment processor (Stripe or Paysafe). The first payment is charged immediately; the rest are charged on the chosen `day` of each subsequent month. The `amount` field on the request is ignored and replaced server-side with `total_amount / duration`.

      <Expandable title="properties">
        <ParamField body="total_amount" type="number">
          Total donation amount to be split across all installments, in `xxx.xx` format. Each installment is charged `total_amount / duration` (rounded to 2 decimals).
        </ParamField>

        <ParamField body="duration" type="integer">
          Number of monthly installments. Must be one of the durations configured on the fundraiser (defaults to `3`, `6`, or `12`).
        </ParamField>

        <ParamField body="day" type="integer">
          Day of the month each installment is charged after the first payment. Must be one of the days configured on the fundraiser (defaults to `1` or `15`).
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="mail" type="object">
  Mail information.

  <Expandable title="properties">
    <ParamField body="same_as_billing" type="boolean">
      Address is the same as billing address
    </ParamField>

    <ParamField body="address" type="string">
      Street Address.
    </ParamField>

    <ParamField body="city" type="string">
      City.
    </ParamField>

    <ParamField body="state" type="string">
      Two letter State or province..
    </ParamField>

    <ParamField body="zip" type="string">
      Zip or Postal code.
    </ParamField>

    <ParamField body="country" type="string">
      ISO 3166-1 alpha-2 country code.
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="id" type="integer">
  Transaction ID.
</ResponseField>

<ResponseField name="ref_id" type="string">
  Reference or confirmation ID from the payment processor.
</ResponseField>

<ResponseField name="amount" type="number">
  Full amount of the transaction.
</ResponseField>

<ResponseField name="currency" type="string">
  Currency code.
</ResponseField>

<ResponseField name="currency_symbol" type="string">
  Currency symbol.
</ResponseField>

<ResponseField name="frequency" type="string">
  Payment frequency. Allowed values: `once`, `month`, `year`
</ResponseField>

<ResponseField name="fundraiser_id" type="integer">
  Fundraiser / Campaign ID.
</ResponseField>

<ResponseField name="parent_id" type="integer">
  Parent transaction ID for recurring or installment payments, otherwise `null`.
</ResponseField>

<ResponseField name="fundraiser_page_id" type="integer">
  Personal page ID the transaction is attributed to, if any.
</ResponseField>

<ResponseField name="fundraiser_team_id" type="integer">
  Team ID the transaction is attributed to, if any.
</ResponseField>

<ResponseField name="organization_id" type="integer">
  Organization ID.
</ResponseField>

<ResponseField name="fundraiser_name" type="string">
  Fundraiser / Campaign name.
</ResponseField>

<ResponseField name="organization_name" type="string">
  Organization name.
</ResponseField>

<ResponseField name="organization_code" type="string">
  Organization's custom ID.
</ResponseField>

<ResponseField name="user_id" type="integer">
  User ID.
</ResponseField>

<ResponseField name="email" type="string">
  Donor's contact email.
</ResponseField>

<ResponseField name="mail" type="object">
  Mailing address for the receipt, returned only when a mailed receipt was requested. Otherwise `null`.

  <Expandable title="properties">
    <ResponseField name="address" type="string">
      Street address.
    </ResponseField>

    <ResponseField name="city" type="string">
      City.
    </ResponseField>

    <ResponseField name="state" type="string">
      State or province.
    </ResponseField>

    <ResponseField name="zip" type="string">
      Zip or postal code.
    </ResponseField>

    <ResponseField name="country" type="string">
      Country code.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="statement_descriptor" type="string">
  Statement descriptor that appears on the donor's card statement.
</ResponseField>

<ResponseField name="summary" type="object">
  Breakdown of the transaction amount by category.

  <Expandable title="properties">
    <ResponseField name="amount_covered_fee" type="number">
      Processing fee covered by the donor.
    </ResponseField>

    <ResponseField name="amount_custom_fee" type="number">
      Custom fees applied to the transaction.
    </ResponseField>

    <ResponseField name="amount_donation" type="number">
      Donation amount.
    </ResponseField>

    <ResponseField name="amount_apparel" type="number">
      Amount spent on apparel.
    </ResponseField>

    <ResponseField name="amount_ticket" type="number">
      Amount spent on tickets.
    </ResponseField>

    <ResponseField name="amount_registration" type="number">
      Amount spent on registration.
    </ResponseField>

    <ResponseField name="amount_sponsor" type="number">
      Amount spent on sponsorships.
    </ResponseField>

    <ResponseField name="amount_cards" type="number">
      Amount spent on e-cards.
    </ResponseField>

    <ResponseField name="frequency" type="string">
      Payment frequency. Allowed values: `once`, `month`, `year`
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="upsell" type="object">
  Recurring upsell details, when an upsell was presented. Otherwise `null`.
</ResponseField>

<ResponseField name="promo_code" type="string">
  Promo code applied to the transaction, if any.
</ResponseField>

<ResponseField name="billing_address" type="object">
  Billing details for the transaction.

  <Expandable title="properties">
    <ResponseField name="name" type="string">
      Full billing name.
    </ResponseField>

    <ResponseField name="email" type="string">
      Billing email.
    </ResponseField>

    <ResponseField name="business_name" type="string">
      Business name.
    </ResponseField>

    <ResponseField name="title" type="string">
      Title / honorific.
    </ResponseField>

    <ResponseField name="first_name" type="string">
      First name.
    </ResponseField>

    <ResponseField name="last_name" type="string">
      Last name.
    </ResponseField>

    <ResponseField name="address" type="string">
      Street address.
    </ResponseField>

    <ResponseField name="city" type="string">
      City.
    </ResponseField>

    <ResponseField name="state" type="string">
      State or province.
    </ResponseField>

    <ResponseField name="zip" type="string">
      Zip or postal code.
    </ResponseField>

    <ResponseField name="country" type="string">
      Country code.
    </ResponseField>

    <ResponseField name="phone" type="string">
      Phone number.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="dtd" type="object">
  Double the Donation employer matching details, when provided. Otherwise `null`.

  <Expandable title="properties">
    <ResponseField name="company_id" type="string">
      Double the Donation company ID.
    </ResponseField>

    <ResponseField name="entered_text" type="string">
      Employer name entered by the donor.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="created_at" type="string">
  Date and time the transaction was created.
</ResponseField>

<ResponseField name="status" type="string">
  Transaction status.
</ResponseField>

**Other responses**

| Status | Description |
| ------ | ----------- |
| `400`  | Bad Request |
| `403`  | Forbidden   |

<ResponseExample>
  ```json theme={null}
  {
    "id": 123123,
    "ref_id": "SCXXxxXxxxxxXXXx",
    "amount": 49.95,
    "currency": "USD",
    "currency_symbol": "$",
    "frequency": "once",
    "fundraiser_id": 1,
    "parent_id": null,
    "fundraiser_page_id": null,
    "fundraiser_team_id": null,
    "organization_id": 1,
    "fundraiser_name": "Gala Night",
    "organization_name": "Crowdchange",
    "organization_code": "CrowdchangeID",
    "user_id": 120120,
    "email": "john@example.com",
    "mail": null,
    "statement_descriptor": "XXX*CC XXX",
    "summary": {
      "amount_covered_fee": 1.95,
      "amount_custom_fee": 0,
      "amount_donation": 48,
      "amount_apparel": 0,
      "amount_ticket": 0,
      "amount_registration": 0,
      "amount_sponsor": 0,
      "amount_cards": 0,
      "frequency": "once"
    },
    "upsell": null,
    "promo_code": null,
    "billing_address": {
      "name": "Mr. John Snow",
      "email": "john@example.com",
      "business_name": null,
      "title": "Mr.",
      "first_name": "John",
      "last_name": "Snow",
      "address": "123 Main St",
      "city": "Toronto",
      "state": "ON",
      "zip": "M5V2T6",
      "country": "CA",
      "phone": null
    },
    "dtd": null,
    "created_at": "2024-01-01 12:00:00",
    "status": "received"
  }
  ```
</ResponseExample>
