Set up a funding recipient

Important: 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.

Integration steps

  • Create your funding recipient.

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:

  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.

Note: You need to generate a new Bearer token before the previous Bearer token expires.

Example request

$curl --location --request POST 'https://identity.payroc.com/authorize' --header 'x-api-key: <api key>'

Example response

If your request is successful, we return a response that contains your Bearer token, information about its scope, and when it expires.

1{
2 "access_token": "eyJhbGc....adQssw5c",
3 "expires_in": 3600,
4 "scope": "service_a service_b",
5 "token_type": "Bearer"
6}

Headers

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.
$curl
>-H "Content-Type: application/json"
>-H "Authorization: <Bearer token>"
>-H "Idempotency-Key: <UUID v4>"

Errors

If your request is unsuccessful, we return an error. For more information about errors, see Errors.

Create your funding recipient

To create your funding recipient, send a POST request to our Funding Recipients endpoint.

To create the body of your request, use the following parameters:

Request

recipientTypeenumRequired
Type or legal structure of the funding recipient.
taxIdstringRequired
Employer identification number (EIN) or Social Security number (SSN).
addressobjectRequired
Address of the funding recipient.
contactMethodslist of objectsRequired
Array of contactMethod objects that you can use to add contact methods for the funding recipient. You must provide at least an email address.
ownerslist of objectsRequired
Array of owner objects that you can use to add owners to the funding recipient.
fundingAccountslist of objectsRequired
Array of fundingAccount objects that you can use to add funding accounts to the funding recipient.
recipientIdintegerOptional
statusenumOptional
Allowed values:
createdDatestringOptionalformat: "date-time"
lastModifiedDatestringOptionalformat: "date-time"
charityIdstringOptional
Government identifier of the charity.
doingBusinessAsstringOptional
Legal name that the business operates under.
metadatamap from strings to stringsOptional
[Metadata](/api/metadata) object you can use to include custom data with your request.

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

Example request

POST
/v1/funding-recipients
1curl -X POST https://api.payroc.com/v1/funding-recipients \
2 -H "Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324" \
3 -H "Authorization: Bearer <token>" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "recipientType": "privateCorporation",
7 "taxId": "12-3456789",
8 "address": {
9 "address1": "1 Example Ave.",
10 "city": "Chicago",
11 "state": "Illinois",
12 "country": "US",
13 "postalCode": "60056"
14 },
15 "contactMethods": [
16 {
17 "type": "email",
18 "value": "[email protected]"
19 }
20 ],
21 "owners": [
22 {
23 "firstName": "Jane",
24 "lastName": "Doe",
25 "dateOfBirth": "1964-03-22",
26 "address": {
27 "address1": "1 Example Ave.",
28 "city": "Chicago",
29 "state": "Illinois",
30 "country": "US",
31 "postalCode": "60056"
32 },
33 "identifiers": [
34 {
35 "type": "nationalId",
36 "value": "xxxxx4320"
37 }
38 ],
39 "contactMethods": [
40 {
41 "type": "email",
42 "value": "[email protected]"
43 }
44 ],
45 "relationship": {
46 "isControlProng": true
47 }
48 }
49 ],
50 "fundingAccounts": [
51 {
52 "type": "checking",
53 "use": "credit",
54 "nameOnAccount": "Jane Doe",
55 "paymentMethods": [
56 {}
57 ]
58 }
59 ]
60}'

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

Response

recipientTypeenumRequired
Type or legal structure of the funding recipient.
taxIdstringRequired
Employer identification number (EIN) or Social Security number (SSN).
doingBuinessAsstringRequired
Legal name that the business operates under.
addressobjectRequired
Address of the funding recipient.
contactMethodslist of objectsRequired
Array of contactMethod objects for the funding recipient.
ownerslist of objectsRequired
Array of owner objects associated with the funding recipient.
fundingAccountslist of objectsRequired
Array of fundingAccount objects associated with the funding recipient.
recipientIdintegerOptional
Unique identifier of the funding recipient.
statusenumOptional
Indicates if we have approved the funding recipient.
Allowed values:
createdDatestringOptionalformat: "date-time"
Date the funding recipient was created.
lastModifiedDatestringOptionalformat: "date-time"
Date the funding recipient was last modified.
charityIdstringOptional
Government identifier of the charity.
metadatamap from strings to stringsOptional
[Metadata](/api/metadata) object you can use to include custom data with your request.

Example response

Response
1{
2 "recipientType": "privateCorporation",
3 "taxId": "12-3456789",
4 "doingBuinessAs": "foo",
5 "address": {
6 "address1": "1 Example Ave.",
7 "address2": "Example Address Line 2",
8 "address3": "Example Address Line 3",
9 "city": "Chicago",
10 "state": "Illinois",
11 "country": "US",
12 "postalCode": "60056"
13 },
14 "contactMethods": [
15 {
16 "type": "email",
17 "value": "[email protected]"
18 }
19 ],
20 "owners": [
21 {
22 "ownerId": 4564,
23 "link": {
24 "rel": "owner",
25 "href": "https://api.payroc.com/v1/owners/4564",
26 "method": "get"
27 }
28 }
29 ],
30 "fundingAccounts": [
31 {
32 "fundingAccountId": 123,
33 "status": "approved",
34 "link": {
35 "rel": "fundingAccount",
36 "href": "https://api.payroc.com/v1/funding-accounts/123",
37 "method": "get"
38 }
39 }
40 ],
41 "recipientId": 234,
42 "status": "approved",
43 "createdDate": "2024-07-02T15:30:00Z",
44 "lastModifiedDate": "2024-07-02T15:30:00Z",
45 "charityId": "foo",
46 "metadata": {}
47}

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