Quickstart

This guide will get you all set up and ready to use the TapTree API. We'll cover how to get started and how to make your first API request. We'll also look at where to go next to find all the information you need to take full advantage of our powerful REST API.

Making your first API request

Below, you can see a minimal example of creating a payment intent using the TapTree API.

Request

POST
/v1/payments
curl https://api.taptree.org/v1/payments \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
        "amount": { "value": "15.20", "currency": "eur" },
        "description": "Order #12345",
        "return_url": "https://example.com/return"
      }'

Response

{
  "object": "payment",
  "id": "pay_AzoSgo2h7mB",
  "org_id": "org_5A8hsNqGGyW",
  "acceptor_id": "acceptor_Aa54Z3THuFj",
  "status": "open",
  "created_at": "2023-12-11T00:40:56.685Z",
  "expires_at": "2023-12-11T01:00:56.685Z",
  "mode": "test",
  "description": "order #2",
  "amount": {
    "value": "15.00",
    "currency": "eur"
  },
  "sequence_type": "one_off",
  "capture_method": "automatic",
  "return_url": "https://example.com/return",
  "available_payment_methods": {
    "card": {
      "impact": {
        "unit": "g CO2",
        "value": "1081"
      }
    },
  },
  "links": {
    "api": {
      "href": "https://api.taptree.org/v1/payments/pay_AzoSgo2h7mB",
      "type": "application/json"
    },
    "checkout": {
      "href": "https://checkout.taptree.org/pay_AzoSgo2h7mB",
      "type": "text/html"
    },
    "dashboard": {
      "href": "https://taptree.org/dashboard/org_5A8hsNqGGyW/payments/pay_AzoSgo2h7mB",
      "type": "text/html"
    }
  }
}

What's next?

Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the TapTree API:

Was this page helpful?