Set up a funding recipient

Before you begin, make sure that you have read our Getting Started guide, and that you have received your API key.
A funding recipient is an entity that can receive funds using funding instructions. Each funding recipient includes at least one of the following:
Funding account: The funding recipient’s bank account.
Owner: Individuals that are associated with the funding recipient.
You can create funding recipients for third parties that can’t directly process sales. For example, charities. To set up a funding recipient, complete the following steps:
Step 1. Generate your Bearer token.
Step 2. Create your funding recipient.
Step 3. Test your integration.

Step 1. Generate your Bearer token

To generate your Bearer token, you must send your API key to our Identity Service. To send your API key to our Identity Service, complete the following steps:
  1. Include your API key in the x-api-key parameter in the header of a POST request.
  2. Send your request to https://identity.payroc.com/authorize.

Example request

curl --location --request POST 'https://identity.payroc.com/authorize' --header 'x-api-key: <api key>'
If your request is successful, we return a response that contains your Bearer token and information about its scope and when it expires.

Example response

{
"access_token": "eyJhbGc....adQssw5c",
"expires_in": 3600,
"scope": "service_a service_b",
"token_type": "Bearer"
}

Step 2. Create your funding recipient

To create your funding recipient, send a POST request to our Funding Recipients endpoint. To create your request, complete the following steps: Test endpoint: https://api.uat.payroc.com/v1/funding-recipients
Production endpoint: https://api.payroc.com/v1/funding-recipients
  1. Create the header of your request. The header of your request 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.
You must include an idempotency key to prevent duplicate requests.
curl
-H "Content-Type: application/json"
-H "Authorization: <Bearer token>"
-H "Idempotency-Key: <UUID v4>"
  1. Create the body of your request. To check which parameters you need to include in the body of your request, use the following schema:

Header parameters

Body parameters

Use our metadata feature to add custom information to your request.
  1. Send your request to the following endpoint.
POST https://api.payroc.com/v1/funding-recipients

Example request

Request
curl --request post \
--url https://api.payroc.com/v1/funding-recipients \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: abc123' \
--data '{"recipientType":"privateCorporation","taxId":"123456789","charityId":"abc123","doingBusinessAs":"abc123","address":{"address1":"1 Example Ave.","address2":"abc123","address3":"abc123","city":"Example city","state":"Illinois","country":"US","postalCode":"60056"},"contactMethods":[{"type":"email","value":"[email protected]"}],"metadata":{"customerId":"2345"},"owners":[{"firstName":"David","middleName":"scott","lastName":"Simpson","dateOfBirth":"1964-03-22T00:00:00.000Z","address":{"address1":"1 Example Ave.","address2":"abc123","address3":"abc123","city":"Example city","state":"Illinois","country":"US","postalCode":"60056"},"identifiers":[{"type":"nationalId","value":"xxx-xx-4320"}],"contactMethods":[{"type":"phone","value":"617 715 1234"},{"type":"mobile","value":"856 457 8745"},{"type":"email","value":"[email protected]"}],"relationship":{"equityPercentage":35.4,"title":"abc123","isControlProng":false}}],"fundingAccounts":[{"type":"checking","use":"credit","nameOnAccount":"Joe Bloggs","paymentMethods":[{"type":"ach","value":{"routingNumber":"123456789","accountNumber":"1234567890"}}],"metadata":{"internalRef":"2345"}}]}'
If your request is successful, we create the funding recipient and return a response. The response contains the following fields:

Response Schema

Status Code 201

Successful request. We created the funding recipient.
Response headers
Response body

Example response

Response
application/json
{
"recipientId": 1,
"status": "approved",
"createdDate": "2020-09-08T12:00:00.000Z",
"lastModifiedDate": "2020-09-08T12:00:00.000Z",
"recipientType": "privateCorporation",
"taxId": "123456789",
"charityId": "abc123",
"doingBuinessAs": "abc123",
"address": {
"address1": "1 Example Ave.",
"address2": "abc123",
"address3": "abc123",
"city": "Example city",
"state": "Illinois",
"country": "US",
"postalCode": "60056"
},
"contactMethods": [
{
"type": "email",
"value": "[email protected]"
}
],
"metadata": {
"customerId": "2345"
},
"owners": [
{
"ownerId": 1,
"link": {
"rel": "owner",
"href": "https://api.payroc.com/v1/owners/1",
"method": "get"
}
}
],
"fundingAccounts": [
{
"fundingAccountId": 1,
"status": "approved",
"link": {
"rel": "fundingAccount",
"herf": "https://api.payroc.com/v1/funding-accounts/1",
"method": "get"
}
},
{
"fundingAccountId": 2,
"status": "rejected",
"link": {
"rel": "fundingAccount",
"herf": "https://api.payroc.com/v1/funding-accounts/2",
"method": "get"
}
}
]
}
If your request is unsuccessful, we return details about the error. For more information about errors, see Errors.

Step 3. Test your integration

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 follow our quick start guide about sending funds to your funding recipients. To view other functions about managing your funding recipients, see funding recipients.