API Guide :: Cancelling a transaction
Cancelling a transaction
Use this API to cancel an ongoing escrow transaction.
Cancel a transaction
Cancelling a request is as simple as making a patch request to https://api.escrow.com/2017-09-01/transaction/id and setting the action field to cancel. You can optionally specify a cancellation reason by populating the cancel_information with a cancellation_reason.
If both the buyer and seller have agreed to the transaction then only the listed partner can cancel. If the transaction has already been completed or cancelled, then the cancel operation will fail.
If the API call is successful, it will return the updated transaction object.
- cURL
- Python
- Ruby
- PHP
- C#
1 2 3 4 5 6 7 8 9 10 11
curl "https://api.escrow.com/2017-09-01/transaction/2020" \ -X PATCH \ -u "email-address:your-api-key" \ -H "Content-Type: application/json" \ -d ' { "action": "cancel", "cancel_information": { "cancellation_reason": "Listing was not authorized" } }'
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 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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
{ "close_date": null, "creation_date": "2020-12-08T03:15:25.700000+00:00", "currency": "usd", "description": "The sale of johnwick.com", "id": 3621322, "is_cancelled": true, "items": [ { "category": "domain_name", "description": "johnwick.com", "extra_attributes": { "concierge": false, "image_url": "https://i.ebayimg.com/images/g/RicAAOSwzO5e3DZs/s-l1600.jpg", "merchant_url": "https://www.ebay.com", "with_content": false }, "fees": [ { "amount": "35.75", "amount_without_taxes": "32.50", "payer_customer": "dshephard+Sandbox1@freelancer.com", "split": "1.0", "taxes": [ { "amount": "3.25", "type": "gst" } ], "type": "escrow" } ], "id": 4204903, "inspection_period": 259200, "quantity": 1, "schedule": [ { "amount": "1000.00", "beneficiary_customer": "keanu.reaves@test.escrow.com", "payer_customer": "dshephard+Sandbox1@freelancer.com", "status": { "disbursed_to_beneficiary": false, "secured": false } } ], "status": { "accepted": false, "accepted_returned": false, "canceled": true, "in_dispute": false, "received": false, "received_returned": false, "rejected": false, "rejected_returned": false, "shipped": false, "shipped_returned": false }, "title": "johnwick.com", "type": "domain_name" } ], "parties": [ { "agreed": false, "customer": "dshephard+Sandbox1@freelancer.com", "id": 10921653, "initiator": true, "next_step": "https://www.escrow-sandbox.com/agree?tid=3621322&token=ad5597f9-8e7e-4dd3-9eba-80857113790f", "role": "buyer", "verification_required": true }, { "agreed": false, "customer": "keanu.reaves@test.escrow.com", "disbursement_method_selected": false, "id": 10921654, "initiator": false, "next_step": "https://www.escrow-sandbox.com/agree?tid=3621322&token=3ad92150-6b07-457a-9220-e92e4f5a532f", "role": "seller" }, { "agreed": true, "customer": "dshephard+Sandbox1@freelancer.com", "id": 10921655, "role": "partner" } ] }