Bank Account Approvals

A Bank Account Approval represents any added authorization on a Bank Account  API . This may be an approval from Centrapay or a consent from a Centrapay Account  API  owner that allows access to a third-party system. See Bank Account Approval Types.


Attributes

  • id

    string

    The Bank Account Approval’s unique identifier.

  • bankAccountId

    string

    The id of the associated Bank Account  API .

  • accountId

    string

    The id of the owning Centrapay Account  API .

  • type

    string

    The type of Bank Account Approval. See Bank Account Approval Types.

  • status

    string

    The current status of the Bank Account Approval. Supported values are created, pending, approved, declined and done.

  • createdAt

    timestamp

    When the Bank Account Approval was created.

  • createdBy

    crn

    The User or API Key that created the Bank Account Approval.

  • modifiedAt

    timestamp

    When the Bank Account Approval was updated.

  • modifiedBy

    crn

    The User or API Key that updated the Bank Account Approval.

  • approvalActivities

    array

    An array of Bank Account Approval Activities associated with the Bank Account Approval.

  • mediaUploadId

    string

    The id of the associated Media Upload  API . Required for type settlement.

  • refreshToken

    string

    A long lived access token for access to a third-party system. Required for type account-information-consent and enduring-payment-consent.

  • consentId

    string

    A unique identifier for an authorization in a third-party system.

Bank Account Approval Types

Namedescription
settlementAn approved Bank Account Approval of type settlement is required for the funds in a Settlement Wallet  API  to be released. A Media Upload  API  is uploaded by the user to provide evidence of ownership of the Bank Account  API  to be approved.
account-information-consentAn approved Bank Account Approval of type account-information-consent provides an access token to read account details from a third-party.
enduring-payment-consentAn approved Bank Account Approval of type enduring-payment-consent provides an access token for creating payments with a third-party.

Attributes

  • activityNumber

    number

    Unique sequential Bank Account Approval Activity number.

  • approvalId

    string

    The id of the associated Bank Account Approval.

  • activityType

    string

    The type of the Bank Account Approval Activity.

  • createdAt

    timestamp

    When the Bank Account Approval Activity was created.

  • createdBy

    crn

    The User or API Key that created the Bank Account Approval Activity.


POST/api/bank-account-approvals

This endpoint allows you to request a Bank Account Approval.

Attributes

Errors

  • APPROVAL_ALREADY_IN_PROGRESS

    403

    There is already a Bank Account Approval in progress that is awaiting review from Centrapay.

Request
POST/api/bank-account-approvals
curl -X POST \
 https://service.centrapay.com/api/bank-account-approvals \
 -H 'content-type: application/json' \
 -H 'x-api-key: <TOKEN>' \
 -d '
{
 "mediaUploadId": "uooxSens6ykJaim1Cu1Q55",
 "bankAccountId": "WRhAxxWpTKb5U7pXyxQjjY",
 "type": "settlement"
}
'
Response
{
  "id": "DcTs3U38HdhfEqwF1GKoT3",
  "mediaUploadId": "uooxSens6ykJaim1Cu1Q55",
  "bankAccountId": "WRhAxxWpTKb5U7pXyxQjjY",
  "accountId": "Jaim1Cu1Q55uooxSens6yk",
  "type": "settlement",
  "status": "created",
  "createdAt": "2021-11-08T21:52:39.915Z",
  "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey",
  "modifiedAt": "2021-11-08T21:52:39.915Z",
  "modifiedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey"
}

GET/api/bank-account-approvals/{bankAccountApprovalId}

This endpoint allows you to retrieve a Bank Account Approval.

Request
GET/api/bank-account-approvals/bbab9a768921019cb856
curl -X GET \
 https://service.centrapay.com/api/bank-account-approvals/bbab9a768921019cb856 \
 -H 'x-api-key: <TOKEN>'
Response
{
  "id": "bbab9a768921019cb856",
  "bankAccountId": "WRhAxxWpTKb5U7pXyxQjjY",
  "accountId": "Jaim1Cu1Q55uooxSens6yk",
  "type": "account-information-consent",
  "status": "approved",
  "createdAt": "2021-11-08T21:52:39.915Z",
  "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey",
  "modifiedAt": "2021-11-08T21:52:39.915Z",
  "modifiedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey",
  "refreshToken": "y04Njk3LTRjNmZkYjBhMzRiZSIsIm5vbmNlIjoiOTg3MTJjMGNkZmFiNWZjNzMwM2MxMzNl",
  "consentId": "d24dbe-e2bc46ac-d924e38af112"
}

POST/api/bank-account-approvals/{bankAccountApprovalId}/accept

This endpoint allows you to accept a Bank Account Approval.

Attributes

  • reason

    string

    The reason for accepting the Bank Account Approval.

Errors

  • APPROVAL_ALREADY_REVIEWED

    403

    The Bank Account Approval has already been accepted or declined.

Request
POST/api/bank-account-approvals/DcTs3U38HdhfEqwF1GKoT3/accept
curl -X POST \
 https://service.centrapay.com/api/bank-account-approvals/DcTs3U38HdhfEqwF1GKoT3/accept \
 -H 'content-type: application/json' \
 -H 'x-api-key: <TOKEN>' \
 -d '
{
 "reason": "All details match"
}
'
Response
{}

POST/api/bank-account-approvals/{bankAccountApprovalId}/decline

This endpoint allows you to decline a Bank Account Approval.

Attributes

  • reason

    stringrequired

    The reason for declining the Bank Account Approval.

Errors

  • APPROVAL_ALREADY_REVIEWED

    403

    The Bank Account Approval has already been accepted or declined.

Request
POST/api/bank-account-approvals/DcTs3U38HdhfEqwF1GKoT3/decline
curl -X POST \
 https://service.centrapay.com/api/bank-account-approvals/DcTs3U38HdhfEqwF1GKoT3/decline \
 -H 'content-type: application/json' \
 -H 'x-api-key: <TOKEN>' \
 -d '
{
 "reason": "No details match"
}
'
Response
{}

GET/api/bank-accounts/{bankAccountId}/approvals

This endpoint allows you to list the Bank Account Approvals for a Bank Account.

Request
GET/api/bank-accounts/5vpkxjn6z787LiAKCqwuf9/approvals
curl -X GET \
 https://service.centrapay.com/api/bank-accounts/5vpkxjn6z787LiAKCqwuf9/approvals \
 -H 'x-api-key: <TOKEN>'
Response
{
  "items": [
    {
      "id": "PJ6jTgDNv1xfFAooCoWZLe",
      "bankAccountId": "5vpkxjn6z787LiAKCqwuf9",
      "createdAt": "2022-08-21T21:41:46.361Z",
      "modifiedAt": "2022-08-21T21:41:46.361Z",
      "accountId": "TEZiZWAtX6v1hJucU4fGKx",
      "createdBy": "crn::user:7c0a034a-c36e-4645-b12b-57dec339ab47",
      "modifiedBy": "crn::user:7c0a034a-c36e-4645-b12b-57dec339ab47",
      "type": "account-information-consent",
      "status": "approved",
      "refreshToken": "tXC4dFm3yNAQbLrm4JxY6pynGoEG8vSJ",
      "consentId": "fFAoo-CoWZLea8-4dFm3yNAoWZLe"
    },
    {
      "id": "WiFna4hCc7k4KYUxncFPg4",
      "bankAccountId": "5vpkxjn6z787LiAKCqwuf9",
      "createdAt": "2022-08-11T20:53:57.337Z",
      "modifiedAt": "2022-08-11T20:53:57.337Z",
      "accountId": "TEZiZWAtX6v1hJucU4fGKx",
      "createdBy": "crn::user:7c0a034a-c36e-4645-b12b-57dec339ab47",
      "modifiedBy": "crn::user:7c0a034a-c36e-4645-b12b-57dec339ab47",
      "type": "enduring-payment-consent",
      "status": "approved",
      "refreshToken": "dAGLl8AfnNCGEKEmBm1FryaDyW1JBh28",
      "consentId": "4KYUx-ncFPg4a8-Ll8AfnNCcFPg4"
    },
    {
      "id": "SoQkkv4rWRwrknrdkYbBuB",
      "bankAccountId": "5vpkxjn6z787LiAKCqwuf9",
      "createdAt": "2022-08-21T21:41:22.345Z",
      "modifiedAt": "2022-08-21T21:41:22.345Z",
      "accountId": "TEZiZWAtX6v1hJucU4fGKx",
      "createdBy": "crn::user:7c0a034a-c36e-4645-b12b-57dec339ab47",
      "modifiedBy": "crn::user:7c0a034a-c36e-4645-b12b-57dec339ab47",
      "type": "account-information-consent",
      "status": "declined",
      "refreshToken": "rX3MNTxFwKIU2lhyZOrq87Aw74ASSHUM",
      "consentId": "rknrd-kYbBuBa8-MNTxFwKIYbBuB"
    }
  ]
}