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
Bank Account Approval Types
Name | description |
---|---|
settlement | An 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-consent | An approved Bank Account Approval of type account-information-consent provides an access token to read account details from a third-party. |
enduring-payment-consent | An approved Bank Account Approval of type enduring-payment-consent provides an access token for creating payments with a third-party. |
/api/bank-account-approvals
This endpoint allows you to request a Bank Account Approval.
Attributes
mediaUploadId
bankAccountId
type
Errors
APPROVAL_ALREADY_IN_PROGRESS
Request
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"
}
/api/bank-account-approvals/{bankAccountApprovalId}
This endpoint allows you to retrieve a Bank Account Approval.
Request
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"
}
/api/bank-account-approvals/{bankAccountApprovalId}/accept
This endpoint allows you to accept a Bank Account Approval.
Attributes
reason
Errors
APPROVAL_ALREADY_REVIEWED
Request
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
{}
/api/bank-account-approvals/{bankAccountApprovalId}/decline
This endpoint allows you to decline a Bank Account Approval.
Attributes
reason
Errors
APPROVAL_ALREADY_REVIEWED
Request
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
{}
/api/bank-accounts/{bankAccountId}/approvals
This endpoint allows you to list the Bank Account Approvals for a Bank Account.
Request
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"
}
]
}