Bank Account Connection Intents

A Bank Account Connection Intent facilitates user authorization of access to Bank Accounts, for example, using Open Banking flows. Typically the authorization will follow an OAuth flow where the user is redirected to a third-party system to authenticate and select one or more bank accounts.


Attributes

  • id

    string

    The Bank Account Connection Intent’s unique identifier.

  • accountId

    string

    The id of the owning Centrapay Account  API .

  • type

    string

    The type of Bank Account Connection Intent. See Bank Account Connection Intent Types.

  • status

    string

    The current status of the Bank Account Connection Intent. Supported values are created, authorized and failed.

  • createdAt

    timestamp

    When the Bank Account Connection Intent was created.

  • createdBy

    crn

    The User or API Key that created the Bank Account Connection Intent.

  • updatedAt

    timestamp

    When the Bank Account Connection Intent was updated.

  • updatedBy

    crn

    The User or API Key that updated the Bank Account Connection Intent.

  • authorizationUrl

    string

    A URL to the third-party beginning the authorization flow.

  • test

    boolean

    A flag which is present if the intention is to connect with a Bank Account  API  used for testing.

  • name

    string

    The name of the consent. Only present if type is enduring-payment-consent.

Bank Account Connection Intent Types

Namedescription
account-information-consentInitiates an authorization flow for authorizing access to bank account details. After a Bank Account Connection Intent has been authorized, one or more Centrapay Bank Account resources may be created.
enduring-payment-consentInitiates an authorization flow for authorizing access to create payments.

POST/api/bank-account-connection-intents

This endpoint allows you to create a Bank Account Connection Intent.

Attributes

  • accountId

    stringrequired

    The id of the owning Account  API .

  • type

    stringrequired

    The type of Bank Account Connection Intent.

  • bankAccountId

    string

    The id of the associated Bank Account  API . Required if type is enduring-payment-consent.

  • test

    boolean

    A flag which is present if the intention is to connect with a Bank Account  API  used for testing.

  • name

    string

    The name of the consent. Only available if type is enduring-payment-consent.

  • period

    string

    The period after which the amount spent using the consent will be reset. Only available if type is enduring-payment-consent. Valid values are daily, weekly, fortnightly, monthly and yearly. Defaults to daily.

  • totalAmount

    string

    The total cent value of transactions the consent can be used for within the period. Only available if type is enduring-payment-consent.

Errors

  • LIVENESS_MISMATCH

    403

    Only Bank Account Connection Intents with the test flag can be associated with test Bank Accounts  API , and vice versa.

Request
POST/api/bank-account-connection-intents
curl -X POST \
 https://service.centrapay.com/api/bank-account-connection-intents \
 -H 'content-type: application/json' \
 -H 'x-api-key: <TOKEN>' \
 -d '
{
 "accountId": "B4u4WZCu3joZFVWT3XjWW3",
 "type": "account-information-consent",
 "test": true
}
'
Response
{
  "id": "3KVjuKW2CZCJeJVqPxwkX7",
  "accountId": "B4u4WZCu3joZFVWT3XjWW3",
  "type": "account-information-consent",
  "status": "created",
  "createdAt": "2022-03-31 02:56:29 UTC",
  "createdBy": "crn:B4u4WZCu3joZFVWT3XjWW3:api-key:MyApiKey",
  "updatedAt": "2022-03-31 02:56:29 UTC",
  "updatedBy": "crn:B4u4WZCu3joZFVWT3XjWW3:api-key:MyApiKey",
  "authorizationUrl": "https://example.com/authorization-url",
  "test": true
}

POST/api/bank-account-connection-intents/{bankAccountConnectionIntentId}/authorize

This endpoint allows you to authorize a Bank Account Connection Intent.

Attributes

  • code

    stringrequired

    Authorization code returned from third-party.

Request
POST/api/bank-account-connection-intents/3KVjuKW2CZCJeJVqPxwkX7/authorize
curl -X POST \
 https://service.centrapay.com/api/bank-account-connection-intents/3KVjuKW2CZCJeJVqPxwkX7/authorize \
 -H 'content-type: application/json' \
 -H 'x-api-key: <TOKEN>' \
 -d '
{
 "code": "hKpKupTM391pE10xfQiorMxXarRKAHRhTfH_x"
}
'
Response
{}