Close return

Use this method to close a return if the customer used an alternative payment method to resolve a returned payment. To close a return, you need the paymentId of the return. To get the paymentId of the return, complete the following steps: 1. Use our [Retrieve Payment](https://docs.payroc.com/api/schema/bank-transfer-payments/payments/retrieve) method to view the details of the original payment. 2. From the [returns object](https://docs.payroc.com/api/schema/bank-transfer-payments/payments/retrieve#response.body.returns) in the response, get the paymentId of the return. If your request is successful, our gateway closes the return.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

paymentIdstringRequired=10 characters
Unique identifier that our gateway assigned to the payment.

Headers

Idempotency-KeystringRequiredformat: "uuid"
Unique identifier that you generate for each request. You must use the [UUID v4 format](https://www.rfc-editor.org/rfc/rfc4122) for the identifier. For more information about the idempotency key, go to [Idempotency](https://docs.payroc.com/api/idempotency).

Response

Successful request. We closed the return.
paymentIdstring=10 characters
Unique identifier that we assigned to the payment.
processingTerminalIdstring4-50 characters
Unique identifier that we assigned to the terminal.
orderobject
Object that contains information about the transaction.
bankAccountobject

Polymorphic object that contains bank account information.

The value of the type field determines which variant you should use:

  • ach - Automated Clearing House (ACH) details
  • pad - Pre-authorized debit (PAD) details
transactionResultobjectRead-only
Object that contains information about the transaction.
customerobject
Object that contains information about the customer.
refundslist of objects
List of refunds issued against the payment.
returnslist of objects
List of returns issued against the payment.
representmentobject

Object that contains details about the re-presented payment linked to the return.

customFieldslist of objects
Array of customField objects.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
406
Not Acceptable Error
409
Conflict Error
415
Unsupported Media Type Error
500
Internal Server Error