Link Search Menu Expand Document

Bank Account Requests

Bank Account Requests facilitate user authorization of access to bank accounts. 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. After a bank account request has been completed, one or more Centrapay Bank Account resources may be created and long-lived access tokens may be stored against those Bank Accounts.

Contents

Models

Bank Account Request

Fields

Field Type Description
id String The Bank Account Request’s unique identifier.
accountId String The id of the owning Centrapay Account.
type String The type of Bank Account Request. See Bank Account Request Types.
status String The current status of the Bank Account Request. Supported values are created, failed and done.
createdAt Timestamp When the Bank Account Request was created.
createdBy CRN The User or API Key that created the Bank Account Request.
updatedAt Timestamp When the Bank Account Request was updated.
updatedBy CRN The User or API Key that updated the Bank Account Request.
authorizationUrl String A URL to the third-party beginning the authorization flow.

Bank Account Request Types

Name description
quartz-details Request will initiate an authorization flow for authorizing access to account details.
quartz-payment Request will initiate an authorization flow for authorizing access to create payments.

Operations

Create Bank Account Request EXPERIMENTAL

POST /api/bank-account-requests

curl -X POST https://service.centrapay.com/api/bank-account-requests \
  -H "X-Api-Key: $api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "uooxSens6ykJaim1Cu1Q55",
    "type": "quartz-details"
  }'

Fields

Field Type Description
accountId String The id of the owning Account.
type String The type of Bank Account Request.
bankAccountId String Optional The id of the associated Bank Account. Required if type is quartz-payment.

Example response payload

{
  "id": "3KVjuKW2CZCJeJVqPxwkX7",
  "accountId": "B4u4WZCu3joZFVWT3XjWW3",
  "type": "quartz-details",
  "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"
}

Authorize Bank Account Request EXPERIMENTAL

POST /api/bank-account-requests/{bankAccountRequestId}/authorize

curl -X POST https://service.centrapay.com/api/bank-account-requests/3KVjuKW2CZCJeJVqPxwkX7/authorize \
  -H "X-Api-Key: $api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "hKpKupTM391pE10xfQiorMxXarRKAHRhTfH_x"
  }'

Fields

Field Type Description
code String Authorization code returned from third-party.

Example response payload

{
}