Questions? Feedback? powered by Olark live chat software

Escrow API Quick Start Guide

Creating a transaction

Create your first transaction with the Escrow API in seconds.

  • 1. Choose your favourite client from the samples below.
  • 2. Update the authentication field with your Escrow.com username and password.
  • 3. Run the code snippet to create your first transaction.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% curl "https://api.escrow.com/2017-09-01/transaction" \
    -X POST \
    -u "email-address:your-password" \
    -H "Content-Type: application/json" \
    -d '
{
    "parties": [
        {
            "role": "buyer",
            "customer": "me"
        },
        {
            "role": "seller",
            "customer": "keanu.reeves@test.escrow.com"
        }
    ],
    "currency": "usd",
    "description": "1962 Fender Stratocaster",
    "items": [
        {
            "title": "1962 Fender Stratocaster",
            "description": "Like new condition, includes original hard case.",
            "type": "general_merchandise",
            "inspection_period": 259200,
            "quantity": 1,
            "schedule": [
                {
                    "amount": 95000.0,
                    "payer_customer": "me",
                    "beneficiary_customer": "keanu.reeves@test.escrow.com"
                }
            ]
        }
    ]
}'

If your request was successful, the Escrow API should return a 201 status code, and a response body like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
    "id": 3300003,
    "description": "1962 Fender Stratocaster",
    "items": [
        {
            "status": {
                "received": false,
                "rejected_returned": false,
                "rejected": false,
                "received_returned": false,
                "shipped": false,
                "accepted": false,
                "shipped_returned": false,
                "accepted_returned": false
            },
            "description": "Like new condition, includes original hard case.",
            "schedule": [
                {
                    "amount": "95000.00",
                    "payer_customer": "michael.nyqvist@test.escrow.com",
                    "beneficiary_customer": "keanu.reeves@test.escrow.com",
                    "status": {
                        "secured": false
                    }
                }
            ],
            "title": "1962 Fender Stratocaster",
            "inspection_period": 259200,
            "fees": [
                {
                    "payer_customer": "michael.nyqvist@test.escrow.com",
                    "amount": "845.50",
                    "type": "escrow"
                }
            ],
            "type": "general_merchandise",
            "id": 3995049,
            "quantity": 1
        }
    ],
    "creation_date": "2017-10-09T04:08:42.023000+00:00",
    "currency": "usd",
    "parties": [
        {
            "customer": "michael.nyqvist@test.escrow.com",
            "agreed": true,
            "role": "buyer",
            "initiator": true
        },
        {
            "customer": "keanu.reeves@test.escrow.com",
            "agreed": false,
            "role": "seller",
            "initiator": false
        },
        {
            "customer": "michael.nyqvist@test.escrow.com",
            "agreed": true,
            "role": "partner"
        }
    ]
}

Get transaction

Take note of the id field in the above response. This is the unique Transaction ID. You can now use this to get the current details and status of the transaction as it progresses. Modify and run a code snippet below to get the details of the transaction you have just created.

1
2
3
4
curl "https://api.escrow.com/2017-09-01/transaction/3300003" \
    -X GET \
    -u "email-address:your-password" \
    -H "Content-Type: application/json"