/get_statement_transactions
Lists statement transactions for a single wallet on a specific app.
Request
The request body at this endpoint is the statements JSON object.
Results are paginated; by default, the first 50 results are returned. You can also request up to 1,000 results per page ("per_page": 1,000)
Authorization / Authentication
Apps using Access Token Authorization
Use a valid access token in an Authorization: Bearer request header.
See Authenticating with an Access Token for more details.
Apps using ECDSA Authentication
The auth signature header is required for this request. The user signature header is optional. If you choose to omit the user signature header, you'll also need to omit the user_handle from the Header object.
See the section on ECDSA Authentication for more detail about ECDSA signature generation.
Note - We recently renamed the field auth_handle to app_handle. For backward compatibility, auth_handle is still valid but has been removed from our documentation.
POST /0.2/get_statement_transactions HTTP/1.1
Host: sandbox.silamoney.com
Content-Type: application/json
// if using OAuth2
Authorization: Bearer [GENERATED JWT TOKEN HERE]
// if using ECDSA
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
{
"header": {
"app_handle": "handle.silamoney",
"user_handle": "user.silamoney"
},
"wallet_id":"cba01abd-07f1-4h8c-a672-cfd76294a906",
"month": "03-2023",
"page": 1,
"per_page": 50
}
String userHandle="user_handle";
String userPrivateKey= "user_private_key";
String walletId="unique wallet id";
String defaultMonth = "03-2023";
int page = 1;
int perPage = 1000;
ApiResponse response = api.getStatementTransactions(userHandle, userPrivateKey, walletId,defaultMonth,page,perPage);
Key | Type | Description |
---|---|---|
header | JSON Object | Required Requires these keys in JSON format: created, app_handle user_handle is optional. See the /check_handle endpoint for the complete list of fields in this object. |
wallet_id | String | Required wallet_uuid - Can be found by calling /get_statements_data, /get_wallet, or /get_wallets. |
month | string / ISO-8601 month | Optional Selects which month's statement is returned. It not provided the most recent month will be returned (excluding current month). |
page | Integer | Optional Min: 1 Default: 1 |
per_page | Integer | Optional Min: 1 Max: 1000 Default per page: 50 |
Response
Response will be paginated based on parameters set in the request.
HTTP/1.1 200 OK
{
"success": true,
"statement_data": [
{
"user_handle": "user.silamoney",
"first_name": "First",
"last_name": "Last",
"date": "03-2023",
"wallet_id": "00a01d14-0sd0-avcc-a672-cfd908794a225",
"beginning_balance": "$0.00",
"ending_balance": "$5,489.00",
"transactions": [
{
"settled_date": "2023-03-08T19:58:25.686126Z",
"description": "Credit from default",
"category": "Credit",
"amount": "$100.00",
"running_balance": "$100.00"
},
{
"settled_date": "2023-03-08T19:58:26.087678Z",
"description": "Credit from default",
"category": "Credit",
"amount": "$200.00",
"running_balance": "$300.00"
}
]
}
],
"pagination": {
"returned_count": 2,
"total_count": 2,
"current_page": 1,
"total_pages": 1
},
"status": "SUCCESS",
"reference": "<your unique id>",
"response_time_ms": "299"
}
String userHandle="user_handle";
String userPrivateKey= "user_private_key";
String walletId="unique wallet id";
String defaultMonth = "03-2023";
int page = 1;
int perPage = 1000;
ApiResponse response = api.getStatementTransactions(userHandle, userPrivateKey, walletId,defaultMonth,page,perPage);
//Success Response
System.out.println(response.getStatusCode()); // 200
GetStatementTransactionsResponse parsedResponse = (GetStatementTransactionsResponse) response.getData();
System.out.println(parsedResponse.getReference()); // Random reference number
System.out.println(parsedResponse.getSuccess());
System.out.println(parsedResponse.getStatus()); // SUCCESS
System.out.println(parsedResponse.getMessage());
System.out.println(parsedResponse.getResponseTimeMs());
List<Statement> statements = parsedResponse.getStatementData(); // Statements data
Statement statement = statements.get(0);
TransactionEntity transaction = statement.getTransactions().get(0);
// Statement fields
System.out.println(statement.getUserHandle());
System.out.println(statement.getDate());
System.out.println(statement.getFirstName());
System.out.println(statement.getLastName());
System.out.println(statement.getWalletId());
System.out.println(statement.getBeginningBalance());
System.out.println(statement.getEndingBalance());
// Transaction fields
System.out.println(transaction.getSettledDate());
System.out.println(transaction.getDescription());
System.out.println(transaction.getDescriptor());
Status Code | Success Attribute | Description |
---|---|---|
200 | true | Able to return statements information. |
400 | false | Bad request format - check validation_details for more information. |
403 | false | Bad/absent signature header. |
500 | false | Server-side issue; please reach out to Sila support. |
Updated about 1 year ago