Banked

The Banked Developer Hub

Welcome to Banked's developer hub. You'll find comprehensive guides and documentation to help you get going with Banked as quickly as possible, as well as support in case you get stuck. Let's jump right in!

Get Started    

Creating a payment session

This page will help take your first steps with Banked. You'll be up and running in no time.

1. Create a Developer Account

Sign up for a developer account and get access to the Banked console. From here you can setup your business, and start taking payments.

2. Get Test Keys

After activating your account you are able to access your API test keys, you can use these to create payments in our sandbox environment where no money will be transferred to/from providers.

To use the examples below, replace YOUR_API_KEY with your own.

3. Generate a Payment Session

The following cURL command creates a PaymentSession which contains a single item. Remember to Replace YOUR_API_KEY with your test key, and YOUR_API_SECRET with your test secret

curl --location --request POST "https://api.banked.com/v2/payment_sessions" \
  --header "Content-Type: application/json" \
  --user "YOUR_API_KEY:YOUR_API_SECRET" \
  --data "{
    \"reference\": \"Illuminate\",
    \"success_url\": \"http://example.com/success\",
    \"error_url\": \"http://example.com/error\",
    \"line_items\": [
      {
        \"name\": \"Candles\",
        \"amount_cents\": 100,
        \"currency\": \"GBP\",
        \"quantity\": 4
      }
    ],
    \"payee\": {
      \"name\": \"Gerald Wiley\",
      \"account_number\": \"12345678\",
      \"sort_code\": \"123456\"
	  }
}"

After running this in your terminal, you'll see the response will return a PaymentSession object with the URL required to access the web checkout and complete the payment.

{
    "amount": 400,
    "created_at": "2019-11-01 15:48:26 UTC",
    "currency": "GBP",
    "end_to_end_id": "728d061b-8e47-4052-be4f-5f9bcdee39ff",
    "error_url": "http://example.com/error",
    "id": "1ae1ce03-dfa9-4593-b487-65c656991cb5",
    "line_items": [
        {
            "amount_cents": 100,
            "currency": "GBP",
            "description": null,
            "name": "Candles",
            "quantity": 4
        }
    ],
    "live": true,
    "payee": {
        "account_number": "12345678",
        "name": "Gerald Wiley",
        "sort_code": "123456"
    },
    "reference": "Illuminate",
    "state": "awaiting_payer",
    "success_url": "http://example.com/success",
    "url": "https://banked.me/pay/1ae1ce03-dfa9-4593-b487-65c656991cb5"
}

You can also include the optional payer field when creating a payment session, this will mean your customer will skip the first screen of Banked's checkout and go straight to the bank selection screen.

4. Checkout with the Mock Bank

Using the provided URL to access the web checkout. You can see details of the PaymentSession and progress through the full checkout flow as a real customer would.

The key difference is we provide a 'mock' bank for developers to test with, which doesn't require the need for a real UK bank account. It also offers the ability to test pending and failed PaymentSessions without any money moving between providers.

5. View Payment Status

The console provides a list of PaymentSessions that have been created. You can toggle between live / test mode, to view PaymentSessions generated with test keys.

6. Going Live

Click the 'Go live' link in the console to start our go live process.

Updated 7 days ago


Creating a payment session


This page will help take your first steps with Banked. You'll be up and running in no time.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.