Retrieving settlement details

For transactions with a current state of Settled, the API can retrieve settlement details. These details include the effective settlement date.

// direct REST call from Javascript
var username= "[email protected]",
    password = "notArealpassw0rd";

// check is an earlier transaction we created.
var documentId = check.documentId;

var settings = {
  "async": true,
  "url": "" + documentId + '/settlements,
  "method": "GET",
  "headers": {
        // this header needs to be set on every REST call.
        "Authorization": "Basic " + btoa(username + ":" + password)

$.ajax(settings).done(function (response) {
ChecksApi apiInstance = new ChecksApi();
List<Settlement> settlements = apiInstance.getSettlements("default", 
ACHChecksApi*apiInstance = [[ACHChecksApi alloc] init];

[apiInstance getSettlementsWithClientId:@"default"
 documentId:[check documentId]
 completionHandler: ^(NSArray<ACHSettlement>* output, NSError* error) {
   if (output) {
     NSLog(@"%@", output);
   if (error) {
     NSLog(@"Error calling ACHChecksApi->getSettlements: %@", error);
Client client = new Client("");
client.SetBasicAuth("[email protected]", "notArealpassw0rd");
ObservableCollection<Settlement> settlements = 
    client.GetSettlementsAsync("default", ch.DocumentId).Result;

Settlement Data

The Settlement data object returned by the API for each programming language is described below

  documentId: <Number>,
  traceNumber: <String>,
  amount: <Number>,
  receivedOn: <Date>,
  settledOn: <Date>
public class Settlement   {
  private Long documentId = null;
  private String traceNumber = null;
  private BigDecimal amount = null;
  private Date receivedOn = null;
  private Date settledOn = null;
@interface ACHSettlement : ACHObject

@property(nonatomic) NSNumber* documentId;

@property(nonatomic) NSString* traceNumber;

@property(nonatomic) NSNumber* amount;

@property(nonatomic) NSDate* receivedOn;

@property(nonatomic) NSDate* settledOn;

public partial class Settlement
  public long DocumentId; 
  public string TraceNumber; 
  public decimal Amount; 
  public System.DateTime ReceivedOn; 
  public System.DateTime? SettledOn;