Get a recovery

get/recoveries/{id}

The GET /recoveries/{id} call allows your platform to look up information on a single recovery. If a merchant's account balance is negative, Recoveries automatically debit a merchant's Payout Method to bring the balance up to $0. Be sure to subscribe to the recoveries.created Notification event topic in order to programmatically integrate new Recoveries that WePay attempts from the merchant's Payout Method.

SecurityappIdAuth and appTokenAuth
Request
path Parameters
id
required
string [ 1 .. 255 ] characters

ID of the recovery, generated by WePay when the recovery is created.

header Parameters
Api-Version
required
string
Example: 3.0
Unique-Key
string
Responses
200
Response Schema: application/json
id
required
string

ID of the recovery, generated by WePay when the recovery is created.

resource
required
string

Helps organize information by identifying the resource type of the object data.

Value: Description
recoveries
path
required
string

Path of resource and resource ID.

create_time
required
integer <int64> >= 0

The time (in UNIX) when the recovery was created.

complete_time
required
integer or null <int64> >= 0

The time (in UNIX) when the recovery was completed.

status
required
string

Status of the recovery. Possible values include: completed, failed, pending.

Enum: Description
pending

WePay has started processing the recovery, but it is not yet available. Find more details in the pending_reasons structure.

completed

WePay has processed the recovery. Note that a recovery's status can change from completed to failed if the issuing bank rejects the debit.

… 1 more
amount
required
integer

Amount of the recovery.

currency
required
string

ISO 4217 currency code. Possible values include: CAD, GBP, USD.

required
object or null

Details the owner resource and owner path.

required
object

Payout method associated with payouts.

required
Array of objects or null or null

Reason why the status is pending and may contain an array of reasons.

required
object or null
required
object or null

When a recovery occurs, fetch this transaction record to account for the debit from the merchant's account balance.

required
object or null

When a non-payment resource (i.e. recoveries or payouts) fails to process, fetch this transaction record in order to maintain accurate accounting of the merchant's balance.

required
object or null

Any custom data your platform chooses to attach to this resource. The custom data must be key-value pairs and not contain any personally identifiable information (PII) or payment card (PCI) data.

api_version
string
400

INVALID_PARAMS

403

NOT_AUTHORIZED

500

UNEXPECTED_ERROR

Request samples
Response samples
application/json
{
  • "amount": 1000,
  • "complete_time": 1278889965,
  • "create_time": 1278889543,
  • "currency": "USD",
  • "custom_data": null,
  • "failure_reason": null,
  • "id": "bb109170-f401-44b0-8a8b-7abfd27e9f30",
  • "owner": {
    • "id": "67a88c34-7188-45f2-be1f-6a4fdeb21d77",
    • "path": "/accounts/67a88c34-7188-45f2-be1f-6a4fdeb21d77",
    • "resource": "accounts"
    },
  • "path": "/recoveries/bb109170-f401-44b0-8a8b-7abfd27e9f30",
  • "payout_method": {
    • "id": "00000000-5553-0000-0000-000000000054",
    • "path": "/payout_methods/00000000-5553-0000-0000-000000000054",
    • "resource": "payout_methods"
    },
  • "pending_reasons": null,
  • "resource": "recoveries",
  • "status": "completed",
  • "txnr_failure": null,
  • "txnr_recovery": {
    • "id": "af39bc0e-28ee-4b01-8049-7d04fc6a32c7",
    • "path": "/transaction_records/af39bc0e-28ee-4b01-8049-7d04fc6a32c7",
    • "resource": "transaction_records"
    },
  • "api_version": "3.0"
}