FIDEL API Reference

Welcome to the FIDEL API Reference. You'll find comprehensive guides and documentation to help you start working with FIDEL API as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

Introduction

 

Welcome to FIDEL API. 👋

You can use the API to access all endpoints, such as the Locations endpoint to create locations and add merchantIds, or the Transaction endpoint to get transactions from a specific program or location.

The API is organised around REST. JSON is returned by all API responses, including errors. In all API requests, you must set the content-type HTTP header to application/json. All API requests must be made over HTTPS. Calls made over HTTP will fail.

 

All API URLs referenced in this documentation start with the following base URL:

https://api.fidel.uk/v1
Suggest Edits

Authentication

 

FIDEL API accounts have test mode and live mode API keys. To change modes just use the appropriate key to get a live or test object. You can find your API keys in the account page of your FIDEL dashboard.

Authenticate your API requests by including your test or live secret API key in the request header. Create an HTTP header named fidel-key and set your secret key as the value.

You should use the public keys on the SDKs and the secret keys to authenticate API requests.

curl -X GET \
  https://api.fidel.uk/v1/transactions/85cdb967-5c5d-45e3-afdd-d0a9e792bf0f \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'

Do not share or include your secret API keys on client side code.

The API returns standard HTTP response codes to indicate success or failure of the API requests. For errors, we also return a customised error message inside the JSON response. You can see the returned HTTP status codes below.

HTTP Status Codes

Code
Title
Description

200

OK

Request successful.

201

Created

Resource successfully created.

204

No Content

Request successful with no content returned.

400

Bad Request

Request was unacceptable.

401

Unauthorised

API key provided is invalid.

402

Request Failed

Valid parameters but the request failed.

404

Not Found

Resource does not exist.

500, 502, 503, 504

Server Errors

Something went wrong with the FIDEL API.

All objects have created and updated date properties. Dates are encoded as strings following the ISO 8601 standard. (2017-06-01T17:18:11.345Z)

On all List endpoints, objects can be filtered by date using the from and to parameters.

curl -X GET \
  'https://api.fidel.uk/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/transactions?from=2019-10-26&to=2019-10-27' \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'

On the List Transactions endpoint the date filtering is applied on the datetime property considering no timezone information. You can access On the other List endpoints the filtering is applied on the created property.

Suggest Edits

Versioning

 

In order to migrate to a newer version of the API you can use a custom HTTP header specifying the API version you would like to request. This allows you to stay on an earlier version and test your development environments against new versions and upgrade when ready.

The Fidel-Version header allows you define in each request the version of the endpoint output. It is possible to request the current version or newer versions of the API.

Check the API changelog at https://reference.fidel.uk/docs/changelog for more information about available versions and go to https://dashboard.fidel.uk/account to upgrade to a newer version.

curl -X GET \
  https://api.fidel.uk/v1/transactions/9cc66ebe-8a18-4a00-b9cb-e1802bc6709d \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \
  -H 'fidel-version: 2019-03-05'
Suggest Edits

Pagination

 

Some API requests support fetching multiple objects. FIDEL API uses cursor-based pagination via the 'start' and 'last' parameters.

A maximum of 100 objects can be returned per request and the limit can be specified by using the 'limit' parameter. By default the 'limit' is set to 100.

curl -X GET \
  'https://api.fidel.uk/v1/transactions?limit=50' \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_8168fe13-91fb-4516-93cf-8a21e5736350'

When the response contains the ‘last’ property it means there are more objects you can fetch. To get the next objects you should set the 'start' property to the value of the 'last' property.

Remember to stringify the 'last' property before using it.

https://api.fidel.uk/v1/path-to-resource?start=${JSON.stringify(last)}

By default, the objects are returned in descending order by 'created' date. If you want to fetch the results in ascending order you can set the 'order' property with the value 'asc'.

Suggest Edits

Postman Collection

 

Postman is a GUI platform to make your API development faster and easier. You can get the FIDEL API Collection by hitting the button below.

Run in Postman

Suggest Edits

Create Brand

 
posthttps://api.fidel.uk/v1/brands
curl -X POST \
  https://api.fidel.uk/v1/brands \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \
  -d '{
    "name": "Brand B",
    "logoURL": "https://brandlogo.png",
    "metadata": {
      "customKey1": "customValue1",
      "customKey2": "customValue2"
    }
  }'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "created": "2017-06-01T10:53:07.707Z",
      "updated": "2017-06-01T10:53:07.707Z",
      "id": "762f6bed-afed-4905-8429-6ea3dd2b862d",
      "name": "Brand B",
      "logoURL": "https://brandlogo.png",
      "live": false,
      "metadata": {
        "customKey1": "customValue1",
        "customKey2": "customValue2"
      },
      "consent": true,
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b"
    }
  ],
  "resource": "/v1/brands",
  "status": 201,
  "execution": 122.34116
}

Body Params

name
string
required

Name of the Brand. 4 - 50 characters.

logoURL
string

URL of the Brand logo in GIF, JPG, JPEG or PNG format.

metadata
object
metadata.customKey
mixed type

Custom key/value.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

Create Brand User

 
posthttps://api.fidel.uk/v1/brands/brandId/programs/programId/users
curl -X POST \
  https://api.fidel.uk/v1/brands/92c00c56-c58f-49cb-8afb-05b4887cc287/programs/94593f09-5fce-4750-aae9-ab49cf124c21/users \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_live_00aff52c-86e8-4791-85cc-fe4d71fc45b7' \
  -d '{
    "email": "john+test@fidel.uk",
    "nameFirst": "John",
    "nameLast": "Test",
    "title": "Head of Growth",
    "skipInvite": false
}'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "created": "2018-04-09T17:47:38.684Z",
      "updated": "2018-04-09T17:47:38.684Z",
      "id": "a02caafd-6e33-45fe-848c-f0fedf6c3362",
      "title": "Head of Growth",
      "nameLast": "Test",
      "nameFirst": "John",
      "email": "john+test@fidel.uk",
      "accountId": "d346d574-d5c2-4a0e-8e02-ffd713fd1a8d",
      "active": false
    }
  ],
  "resource": "/v1/brands/92c00c56-c58f-49cb-8afb-05b4887cc287/programs/94593f09-5fce-4750-aae9-ab49cf124c21/users",
  "status": 201,
  "execution": 529.402777
}

Body Params

email
string
required

Company email of authorized Brand personnel to sign consent and have access to Brand transactions.

nameFirst
string
required

First name of authorised person.

nameLast
string
required
title
string
required

Title of authorised person company position.

skipInvite
boolean

If true no email is sent to the brand user and the brand consent is automatically approved.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 

Brand User

You can only create Brand Users on live environment.

Suggest Edits

Get Brand

 
gethttps://api.fidel.uk/v1/brands/brandId
curl -X GET \
  https://api.fidel.uk/v1/brands/762f6bed-afed-4905-8429-6ea3dd2b862d \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "updated": "2017-06-01T10:53:07.707Z",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "created": "2017-06-01T10:53:07.707Z",
      "id": "762f6bed-afed-4905-8429-6ea3dd2b862d",
      "metadata": {
        "customKey1": "customValue1",
        "customKey2": "customValue2"
      },
      "name": "Brand B",
      "logoUrl": "https://brandlogo.png",
      "live": false,
      "consent": true
    }
  ],
  "resource": "/v1/brands/762f6bed-afed-4905-8429-6ea3dd2b862d",
  "status": 200,
  "execution": 90.379702
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

List Brands

 
gethttps://api.fidel.uk/v1/brands
    curl -X GET \
      https://api.fidel.uk/v1/brands \
      -H 'content-type: application/json' \
      -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \
A binary file was returned

You couldn't be authenticated

{
  "count": 1,
  "items": [
    {
      "updated": "2017-06-01T10:53:07.707Z",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "created": "2017-06-01T10:53:07.707Z",
      "id": "762f6bed-afed-4905-8429-6ea3dd2b862d",
      "metadata": {
        "customKey1": "customValue1",
        "customKey2": "customValue2"
      },
      "name": "Brand B",
      "logoUrl": "https://brandlogo.png",
      "live": false,
      "consent": true
    }
  ],
  "resource": "/v1/brands",
  "status": 200,
  "execution": 137.208629
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string

test/live API secret key.

 
Suggest Edits

Delete Brand

 
deletehttps://api.fidel.uk/v1/brands/brandId
curl -X DELETE \
      https://api.fidel.uk/v1/brands/44810f80-65ea-4394-89a5-0abc9ae6c2c5 \
      -H 'content-type: application/json' \
      -H 'fidel-key: sk_live_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

No response examples available

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 

Deleting Brands on live environment

You can only delete Brands with no signed consent on live environment.

Suggest Edits

Create Program

 
posthttps://api.fidel.uk/v1/programs
curl -X POST \
  https://api.fidel.uk/v1/programs \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \
  -d '{
    "name": "Program X",
    "metadata": {
      "customKey1": "customValue1",
      "customKey2": "customValue2"
    }
  }'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "created": "2017-06-01T12:30:50.129Z",
      "updated": "2017-06-01T12:30:50.129Z",
      "id": "e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
      "submit": false,
      "metadata": {
        "customKey1": "customValue1",
        "customKey2": "customValue2"
      },
      "name": "Program X",
      "live": false,
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "active": true,
      "activeDate": "2017-06-01T12:30:50.129Z"
    }
  ],
  "resource": "/v1/programs",
  "status": 201,
  "execution": 80.291391
}

Body Params

name
string
required

Name of the Program. 4 - 50 characters.

metadata
object
metadata.customKey
mixed type

Custom key/value.

Headers

Content-Type
string
required

application/json

FIdel-Key
string
required

test/live API secret key.

 
Suggest Edits

Get Program

 
gethttps://api.fidel.uk/v1/programs/programId
curl -X GET \
  https://api.fidel.uk/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394 \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "active": true,
      "updated": "2017-06-01T12:30:50.129Z",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "activeDate": "2017-06-01T12:30:50.129Z",
      "created": "2017-06-01T12:30:50.129Z",
      "submit": false,
      "id": "e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
      "metadata": {
        "customKey1": "customValue1",
        "customKey2": "customValue2"
      },
      "name": "Program X",
      "live": false
    }
  ],
  "resource": "/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
  "status": 200,
  "execution": 125.62876
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

List Programs

 
gethttps://api.fidel.uk/v1/programs
curl -X GET \
  https://api.fidel.uk/v1/programs \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "count": 1,
  "items": [
    {
      "active": true,
      "updated": "2017-06-01T12:30:50.129Z",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "activeDate": "2017-06-01T12:30:50.129Z",
      "created": "2017-06-01T12:30:50.129Z",
      "submit": false,
      "id": "e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
      "metadata": {
        "customKey1": "customValue1",
        "customKey2": "customValue2"
      },
      "name": "Program X",
      "live": false
    }
  ],
  "resource": "/v1/programs",
  "status": 200,
  "execution": 94.714601
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

Create Location

 
posthttps://api.fidel.uk/v1/programs/programId/locations
curl -X POST \
  https://api.fidel.uk/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/locations \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \
  -d '{
    "address": "2 Soho Square", 
    "brandId": "a00461d2-d63e-407c-846c-6055e838cfe8", 
    "city": "London", 
    "countryCode": "GBR",
    "postcode": "W1D 3PX",
    "metadata": {
      "customKey1": "customValue1",
      "customKey2": "customValue2"
    }
}'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "created": "2019-01-17T18:09:20.242Z",
      "updated": "2019-01-17T18:09:20.242Z",
      "id": "957f0b4a-facd-4e45-8416-1c6468ca0c0a",
      "programId": "c51e095d-13e2-4f2c-9559-d23e4ac3c31f",
      "postcode": "W1D3PX",
      "metadata": {
        "customKey1": "customValue1",
        "customKey2": "customValue2"
      },
      "live": false,
      "currency": "GBP",
      "countryCode": "GBR",
      "city": "London",
      "brandId": "a00461d2-d63e-407c-846c-6055e838cfe8",
      "address": "2 Soho Square",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "amex": {
        "clearing": false,
        "auth": false,
        "authTransactionId": null,
        "clearingTransactionId": null,
        "status": "active"
      },
      "mastercard": {
        "clearing": false,
        "auth": false,
        "authTransactionId": null,
        "clearingTransactionId": null,
        "status": "active"
      },
      "visa": {
        "clearing": false,
        "auth": false,
        "authTransactionId": null,
        "clearingTransactionId": null,
        "status": "active"
      },
      "activeDate": "2019-01-17T18:09:20.242Z",
      "active": true
    }
  ],
  "resource": "/v1/programs/c51e095d-13e2-4f2c-9559-d23e4ac3c31f/locations",
  "status": 201,
  "execution": 247.584578
}

Body Params

address
string
required

2 - 100 characters.

brandId
string
required
city
string
required

2 - 100 characters.

countryCode
string
required
postcode
string
required

4 - 20 characters.

statusCode
string

(Only for USA locations) 2-letter US state code from the ANSI standard INCITS 38:2009

metadata
object
metadata.customKey
mixed type

Custom key/value.

Headers

Content-Type
string
required

application/json

Fidel-Key
string

test/live API secret key.

 
Suggest Edits

Get Location

 
gethttps://api.fidel.uk/v1/locations/locationId
curl -X GET \
  https://api.fidel.uk/v1/locations/957f0b4a-facd-4e45-8416-1c6468ca0c0a \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "metadata": {
        "customKey2": "customValue2",
        "customKey1": "customValue1"
      },
      "currency": "GBP",
      "postcode": "W1D3PX",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "activeDate": "2019-01-17T18:09:20.242Z",
      "countryCode": "GBR",
      "visa": {
        "clearingTransactionId": null,
        "auth": false,
        "authTransactionId": null,
        "clearing": false,
        "status": "active"
      },
      "created": "2019-01-17T18:09:20.242Z",
      "address": "2 Soho Square",
      "live": false,
      "city": "London",
      "updated": "2019-01-17T18:09:20.242Z",
      "mastercard": {
        "clearingTransactionId": null,
        "auth": false,
        "authTransactionId": null,
        "clearing": false,
        "status": "active"
      },
      "programId": "c51e095d-13e2-4f2c-9559-d23e4ac3c31f",
      "brandId": "a00461d2-d63e-407c-846c-6055e838cfe8",
      "amex": {
        "clearingTransactionId": null,
        "auth": false,
        "authTransactionId": null,
        "clearing": false,
        "status": "active"
      },
      "id": "957f0b4a-facd-4e45-8416-1c6468ca0c0a",
      "active": true
    }
  ],
  "resource": "/v1/locations/957f0b4a-facd-4e45-8416-1c6468ca0c0a",
  "status": 200,
  "execution": 123.276885
}

Path Params

merchantId
string
required

Get Location by merchantId.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

Update Location

 
puthttps://api.fidel.uk/v1/locations/locationId
curl -X PUT \
  https://api.fidel.uk/v1/locations/957f0b4a-facd-4e45-8416-1c6468ca0c0a \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \
  -d '{
    "address": "200 Soho Square", 
    "city": "London", 
    "countryCode": "GBR",
    "postcode": "W1D 4PX",
    "metadata": {
      "customKey1": "customValue1",
      "customKey2": "customValue2"
    }
}'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "metadata": {
        "customKey2": "customValue4",
        "customKey1": "customValue3"
      },
      "currency": "GBP",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "activeDate": "2019-01-17T18:09:20.242Z",
      "postcode": "W1D4PX",
      "countryCode": "GBR",
      "visa": {
        "clearingTransactionId": null,
        "auth": false,
        "authTransactionId": null,
        "clearing": false,
        "status": "active"
      },
      "created": "2019-01-17T18:09:20.242Z",
      "address": "200 Soho Square",
      "live": false,
      "city": "London",
      "updated": "2019-01-17T18:14:29.469Z",
      "mastercard": {
        "clearingTransactionId": null,
        "auth": false,
        "authTransactionId": null,
        "clearing": false,
        "status": "active"
      },
      "programId": "c51e095d-13e2-4f2c-9559-d23e4ac3c31f",
      "brandId": "a00461d2-d63e-407c-846c-6055e838cfe8",
      "amex": {
        "clearingTransactionId": null,
        "auth": false,
        "authTransactionId": null,
        "clearing": false,
        "status": "active"
      },
      "id": "957f0b4a-facd-4e45-8416-1c6468ca0c0a"
    }
  ],
  "resource": "/v1/locations/957f0b4a-facd-4e45-8416-1c6468ca0c0a",
  "status": 200,
  "execution": 118.818676
}

Body Params

address
string
required
city
string
required
countryCode
string
required
postcode
string
required
stateCode
string

(Only for USA locations) 2-letter US state code from the ANSI standard INCITS 38:2009; null to remove the stateCode.

metadata
object
metadata.customKey
mixed type

Custom key/value.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

List Locations

 
gethttps://api.fidel.uk/v1/programs/programId/locations
curl -X GET \
  https://api.fidel.uk/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/locations \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "count": 1,
  "items": [
    {
      "metadata": {
        "customKey2": "customValue4",
        "customKey1": "customValue3"
      },
      "currency": "GBP",
      "postcode": "W1D4PX",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "activeDate": "2019-01-17T18:09:20.242Z",
      "countryCode": "GBR",
      "visa": {
        "clearingTransactionId": null,
        "auth": false,
        "authTransactionId": null,
        "clearing": false,
        "status": "active"
      },
      "created": "2019-01-17T18:09:20.242Z",
      "address": "200 Soho Square",
      "live": false,
      "city": "London",
      "updated": "2019-01-17T18:14:29.469Z",
      "mastercard": {
        "clearingTransactionId": null,
        "auth": false,
        "authTransactionId": null,
        "clearing": false,
        "status": "active"
      },
      "programId": "c51e095d-13e2-4f2c-9559-d23e4ac3c31f",
      "brandId": "a00461d2-d63e-407c-846c-6055e838cfe8",
      "amex": {
        "clearingTransactionId": null,
        "auth": false,
        "authTransactionId": null,
        "clearing": false,
        "status": "active"
      },
      "id": "957f0b4a-facd-4e45-8416-1c6468ca0c0a",
      "active": true
    }
  ],
  "resource": "/v1/programs/c51e095d-13e2-4f2c-9559-d23e4ac3c31f/locations",
  "status": 200,
  "execution": 112.61088
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

List Locations by Brand

 
gethttps://api.fidel.uk/v1/brands/brandId/programs/programId/locations
curl -X GET \
  https://api.fidel.uk/v1/brands/83ffa0fb-c961-48a5-8542-797ba091be16/programs/833cd5d7-cc0b-47f2-8950-15eb424ebbd3/locations \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_aac1c617-b35e-424b-9bfd-b449c8ebe035'
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "items": [
        {
            "currency": "GBP",
            "visa": {
                "clearingTransactionId": null,
                "auth": false,
                "authTransactionId": null,
                "clearing": false,
                "status": "active"
            },
            "geolocation": {
                "latitude": 51.5138332,
                "longitude": -0.1318224
            },
            "city": "London",
            "mastercard": {
                "clearingTransactionId": null,
                "auth": false,
                "authTransactionId": null,
                "clearing": false,
                "status": "active"
            },
            "programId": "833cd5d7-cc0b-47f2-8950-15eb424ebbd3",
            "amex": {
                "clearingTransactionId": null,
                "auth": false,
                "authTransactionId": null,
                "clearing": false,
                "status": "active"
            },
            "id": "e7f40b78-a7a3-4e28-ac99-553dc6c6a7c6",
            "accountId": "d346d574-d5c2-4a0e-8e02-ffd713fd1a8d",
            "activeDate": "2019-04-05T12:18:06.231Z",
            "postcode": "W1V4LA",
            "countryCode": "GBR",
            "created": "2019-04-05T12:18:06.231Z",
            "address": "170 Wardour Street",
            "live": false,
            "updated": "2019-04-05T12:18:06.231Z",
            "brandId": "83ffa0fb-c961-48a5-8542-797ba091be16",
            "timezone": "Europe/London",
            "active": true
        },
        {
            "metadata": {
                "locationMetadata": "locationMetadataValue"
            },
            "currency": "GBP",
            "visa": {
                "clearingTransactionId": null,
                "auth": false,
                "authTransactionId": null,
                "clearing": false,
                "status": "active"
            },
            "geolocation": {
                "latitude": 51.5138332,
                "longitude": -0.1318224
            },
            "city": "London",
            "mastercard": {
                "clearingTransactionId": null,
                "auth": false,
                "authTransactionId": null,
                "clearing": false,
                "status": "active"
            },
            "programId": "833cd5d7-cc0b-47f2-8950-15eb424ebbd3",
            "amex": {
                "clearingTransactionId": null,
                "auth": false,
                "authTransactionId": null,
                "clearing": false,
                "status": "active"
            },
            "id": "2f0c5418-7679-4954-839f-a7cc0d4ce4a9",
            "accountId": "d346d574-d5c2-4a0e-8e02-ffd713fd1a8d",
            "activeDate": "2019-04-25T10:25:14.577Z",
            "postcode": "W1D3PX",
            "countryCode": "GBR",
            "created": "2019-04-25T10:25:14.577Z",
            "address": "347 Soho Square",
            "live": false,
            "updated": "2019-04-25T10:25:14.577Z",
            "brandId": "83ffa0fb-c961-48a5-8542-797ba091be16",
            "timezone": "Europe/London",
            "active": true
        }
    ],
    "resource": "/v1/brands/83ffa0fb-c961-48a5-8542-797ba091be16/programs/833cd5d7-cc0b-47f2-8950-15eb424ebbd3/locations",
    "status": 200,
    "execution": 64.985723
}

Query Params

postcode
string

Filter by postcode.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

Delete Location

 
deletehttps://api.fidel.uk/v1/locations/locationId
curl -X DELETE \
      https://api.fidel.uk/v1/locations/1d4f3030-f40b-4497-88ae-5dbe0c189a72 \
      -H 'content-type: application/json' \
      -H 'fidel-key: sk_live_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

No response examples available

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

Create Card

 
posthttps://api.fidel.uk/v1/programs/programId/cards
curl -X POST \
  https://api.fidel.uk/v1/programs/f76ed1be-e434-480b-aa1d-ff48f548f62a/cards
  -H 'Content-Type: application/json'
  -H 'Fidel-Key: pk_test_62f02030-0409-4eb5-ab94-6eff05b3d888'
  -d '{
  	"number": "4444000000004222",
    "expMonth": 10,
    "expYear": 2019,
    "countryCode": "GBR",
    "termsOfUse": true
}'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "id": "612ff311-dc0c-448d-8199-5a371f07433d",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "programId": "f76ed1be-e434-480b-aa1d-ff48f548f62a",
      "type": "visa",
      "scheme": "visa",
      "lastNumbers": "4222",
      "firstNumbers": "444400",
      "expYear": 2019,
      "expMonth": 10,
      "expDate": "2019-10-01T00:00:00.000Z",
      "countryCode": "GBR",
      "live": false,
      "created": "2018-09-10T10:30:50.494Z",
      "updated": "2018-09-10T10:30:50.494Z"
    }
  ],
  "resource": "/v1/programs/f76ed1be-e434-480b-aa1d-ff48f548f62a/cards",
  "status": 201,
  "execution": 126.820606
}

Body Params

countryCode
string
required

GBR, IRL, USA.

expMonth
int32
required

1 - 12

expYear
int32
required

4 digits.

number
int32
required

16 digit card number.

termsOfUse
boolean
required
metadata
object
metadata.id
string

Non-unique index. A-Z+a-z+0-9+dash, case sensitive. 5 - 40 characters. (uuid compatible)

metadata.customKey
mixed type

Custom key/value.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 

Public Key Required

To use the /cards endpoint you must use the public keys. Only applicable to this endpoint.

Creating Live Cards

To use the /cards endpoint on live environment you need to be PCI Compliant. Please contact us at developer@fidel.uk or Slack channel to request permission.

 
gethttps://api.fidel.uk/v1/cards/cardId
    curl -X GET \
      https://api.fidel.uk/v1/cards/c66ec078-56db-4094-858a-ab5598c0c5e7 \
      -H 'Content-Type: application/json' \
      -H 'Fidel-Key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "scheme": "visa",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "countryCode": "GBR",
      "created": "2018-09-10T10:30:50.494Z",
      "expYear": 2019,
      "expDate": "2019-10-01T00:00:00.000Z",
      "live": false,
      "lastNumbers": "4222",
      "expMonth": 10,
      "updated": "2018-09-10T10:30:50.494Z",
      "programId": "f76ed1be-e434-480b-aa1d-ff48f548f62a",
      "firstNumbers": "444400",
      "id": "612ff311-dc0c-448d-8199-5a371f07433d",
      "type": "visa"
    }
  ],
  "resource": "/v1/cards/612ff311-dc0c-448d-8199-5a371f07433d",
  "status": 200,
  "execution": 56.217957
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

Test/Live API secret key.

 
Suggest Edits

List Cards

 
gethttps://api.fidel.uk/v1/programs/programId/cards
    curl -X GET \
      https://api.fidel.uk/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/cards \
      -H 'Content-Type: application/json' \
      -H 'Fidel-Key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "items": [
    {
      "scheme": "visa",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "countryCode": "GBR",
      "created": "2018-09-10T10:30:50.494Z",
      "expYear": 2019,
      "expDate": "2019-10-01T00:00:00.000Z",
      "live": false,
      "lastNumbers": "4222",
      "expMonth": 10,
      "updated": "2018-09-10T10:30:50.494Z",
      "programId": "f76ed1be-e434-480b-aa1d-ff48f548f62a",
      "firstNumbers": "444400",
      "id": "612ff311-dc0c-448d-8199-5a371f07433d",
      "type": "visa"
    },
    {
      "scheme": "mastercard",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "countryCode": "GBR",
      "created": "2018-09-10T10:24:55.077Z",
      "expYear": 2019,
      "expDate": "2019-11-01T00:00:00.000Z",
      "live": false,
      "lastNumbers": "5111",
      "expMonth": 11,
      "updated": "2018-09-10T10:24:55.077Z",
      "programId": "f76ed1be-e434-480b-aa1d-ff48f548f62a",
      "firstNumbers": "555500",
      "id": "5e152330-c074-49ed-85e1-a52cd8a8679b",
      "type": "mastercard"
    }
  ],
  "resource": "/v1/programs/f76ed1be-e434-480b-aa1d-ff48f548f62a/cards",
  "status": 200,
  "execution": 93.92246
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

List Cards from Metadata ID

 
gethttps://api.fidel.uk/v1/cards/metadata/metadataId
    curl -X GET \
      https://api.fidel.uk/v1/cards/metadata/this-is-the-metadata-id \
      -H 'Content-Type: application/json' \
      -H 'Fidel-Key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "count": 1,
  "items": [
    {
      "scheme": "visa",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "countryCode": "GBR",
      "mapped": true,
      "created": "2017-06-01T16:53:53.892Z",
      "expYear": 2018,
      "expDate": "2018-10-01T00:00:00.000Z",
      "live": false,
      "lastNumbers": "4001",
      "metadata": {
        "id": "this-is-the-metadata-id",
        "customKey2": "customValue2",
        "customKey1": "customValue1"
      },
      "expMonth": 10,
      "updated": "2017-06-01T16:53:53.892Z",
      "programId": "e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
      "id": "c66ec078-56db-4094-858a-ab5598c0c5e7",
      "type": "visa"
    }
  ],
  "resource": "/v1/cards/metadata/this-is-the-metadata-id",
  "status": 200,
  "execution": 112.761067
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

Test/Live API secret key.

 
Suggest Edits

Delete Card

 
deletehttps://api.fidel.uk/v1/cards/cardId
    curl -X DELETE \
      https://api.fidel.uk/v1/cards/30c9a80d-3bb3-4a8d-8dc4-2df149422f8d \
      -H 'Content-Type: application/json' \
      -H 'Fidel-Key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

No response examples available

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

Test/Live API secret key.

 
Suggest Edits

Create Offer

 
posthttps://api.fidel.uk/v1/offers
curl -X POST \
  https://api.fidel.uk/v1/offers \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_live_b2e6a6ab-1a11-47ec-831c-81c2b23fd5a0' \
  -d '{
        "countryCode": "GBR",
        "name":"20% Off Netflix Subscription",
        "publisherId":"4ed4b62b-aa4c-43a1-8064-da6d1368e17a",
        "brandId":"9b59d440-ed5c-44cd-8a0c-51df6719219f",
        "startDate":"2019-04-25",
        "type":{
          "name":"discount",
          "value":20
        }
      }'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "created": "2019-04-25T16:47:33.442Z",
      "updated": "2019-04-25T16:47:33.442Z",
      "id": "bbe04595-dd79-47eb-b9fc-54f275ca2f13",
      "type": {
        "name": "discount",
        "value": 20
      },
      "startDate": "2019-04-25",
      "schemes": [
        "amex",
        "mastercard",
        "visa"
      ],
      "returnPeriod": null,
      "publisherId": "4ed4b62b-aa4c-43a1-8064-da6d1368e17a",
      "priority": 1,
      "origin": {
        "type": "card-linking",
        "id": "4ed4b62b-aa4c-43a1-8064-da6d1368e17a"
      },
      "name": "20% Off Netflix Subscription",
      "minTransactionAmount": 0,
      "locationsTotal": 0,
      "funded": null,
      "feeSplit": null,
      "endDate": null,
      "daysOfWeek": [0,1,2,3,4,5,6],
      "currency": "GBP",
      "countryCode": "GBR",
      "brandLogoURL": null,
      "brandName": "Nextflix",
      "brandId": "9b59d440-ed5c-44cd-8a0c-51df6719219f",
      "additionalTerms": null,
      "accepted": false
    }
  ],
    "resource": "/v1/offers",
     "status": 201,
     "execution": 361.077904

Body Params

accepted
boolean

Offer can be accepted or rejected by the Brand.

additionalTerms
string

Additional terms related to the offer.

brandId
string
required

Id of the Brand.

brandLogoURL
string

URL for the logo of the Brand.

brandName
string

Name of the Brand.

countryCode
string
required

ISO 3166-1 alpha-3 country code where the offer is active.

currency
string

Currency for the offer based on countryCode.

daysOfWeek
array of integers

Array of numbers between 0 and 6 representing the days of the week. Starting on Sunday.

endDate
date

Expiring date for the offer.

feeSplit
int32

Split of the performance fee attributed to publisher.

funded
object

Id an type of funder for the offer. Type can have the following values: [merchant, card-linking, affiliate]

locationsTotal
int32

Number of locations linked to the offer.

maxTransactionAmount
int32

Maximum spend amount to qualify transaction.

minTransactionAmount
int32

Minimum amount required to be spent to qualify transaction.

name
string
required

Name of the offer.

origin
object

Id and type of the creator of the offer. Type can have the following values: [merchant, publisher, affiliate]

performanceFee
int32

Percentage of the net transaction amount charged by Fidel to qualify the offer. Not applicable if offer is self-funded or funded by an affiliate.

publisherId
string
required

Id of the publisher. References accountId.

returnPeriod
int32

Number of days before a transaction qualifies for the offer.

schemes
array of strings

Schemes where the offer will qualify. Possible values are [visa, mastercard, amex].

startDate
date
required

Starting date when offer starts qualifying transactions.

type
object
required

An offer can be a fixed amount off or a percentage discount of the transactions amount. type: {name: string, value: number}. The name property can have two values: amount and discount. The value property saves the fixed amount of currency to be rewarded or the percentage value in case of a discount offer.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

live API secret key.

 
Suggest Edits

Edit Offer

Edit specific offer properties.

 
patchhttps://api.fidel.uk/v1/offers/offerId
curl -X PATCH \
  https://api.fidel.uk/v1/offers/bbe04595-dd79-47eb-b9fc-54f275ca2f13 \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_live_b2e6a6ab-1a11-47ec-831c-81c2b23fd5a0' \
  -d '{
        "name":"£5 Off Netflix Every Month",
        "startDate":"2019-04-30",
        "type":{
          "name":"amount",
          "value":5
        }
      }'
A binary file was returned

You couldn't be authenticated

{
    "items": [
        {
            "publisherId": "4ed4b62b-aa4c-43a1-8064-da6d1368e17a",
            "currency": "GBP",
            "feeSplit": null,
            "endDate": null,
            "brandName": "Nextflix",
            "name": "£5 Off Netflix Every Month",
            "daysOfWeek": [0,1,2,3,4,5,6],
            "brandLogoURL": null,
            "additionalTerms": null,
            "locationsTotal": 1,
            "startDate": "2019-04-30",
            "id": "bbe04595-dd79-47eb-b9fc-54f275ca2f13",
            "origin": {
                "type": "card-linking",
                "id": "4ed4b62b-aa4c-43a1-8064-da6d1368e17a"
            },
            "countryCode": "GBR",
            "created": "2019-04-25T16:47:33.442Z",
            "priority": 1,
            "schemes": [
                "amex",
                "mastercard",
                "visa"
            ],
            "returnPeriod": null,
            "updated": "2019-04-25T22:54:33.132Z",
            "brandId": "9b59d440-ed5c-44cd-8a0c-51df6719219f",
            "accepted": false,
            "funded": null,
            "minTransactionAmount": 0,
            "type": {
                "name": "amount",
                "value": 5
            }
        }
    ],
    "resource": "/v1/offers/bbe04595-dd79-47eb-b9fc-54f275ca2f13",
    "execution": 238.614179
}

Headers

Content-Type
string

application/json

Fidel-Key
string

live API secret key.

 
Suggest Edits

Get Offer

 
gethttps://api.fidel.uk/v1/offers/offerId
curl -X GET \
  https://api.fidel.uk/v1/offers/bbe04595-dd79-47eb-b9fc-54f275ca2f13 \
  -H 'Content-Type: application/json' \
  -H 'Fidel-Key: sk_live_b2e6a6ab-1a11-47ec-831c-81c2b23fd5a0'
A binary file was returned

You couldn't be authenticated

{
    "items": [
        {
            "publisherId": "4ed4b62b-aa4c-43a1-8064-da6d1368e17a",
            "currency": "GBP",
            "feeSplit": null,
            "endDate": null,
            "brandName": "Nextflix",
            "name": "20% Off Netflix Subscription",
            "daysOfWeek": [0,1,2,3,4,5,6],
            "brandLogoURL": null,
            "locationsTotal": 0,
            "additionalTerms": null,
            "startDate": "2019-04-25",
            "id": "bbe04595-dd79-47eb-b9fc-54f275ca2f13",
            "origin": {
                "type": "card-linking",
                "id": "4ed4b62b-aa4c-43a1-8064-da6d1368e17a"
            },
            "countryCode": "GBR",
            "created": "2019-04-25T16:47:33.442Z",
            "priority": 1,
            "schemes": [
                "amex",
                "mastercard",
                "visa"
            ],
            "returnPeriod": null,
            "updated": "2019-04-25T16:47:33.442Z",
            "brandId": "9b59d440-ed5c-44cd-8a0c-51df6719219f",
            "accepted": false,
            "funded": null,
            "minTransactionAmount": 0,
            "type": {
                "name": "discount",
                "value": 20
            }
        }
    ],
    "resource": "/v1/offers/bbe04595-dd79-47eb-b9fc-54f275ca2f13",
    "status": 200,
    "execution": 84.365502
}

Path Params

offerId
string
required

Id of the offer.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

live API secret key.

 
Suggest Edits

List Offers

 
gethttps://api.fidel.uk/v1/offers
curl -X GET \
  https://api.fidel.uk/v1/offers \
  -H 'Content-Type: application/json' \
  -H 'Fidel-Key: sk_live_66a5b4d4-70ab-4ed5-8638-cdf9dd6e1137'
A binary file was returned

You couldn't be authenticated

No response examples available

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

live API secret key.

 
Suggest Edits

Delete Offer

 
deletehttps://api.fidel.uk/v1/v1/offers/offer.id
curl -X DELETE \
  https://api.fidel.uk/v1/offers/78a043ab-1f71-4ee7-bb6b-badc55f66d69 \
  -H 'Content-Type: application/json' \
  -H 'Fidel-Key: sk_live_66a5b4d4-70ab-4ed5-8638-cdf9dd6e1137'
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

offerId
string
required

Id of the offer.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

live API secret key.

 
Suggest Edits

Add Location to Offer

Links locations to an offer.

 
posthttps://api.fidel.uk/v1/offers/offerId/locations/locationId
curl -X POST \
  https://api.fidel.uk/v1/offers/bbe04595-dd79-47eb-b9fc-54f275ca2f13/locations/a471dca3-4225-4fc3-9418-ee4e6dfb2800 \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_live_b2e6a6ab-1a11-47ec-831c-81c2b23fd5a0' \
  -d ''
A binary file was returned

You couldn't be authenticated

{
  "status": 200,
  "resource": "/v1/offers/bbe04595-dd79-47eb-b9fc-54f275ca2f13/locations/a471dca3-4225-4fc3-9418-ee4e6dfb2800",
  "execution": 117.927512
}

Path Params

offerId
string
required

Id of the Offer.

locationId
string
required

Id of the Location.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

live API secret key.

 
Suggest Edits

Send Offer to Brand

 
posthttps://api.fidel.uk/v1/offers/offerId/notify
curl -X POST \
  https://api.fidel.uk/v1/offers/881c7c1e-8dc6-4250-b04f-8c582d617598/notify \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

offerId
string
required

Id if the Offer.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

live API secret key.

 
Suggest Edits

Create Transaction

 
posthttps://api.fidel.uk/v1/transactions/test
curl -X POST \
  https://api.fidel.uk/v1/transactions/test \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \
  -d '{
    "amount": 24.15,
    "cardId": "bc538b71-31c5-4699-820a-6d4a08693314",
    "locationId": "7a916fbd-70a0-462f-8dbc-bd7dbfbea140"
  }'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "id": "7fdfd5d8-9589-402f-8477-4a727ad138a2",
      "accountId": "4ed4b72b-aa4c-43a1-8054-da6d1368e17a",
      "amount": 24.15,
      "auth": true,
      "cleared": false,
      "created": "2019-04-09T16:00:00.644Z",
      "currency": "GBP",
      "datetime": "2019-04-10T15:59:30",
      "offer": null,
      "programId": "6e38aa0c-b7ef-46bd-b1bd-c07c647d9cba",
      "updated": "2019-04-09T16:00:00.644Z",
      "wallet": null,
      "brand": {
        "id": "9d136f2e-df99-4a08-a0a5-3bc1534b7db8",
        "logoUrl": "https://coffeebrand.com/logo.png",
        "name": "Coffee Brand"
      },
      "card": {
        "id": "bc538b71-31c5-4699-820a-6d4a08693314",
        "firstNumbers": "555500",
        "lastNumbers": "5001",
        "scheme": "visa",
        "metadata": {
          "id": "00012345",
          "name": "Joseph Cooper"
        }
      },
      "identifiers": {
        "amexApprovalCode": "A9M5VYD",
        "mastercardRefNumber": "H6REF8BL",
        "mastercardTransactionSequenceNumber": "000009867889",
        "MID": "8552067328",
        "visaAuthCode": "A73H890"
      },
      "location": {
        "id": "7a916fbd-70a0-462f-8dbc-bd7dbfbea140",
        "address": "53 Frith Street",
        "city": "London",
        "countryCode": "GBR",
        "postcode": "W1D 4SN",
        "timezone": "Europe/London",
        "geolocation": {
          "latitude": 51.513716,
          "longitude": -0.13202
        },
        "metadata": {
          "id": "0001234567",
          "name": "Coffee Brand HQ"
        }
      }
    }
  ],
  "resource": "/v1/transactions/test",
  "status": 201,
  "execution": 64.436189
}

Body Params

amount
float
required

The amount of the transaction. Refund transactions a represented by negative amounts (ex: -100)

cardId
string
required
locationId
string
required

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

Test/Live API secret key.

 

Creating Transactions

You can only create transactions in test mode using your test API secret key.

Suggest Edits

Get Transaction

 
gethttps://api.fidel.uk/v1/transactions/transactionId
curl -X GET \
  https://api.fidel.uk/v1/transactions/84782884-6ab8-4885-820f-4cd081dd658f \
  -H 'Content-Type: application/json' \
  -H 'Fidel-Key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "id": "7fdfd5d8-9589-402f-8477-4a727ad138a2",
      "accountId": "4ed4b72b-aa4c-43a1-8054-da6d1368e17a",
      "amount": 100,
      "auth": true,
      "cleared": false,
      "created": "2019-04-09T16:00:00.644Z",
      "currency": "GBP",
      "datetime": "2019-04-10T15:59:30",
      "offer": null,
      "programId": "6e38aa0c-b7ef-46bd-b1bd-c07c647d9cba",
      "updated": "2019-04-09T16:00:00.644Z",
      "wallet": "apple-pay",
      "brand": {
        "id": "9d136f2e-df99-4a08-a0a5-3bc1534b7db8",
        "logoUrl": "https://coffeebrand.com/logo.png",
        "name": "Coffee Brand"
      },
      "card": {
        "id": "bc538b71-31c5-4699-820a-6d4a08693314",
        "firstNumbers": "555500",
        "lastNumbers": "5001",
        "scheme": "visa",
        "metadata": {
          "id": "00012345",
          "name": "Joseph Cooper"
        }
      },
      "identifiers": {
        "amexApprovalCode": "A9M5VYD",
        "mastercardRefNumber": "H6REF8BL",
        "mastercardTransactionSequenceNumber": "000009867889",
        "MID": "8552067328",
        "visaAuthCode": "A73H890"
      },
      "location": {
        "id": "7a916fbd-70a0-462f-8dbc-bd7dbfbea140",
        "address": "53 Frith Street",
        "city": "London",
        "countryCode": "GBR",
        "postcode": "W1D 4SN",
        "timezone": "Europe/London",
        "geolocation": {
          "latitude": 51.513716,
          "longitude": -0.13202
        },
        "metadata": {
          "id": "0001234567",
          "name": "Coffee Brand HQ"
        }
      }
    }
  ],
  "resource": "/v1/transactions/7fdfd5d8-9589-402f-8477-4a727ad138a2",
  "status": 200,
  "execution": 78.351005
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live secret API key.

 
Suggest Edits

List Transactions

 
gethttps://api.fidel.uk/v1/programs/programId/transactions
curl -X GET \
  https://api.fidel.uk/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/transactions \
  -H 'Content-Type: application/json' \
  -H 'Fidel-Key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "count": 1,
  "items": [
    {
      "id": "7fdfd5d8-9589-402f-8477-4a727ad138a2",
      "accountId": "4ed4b72b-aa4c-43a1-8054-da6d1368e17a",
      "amount": 100,
      "auth": true,
      "cleared": false,
      "created": "2019-04-09T16:00:00.644Z",
      "currency": "GBP",
      "datetime": "2019-04-10T15:59:30",
      "offer": null,
      "programId": "e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
      "updated": "2019-04-09T16:00:00.644Z",
      "wallet": "apple-pay",
      "brand": {
        "id": "9d136f2e-df99-4a08-a0a5-3bc1534b7db8",
        "logoUrl": "https://coffeebrand.com/logo.png",
        "name": "Coffee Brand"
      },
      "card": {
        "id": "bc538b71-31c5-4699-820a-6d4a08693314",
        "firstNumbers": "555500",
        "lastNumbers": "5001",
        "scheme": "visa",
        "metadata": {
          "id": "00012345",
          "name": "Joseph Cooper"
        }
      },
      "identifiers": {
        "amexApprovalCode": "A9M5VYD",
        "mastercardRefNumber": "H6REF8BL",
        "mastercardTransactionSequenceNumber": "000009867889",
        "MID": "8552067328",
        "visaAuthCode": "A73H890"
      },
      "location": {
        "id": "7a916fbd-70a0-462f-8dbc-bd7dbfbea140",
        "address": "53 Frith Street",
        "city": "London",
        "countryCode": "GBR",
        "postcode": "W1D 4SN",
        "timezone": "Europe/London",
        "geolocation": {
          "latitude": 51.513716,
          "longitude": -0.13202
        },
        "metadata": {
          "id": "0001234567",
          "name": "Coffee Brand HQ"
        }
      }
    }
  ],
  "resource": "/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/transactions",
  "status": 200,
  "execution": 88.034955
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

Test/Live API secret key.

 
Suggest Edits

Create Webhook (Brand)

 
posthttps://api.fidel.uk/v1/hooks
curl -X POST \
  https://api.fidel.uk/v1/hooks \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \
  -d '{
    "event": "brand.consent",
    "url": "https://realtime.com"
  }'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "created": "2017-06-01T16:16:57.992Z",
      "updated": "2017-06-01T16:16:57.992Z",
      "id": "b9ef3795-a38f-4ef2-8d8d-293dd7fbe1a6",
      "url": "https://realtime.com",
      "live": false,
      "event": "brand.consent",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b"
    }
  ],
  "resource": "/v1/hooks",
  "status": 201,
  "execution": 426.343555
}

Body Params

event
string
required

The type of event. (values: brand.consent)

url
string
required

URL destination of the event.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

Create Webhook (Program)

 
posthttps://api.fidel.uk/v1/programs/programId/hooks
curl -X POST \
  https://api.fidel.uk/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/hooks \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \
  -d '{
    "event": "transaction.auth",
    "url": "https://realtime.com"
  }'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "created": "2017-06-01T16:16:57.992Z",
      "updated": "2017-06-01T16:16:57.992Z",
      "id": "b9ef3795-a38f-4ef2-8d8d-293dd7fbe1a6",
      "url": "https://realtime.com",
      "programId": "e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
      "live": false,
      "event": "transaction.auth",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b"
    }
  ],
  "resource": "/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/hooks",
  "status": 201,
  "execution": 426.343555
}

Body Params

event
string
required

The type of event. (values: program.status, transaction.auth, transaction.clearing)

url
string
required

URL destination of the event.

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

Get Webhook

 
gethttps://api.fidel.uk/v1/hooks/hookId
curl -X GET \
  https://api.fidel.uk/v1/hooks/b9ef3795-a38f-4ef2-8d8d-293dd7fbe1a6 \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "event": "transaction.auth",
      "updated": "2017-06-01T16:16:57.992Z",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "programId": "e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
      "created": "2017-06-01T16:16:57.992Z",
      "id": "b9ef3795-a38f-4ef2-8d8d-293dd7fbe1a6",
      "url": "https://realtime.com",
      "live": false
    }
  ],
  "resource": "/v1/hooks/b9ef3795-a38f-4ef2-8d8d-293dd7fbe1a6",
  "status": 200,
  "execution": 97.988909
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

Update Webhook

 
puthttps://api.fidel.uk/v1/hooks/hookId
curl -X PUT \
  https://api.fidel.uk/v1/hooks/b9ef3795-a38f-4ef2-8d8d-293dd7fbe1a6 \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \
  -d '{
  "programId": "e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
  "event": "transaction.auth",
  "url": "https://realtime.com"
}'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "event": "transaction.auth",
      "updated": "2017-06-01T16:49:03.146Z",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "programId": "e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
      "created": "2017-06-01T16:16:57.992Z",
      "id": "b9ef3795-a38f-4ef2-8d8d-293dd7fbe1a6",
      "url": "https://realtime.com",
      "live": false
    }
  ],
  "resource": "/v1/hooks/b9ef3795-a38f-4ef2-8d8d-293dd7fbe1a6",
  "execution": 112.368122
}

Body Params

programId
string
required

Only on Program Level webhooks.

event
string
required
url
string
required

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.

 
Suggest Edits

List Webhooks

 
gethttps://api.fidel.uk/v1/programs/programId/hooks
curl -X GET \
  https://api.fidel.uk/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/hooks \
  -H 'content-type: application/json' \
  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63'
A binary file was returned

You couldn't be authenticated

{
  "count": 1,
  "items": [
    {
      "updated": "2017-06-01T16:16:57.992Z",
      "event": "transaction.auth",
      "accountId": "3693ac7e-3e2b-432c-8c60-2b786453ca9b",
      "programId": "e1d96ed3-dfd6-4896-8e57-37dca8b1c394",
      "created": "2017-06-01T16:16:57.992Z",
      "url": "https://realtime.com",
      "id": "b9ef3795-a38f-4ef2-8d8d-293dd7fbe1a6",
      "live": false
    }
  ],
  "resource": "/v1/programs/e1d96ed3-dfd6-4896-8e57-37dca8b1c394/hooks",
  "status": 200,
  "execution": 107.330434
}

Headers

Content-Type
string
required

application/json

Fidel-Key
string
required

test/live API secret key.