Link Search Menu Expand Document

First Steps

An overview of the steps to start accepting payments.

Table of Contents

  1. Register a Sandbox Account
  2. Create Secret and Publishable API Keys
  3. Create or Retrieve a Connected Account
  4. Process Your First Test Payment
    1. Create a Payment Method
    2. Create and Confirm a Payment Intent

Register a Sandbox Account

Get started with Tilled by creating a free sandbox account. Your test account gives you access to the sandbox Partner Console, which is an online dashboard where you can manage your integration.

Your sandbox Partner Console account allows you to:

  • Make test payments
  • Invite team members
  • Generate API keys
  • Setup webhooks

Create Secret and Publishable API Keys

Create API keys from our Partner Console to be used in your API calls.

Create or Retrieve a Connected Account

View your list of merchant accounts and either use the auto-created Shovel Shop (demo) account or create your own merchant account. Note: prefix the name of the account with an asterisk (e.g. *ACME Inc.) to bypass needing to submit an onboarding form.

Process Your First Test Payment

Create a Payment Method

When creating payment methods of type=card, instead of passing card numbers directly, we strongly recommend using Tilled.js. We’ve created a simple payment example project using Node.js to help integrate Tilled.js.

However, if you’d still like to create a payment method via the API with test card numbers:

$ curl -X POST https://sandbox-api.tilled.com/v1/payment-methods \
-H "tilled-api-key: {{SECRET_KEY}}" \
-H "tilled-account: {{MERCHANT_ACCOUNT_ID}}" \
-H "Content-Type: application/json" \
-d '{"card":{"number":"4111111111111111","exp_month":8,"exp_year":2026},"billing_details":{"address":{"zip":"80301","country":"US"},"name":"John Doe"},"type":"card"}'

Example response:

{
  "card": {
    "brand": "visa",
    "last4": "1111",
    "funding": "credit",
    "exp_year": 2026,
    "exp_month": 8,
    "holder_name": "John Doe"
  },
  "chargeable": true,
  "id": "pm_cUfzDJXONNK9bsm4veVXQ",
  "type": "card",
  "expires_at": "2021-11-11T00:00:02.331Z", // 15 minutes after creation
  "billing_details": {
    "name": "John Doe",
    "address": { "zip": "80301", "country": "US" }
  },
  ...
}

Create and Confirm a Payment Intent

$ curl -X POST https://sandbox-api.tilled.com/v1/payment-intents \
-H "tilled-api-key: {{SECRET_KEY}}" \
-H "tilled-account: {{MERCHANT_ACCOUNT_ID}}" \
-H "Content-Type: application/json" \
-d '{ "amount": 1099, "currency": "usd", "payment_method_types": ["card"], "payment_method_id": "pm_uCFzDJXONNK9bsm4veVXQ", "confirm": true }'

Example response:

{
  "id": "pi_JL8QI8hXvkI33177EOKFw",
  "amount": 1099,
  "currency": "usd",
  "status": "succeeded",
  "payment_method": {
    ...
  },
  "charges": [
    {
      "id": "ch_yQ36dzG4Katn8WEzuhTmy",
      "status": "succeeded",
      "amount_captured": 1099,
      "captured_at": "2021-11-11T00:04:07.000Z",
      ...
    }
  ],
  ...
}


Copyright © 2022 Tilled