- listAccounts - List business accounts
- getAccount - Get business account
- list - List transactions
- get - Get transaction
Retrieve all business accounts for the authenticated organization.
The results are paginated.
package hello.world;
import com.mollie.mollie.Client;
import com.mollie.mollie.models.components.Security;
import com.mollie.mollie.models.components.Sorting;
import com.mollie.mollie.models.errors.ErrorResponse;
import com.mollie.mollie.models.operations.ListBusinessAccountsRequest;
import com.mollie.mollie.models.operations.ListBusinessAccountsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ErrorResponse, Exception {
Client sdk = Client.builder()
.testmode(true)
.security(Security.builder()
.oAuth(System.getenv().getOrDefault("O_AUTH", ""))
.build())
.build();
ListBusinessAccountsRequest req = ListBusinessAccountsRequest.builder()
.from("ba_nopqrstuvwxyz23456789A")
.limit(50L)
.sort(Sorting.DESC)
.idempotencyKey("123e4567-e89b-12d3-a456-426")
.build();
sdk.accounts().listAccounts()
.callAsStream()
.forEach((ListBusinessAccountsResponse item) -> {
// handle page
});
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ListBusinessAccountsRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse | 400 | application/hal+json |
| models/errors/APIException | 4XX, 5XX | */* |
Retrieve a single business account object by its account ID. This allows you to check the current status, balance, and account details.
package hello.world;
import com.mollie.mollie.Client;
import com.mollie.mollie.models.components.Security;
import com.mollie.mollie.models.errors.ErrorResponse;
import com.mollie.mollie.models.operations.GetBusinessAccountResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ErrorResponse, Exception {
Client sdk = Client.builder()
.testmode(true)
.security(Security.builder()
.oAuth(System.getenv().getOrDefault("O_AUTH", ""))
.build())
.build();
GetBusinessAccountResponse res = sdk.accounts().getAccount()
.businessAccountId("ba_nopqrstuvwxyz23456789A")
.idempotencyKey("123e4567-e89b-12d3-a456-426")
.call();
if (res.businessAccountResponse().isPresent()) {
System.out.println(res.businessAccountResponse().get());
}
}
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
businessAccountId |
String | ✔️ | Provide the ID of the related business account. | ba_nopqrstuvwxyz23456789A |
testmode |
Optional<Boolean> | ➖ | Most API credentials are specifically created for either live mode or test mode. In those cases the testmode queryparameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting the testmode query parameter to true.Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa. |
|
idempotencyKey |
Optional<String> | ➖ | A unique key to ensure idempotent requests. This key should be a UUID v4 string. | 123e4567-e89b-12d3-a456-426 |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse | 404 | application/hal+json |
| models/errors/APIException | 4XX, 5XX | */* |
Retrieve all transactions for a specific business account.
The results are paginated.
package hello.world;
import com.mollie.mollie.Client;
import com.mollie.mollie.models.components.Security;
import com.mollie.mollie.models.components.Sorting;
import com.mollie.mollie.models.errors.ErrorResponse;
import com.mollie.mollie.models.operations.ListBusinessAccountTransactionsRequest;
import com.mollie.mollie.models.operations.ListBusinessAccountTransactionsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ErrorResponse, Exception {
Client sdk = Client.builder()
.testmode(true)
.security(Security.builder()
.oAuth(System.getenv().getOrDefault("O_AUTH", ""))
.build())
.build();
ListBusinessAccountTransactionsRequest req = ListBusinessAccountTransactionsRequest.builder()
.businessAccountId("ba_nopqrstuvwxyz23456789A")
.from("batr_87GByBuj4UCcUTEbs6aGJ")
.limit(50L)
.sort(Sorting.DESC)
.idempotencyKey("123e4567-e89b-12d3-a456-426")
.build();
sdk.accounts().list()
.callAsStream()
.forEach((ListBusinessAccountTransactionsResponse item) -> {
// handle page
});
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ListBusinessAccountTransactionsRequest | ✔️ | The request object to use for the request. |
ListBusinessAccountTransactionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse | 400 | application/hal+json |
| models/errors/APIException | 4XX, 5XX | */* |
Retrieve a single transaction object by its transaction ID. This allows you to check the details, amount, counterparty, and balance impact of a specific transaction.
package hello.world;
import com.mollie.mollie.Client;
import com.mollie.mollie.models.components.Security;
import com.mollie.mollie.models.errors.ErrorResponse;
import com.mollie.mollie.models.operations.GetBusinessAccountTransactionResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ErrorResponse, Exception {
Client sdk = Client.builder()
.testmode(true)
.security(Security.builder()
.oAuth(System.getenv().getOrDefault("O_AUTH", ""))
.build())
.build();
GetBusinessAccountTransactionResponse res = sdk.accounts().get()
.businessAccountId("ba_nopqrstuvwxyz23456789A")
.transactionId("batr_87GByBuj4UCcUTEbs6aGJ")
.idempotencyKey("123e4567-e89b-12d3-a456-426")
.call();
if (res.transactionResponse().isPresent()) {
System.out.println(res.transactionResponse().get());
}
}
}package hello.world;
import com.mollie.mollie.Client;
import com.mollie.mollie.models.components.Security;
import com.mollie.mollie.models.errors.ErrorResponse;
import com.mollie.mollie.models.operations.GetBusinessAccountTransactionResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ErrorResponse, Exception {
Client sdk = Client.builder()
.testmode(true)
.security(Security.builder()
.oAuth(System.getenv().getOrDefault("O_AUTH", ""))
.build())
.build();
GetBusinessAccountTransactionResponse res = sdk.accounts().get()
.businessAccountId("ba_nopqrstuvwxyz23456789A")
.transactionId("batr_87GByBuj4UCcUTEbs6aGJ")
.idempotencyKey("123e4567-e89b-12d3-a456-426")
.call();
if (res.transactionResponse().isPresent()) {
System.out.println(res.transactionResponse().get());
}
}
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
businessAccountId |
String | ✔️ | Provide the ID of the related business account. | ba_nopqrstuvwxyz23456789A |
transactionId |
String | ✔️ | Provide the ID of the related transaction. | batr_87GByBuj4UCcUTEbs6aGJ |
testmode |
Optional<Boolean> | ➖ | Most API credentials are specifically created for either live mode or test mode. In those cases the testmode queryparameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting the testmode query parameter to true.Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa. |
|
idempotencyKey |
Optional<String> | ➖ | A unique key to ensure idempotent requests. This key should be a UUID v4 string. | 123e4567-e89b-12d3-a456-426 |
GetBusinessAccountTransactionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse | 404 | application/hal+json |
| models/errors/APIException | 4XX, 5XX | */* |