Introduction

The CrowdPay API is a REST-based interface to our CrowdPay Escro services. Before any API calls can be made it is necessary to contact the CrowdPay team to get credentials and have your server IP address whitelisted.

URL

The URL schema for the API is:

Version 1: https://{domain}/crowdfunding/api/{resource}
Version 2: https://{domain}/crowdfunding/api/{version}/{resource}

The meaning for each of the tokens in brackets of the URL schema are:

  • {domain}: You will receive this with your credentials after contacting the CrowdPay Team
  • {version}: The version of the API you use for communication (e.g. v1 or v2)
  • {resource}: The resource you want to perform operations on.

Version 1: The endpoint POST "https://qaservices.goldstartrust.com/crowdfunding/api/Investor" using the Investor object model listed below will create an investor resource.
Version 2: The endpoint POST "https://qaservices.goldstartrust.com/crowdfuncing/api/v2/Investor using the appropriate version of teh Investor object model listed below will create an investor resource."

HTTP Headers

  • X-ApiKey: Your unique API key will be required in the header of all API calls
  • X-PortalKey: The portal key identifies the escrow (offering) and is also required in the header of all API calls
  • X-ByPassValidation: This boolean value is only used in QA (a.k.a. "The Sandbox") to bypass validation that would prevent transactions from being processed, if included on a live API call in production it will be ignored

Security

All calls are to be made securely with HTTP over SSL ("https://...")

Tools

Postman is a good tool to use when working with the API.

Object Models and Code Examples

Investor

Object Model

public long id { get; set; }

public Guid? Investor_key { get; set; }

[StringLength(9)]
[MinLength(9)]
[MaxLength(9)]
[Required] public string tax_id_number { get; set; }

[StringLength(50)]
public string first_name { get; set; }

[StringLength(50)]
public string middle_name { get; set; }

[StringLength(50)]
public string last_name { get; set; }

[StringLength(150)]
public string name { get; set; }

[Column(TypeName = "date")]
public DateTime? birth_date { get; set; }

[StringLength(40)]
public string mailing_address_1 { get; set; }

[StringLength(40)]
public string mailing_address_2 { get; set; }

[StringLength(40)]
public string mailing_city { get; set; }

[StringLength(30)]
public string mailing_state { get; set; }

[StringLength(9)]
public string mailing_zip { get; set; }

[StringLength(40)]
public string mailing_country { get; set; }

[Required]
public bool is_mailing_address_foreign { get; set; }

[StringLength(40)]
public string legal_address_1 { get; set; }

[StringLength(40)]
public string legal_address_2 { get; set; }

[StringLength(40)]
public string legal_city { get; set; }

[StringLength(30)]
public string legal_state { get; set; }

[StringLength(9)]
public string legal_zip { get; set; }

[StringLength(40)]
public string legal_country { get; set; }

public bool is_legal_address_foreign { get; set; }

[StringLength(10)]
public string primary_phone { get; set; }

[StringLength(10)]
public string secondary_phone { get; set; }

[Required]
public bool is_person { get; set; }

[StringLength(50)]
public string email { get; set; }

[Required]
public bool is_cip_satisfied { get; set; }

[StringLength(30)]
public string portal_investor_number { get; set; }

[StringLength(45)] [Required] public string created_by_ip_address { get; set; } public ICollection<Account> Accounts

Create Investor (all versions)

Request

Content-Type: application/json POST https://qaservices.goldstartrust.com/Crowdfunding/api/Investor { "id": 0, "tax_id_number": "111223334", "first_name": "InvestorFirst", "middle_name": "InvestorMiddle", "last_name": "InvestorLast", "name": null, "birth_date": "1960-12-31T00:00:00", "mailing_address_1": "123 Ave A", "mailing_address_2": null, "mailing_city": "Somewhere", "mailing_state": "TX", "mailing_zip": "79109", "mailing_country": null, "is_mailing_address_foreign": false, "legal_address_1": "123 Ave A", "legal_address_2": null, "legal_city": "Soemwhere", "legal_state": "TX", "legal_zip": "79109", "legal_country": null, "is_legal_address_foreign": false, "primary_phone": "1112223333", "secondary_phone": "2223334444", "is_person": true, "email": "[email protected]", "is_cip_satisfied": false, "portal_investor_number": "yourinvestornumber", "created_by_ip_address": "123.456.789.012" }

Response

Notice the payload includes the system-assigned id and investor_key attributes. The id attribute must be used when creating accounts associated with this investor. The investor_key attribute must be used to GET this investor. { "id": 76866, "investor_key": "abababab-cdcd-efef-ghgh-jkjkjkjkjkjk", "tax_id_number": "111223334", "first_name": "InvestorFirst", "middle_name": "InvestorMiddle", "last_name": "InvestorLast", "name": null, "birth_date": "1960-12-31T00:00:00", "mailing_address_1": "123 Ave A", "mailing_address_2": null, "mailing_city": "Somewhere", "mailing_state": "TX", "mailing_zip": "79109", "mailing_country": null, "is_mailing_address_foreign": false, "legal_address_1": "123 Ave A", "legal_address_2": null, "legal_city": "Soemwhere", "legal_state": "TX", "legal_zip": "79109", "legal_country": null, "is_legal_address_foreign": false, "primary_phone": "1112223333", "secondary_phone": "2223334444", "is_person": true, "email": "[email protected]", "is_cip_satisfied": false, "portal_investor_number": "yourinvestornumber", "created_by_ip_address": "123.456.789.012", "Accounts": [], "Transactions": [] }

Response codes

Create Investor Response codes go here

Account

Object Model

public long id { get; set; } [StringLength(15)] public string number { get; set; } [StringLength(30)] public string portal_account_number { get; set; } [Required] public long investor_id { get; set; } [StringLength(50)] public string name_1 { get; set; } [StringLength(50)] public string name_2 { get; set; } [StringLength(50)] public string name_3 { get; set; } [StringLength(50)] public string name_4 { get; set; } [StringLength(40)] public string mailing_address_1 { get; set; } [StringLength(40)] public string mailing_address_2 { get; set; } [StringLength(40)] public string mailing_city { get; set; } [StringLength(30)] public string mailing_state { get; set; } [StringLength(9)] public string mailing_zip { get; set; } [StringLength(40)] public string mailing_country { get; set; } [Required] public bool is_mailing_address_foreign { get; set; } public decimal? current_uninvested_cash { get; set; } public decimal? uninvested_cash { get; set; } [Required] public bool is_cip_satisfied { get; set; } // 1=Checking, 2=Savings [Required] [RegularExpression(@"[1-2]")] public int? draft_account_type_id { get; set; } [Required] [MinLength(9)] [MaxLength(9)] public string draft_routing_number { get; set; } [Required] [StringLength(17)] public string draft_account_number { get; set; } [Required] [StringLength(50)] public string draft_account_name { get; set; } // 1=Open, 2=Closed, 3=Pending [Required] [RegularExpression(@"[1-3]")] public int? status_id { get; set; } // 2=Traditional IRA, 11=Roth IRA 12=Non IRA [Required] [RegularExpression(@"[2]|1[1-2]")] // Valid values 2, 11, 12 public int account_type_id { get; set; } // 1=Received W-9/No Withholding 2=W-9 Not Received/Withholding // 3=Manditory Withholding 4=Exempt From Reporting // 5=Corporate - No Reporting 6=Foreign Resident // 7=W-8 Non US Citizen [RegularExpression(@"[1-7]")] // Valid values 1 thru 7 [Required] public int? w9_code_id { get; set; } [StringLength(75)] public string contact_name { get; set; } [StringLength(20)] [RegularExpression(@"^\d+$")] public string contact_phone { get; set; } [StringLength(50)] [Required] public string contact_email { get; set; } public long? idology_id { get; set; } [StringLength(45)] [Required] public string created_by_ip_address { get; set; } public ICollection<Asset> Assets public ICollection<Transaction> Transactions

Create Account

Request

Content-Type: application/json POST https://qaservices.goldstartrust.com/Crowdfunding/api/Account { "portal_account_number": "youraccountnumber", "investor_id": 76866, "name_1": null, "name_2": null, "name_3": null, "name_4": null, "mailing_address_1": "123 Ave A", "mailing_address_2": null, "mailing_city": "Somewhere", "mailing_state": "TX", "mailing_zip": "79109", "mailing_country": null, "is_mailing_address_foreign": "false", "is_cip_satisfied": true, "draft_account_type_id": 1, "draft_routing_number": "111310870", "draft_account_number": "1234567890", "draft_account_name": "First Last", "status_id": 1, "account_type_id": 12, "w9_code_id": 1, "contact_name": "InvestorFirst InvestorLast", "contact_phone": "8061234567", "contact_email": "[email protected]", "idology_id": 123456, "created_by_ip_address": "123.456.789.012" }

Response

Account Model is returned. Notice the id attribute returned; it must be used when making “Funding” and “Escrow” API calls. { "id": 81686, "number": "$1000604176", "portal_account_number": "9876431", "investor_id": 76866, "name_1": "InvestorFirst InvestorMiddle InvestorLast", "name_2": null, "name_3": null, "name_4": null, "mailing_address_1": "123 Ave A", "mailing_address_2": null, "mailing_city": "Somewhere", "mailing_state": "TX", "mailing_zip": "79109", "mailing_country": null, "is_mailing_address_foreign": false, "current_uninvested_cash": 0, "uninvested_cash": 0, "is_cip_satisfied": false, "draft_account_type_id": null, "draft_routing_number": null, "draft_account_number": "1234567890", "draft_account_name": "First Last", "status_id": 1, "account_type_id": 12, "w9_code_id": 1, "contact_name": "InvestorFirst InvestorLast", "contact_phone": "8061234567", "contact_email": "[email protected]", "idology_id": 123456, "created_by_ip_address": "123.456.789.012" }

Response Codes

Create Account Response codes go here

Get Account

Request

{ "id": 81690, "number": "$1000604180", "portal_account_number": "9876431", "investor_id": 123456, "name_1": "InvestorFirst InvestorMiddle InvestorLast", "name_2": null, "name_3": null, "name_4": null, "mailing_address_1": "123 Ave. A", "mailing_address_2": null, "mailing_city": "Amarillo", "mailing_state": "TX", "mailing_zip": "79109", "mailing_country": null, "is_mailing_address_foreign": false, "available_balance": 0, "current_balance": 0, "is_cip_satisfied": false, "draft_account_type_id": 1, "draft_routing_number": "111222333", "draft_account_number": "1234567890", "draft_account_name": "InvestorFirst InvestorLast", "status_id": 1, "account_type_id": 12, "w9_code_id": 1, "contact_name": "InvestorFirst InvestorLast", "contact_phone": "806-123-4567", "contact_email": "[email protected]", "idology_id": 123456, "created_by_ip_address": "123.456.789.012", "Assets": [], "Transactions": [] }

Response

{ "id": 81690, "number": "$1000604180", "portal_account_number": "9876431", "investor_id": 123456, "name_1": "InvestorFirst InvestorMiddle InvestorLast", "name_2": null, "name_3": null, "name_4": null, "mailing_address_1": "3700 Rutson Drive test", "mailing_address_2": null, "mailing_city": "Amarillo", "mailing_state": "TX", "mailing_zip": "79109", "mailing_country": null, "is_mailing_address_foreign": false, "available_balance": 0, "current_balance": 0, "is_cip_satisfied": false, "draft_account_type_id": 1, "draft_routing_number": "111222333", "draft_account_number": "1234567890", "draft_account_name": "InvestorFirst InvestorLast", "status_id": 1, "account_type_id": 12, "w9_code_id": 1, "contact_name": "InvestorFirst InvestorLast", "contact_phone": "806-123-4567", "contact_email": "[email protected]", "idology_id": 123456, "created_by_ip_address": "123.456.789.012", "Assets": [ { "id": 471277, "description": "ACME Wealth Agriculture 101, LLC", "number": "2000001", "sold_date": null, "market_value": 250, "Transactions": [] } ], “Transactions”: [] }

Response codes

Get account response codes go here

Get Account with Assets (version 1)

Request

Get Account with Assets request goes here

Response

Get Account with Assets response goes here

Response Codes

Get Account with Assets response codes go here

Get Account with Assets (version 2+)

Request

Get Account with Assets v2 request goes here

Response

Get Account with Assets v2 response goes here

Response Codes

Get Account with Assets v2 response codes go here

Get Account with Transactions

Request

Get Account with Transactions request goes here

Response

Get Account with Transactions response goes here

Response Codes

Get Account with Transactions response codes go here

Update Account

Notes

Update account notes go here

Request

Update account request goes here

Response

Update Account Response goes here

Response Codes

Update Account response codes go here

Account Transactions

Fund Account

Object Model

Object Model for fund account goes here

Request

Fund account request goes here

Response

Fund Account Response goes here

Response codes

Fund account Response codes go here

Withdraw Funds

Request

Withdraw funds request goes here

Response

Withdraw Funds response code goes here

Response Codes

Withdraw funds Response codes go here

Get Transaction

Request

Get Transaction request goes here

Response

Get Transaction response goes here

Response Code

Get Transaction response code goes here

Asset (Version 1 and 2)

Object Model

Version 1

public long id
public string description
public string number
public DateTime? sold_date
public decimal? market_value
public ICollection<Transaction> Transactions

Version 2

public long id

[StringLength(100)]
public string description

[StringLength(35)]
public string number

public DateTime? sold_date

public decimal? market_value

[RegularExpression(@”^([0-9]{0,2})(\\.[0-9]{1})?$”, ErrorMessage = “Invalid term”)]
public decimal? term { get; set; }

public DateTime? effective_date
[RegularExpression(@”[1-2]”, ErrorMessage = “Invalid interest type. 1=Simple, 2=Compound”)]
public decimal? interest_type { get; set; } [RegularExpression(@”[1-4]”, ErrorMessage = “Invalid interest frequency. 1=Monthy, 2=Quarterly, 3=Semi-Annually, 4=Annually”)]
public decimal? interest_frequency { get; set; }

[Required]
[Range(0.000, 99.999, ErrorMessage = “Interest rate must be between 0.000 and 99.999 inclusively.”)]
[[email protected]”^([0-9]{0,2})(\\.[0-9]{1,3})?$”, ErrorMessage = “Invalid interest_rate”)]
public virtual decimal interest_rate

public DateTime? maturity_date

[StringLength(30)]
public string third_party_asset_number

public ICollection<Transaction> Transactions

Get Asset

Request

Get Asset Request goes here

Response

Get Asset Response goes here

Response Code

Get Asset Response Codes go here

Get Asset version 2

Request

Get Asset version 2 request goes here

Response

Get Asset version 2 response goes here

Response codes

Get Asset version 2 response codes go here

Get Asset with Transactions version 1

Request

Get Asset with Transactions request goes here

Response

Get Asset with Transactions response goes here

Respnse Codes

Get Asset with Transactions response codes go here

Get Asset with Transactions version 2

Request

Get Asset with Transactions version 2 request goes here

Response

Get Asset with Transactions version 2 response goes here

Respnse Codes

Get Asset with Transactions version 2 response codes go here

Escrows

Object Model

Escrow Object