Important: Before you begin, make sure that you have read our Getting Started guide, and that you have received your API key.
To send funds to your merchants, you need to provide us with instructions about:
Funding accounts that we should send the funds to
Amount of funds that we should send
Before you create your funding instructions, we recommend that you check to make sure you have the funds available to send.
Integration steps
Step 1. (Optional) Check the available balance.
Step 2. Create a funding instruction.
Before you begin
Bearer tokens
Use our Identity Service to generate a Bearer token to include in the header of your requests. To generate your Bearer token, complete the following steps:
Include your API key in the x-api-key parameter in the header of a POST request.
Send your request to https://identity.payroc.com/authorize .
Note: You need to generate a new Bearer token before the previous Bearer token expires.
Example request
Example response
If your request is successful, we return a response that contains your Bearer token, information about its scope, and when it expires.
To create the header of each POST request, you must include the following parameters:
Content-Type: Include application/json as the value for this parameter.
Authorization: Include your Bearer token in this parameter.
Idempotency-Key: Include a UUID v4 to make the request idempotent.
Errors
If your request is unsuccessful, we return an error. For more information about errors, see Errors .
Step 1. (Optional) Check the available balance
To check the available balance, you need to send a GET request to our Funding Balance endpoint.
Query parameters
before string Optional
Return the previous page of results before the value that you specify.
You can’t send the before parameter in the same request as the after parameter.
after string Optional
Return the next page of results after the value that you specify.
You can’t send the after parameter in the same request as the before parameter.
limit integer Optional <=100Defaults to 10
Limit the maximum number of results that we return for each page.
merchantId string Optional
Filter results by the unique identifier that the processor assigned to the merchant.
Example request
If your request is successful, we return a response that contains the funds available for your merchant. The response contains the following fields:
Response
data list of objects Required
Array of merchantBalance objects.
count double Optional
Number of results we returned on this page.
**Note:** This might not be the total number of results that match your query.
hasMore boolean Optional
Indicates whether there is another page of results available.
limit double Optional
Maximum number of results that we return for each page.
links list of objects Optional
Reference links to navigate to the previous page of results or to the next page of results.
Example response
Step 2. Create a funding instruction
Note: You can use a funding instruction to send funds to a single merchant or to multiple merchants in a single request.
To create your funding instruction, send a POST request to our Funding Instructions endpoint.
To create the body of your request, use the following parameters:
Request
merchants list of objects Optional
Array of merchantInstruction objects.
Note: Use our metadata feature to add custom information to your request.
Example request
POST /v1 / funding-instructions
If your request is successful, we create the funding instruction and return a response. The response contains the following fields:
Response
instructionId integer Optional
Unique identifier of the funding instruction.
createdDate string Optional format: "datetime"
Date that we created the funding instruction.
lastModifiedDate string Optional format: "datetime"
Date of the most recent change to the funding instruction.
status enum Optional
Status of the funding instruction.
Allowed values: accepted pending completed
merchants list of objects Optional
Array of merchantInstruction objects.
metadata map from strings to strings Optional
[Metadata](https://docs.payroc.com/api/metadata) object you can use to include custom data with your request.
Example response
Test cases
Our integration team provides you with test cases that you can run to verify that your integration works with our API.
For your next steps, we recommend that you integrate with the other functions so you can manage your funding instructions. To view the other functions, see funding instructions .