GoCardless Embed
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: |
country_code | The country that the creditor is registered in, as a ISO 3166-1 alpha-2 code. |
Examples of how to make this request using the GoCardless client libraries:
1POST https://api.gocardless.com/creditors HTTP/1.1
2Content-Type: application/json
3{
4 "creditors": {
5 "name": "Example Ltd",
6 "country_code": "GB",
7 "creditor_type": "company"
8 }
9}
10
11HTTP/1.1 201 Created
12Location: /creditors/CR123
13Content-Type: application/json
14{
15 "creditors": {
16 "id": "CR123",
17 "created_at": "2017-02-16T12:34:56.000Z",
18 "name": "Example Ltd",
19 "creditor_type": "company",
20 "country_code": "GB",
21 ...
22 }
23}
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.