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:

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 "doingBusinessAs": "foo",
9 "address": {
10 "address1": "1 Example Ave.",
11 "city": "Chicago",
12 "state": "Illinois",
13 "country": "US",
14 "postalCode": "60056"
15 },
16 "contactMethods": [
17 {
18 "type": "email",
19 "value": "[email protected]"
20 }
21 ],
22 "owners": [
23 {
24 "firstName": "Jane",
25 "lastName": "Doe",
26 "dateOfBirth": "1964-03-22",
27 "address": {
28 "address1": "1 Example Ave.",
29 "city": "Chicago",
30 "state": "Illinois",
31 "country": "US",
32 "postalCode": "60056"
33 },
34 "identifiers": [
35 {
36 "type": "nationalId",
37 "value": "xxxxx4320"
38 }
39 ],
40 "contactMethods": [
41 {
42 "type": "email",
43 "value": "[email protected]"
44 }
45 ],
46 "relationship": {
47 "isControlProng": true
48 }
49 }
50 ],
51 "fundingAccounts": [
52 {
53 "type": "checking",
54 "use": "credit",
55 "nameOnAccount": "Jane Doe",
56 "paymentMethods": [
57 {}
58 ]
59 }
60 ]
61}'

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

Example response

Response
1{
2 "recipientType": "privateCorporation",
3 "taxId": "12-3456789",
4 "doingBusinessAs": "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 "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": "foo",
55 "metadata": {}
56}

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.