ESCROW API QUICK START GUIDE

The Escrow REST API allows partners to integrate with the Escrow.com platform. This guide contains sample cURL requests to show you how to integrate successfully. For detailed explanations on how to integrate with the API, please refer to the complete Escrow REST API Integration Kit.

Authentication

Authentication is handled via a base-64 encoded Authorization Header that needs to be included in each request. To construct this header, you must base-64 encode your username and password, separated by a colon.

For example, if your username is “test@escrow.com” and your password is "Password1", your Authorization Header would look like this:

Authorization: Basic dGVzdEBlc2Nyb3cuY29tOlBhc3N3b3JkMQ==

The un-encoded segment of the above header is:

test@escrow.com:Password1

Create Transaction Sample

The following sample cURL request will create a transaction on the integration environment (https://stgwww.escrow.com) when POSTing to the following API endpoint (https://stgsecureapi.escrow.com/api/Transaction) for the given partner ID (in this case 10937).

curl -X POST -H "Authorization: Basic dGVzdEBlc2Nyb3cuY29tOlBhc3N3b3JkMQ==" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "Title": "Test General Merchandise Title", "Description": "Description", "TransactionType": "1", "Partner": { "PartnerId": "10937" }, "Buyer": { "Email": "buyer@escrow.com", "Initiator": "false", "CompanyChk": "false", "AutoAgree": "false", "AgreementChecked": "false" }, "Seller": { "Email": "seller@escrow.com", "Initiator": "true", "CompanyChk": "false", "AutoAgree": "false", "AgreementChecked": "false" }, "LineItems": [ { "ItemName": "Line Item 1", "Description": "Line Item 1 Description", "Quantity": "1", "Price": "2500", "Accept": "true", "SellComm": "100", "BuyComm": "50" } ], "EscrowPayment": "0", "ShipmentFee": "25", "ShipmentPayment": "0", "InspectionLength": "6", "Currency": "USD", "Fulfillment": "1", "CommissionType": "1", "InitiationDate": "2014-04-15", "TransactionLocked": "true", "PartnerTransID": "12345", "TermsLocked": "true", "AllowReject": "true", "BrkCommissionBuyerPortion": "0", "BrkCommissionSellerPortion": "500", "BrokerCommissionPayee": "seller" }' "https://stgsecureapi.escrow.com/api/Transaction"

Get Status Sample

The following sample cURL request will retrieve the current status of a transaction on the integration environment (https://stgwww.escrow.com) when GETting the status endpoint with the given partner ID (in this case 10937) and transaction identifier (in this case 12345).

curl -X GET -H "Authorization: Basic dGVzdEBlc2Nyb3cuY29tOlBhc3N3b3JkMQ==" -H "Cache-Control: no-cache" "https://stgsecureapi.escrow.com/api/Status?partnerID=10937&escrowUniqueIdentifier=12345"

Add Tracking Sample

The following sample cURL request will add a tracking number to a transaction on the integration environment (https://stgwww.escrow.com) when POSTing to the following API endpoint (https://stgsecureapi.escrow.com/api/Shipping) for the given partner ID (in this case 10937) and transaction identifier (in this case 456789).

curl -X POST -H "Authorization: Basic dGVzdEBlc2Nyb3cuY29tOlBhc3N3b3JkMQ==" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"EscrowUniqueIdentifier":456789,"Carrier":"FEDEX","TrackID":"1234ABCD","Partner":{"PartnerId":"10937"}} ' "https://stgsecureapi.escrow.com/api/Shipping"

Add Settlement Information Sample

The following sample cURL request will add the specified settlement account (the GUID of a specified settlement account may be found under My Profile on the logged-in site) to the given transaction (in this case 456789).

curl -X POST -H "Authorization: Basic dGVzdEBlc2Nyb3cuY29tOlBhc3N3b3JkMQ==" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "TransactionID": 456789, "SellerEmail": "seller@escrow.com", "SettlementAuthorizationToken": "5ECCDBB4-A926-46D0-AAE2-2C2066AA86DE" }' "https://stgsecureapi.escrow.com/api/Settlement"