Create funding instruction

View as MarkdownOpen in Claude
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.

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 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 headers

locationstring
URI reference to created resource.

Response

Successful request. We accepted the instructions.
instructionIdintegerRead-only
Unique identifier that we assigned to the funding instruction.
createdDatestringRead-onlyformat: "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.
lastModifiedDatestringRead-onlyformat: "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.
statusenumRead-only
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
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

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

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
406
Not Acceptable Error
409
Conflict Error
500
Internal Server Error