Retrieve payment instruction

Use this method to retrieve information about a payment instruction. To retrieve a payment instruction, you need its paymentInstructionId. Our gateway returned the paymentInstructionId in the response of the [Submit Payment Instruction](https://docs.payroc.com/api/schema/payroc-cloud/payment-instructions/submit) method. Our gateway returns the status of the payment instruction. If the payment device completed the payment instruction, the response also includes a link to the payment.

Path parameters

paymentInstructionIdstringRequired>=1 character<=36 characters
Unique identifier that we assigned to the payment instruction.

Headers

AuthorizationstringRequired

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

Response

Successful request. Returns the current status of the requested payment instruction.
statusenum
Indicates the current status of the instruction. - `canceled` – The instruction was canceled before it was completed. - `completed` – The instruction has completed. Use the link object to check the resource. - `failure` – The instruction failed. Check the errorMessage field for more information. - `inProgress` – The instruction is currently in progress.
Allowed values:
paymentInstructionIdstring>=1 character<=36 characters
Unique identifier that we assigned to the payment instruction.
errorMessagestring or null

Description of the error that caused the instruction to fail.

Note: We return this field only if the status is failure.

Errors