Silvergate API Service 2.0

API change history

This is our latest API good from April 2018 going forward

account/sendwire

Sendwire is a BETA wire transfer request mechanism which batches requests and processes them through a client’s existing electronic banking workflow.

Try it

Request

Request URL

Request headers

  • string

    jwt access token

  • (optional)
    string
    Media type of the body sent to the API.
  • string
    Subscription key which provides access to this API. Found in your Profile.

Request body

Field Name Description Data Type Length Sample Opt/Req Comments
SequenceNumber The sequence number helps match input requests and output responses, it does not get stored in any transactional record Numeric 8 1234 Optional Used to reassemble responses, this is for your use only, does not appear in any transactional record, not recallable
SendingAccountNumber The account from which you will debit the transfer amount String 20 9999999999 Required
Amount The dollar amount of the transfer Decimal 13 10000 Required
SendOnDate The date on which you want the transfer to be approved and ultimately sent Date 10 7/1/2018 Required The cutoff time for wires on week days is 1:30 PM Pacific Standard Time (13:30).
RoutingType This is the routing method, options are ABA or SWIFT string 5 ABA Required
RoutingId This is either the ABA routing number of the receiving bank or the SWIFT BIC (Bank Identifier Code) string 11 12345678 Required
RecipientAccountNumber The account number of the intended recipient of the transfer string 35 1111111111 Required
RecipientBankName The bank name of the intended recipient of the transfer string 35 Required
RecipientBankAddress1 The bank address of the intended recipient of the transfer string 35 Required
RecipientBankAddress2 The bank address of the intended recipient of the transfer string 35 Required
RecipientBankAddress3 The bank address of the intended recipient of the transfer string 35 Optional
RecipientName The name of the intended recipient (person or entity) string 35 Required
RecipientAddress1 The address of the intended recipient (person or entity) string 35 Required
RecipientAddress2 The address of the intended recipient (person or entity) string 35 Required
RecipientAddress3 The address of the intended recipient (person or entity) string 35 Optional
AdditionalInfo Can be used to send any additional reference code. It maps to wire detail OriginatortoBeneficiary fields lines 1 through 4 string 140 Optional
IntermediaryRoutingType Intermediary bank routing method string 5 ABA Optional This can only be ABA, even if main RoutingType is SWIFT
IntermediaryBankId Intermediary bank routing id string 11 12345678 Optional
IntermediaryAccount Intermediary bank account number string 35 8888888888 Optional
IntermediaryBankName Intermediary bank name string 35 Optional
IntermediaryBankAddress1 Intermediary bank address string 35 Optional
IntermediaryBankAddress2 Intermediary bank address string 35 Optional
IntermediaryBankAddress3 Intermediary bank address string 35 Optional

{
  "SequenceNumber": 0,
  "SendingAccountNumber": "string",
  "Amount": 0.0,
  "SendOnDate": "string",
  "RoutingType": "string",
  "RoutingId": "string",
  "RecipientAccountNumber": "string",
  "RecipientBankName": "string",
  "RecipientBankAddress1": "string",
  "RecipientBankAddress2": "string",
  "RecipientBankAddress3": "string",
  "RecipientName": "string",
  "RecipientAddress1": "string",
  "RecipientAddress2": "string",
  "RecipientAddress3": "string",
  "AdditionalInfo": "string",
  "IntermediaryRoutingType": "string",
  "IntermediaryRoutingId": "string",
  "IntermediaryAccount": "string",
  "IntermediaryBankName": "string",
  "IntermediaryBankAddress1": "string",
  "IntermediaryBankAddress2": "string",
  "IntermediaryBankAddress3": "string"
}
{
  "type": "object",
  "properties": {
    "SequenceNumber": {
      "format": "int32",
      "type": "integer"
    },
    "SendingAccountNumber": {
      "type": "string"
    },
    "Amount": {
      "format": "double",
      "type": "number"
    },
    "SendOnDate": {
      "format": "date-time",
      "type": "string"
    },
    "RoutingType": {
      "type": "string"
    },
    "RoutingId": {
      "type": "string"
    },
    "RecipientAccountNumber": {
      "type": "string"
    },
    "RecipientBankName": {
      "type": "string"
    },
    "RecipientBankAddress1": {
      "type": "string"
    },
    "RecipientBankAddress2": {
      "type": "string"
    },
    "RecipientBankAddress3": {
      "type": "string"
    },
    "RecipientName": {
      "type": "string"
    },
    "RecipientAddress1": {
      "type": "string"
    },
    "RecipientAddress2": {
      "type": "string"
    },
    "RecipientAddress3": {
      "type": "string"
    },
    "AdditionalInfo": {
      "type": "string"
    },
    "IntermediaryRoutingType": {
      "type": "string"
    },
    "IntermediaryRoutingId": {
      "type": "string"
    },
    "IntermediaryAccount": {
      "type": "string"
    },
    "IntermediaryBankName": {
      "type": "string"
    },
    "IntermediaryBankAddress1": {
      "type": "string"
    },
    "IntermediaryBankAddress2": {
      "type": "string"
    },
    "IntermediaryBankAddress3": {
      "type": "string"
    }
  }
}
{
  "SequenceNumber": 0,
  "SendingAccountNumber": "string",
  "Amount": 0.0,
  "SendOnDate": "string",
  "RoutingType": "string",
  "RoutingId": "string",
  "RecipientAccountNumber": "string",
  "RecipientBankName": "string",
  "RecipientBankAddress1": "string",
  "RecipientBankAddress2": "string",
  "RecipientBankAddress3": "string",
  "RecipientName": "string",
  "RecipientAddress1": "string",
  "RecipientAddress2": "string",
  "RecipientAddress3": "string",
  "AdditionalInfo": "string",
  "IntermediaryRoutingType": "string",
  "IntermediaryRoutingId": "string",
  "IntermediaryAccount": "string",
  "IntermediaryBankName": "string",
  "IntermediaryBankAddress1": "string",
  "IntermediaryBankAddress2": "string",
  "IntermediaryBankAddress3": "string"
}
{
  "type": "object",
  "properties": {
    "SequenceNumber": {
      "format": "int32",
      "type": "integer"
    },
    "SendingAccountNumber": {
      "type": "string"
    },
    "Amount": {
      "format": "double",
      "type": "number"
    },
    "SendOnDate": {
      "format": "date-time",
      "type": "string"
    },
    "RoutingType": {
      "type": "string"
    },
    "RoutingId": {
      "type": "string"
    },
    "RecipientAccountNumber": {
      "type": "string"
    },
    "RecipientBankName": {
      "type": "string"
    },
    "RecipientBankAddress1": {
      "type": "string"
    },
    "RecipientBankAddress2": {
      "type": "string"
    },
    "RecipientBankAddress3": {
      "type": "string"
    },
    "RecipientName": {
      "type": "string"
    },
    "RecipientAddress1": {
      "type": "string"
    },
    "RecipientAddress2": {
      "type": "string"
    },
    "RecipientAddress3": {
      "type": "string"
    },
    "AdditionalInfo": {
      "type": "string"
    },
    "IntermediaryRoutingType": {
      "type": "string"
    },
    "IntermediaryRoutingId": {
      "type": "string"
    },
    "IntermediaryAccount": {
      "type": "string"
    },
    "IntermediaryBankName": {
      "type": "string"
    },
    "IntermediaryBankAddress1": {
      "type": "string"
    },
    "IntermediaryBankAddress2": {
      "type": "string"
    },
    "IntermediaryBankAddress3": {
      "type": "string"
    }
  }
}
<Silvergate.ESB.API.DAL.BatchWireRequest>
  <SequenceNumber>0</SequenceNumber>
  <SendingAccountNumber>string</SendingAccountNumber>
  <Amount>0</Amount>
  <SendOnDate>string</SendOnDate>
  <RoutingType>string</RoutingType>
  <RoutingId>string</RoutingId>
  <RecipientAccountNumber>string</RecipientAccountNumber>
  <RecipientBankName>string</RecipientBankName>
  <RecipientBankAddress1>string</RecipientBankAddress1>
  <RecipientBankAddress2>string</RecipientBankAddress2>
  <RecipientBankAddress3>string</RecipientBankAddress3>
  <RecipientName>string</RecipientName>
  <RecipientAddress1>string</RecipientAddress1>
  <RecipientAddress2>string</RecipientAddress2>
  <RecipientAddress3>string</RecipientAddress3>
  <AdditionalInfo>string</AdditionalInfo>
  <IntermediaryRoutingType>string</IntermediaryRoutingType>
  <IntermediaryRoutingId>string</IntermediaryRoutingId>
  <IntermediaryAccount>string</IntermediaryAccount>
  <IntermediaryBankName>string</IntermediaryBankName>
  <IntermediaryBankAddress1>string</IntermediaryBankAddress1>
  <IntermediaryBankAddress2>string</IntermediaryBankAddress2>
  <IntermediaryBankAddress3>string</IntermediaryBankAddress3>
</Silvergate.ESB.API.DAL.BatchWireRequest>
{
  "type": "object",
  "properties": {
    "SequenceNumber": {
      "format": "int32",
      "type": "integer"
    },
    "SendingAccountNumber": {
      "type": "string"
    },
    "Amount": {
      "format": "double",
      "type": "number"
    },
    "SendOnDate": {
      "format": "date-time",
      "type": "string"
    },
    "RoutingType": {
      "type": "string"
    },
    "RoutingId": {
      "type": "string"
    },
    "RecipientAccountNumber": {
      "type": "string"
    },
    "RecipientBankName": {
      "type": "string"
    },
    "RecipientBankAddress1": {
      "type": "string"
    },
    "RecipientBankAddress2": {
      "type": "string"
    },
    "RecipientBankAddress3": {
      "type": "string"
    },
    "RecipientName": {
      "type": "string"
    },
    "RecipientAddress1": {
      "type": "string"
    },
    "RecipientAddress2": {
      "type": "string"
    },
    "RecipientAddress3": {
      "type": "string"
    },
    "AdditionalInfo": {
      "type": "string"
    },
    "IntermediaryRoutingType": {
      "type": "string"
    },
    "IntermediaryRoutingId": {
      "type": "string"
    },
    "IntermediaryAccount": {
      "type": "string"
    },
    "IntermediaryBankName": {
      "type": "string"
    },
    "IntermediaryBankAddress1": {
      "type": "string"
    },
    "IntermediaryBankAddress2": {
      "type": "string"
    },
    "IntermediaryBankAddress3": {
      "type": "string"
    }
  }
}
<Silvergate.ESB.API.DAL.BatchWireRequest>
  <SequenceNumber>0</SequenceNumber>
  <SendingAccountNumber>string</SendingAccountNumber>
  <Amount>0</Amount>
  <SendOnDate>string</SendOnDate>
  <RoutingType>string</RoutingType>
  <RoutingId>string</RoutingId>
  <RecipientAccountNumber>string</RecipientAccountNumber>
  <RecipientBankName>string</RecipientBankName>
  <RecipientBankAddress1>string</RecipientBankAddress1>
  <RecipientBankAddress2>string</RecipientBankAddress2>
  <RecipientBankAddress3>string</RecipientBankAddress3>
  <RecipientName>string</RecipientName>
  <RecipientAddress1>string</RecipientAddress1>
  <RecipientAddress2>string</RecipientAddress2>
  <RecipientAddress3>string</RecipientAddress3>
  <AdditionalInfo>string</AdditionalInfo>
  <IntermediaryRoutingType>string</IntermediaryRoutingType>
  <IntermediaryRoutingId>string</IntermediaryRoutingId>
  <IntermediaryAccount>string</IntermediaryAccount>
  <IntermediaryBankName>string</IntermediaryBankName>
  <IntermediaryBankAddress1>string</IntermediaryBankAddress1>
  <IntermediaryBankAddress2>string</IntermediaryBankAddress2>
  <IntermediaryBankAddress3>string</IntermediaryBankAddress3>
</Silvergate.ESB.API.DAL.BatchWireRequest>
{
  "type": "object",
  "properties": {
    "SequenceNumber": {
      "format": "int32",
      "type": "integer"
    },
    "SendingAccountNumber": {
      "type": "string"
    },
    "Amount": {
      "format": "double",
      "type": "number"
    },
    "SendOnDate": {
      "format": "date-time",
      "type": "string"
    },
    "RoutingType": {
      "type": "string"
    },
    "RoutingId": {
      "type": "string"
    },
    "RecipientAccountNumber": {
      "type": "string"
    },
    "RecipientBankName": {
      "type": "string"
    },
    "RecipientBankAddress1": {
      "type": "string"
    },
    "RecipientBankAddress2": {
      "type": "string"
    },
    "RecipientBankAddress3": {
      "type": "string"
    },
    "RecipientName": {
      "type": "string"
    },
    "RecipientAddress1": {
      "type": "string"
    },
    "RecipientAddress2": {
      "type": "string"
    },
    "RecipientAddress3": {
      "type": "string"
    },
    "AdditionalInfo": {
      "type": "string"
    },
    "IntermediaryRoutingType": {
      "type": "string"
    },
    "IntermediaryRoutingId": {
      "type": "string"
    },
    "IntermediaryAccount": {
      "type": "string"
    },
    "IntermediaryBankName": {
      "type": "string"
    },
    "IntermediaryBankAddress1": {
      "type": "string"
    },
    "IntermediaryBankAddress2": {
      "type": "string"
    },
    "IntermediaryBankAddress3": {
      "type": "string"
    }
  }
}

Responses

200 OK

Wire was sent for processing successfully

Representations

{
  "SequenceNumber": 0,
  "WireId": 0,
  "Message": "string"
}
{
  "type": "object",
  "properties": {
    "SequenceNumber": {
      "format": "int32",
      "type": "integer"
    },
    "WireId": {
      "format": "int32",
      "type": "integer"
    },
    "Message": {
      "type": "string"
    }
  }
}
{
  "SequenceNumber": 0,
  "WireId": 0,
  "Message": "string"
}
{
  "type": "object",
  "properties": {
    "SequenceNumber": {
      "format": "int32",
      "type": "integer"
    },
    "WireId": {
      "format": "int32",
      "type": "integer"
    },
    "Message": {
      "type": "string"
    }
  }
}
<Silvergate.ESB.API.DAL.BatchWireResponse>
  <SequenceNumber>0</SequenceNumber>
  <WireId>0</WireId>
  <Message>string</Message>
</Silvergate.ESB.API.DAL.BatchWireResponse>
{
  "type": "object",
  "properties": {
    "SequenceNumber": {
      "format": "int32",
      "type": "integer"
    },
    "WireId": {
      "format": "int32",
      "type": "integer"
    },
    "Message": {
      "type": "string"
    }
  }
}
<Silvergate.ESB.API.DAL.BatchWireResponse>
  <SequenceNumber>0</SequenceNumber>
  <WireId>0</WireId>
  <Message>string</Message>
</Silvergate.ESB.API.DAL.BatchWireResponse>
{
  "type": "object",
  "properties": {
    "SequenceNumber": {
      "format": "int32",
      "type": "integer"
    },
    "WireId": {
      "format": "int32",
      "type": "integer"
    },
    "Message": {
      "type": "string"
    }
  }
}

400 Bad Request

Invalid request information

401 Unauthorized

Access Information cannot be Authenticated

503 Service Unavailable

Host connection cannot be established

Code samples

@ECHO OFF

curl -v -X POST "https://silvergate.azure-api.net/v2/account/sendwire"
-H "Authorization: "
-H "Content-Type: application/json"
-H "Ocp-Apim-Subscription-Key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Authorization", "");
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            var uri = "https://silvergate.azure-api.net/v2/account/sendwire?" + queryString;

            HttpResponseMessage response;

            // Request body
            byte[] byteData = Encoding.UTF8.GetBytes("{body}");

            using (var content = new ByteArrayContent(byteData))
            {
               content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
               response = await client.PostAsync(uri, content);
            }

        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://silvergate.azure-api.net/v2/account/sendwire");


            URI uri = builder.build();
            HttpPost request = new HttpPost(uri);
            request.setHeader("Authorization", "");
            request.setHeader("Content-Type", "application/json");
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://silvergate.azure-api.net/v2/account/sendwire?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Authorization","");
                xhrObj.setRequestHeader("Content-Type","application/json");
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
            },
            type: "POST",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://silvergate.azure-api.net/v2/account/sendwire";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"POST"];
    // Request headers
    [_request setValue:@"" forHTTPHeaderField:@"Authorization"];
    [_request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://silvergate.azure-api.net/v2/account/sendwire');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Authorization' => '',
    'Content-Type' => 'application/json',
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_POST);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Authorization': '',
    'Content-Type': 'application/json',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('silvergate.azure-api.net')
    conn.request("POST", "/v2/account/sendwire?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Authorization': '',
    'Content-Type': 'application/json',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('silvergate.azure-api.net')
    conn.request("POST", "/v2/account/sendwire?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://silvergate.azure-api.net/v2/account/sendwire')


request = Net::HTTP::Post.new(uri.request_uri)
# Request headers
request['Authorization'] = ''
# Request headers
request['Content-Type'] = 'application/json'
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body