# Creating a Creditor

Source: https://docs.gocardless.com/docs/gc-embed/creating-a-creditor

# Creating a Creditor

In this step of the GoCardless Embed guide you will create a creditor to represent one of your merchants.

By having a creditor for each merchant you will be able to pay out separately for each creditor, customise the beneficiary name the payer sees, and perform reconciliation on a per-merchant basis.

## POST /creditors

You can create a creditor by performing a POST request to the `/creditors` endpoint. The required parameters are:

| Parameter     | Description                                                                                                                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name          | The trading name of the creditor.                                                                                                                                   |
| creditor_type | The type of business of the creditor. One of: `individual`, `company`, `charity`, `partnership`, and `trust`.                                                       |
| country_code  | The country that the creditor is registered in, as a [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). |

Examples of how to make this request using the GoCardless [client libraries](/docs/developer-resources/client-libraries):

```http
POST https://api.gocardless.com/creditors HTTP/1.1
Content-Type: application/json
\
\}

HTTP/1.1 201 Created
Location: /creditors/CR123
Content-Type: application/json
\
\}
```

```php
\$client = new \\GoCardlessPro\\Client([
'access_token' => 'your_access_token_here',
'environment' => \\GoCardlessPro\\Environment::SANDBOX
]);

\$client->creditors()->create([
'params' => [
'name' => 'Example Ltd',
'country_code' => 'GB',
'creditor_type' => 'company'
]
]);
```

```python
import gocardless_pro
client = gocardless_pro.Client(access_token="your_access_token_here", environment='sandbox')

client.creditors.create(params=\)
```

```ruby
@client = GoCardlessPro::Client.new(
access_token: "your_access_token",
environment: :sandbox
)

@client.creditors.create(
params: \
)
```

```java
import static com.gocardless.GoCardlessClient.Environment.SANDBOX;
String accessToken = "your_access_token_here";
GoCardlessClient client = GoCardlessClient
.newBuilder(accessToken)
.withEnvironment(SANDBOX)
.build();

Creditor creditor = client.creditors().create()
.withName("Example Ltd")
.withCountryCode("GB")
.withCreditorType("company")
.execute();
```

```javascript
const constants = require("gocardless-nodejs/constants");
const gocardless = require("gocardless-nodejs");
const client = gocardless(
"your_access_token_here",
constants.Environments.Sandbox,
);

const creditor = await client.creditors.create(\);
```

```net
String accessToken = "your_access_token";
GoCardlessClient gocardless = GoCardlessClient.Create(accessToken, Environment.SANDBOX);

var creditorRequest = new GoCardless.Services.CreditorCreateRequest()
\;

var creditorResponse = await gocardless.Creditors.CreateAsync(creditorRequest);
GoCardless.Resources.Creditor creditor = creditorResponse.Creditor;
```

```go
package main

	gocardless "github.com/gocardless/gocardless-pro-go/v6"
)

accessToken := "your_access_token_here"
config, err := gocardless.NewConfig(accessToken, gocardless.WithEndpoint(gocardless.SandboxEndpoint))
if err != nil \
client, err := gocardless.New(config)
if err != nil \

creditorCreateParams := gocardless.CreditorCreateParams\

creditor, err := client.Creditors.Create(context, creditorCreateParams)
```

```bash
curl --silent \\
-H "Content-Type: application/json" \\
-H "Gocardless-Version: 2015-07-06" \\
-H "Authorization: Bearer \$\" \\
"https://api.gocardless.com/creditors" \\
-d @- << EOF
\
\}
EOF
```

The API will respond with a creditor object containing a creditor ID starting with 'CR'. This ID will be used in subsequent steps.

For more details, see the [API reference docs for this endpoint](/docs/api-reference/creditor#create-a-creditor).

## What's next?

  
#### [Adding a Creditor Bank Account](/docs/gc-embed/adding-a-creditor-bank-account)

Add a bank account for each merchant so GoCardless can settle funds to the right place.

  
#### [Setting a Scheme Identifier](/docs/gc-embed/setting-a-scheme-identifier)

Request a custom scheme identifier so your merchant's name appears on payers' bank statements.