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 [Retrieve Funding Balance](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.

Authentication

AuthorizationBearer

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

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 merchantInstruction objects.
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.
lastModifiedDatestring or nullformat: "datetime"
Date of the most recent change to the funding instruction.
statusenum or null
Status of the funding instruction.
Allowed values:
merchantslist of objects or null
Array of merchantInstruction objects.
metadatamap from strings to strings or null

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

Errors