Skip to content
Developerhome

Understand provider json

  Less than to read

Consuming applications need to know that your provider exists and what its functionality is.

To support this, a provider must generate a json file that describes the provider’s functionality and requirements.


Provider rules metadata

The json Rules that you provide tell the consuming application what they need to do to integrate with you.

For your provider to be understood by Sage you must provide rules, some of these values are provided by Sage and others are provided by you.

Top level fields

You must provide json with the following fields for Sage to understand your provider.

  • providerId: Guid, this is the provider identifier provided by Sage, this should never change as is unique to your organisation
  • clientID: Provided by Sage after the kick off call. Specific to environment.
  • name: String, supplied by the provider, the name of your provider as you would like it to appear in a Sage product
  • author: String, this represents the author of this configuration data. This is normally the name of you organisation
  • country: Array of 2-character ISO country code Strings, countries where it you can make payments using this providers service. Specify each country using the ISO 3166-1 Alpha-2 format. Should be an array of default countries even if there is only one.
  • defaultLanguage: String, supplied by the provider, the language that text will be returned in by default
  • supportedLanguages: Array of Strings, supplied by provider, languages that can be returned if an x-accept-language header is provided
  • logo: String, the link to your organisations or services logo that you would like to appear in sage products
  • logoSvg: String, as with logo but in a Svg format
  • termsOfUse: String, the link to the terms of use for this provider
  • privacyAgreement: String, the link to the privacy agreement relating to this provider
  • notificationUrl: String, supplied by the provider, the url that Sage will send messages to
  • providerHeaderKeyName: String, supplied by the provider, header name Sage should include on posts
  • providerHeaderKeyValue: String, supplied by the provider, header value Sage should include on posts (this can help identify it is sage posting against notification endpoint)
  • accountType: Object (see below)

accountType

  • capabilities: Object of type capabilities (see below), supplied by the provider, describes the functionality of the provider
  • name: String, supplied by the provider, the type of account the provider deals with, usually Corporate
  • description: String, supplied by the provider, text that may appear in Sage UI to describe the provider
  • maximumPaymentCount: Int, the maximum payments that can be processed in a batch of payments, Sage Network Platform supports a maximum of 2000
  • maximumInvoicesPerPayment: Int the maximum invoice details that can be included per payment in the batch, Sage Network Platform supports a maximum of 100
  • validationRules: Array Objects of type Rules
  • defaultLocalInstrument: Guid, supplied by Sage, the Guid of the Sage Network Platform local instrument (payment method) that the provider would use as default
  • localInstruments: Array of objects of type LocalInstrument

capabilities

An array of enumerated values that describe the capabilities of the provider, Providers can add capabilities but they should first be agreed with Sage so that they can be documented and capabilities are standardised across providers.

  • SubscriptionRequired: A subscription to this provider is required before any payments can be made. To be able to make payments with this provider a subscription must be made via the consumer v3/subscription endpoint
  • DebtorAccountRequired: The provider holds a copy of the consumer debtor/bank account(s) details, these must be sent to the provider via the consumer api-msg-v1/debtoraccountputs endpoint
  • CreditorRequired: The provider holds a copy of the consumer creditor/vendor details, these must be sent to the provider via the consumer api-msg-v1/creditorputs endpoint
  • DebtorQueries: The provider supports querying the debtor/bank account information it holds using the api-msg-v1/debtoraccountlistqueries endpoint
  • CreditorQueries: The provider supports querying the creditor/vendor information it holds using the api-msg-v1/creditorlistqueries endpoint
  • IFramePermitted: The provider allows any UI it serves to be embedded in an iFrame
  • SubscriptionUpdateMessage: The provider sends a notification when a subscription is updated (status change etc)
  • BatchpaymentsUpdateMessage: The provider sends a notification when a batch of payments is updated (status change etc)
  • PaymentsUpdateMessage: The provider sends a notification when a payment is updated (status change etc)

Rules

An array of validation rules

  • ruleId: Guid, supplied by the provider
  • validation: Object of type Validation

Validation

  • jsonPath: String, supplied by the provider, the path in the entity (apiPath) that this data is bound to
  • apiPath: String, supplied by the provider, the entity that the jsonPath belongs to. One of Subscriptions, BatchPayments, Creditors, CreditorPuts, DebtorAccounts, DebtorAccountsPuts
  • optionality: String, supplied by the provider, Optional, Required
  • regex: String, supplied by the provider, a regular expression that describes the field type, size and any limits
  • uiLabel: String, supplied by the provider, Text that will appear as a label in this field when built using dynamic UI
  • example: String, supplied by the provider, Example that will appear as a hint in this field when built using dynamic UI
  • description: String, supplied by the provider, Description that will appear as a tooltip in this field when built using dynamic UI
  • errorMessage: String, supplied by the provider, Error message that will appear as an error against this field when built using dynamic UI

LocalInstrument

Array of local instruments

  • id: Guid, supplied by Sage
  • value: String, supplied by the provider, name of local instrument (payment type)

Existing local instrument guid’s and values are as follows:

"id": "017f637f-7d2e-4080-b067-35f1fd4ac113",
"name": "Selected by provider",
"value": "NETWORK",
 
"id": "0242ebf6-a1fa-4d32-a998-9d609b4f57b0",
"name": "Check",
"value": "CHECK",
 
"id": "0bb1fda9-ef77-4114-9963-2dfc62b37919",
"name": "Selected by Provider",
"value": "NETWORK",
 
"id": "117a9d52-a163-4a60-abe2-108e9db4a487",
"name": "SEPA - Single European Payments Area",
"value": "SEPA",
 
"id": "2c3c4a67-06a3-428f-b678-02924e73e8a8",
"name": "BACS - Bankers Automated Clearing System",
"value": "BACS",
 
"id": "32ecfd72-e058-4c69-a8f0-ee052cfe1b06",
"name": "Outsourced Check",
"value": "OUTSOURCESCHECK",
 
"id": "337d946e-3f4f-4590-87f6-9511e28f9a3c",
"name": "RTR - RealTimeRails",
"value": "RTR",
 
"id": "43747297-2205-4f4a-8380-496e2306cc4e",
"name": "Faster Payments",
"value": "FASTERPAYMENTS",
 
"id": "57f4d4e5-b717-4518-b6f5-566d7fea0f7a",
"name": "EFT - Electronic Fund Transfer",
"value": "EFT",
 
"id": "85f7caf8-4566-4719-a2fa-983134a95f50",
"name": "Virtual Card",
"value": "VCARD",
 
"id": "94443c6a-256d-4e5e-b9d8-0946461ad89c",
"name": "ACH - Automated Clearing House",
"value": "ACH",
 
"id": "9d7e5afd-87bd-4b16-be1e-d46e0e29c2a6",
"name": "WIRE - Wire Transfer",
"value": "WIRE",
 
"id": "a9ca03f6-1882-432e-858c-c45726b0fe86",
"name": "email",
"value": "EMAIL",
 
"id": "b559d846-0173-47c7-87d2-194fbe4a4ffc",
"name": "INTERAC - e-Transfer for Business",
"value": "INTERAC",
 
"id": "f06b683d-a948-4389-8ace-b26b3311e697",
"name": "Check Printed",
"value": "CHECKPRINTED",
 
"id": "fb6f5d78-d2d3-447b-b443-9bf4734f3867",
"name": "International Wire",
"value": "INTERNATIONALWIRE",

If you require a new local instrument (payment type), please contact sage with the details as we have to add this at our end.

The following is an example of a provider payload.

{
  "providerId": "38a33184-be4a-4fe0-a8c4-53197eac6439",
  "clientId": "xxx",
  "clientApiKey": "xxx",
  "name": "TestProvider1",
  "country": [
    "AU"
  ],
  "defaultLanguage": "en",
  "supportedLanguages": [ "en" ],
  "notificationUrl": "https://xxx/api/webhook",
  "providerHeaderKeyName": "x-sage-auth-key",
  "providerHeaderKeyValue": "xxx",
  "accountType": {
    "capabilities": [
      "SubscriptionRequired",
      "DebtorAccountRequired",
      "CreditorRequired",
      "DebtorQueries",
      "CreditorQueries"
    ],
    "name": "Corporate",
    "accountTypeId": "xxx",
    "description": "Test Provider 1",
    "maximumPaymentCount": 2000,
    "maximumInvoicesPerPayment": 50,
    "validationRules": [
      {
        "ruleId": "xxx",
        "validation": {
          "jsonPath": "additionalData.companyname",
          "apiPath": "Subscriptions",
          "optionality": "Required",
          "regex": "^[^<>\"{}\\]\\[]{0,255}$",
          "uiLabel": "Company Name",
          "example": "Acme Inc",
          "description": "The companies legal name",
          "errorMessage": "name includes invalid characters"
        }
      },
      {
        "ruleId": "xxx",
        "validation": {
          "jsonPath": "additionalData.email",
          "apiPath": "Subscriptions",
          "optionality": "Optional",
          "regex": "(?=^.{5,71}$)(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",
          "uiLabel": "Email",
          "example": "[email protected]",
          "description": "Email Address",
          "errorMessage": "Email address includes invalid characters"
        }
      }
    ],
    "defaultlocalinstrument": "xxx",
    "localInstruments": [
      {
        "id": "85f7caf8-4566-4719-a2fa-983134a95f50",
        "value": "VCARD"
      },
      {
        "id": "0242ebf6-a1fa-4d32-a998-9d609b4f57b0",
        "value": "CHECK"
      },
      {
        "id": "94443c6a-256d-4e5e-b9d8-0946461ad89c",
        "value": "ACH"
      }
    ]
  }
}