A funds transfer represents either a top up to or a withdrawal from a Centrapay wallet. Topping up a wallet consists of making a bank transfer from the user’s bank account to Centrapay. Once Centrapay has verified the transfer was successful a user will be given credit on their Centrapay wallet equal to the amount of the bank transfer.
POST/api/topups
This endpoint allows you to create a topup.
Attributes
assetId
stringrequiredbankAccountId
stringrequired
Errors
BANK_AUTHORITY_WALLET_MISMATCH
403MAX_INFLIGHT_TOPUPS_EXCEEDED
403MAX_INFLIGHT_TOPUP_AMOUNT_EXCEEDED
403QUOTA_EXCEEDED
403DIRECT_DEBIT_NOT_AUTHORIZED
403INVALID_WALLET_TYPE
403BANK_ACCOUNT_TYPE_NOT_CONFIGURED_FOR_TOPUP
403
Request
POST/api/topups
curl -X POST \
https://service.centrapay.com/api/topups \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>' \
-d '
{
"amount": "10000",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY"
}
'
Response
{
"id": "hg2RfYTQ635tPBZEPJdCre",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY",
"accountId": "aBc932S9182qwCDqwer",
"type": "topup",
"amount": "10000",
"status": "created",
"createdAt": "2020-05-01T12:30:00.000Z",
"updatedAt": "2020-05-01T12:30:00.000Z"
}
Request
GET/api/topups/WRhAxxWpTKb5U7pXyxQjjY
curl -X GET \
https://service.centrapay.com/api/topups/WRhAxxWpTKb5U7pXyxQjjY \
-H 'x-api-key: <TOKEN>'
Response
{
"id": "WRhAxxWpTKb5U7pXyxQjjY",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY",
"accountId": "aBc932S9182qwCDqwer",
"type": "topup",
"amount": "10000",
"status": "created",
"createdAt": "2020-05-01T12:30:00.000Z",
"updatedAt": "2020-05-01T12:30:00.000Z"
}
GET/api/topups
This endpoint allows you to list the Top Ups for authorized accounts.
Request
GET/api/topups
curl -X GET \
https://service.centrapay.com/api/topups \
-H 'x-api-key: <TOKEN>'
Response
[
{
"id": "5thg2RPBZEfYTPJdQ63Cre",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY",
"accountId": "aBc932S9182qwCDqwer",
"type": "topup",
"amount": "10000",
"status": "created",
"createdAt": "2020-05-01T12:30:00.000Z",
"updatedAt": "2020-05-01T12:30:00.000Z"
},
{
"id": "hg2RfYTQ635tPBZEPJdCre",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY",
"accountId": "aBc932S9182qwCDqwer",
"type": "topup",
"amount": "10000",
"status": "created",
"createdAt": "2020-05-01T12:30:00.000Z",
"updatedAt": "2020-05-01T12:30:00.000Z"
}
]
GET/api/accounts/{accountId}/topups
This endpoint allows you to list the Top Ups for an account.
Request
GET/api/accounts/aBc932S9182qwCDqwer/topups
curl -X GET \
https://service.centrapay.com/api/accounts/aBc932S9182qwCDqwer/topups \
-H 'x-api-key: <TOKEN>'
Response
[
{
"id": "5thg2RPBZEfYTPJdQ63Cre",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY",
"accountId": "aBc932S9182qwCDqwer",
"type": "topup",
"amount": "10000",
"status": "created",
"createdAt": "2020-05-01T12:30:00.000Z",
"updatedAt": "2020-05-01T12:30:00.000Z"
},
{
"id": "hg2RfYTQ635tPBZEPJdCre",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY",
"accountId": "aBc932S9182qwCDqwer",
"type": "topup",
"amount": "10000",
"status": "created",
"createdAt": "2020-05-01T12:30:00.000Z",
"updatedAt": "2020-05-01T12:30:00.000Z"
}
]
POST/api/withdrawals
This endpoint allows you to create a withdrawal.
Attributes
assetId
stringrequiredbankAccountId
stringrequired
Errors
BANK_AUTHORITY_WALLET_MISMATCH
403INSUFFICIENT_WALLET_BALANCE
403INVALID_WALLET_TYPE
403BANK_ACCOUNT_TYPE_NOT_CONFIGURED_FOR_WITHDRAWAL
403
Request
POST/api/withdrawals
curl -X POST \
https://service.centrapay.com/api/withdrawals \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>' \
-d '
{
"amount": "10000",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY"
}
'
Response
{
"id": "hg2RfYTQ635tPBZEPJdCre",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY",
"accountId": "aBc932S9182qwCDqwer",
"type": "withdrawal",
"amount": "10000",
"status": "created",
"createdAt": "2020-05-01T12:30:00.000Z",
"updatedAt": "2020-05-01T12:30:00.000Z"
}
GET/api/withdrawals/{withdrawalId}
This endpoint allows you to retrieve a Withdrawal by id.
Errors
BANK_AUTHORITY_WALLET_MISMATCH
403INSUFFICIENT_WALLET_BALANCE
403INVALID_WALLET_TYPE
403BANK_ACCOUNT_TYPE_NOT_CONFIGURED_FOR_WITHDRAWAL
403
Request
GET/api/withdrawals/WRhAxxWpTKb5U7pXyxQjjY
curl -X GET \
https://service.centrapay.com/api/withdrawals/WRhAxxWpTKb5U7pXyxQjjY \
-H 'x-api-key: <TOKEN>'
Response
{
"id": "WRhAxxWpTKb5U7pXyxQjjY",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY",
"accountId": "aBc932S9182qwCDqwer",
"type": "withdrawal",
"amount": "10000",
"status": "created",
"createdAt": "2020-05-01T12:30:00.000Z",
"updatedAt": "2020-05-01T12:30:00.000Z"
}
GET/api/accounts/{accountId}/withdrawals
This endpoint allows you to list the withdrawals for an Account.
Request
GET/api/accounts/aBc932S9182qwCDqwer/withdrawals
curl -X GET \
https://service.centrapay.com/api/accounts/aBc932S9182qwCDqwer/withdrawals \
-H 'x-api-key: <TOKEN>'
Response
{
"items": [
{
"id": "5thg2RPBZEfYTPJdQ63Cre",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY",
"accountId": "aBc932S9182qwCDqwer",
"type": "withdrawal",
"amount": "10000",
"status": "created",
"createdAt": "2020-05-01T12:30:00.000Z",
"updatedAt": "2020-05-01T12:30:00.000Z"
},
{
"id": "hg2RfYTQ635tPBZEPJdCre",
"assetId": "Te2uDM7xhDLWGVJU3nzwnh",
"bankAccountId": "FRhAzzWpTKb5U7pZygQjjY",
"accountId": "aBc932S9182qwCDqwer",
"type": "withdrawal",
"amount": "10000",
"status": "done",
"createdAt": "2020-05-01T12:30:00.000Z",
"updatedAt": "2020-05-01T12:30:00.000Z"
}
]
}
POST/api/funds-transfers/{fundsTransferId}/abort
This endpoint allows you to abort a Funds Transfer.
Errors
ABORT_WITHDRAWAL_NOT_SUPPORTED
403FUNDS_TRANSFER_ALREADY_COMPLETE
403
Request
POST/api/funds-transfers/5thg2RPBZEfYTPJdQ63Cre/abort
curl -X POST \
https://service.centrapay.com/api/funds-transfers/5thg2RPBZEfYTPJdQ63Cre/abort \
-H 'x-api-key: <TOKEN>'
Response
{}