Questions? Feedback? powered by Olark live chat software

API Guide :: Funding a transaction

Funding a transaction

Transactions must be funded before the seller can ship the items. A transaction can be funded in multiple different ways. Such methods include PayPal, Credit Card, and Wire Transfer. Not all methods are applicable on each transaction. For PayPal and Credit Card, these must be funded through the Escrow.com website, and are not available to be funded through the API. Wire transfers must be initiated through your bank, however we expose an API endpoint that allows you to provide us with the wire reference number.

Fetching available payment methods

Not all payment methods are available to all customers on all transactions. Because of this, we offer an API endpoint to allow you to fetch what payment methods are available on the transaction.

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

Example Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  "available_payment_methods": [
    {
      "type": "paypal",
      "total": 210.0,
      "currency": "usd",
    },
    {
      "type": "credit_card",
      "total": 215.0,
      "currency": "usd",
    },
    {
      "type": "wire_transfer",
      "total": 200.0,
      "currency": "usd",
    },
    {
      "type": "international_wire_transfer",
      "total": 225.0,
      "currency": "usd",
    },
  ]
}

Paying via PayPal

For transactions where PayPal is available, you can call this endpoint in order to retrieve an Escrow.com landing page that will allow the user to pay via PayPal. Upon completion of payment, the user will be redirected back to thereturn_url, if provided.

1
2
3
4
5
6
7
8
curl "https://api.escrow.com/2017-09-01/transaction/29292/payment_methods/paypal"\
    -X POST \
    -u "email-address:your-api-key" \
    -H "Content-Type: application/json" \
    -d '
{
  "return_url": "https://www.google.com/payment-result"
}'

Example Response

1
2
3
{
  "landing_page": "https://www.escrow.com/payment-flow/paypal?auth=23933KJHKJHA"
}

Paying via credit card

On transactions where paying via credit card is applicable, we return an Escrow.com landing page for the user to enter their credit card details. Upon completion of payment, the user will be redirected back to thereturn_url, if provided.

1
2
3
4
5
6
7
8
curl "https://api.escrow.com/2017-09-01/transaction/29292/payment_methods/credit_card" \
    -X POST \
    -u "email-address:your-api-key" \
    -H "Content-Type: application/json" \
    -d '
{
  "return_url": "https://www.google.com/payment-result"
}'

Example Response

1
2
3
{
  "landing_page": "https://www.escrow.com/payment-flow/credit_card?auth=23933KJHKJHA"
}

Paying via wire transfer

Unlike PayPal or credit card, paying by wire transfer is available on all transactions and all transaction types. Additionally, wire transfers do not require the user to visit Escrow.com to complete payment.

Paying via wire transfer is completed in two steps. The first step is retrieving the bank account details and payment reference details. Escrow.com uses multiple banks to help processing customers payments quicker so it is important to not hard code any of this information into your integration, doing so may impact payment processing times on your transactions if any of the payment information changes.

Retrieving wire transfer details

This endpoint is used for returning the wire transfer details for funding an entire transaction.

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

Example Response

1
2
3
4
5
6
7
8
{
  "bank_name": "Wells Fargo Bank, N.A",
  "bank_address": "420 Montgomery St, San Francisco, CA 94104",
  "routing_number": "121000248",
  "swift_code": "WFBIUS6S",
  "credit_account_name": "Internet Escrow Services Inc",
  "credit_account_number": "7101167844"
}

Marking a transaction as as paid by wire transfer

This endpoint should be called after the wire transfer has been initiated.

1
2
3
4
curl "https://api.escrow.com/2017-09-01/transaction/29292/payment_methods/wire_transfer"\
    -X POST \
    -u "email-address:your-api-key" \
    -H "Content-Type: application/json"