Send funds to your merchants

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

Authenticate your requests before making API calls. If your request fails, 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

beforestringOptional
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.
afterstringOptional
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.
limitintegerOptional<=100Defaults to 10
Limit the maximum number of results that we return for each page.
merchantIdstringOptional
Filter results by the unique identifier that the processor assigned to the merchant.

Example request

GET
/v1/funding-balance
1curl -G https://api.payroc.com/v1/funding-balance \
2 -H "Authorization: Bearer <token>" \
3 -d after=8516 \
4 -d before=2571 \
5 -d limit=25 \
6 -d merchantId=4525644354

If your request is successful, we return a response that contains the funds available for your merchant. The response contains the following fields:

Response

datalist of objectsRequired
Array of merchantBalance objects.
limitintegerOptional
Maximum number of results that we return for each page.
countintegerOptional
Number of results we returned on this page. **Note:** This might not be the total number of results that match your query.
hasMorebooleanOptional
Indicates whether there is another page of results available.

Example response

Response
1{
2 "data": [
3 {
4 "merchantId": "4525644354",
5 "funds": 120000,
6 "pending": 50050,
7 "available": 69950,
8 "currency": "USD"
9 },
10 {
11 "merchantId": "9876543219",
12 "funds": 50000,
13 "pending": 0,
14 "available": 50000,
15 "currency": "USD"
16 }
17 ],
18 "limit": 2,
19 "count": 2,
20 "hasMore": true,
21 "links": [
22 {
23 "rel": "previous",
24 "method": "get",
25 "href": "https://api.payroc.com/v1/funding-balance?before=4525644354&limit=2"
26 },
27 {
28 "rel": "next",
29 "method": "get",
30 "href": "https://api.payroc.com/v1/funding-balance?after=9876543219&limit=2"
31 }
32 ]
33}

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

Note: Use our metadata feature to add custom information to your request.

Example request

POST
/v1/funding-instructions
1curl -X POST https://api.payroc.com/v1/funding-instructions \
2 -H "Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324" \
3 -H "Authorization: Bearer <token>" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "merchants": [
7 {
8 "merchantId": "4525644354",
9 "recipients": [
10 {
11 "fundingAccountId": 123,
12 "paymentMethod": "ACH",
13 "amount": {
14 "value": 120000,
15 "currency": "USD"
16 },
17 "metadata": {
18 "yourCustomField": "abc123"
19 }
20 }
21 ]
22 }
23 ],
24 "metadata": {
25 "yourCustomField": "abc123"
26 }
27}'

If your request is successful, we create the funding instruction and return a response. The response contains the following fields:

Response

Example response

Response
1{
2 "instructionId": 64643131,
3 "createdDate": "2024-07-02T15:30:00Z",
4 "lastModifiedDate": "2024-07-02T15:30:00Z",
5 "status": "accepted",
6 "merchants": [
7 {
8 "merchantId": "4525644354",
9 "recipients": [
10 {
11 "fundingAccountId": 123,
12 "paymentMethod": "ACH",
13 "amount": {
14 "value": 120000,
15 "currency": "USD"
16 },
17 "status": "accepted",
18 "metadata": {
19 "yourCustomField": "abc123"
20 },
21 "link": {
22 "rel": "fundingAccount",
23 "method": "get",
24 "href": "https://api.payroc.com/v1/funding-accounts/123"
25 }
26 }
27 ],
28 "link": {
29 "rel": "merchant",
30 "method": "get",
31 "href": "https://api.payroc.com/v1/processing-accounts/4525644354"
32 }
33 }
34 ],
35 "metadata": {
36 "instructionRef": "abc123"
37 }
38}

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.