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

# Add funds through credit card

> Tops up your account balance with a credit card payment. Use the web interface
to place a credit card on file for each currency you plan to fund. The success
response provides your updated account balance.




## OpenAPI

````yaml /api-reference/openapi.yaml post /funds
openapi: 3.1.0
info:
  title: Giftbit API
  version: v1
  description: >
    Giftbit's REST API lets you automatically order rewards and send them to
    your

    recipients. Delivery can be handled either by links that integrate into
    another

    system's workflow, or by emails sent through the Giftbit system.


    Authenticate every request with a bearer token in the `Authorization`
    header.

    Only an HTTP `200` means success; all non-`200` responses share a common
    error body.
  contact:
    name: Giftbit Support
    email: testbed@giftbit.com
    url: https://www.giftbit.com/api-documentation
servers:
  - url: https://api-testbed.giftbit.com/papi/v1
    description: Testbed
  - url: https://api.giftbit.com/papi/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Ping
    description: Test your authentication and check the health of the Giftbit API.
  - name: Brands
    description: List reward brands and retrieve extended information about a single brand.
  - name: Regions
    description: List the regions used to filter brands and request Full Catalog rewards.
  - name: Email Orders
    description: Order one or more rewards delivered to recipients by Giftbit email.
  - name: Shortlink Orders
    description: Order branded shortlink rewards that include a customized landing page.
  - name: Direct Link Orders
    description: >-
      Order minimally branded direct link rewards returned immediately in the
      response.
  - name: Embedded Rewards
    description: >-
      Order a single in-app reward for immediate delivery in your app or
      website.
  - name: Funds
    description: Retrieve your account balance and top it up with a credit card payment.
  - name: Rewards
    description: List, retrieve, resend, and cancel individual rewards.
paths:
  /funds:
    post:
      tags:
        - Funds
      summary: Add funds through credit card
      description: >
        Tops up your account balance with a credit card payment. Use the web
        interface

        to place a credit card on file for each currency you plan to fund. The
        success

        response provides your updated account balance.
      operationId: add-funds-through-credit-card
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - currencyisocode
                - fund_amount_in_cents
                - id
              properties:
                currencyisocode:
                  type: string
                  enum:
                    - CAD
                    - USD
                  description: Which currency to add funds in.
                fund_amount_in_cents:
                  type: integer
                  description: >-
                    Amount of money to fund in cents. Subject to minimums in the
                    web application.
                id:
                  type: string
                  description: A unique identifier for the funding event assigned by you.
            example:
              currencyisocode: USD
              fund_amount_in_cents: 25000
              id: clientProvidedId_abc123
      responses:
        '200':
          description: Funds updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FundsResponse'
              example:
                info:
                  code: INFO_FUNDS_ADDED
                  name: Funds updated
                  message: Your funds have been updated.
                fundsbycurrency:
                  USD:
                    available_in_cents: 196525
                    pending_in_cents: 0
                    reserved_in_cents: 41500
                  CAD:
                    available_in_cents: 6600
                    pending_in_cents: 0
                    reserved_in_cents: 1000
                  PRO:
                    available_in_cents: 0
                    pending_in_cents: 0
                    reserved_in_cents: 0
        '400':
          description: Invalid fund amount.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: ERROR_FUNDS_INVALID_FUND_AMOUNT
                  name: Invalid fund amount.
                  message: >-
                    10000 is an invalid fund amount. Minimum in cents: 25000,
                    Maximum in cents: 1000000
                status: 400
        '402':
          description: Credit card transaction failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: ERROR_FUNDS_CARD_ERROR
                  name: Credit card transaction failed
                  message: >-
                    Transaction failed. We were unable to charge your card. Go
                    to web app to update your credit card.
                status: 402
components:
  schemas:
    FundsResponse:
      type: object
      properties:
        info:
          $ref: '#/components/schemas/Info'
        fundsbycurrency:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/CurrencyFunds'
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
        status:
          type: integer
          description: An integer that matches the HTTP status code returned.
    Info:
      type: object
      description: Status information returned on successful requests.
      properties:
        code:
          type: string
          description: An enum-style status code for the request.
        name:
          type: string
          description: Human-readable status name.
        message:
          type: string
          description: Request-context-specific message.
    CurrencyFunds:
      type: object
      properties:
        available_in_cents:
          type: integer
          description: Available funds — your purchasing power for new reward orders.
        pending_in_cents:
          type: integer
          description: Funds sent by you but not yet fully processed by Giftbit.
        reserved_in_cents:
          type: integer
          description: >-
            Funds held to cover outstanding, unclaimed reward offers within
            their claim period.
    Error:
      type: object
      properties:
        code:
          type: string
          description: An enum-style error code that will not change.
        name:
          type: string
          description: Human-readable error name.
        message:
          type: string
          description: Request-specific information about the error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Send your API token prefixed by `Bearer ` in the `Authorization` header.

````