An overview of ways to pay.

To place an order via the API, you need to specify a funding source, which represents a way to pay for that order.

Available funding sources

Balance

Your Tremendous balance gets debited for each order you place. This is the most common way to pay for orders via API.

You can look up the funds available in your balance by logging in via the UI, and going to BillingAccount balance.

You can also do so programmatically by querying the funding sources endpoint:

curl --url 'https://testflight.tremendous.com/api/v2/funding_sources' \
     --header 'Authorization: Bearer YOUR-API-KEY'
{
  "funding_sources": [
    {
      "method": "balance",
      "id": "GCTHLCMFVYMD",
      "meta": {
        "available_cents": 600000,
        "pending_cents": 0
      }
    }
  ]
}

You can fund your balance with an ACH deposit, wire, or a credit card. Log into the Tremendous UI in order to make a deposit.

Commercial invoicing

With commercial invoicing, you'll be invoiced on a regular schedule for rewards sent. Commercial invoices can be auto-debited from a bank account via ACH.

To set up commercial invoicing, please speak to our sales team. When this is enabled, the option will show up in your funding sources.

Bank account

Your bank account gets debited via ACH for each order you place. If you are sending large numbers of orders via the API, we'd recommend contacting sales for other funding options.

To add a bank account, log into the dashboard UI.

🚧

Credit cards not available for API orders

Credit card orders are currently only supported via the web UI. If you'd like to pay via credit card, you can fund your balance using a credit card, and then use the balance as a funding source for the order.

Changing your funding source

To change your funding source, you'll need to do the following:

  1. Enable the funding source. This might mean adding a bank account via the dashboard, or speaking to sales to enable commercial invoicing.
  2. Query the funding_sources resource to find the ID of the funding source. Choose the ID of the funding source you'd like to use from the results of the query.
curl --url 'https://testflight.tremendous.com/api/v2/funding_sources' \
     --header 'Authorization: Bearer YOUR-API-KEY'
{
  "funding_sources": [
    {
      "id": "3SZHCQGNNVGH",
      "method": "bank_account",
      "meta": {
        "accountholder_name": "Kapil Kale",
        "account_type": "checking",
        "bank_name": null,
        "account_number_mask": "1786",
        "account_routing_mask": "0661",
        "refundable": false,
        "last_payment_failed_at": null
      }
    },
    {
      "method": "invoice",
      "type": "COMMERCIAL",
      "id": "4G1IPSQINMMV"
    },
    {
      "method": "balance",
      "id": "GCTHLCMFVYMD",
      "meta": {
        "available_cents": 600000,
        "pending_cents": 0
      }
    }
  ]
}
  1. Replace the funding_source_id in your API call to /api/v2/orders:
curl --url 'https://testflight.tremendous.com/api/v2/orders' \
     --header 'Authorization: Bearer YOUR-API-KEY' \
     --header 'Content-Type: application/json' \
     --data '
{
     "payment": {
          "funding_source_id": "YOUR-SELECTED-SOURCE-ID"
     },
     "rewards": [
          {
               "value": {
                    "denomination": 50
               },
               "delivery": {
                    "method": "EMAIL"
               },
               "recipient": {
                    "name": "Jane Doe",
                    "email": "[email protected]"
               },
               "products": [
                    "OKMHM2X2OHYV"
               ]
          }
     ]
}
'