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.
Request
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"
}
/api/topups
This endpoint allows you to list the Top Ups for authorized accounts.
Request
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"
}
]
/api/accounts/{accountId}/topups
This endpoint allows you to list the Top Ups for an account.
Request
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"
}
]
/api/withdrawals
This endpoint allows you to create a withdrawal.
Attributes
assetId
bankAccountId
Errors
BANK_AUTHORITY_WALLET_MISMATCH
INSUFFICIENT_WALLET_BALANCE
INVALID_WALLET_TYPE
BANK_ACCOUNT_TYPE_NOT_CONFIGURED_FOR_WITHDRAWAL
Request
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"
}
/api/withdrawals/{withdrawalId}
This endpoint allows you to retrieve a Withdrawal by id.
Errors
BANK_AUTHORITY_WALLET_MISMATCH
INSUFFICIENT_WALLET_BALANCE
INVALID_WALLET_TYPE
BANK_ACCOUNT_TYPE_NOT_CONFIGURED_FOR_WITHDRAWAL
Request
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"
}
/api/accounts/{accountId}/withdrawals
This endpoint allows you to list the withdrawals for an Account.
Request
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"
}
]
}
/api/funds-transfers/{fundsTransferId}/abort
This endpoint allows you to abort a Funds Transfer.
Errors
ABORT_WITHDRAWAL_NOT_SUPPORTED
FUNDS_TRANSFER_ALREADY_COMPLETE
Request
curl -X POST \
https://service.centrapay.com/api/funds-transfers/5thg2RPBZEfYTPJdQ63Cre/abort \
-H 'x-api-key: <TOKEN>'
Response
{}