Set up a funding recipient

View as MarkdownOpen in Claude

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).
doingBusinessAsstringRequired
Trading name of the business or organization.
addressobjectRequired
Polymorphic object that contains address information for a funding recipient.
contactMethodslist of objectsRequired
Array of polymorphic objects, which contain contact information. **Note:** You must provide an email address. The value of the type parameter determines which variant you should use: - `email` - Email address - `phone` - Phone number - `mobile` - Mobile number - `fax` - Fax number
ownerslist of objectsRequired
Array of owner objects. Each object contains information about an individual who owns or manages the funding recipient.
fundingAccountslist of objectsRequired
Array of fundingAccount objects that you can use to add funding accounts to the funding recipient.
charityIdstringOptional
Government identifier of the charity.
metadatamap from strings to stringsOptional
[Metadata](https://docs.payroc.com/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
1using Payroc;
2using System.Threading.Tasks;
3using Payroc.Funding.FundingRecipients;
4using System.Collections.Generic;
5using System;
6
7namespace Usage;
8
9public class Example
10{
11 public async Task Do() {
12 var client = new BasePayrocClient(
13 clientOptions: new ClientOptions {
14 Environment = PayrocEnvironment.Production
15 }
16 );
17
18 await client.Funding.FundingRecipients.CreateAsync(
19 new CreateFundingRecipient {
20 IdempotencyKey = "8e03978e-40d5-43e8-bc93-6894a57f9324",
21 RecipientType = CreateFundingRecipientRecipientType.PrivateCorporation,
22 TaxId = "12-3456789",
23 DoingBusinessAs = "Pizza Doe",
24 Address = new Address {
25 Address1 = "1 Example Ave.",
26 Address2 = "Example Address Line 2",
27 Address3 = "Example Address Line 3",
28 City = "Chicago",
29 State = "Illinois",
30 Country = "US",
31 PostalCode = "60056"
32 },
33 ContactMethods = new List<ContactMethod>(){
34 new ContactMethod(
35 new ContactMethodEmail {
36 Value = "[email protected]"
37 }
38 ),
39 new ContactMethod(
40 new ContactMethodPhone {
41 Value = "2025550164"
42 }
43 ),
44 }
45 ,
46 Owners = new List<Owner>(){
47 new Owner {
48 FirstName = "Jane",
49 LastName = "Doe",
50 DateOfBirth = DateOnly.Parse("1964-03-22"),
51 Address = new Address {
52 Address1 = "1 Example Ave.",
53 City = "Chicago",
54 State = "Illinois",
55 Country = "US",
56 PostalCode = "60056"
57 },
58 Identifiers = new List<Identifier>(){
59 new Identifier {
60 Type = IdentifierType.NationalId,
61 Value = "000-00-4320"
62 },
63 }
64 ,
65 ContactMethods = new List<ContactMethod>(){
66 new ContactMethod(
67 new ContactMethodEmail {
68 Value = "[email protected]"
69 }
70 ),
71 new ContactMethod(
72 new ContactMethodPhone {
73 Value = "2025550164"
74 }
75 ),
76 }
77 ,
78 Relationship = new OwnerRelationship {
79 IsControlProng = true,
80 EquityPercentage = 48.5f,
81 Title = "CFO",
82 IsAuthorizedSignatory = false
83 },
84 MiddleName = "Helen"
85 },
86 }
87 ,
88 FundingAccounts = new List<FundingAccount>(){
89 new FundingAccount {
90 Type = FundingAccountType.Checking,
91 Use = FundingAccountUse.Credit,
92 NameOnAccount = "Jane Doe",
93 PaymentMethods = new List<PaymentMethodsItem>(){
94 new PaymentMethodsItem(
95 new PaymentMethodAch {
96 Value = new PaymentMethodAchValue {
97 RoutingNumber = "123456789",
98 AccountNumber = "1234567890"
99 }
100 }
101 ),
102 }
103
104 },
105 }
106 ,
107 Metadata = new Dictionary<string, string>(){
108 ["yourCustomField"] = "abc123",
109 }
110
111 }
112 );
113 }
114
115}

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).
doingBusinessAsstringRequired
Legal name of the business or organization.
addressobjectRequired
Polymorphic object that contains address information for a funding recipient.
contactMethodslist of objectsRequired
Array of polymorphic objects, which contain contact information. The value of the type parameter determines which variant you should use: - `email` - Email address - `phone` - Phone number - `mobile` - Mobile number - `fax` - Fax number
ownerslist of objectsRequiredRead-only
Array of owner objects associated with the funding recipient.
fundingAccountslist of objectsRequiredRead-only
Array of fundingAccount objects associated with the funding recipient.
recipientIdintegerOptionalRead-only
Unique identifier that we assigned to the funding recipient.
statusenumOptionalRead-only
Indicates if we have approved the funding recipient.
Allowed values:
createdDatedatetimeOptionalRead-only
Date the funding recipient was created.
lastModifiedDatedatetimeOptionalRead-only
Date the funding recipient was last modified.
charityIdstringOptional
Government identifier of the charity.
metadatamap from strings to stringsOptional
[Metadata](https://docs.payroc.com/api/metadata) object you can use to include custom data with your request.

Example response

Response
1{
2 "recipientType": "privateCorporation",
3 "taxId": "123456789",
4 "doingBusinessAs": "string",
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 "fundingAccountId": 124,
42 "status": "rejected",
43 "link": {
44 "rel": "fundingAccount",
45 "href": "https://api.payroc.com/v1/funding-accounts/124",
46 "method": "get"
47 }
48 }
49 ],
50 "recipientId": 234,
51 "status": "approved",
52 "createdDate": "2024-07-02T15:30:00Z",
53 "lastModifiedDate": "2024-07-02T15:30:00Z",
54 "charityId": "string",
55 "metadata": {
56 "yourCustomField": "abc123"
57 }
58}

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