Create funding instruction

Use this method to create a funding instruction that tells us how to distribute the funds from your merchants' transactions. **Note:** Before you create a funding instruction, you can use our [List Funding Balances](https://docs.payroc.com/api/schema/funding/funding-activity/retrieve-balance) method to view the amount of available funds that a merchant has. In your request, include an array of merchantInstruction objects. Each merchantInstruction object contains the following: - Merchant ID (MID) of the merchant whose funding balance you want to distribute. - Funding account that you want to send funds to. - Amount that you want to send to the funding account. Our gateway returns the instructionId, which you can use to run follow-on actions.

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).

Request

This endpoint expects an object.
merchantslist of objectsOptional
Array of merchants objects. Each object specifies the merchant whose funding balance we distribute and who you want to send the funds to.
metadatamap from strings to stringsOptional

Metadata object you can use to include custom data with your request.

Response

Successful request. We accepted the instructions.
instructionIdinteger or null
Unique identifier that we assigned to the funding instruction.
createdDatestring or nullformat: "datetime"
Date that we created the funding instruction. The date format follows the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) standard.
lastModifiedDatestring or nullformat: "datetime"
Date of the most recent change to the funding instruction. The date format follows the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) standard.
statusenum or null
Status of the funding instruction. Our gateway returns one of the following values: - `accepted` - We have received the funding instruction but have not yet reviewed it. - `pending` - We have received the funding instruction and we are reviewing it. - `completed` - We have reviewed and processed the funding instruction.
Allowed values:
merchantslist of objects or null
Array of merchants objects. Each object specifies the merchant whose funding balance we distribute and who you want to send the funds to.
metadatamap from strings to strings or null

Metadata object you can use to include custom data with your request.

Errors