Mandates

Create mandate

Create a new mandate

This API must be called using a backend bearer token.

post/v3/mandates

Request

  • Base URL
    https://api.truelayer-sandbox.com
  • URL
    https://api.truelayer-sandbox.com/v3/mandates
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://auth.truelayer.com/connect/token scopes: mandates

Headers

Idempotency-Keystring required

An idempotency key to allow safe retrying without the operation being performed multiple times. The value should be unique for each operation, e.g. a UUID, with the same key being sent on a retry of the same request.

Tl-Signaturestring required

A JWS with detached content, signed with your private key. See Request Signing

Request body

currency'GBP' | 'EUR' required
metadataMetadata

Optional field for adding custom key-value data to a resource. This object can contain a maximum of 10 key-value pairs, each with a key with a maximum length of 40 characters and a non-null value with a maximum length of 500 characters.

Example request

{
  "mandate": {
    "provider_selection": {
      "filter": {
        "countries": [
          "GB"
        ],
        "release_channel": "general_availability",
        "customer_segments": [
          "retail"
        ],
        "provider_ids": [
          "mock-payments-gb-redirect"
        ],
        "excludes": {
          "provider_ids": [
            "ob-exclude-this-bank"
          ]
        }
      }
    },
    "beneficiary": {
      "merchant_account_id": "AB8FA060-3F1B-4AE8-9692-4AA3131020D0"
    },
    "reference": "mandate-ref",
    "statement_reference": "mandate-ref"
  },
  "currency": "GBP",
  "user": {
    "id": "f9b48c9d-176b-46dd-b2da-fe1a2b77350c",
    "name": "Remi Terr",
    "email": "remi.terr@aol.com",
    "phone": "+447777777777",
    "date_of_birth": "1990-01-31",
    "address": {
      "address_line1": "40 Finsbury Square",
      "address_line2": "The Gilbert",
      "city": "London",
      "state": "London",
      "zip": "EC2A 1PX",
      "country_code": "GB"
    },
    "political_exposure": "current"
  },
  "constraints": {
    "valid_from": "2022-01-01T00:00:00.000Z",
    "valid_to": "2022-12-31T23:59:59.999Z"
  },
  "metadata": {
    "prop1": "value1",
    "prop2": "value2"
  },
  "related_products": {
    "signup_plus": {}
  },
  "sub_merchants": {
    "ultimate_counterparty": {
      "url": "https://truelayer.com",
      "mcc": "1234",
      "address": {
        "address_line1": "40 Finsbury Square",
        "address_line2": "The Gilbert",
        "city": "London",
        "state": "London",
        "zip": "EC2A 1PX",
        "country_code": "GB"
      }
    }
  }
}

Response

Mandate Created

OR

Example response

{
  "id": "be6db706-68f1-4e9c-ab09-b83d8e3ea60d",
  "user": {
    "id": "b8d4dda0-ff2c-4d77-a6da-4615e4bad941"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.