Skip to Content
Docs
Payouts

Simulate a payout return

POST/payouts/{id}/simulate/return

Simulates the return of a succeeded payout by the recipient's bank, for testing return handling. Only available in the sandbox.

The payout's status becomes returned with return code R01, and a payout.returned webhook is sent. A payout can be returned only once.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.
idempotency-keystring

A unique key, such as a UUID, that makes a POST or DELETE request safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace.

  • A retry with the same key, endpoint and body gets the first request's stored status and body, without running the request again.
  • If the first request is still being processed, a retry gets 409 idempotency_error (request_in_progress).
  • The same key on another endpoint, or with another body, gets 400 idempotency_error (invalid_parameters).
  • GET, PUT and PATCH requests ignore the key.

The response repeats the key in its Idempotency-Key header.

Path parameters

idstringRequired

The unique identifier of the payout.

Returns

Payout returned successfully.

Errors

400
Invalid request parameters, or the payout has already been returned.
401
The API key or access token is missing, unknown or no longer works (invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).
403
The endpoint is only available in the sandbox. A 403 can also mean the key may not make this request; code says why.
404
Payout not found.
409
Another request with the same idempotency-key is still being processed (request_in_progress). Wait, then retry with the same key.
422
Unprocessable content. Only a succeeded payout can be returned.
500
Internal server error.
503
Service unavailable. Retry after the number of seconds in Retry-After, or after a few seconds when there's none.
Was this page helpful?