Retrieve a specific settlement for a transaction by its unique identifier.
package hello.world;
import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.errors.*;
import com.gr4vy.sdk.models.operations.GetTransactionSettlementResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Gr4vy sdk = Gr4vy.builder()
.merchantAccountId("<id>")
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetTransactionSettlementResponse res = sdk.transactions().settlements().get()
.transactionId("7099948d-7286-47e4-aad8-b68f7eb44591")
.settlementId("b1e2c3d4-5678-1234-9abc-1234567890ab")
.call();
if (res.settlement().isPresent()) {
System.out.println(res.settlement().get());
}
}
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
transactionId |
String | ✔️ | The unique identifier of the transaction. | 7099948d-7286-47e4-aad8-b68f7eb44591 |
settlementId |
String | ✔️ | The unique identifier of the settlement. | b1e2c3d4-5678-1234-9abc-1234567890ab |
merchantAccountId |
JsonNullable<String> | ➖ | The ID of the merchant account to use for this request. |
GetTransactionSettlementResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/Error400 | 400 | application/json |
| models/errors/Error401 | 401 | application/json |
| models/errors/Error403 | 403 | application/json |
| models/errors/Error404 | 404 | application/json |
| models/errors/Error405 | 405 | application/json |
| models/errors/Error409 | 409 | application/json |
| models/errors/HTTPValidationError | 422 | application/json |
| models/errors/Error425 | 425 | application/json |
| models/errors/Error429 | 429 | application/json |
| models/errors/Error500 | 500 | application/json |
| models/errors/Error502 | 502 | application/json |
| models/errors/Error504 | 504 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
List all settlements for a specific transaction.
package hello.world;
import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.errors.*;
import com.gr4vy.sdk.models.operations.ListTransactionSettlementsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Gr4vy sdk = Gr4vy.builder()
.merchantAccountId("<id>")
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
ListTransactionSettlementsResponse res = sdk.transactions().settlements().list()
.transactionId("7099948d-7286-47e4-aad8-b68f7eb44591")
.call();
if (res.settlements().isPresent()) {
System.out.println(res.settlements().get());
}
}
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
transactionId |
String | ✔️ | The unique identifier of the transaction. | 7099948d-7286-47e4-aad8-b68f7eb44591 |
merchantAccountId |
JsonNullable<String> | ➖ | The ID of the merchant account to use for this request. |
ListTransactionSettlementsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/Error400 | 400 | application/json |
| models/errors/Error401 | 401 | application/json |
| models/errors/Error403 | 403 | application/json |
| models/errors/Error404 | 404 | application/json |
| models/errors/Error405 | 405 | application/json |
| models/errors/Error409 | 409 | application/json |
| models/errors/HTTPValidationError | 422 | application/json |
| models/errors/Error425 | 425 | application/json |
| models/errors/Error429 | 429 | application/json |
| models/errors/Error500 | 500 | application/json |
| models/errors/Error502 | 502 | application/json |
| models/errors/Error504 | 504 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |