Customer
Customer objects hold the contact details for a customer. A customer can have several customer bank accounts, which in turn can have several Direct Debit mandates.
Create a customer#
/customersCreates a new customer object.
Request Body
customersobject16 properties
emailstring | null
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring | null
Customer's first name. Required unless a company_name is provided.
family_namestring | null
Customer's surname. Required unless a company_name is provided.
company_namestring | null
Customer's company name. Required unless a given_name and family_name are provided. For Canadian customers, the use of a company_name value will mean that any mandate created from this customer will be considered to be a "Business PAD" (otherwise, any mandate will be considered to be a "Personal PAD").
address_line1string | null
The first line of the customer's address.
address_line2string | null
The second line of the customer's address.
address_line3string | null
The third line of the customer's address.
citystring | null
The city of the customer's address.
regionstring | null
The customer's address region, county or department. For US customers a 2 letter ISO3166-2:US state code is required (e.g. CA for California).
postal_codestring | null
The customer's postal code.
country_codestring | null
languagestring | null
ISO 639-1 code. Used as the language for notification emails sent by GoCardless if your organisation does not send its own (see compliance requirements). Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If this is not provided, the language will be chosen based on the country_code (if supplied) or default to "en".
phone_numberstring | null
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring | null
For Swedish customers only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
danish_identity_numberstring | null
For Danish customers only. The civic/company number (CPR or CVR) of the customer. Must be supplied if the customer's bank account is denominated in Danish krone (DKK).
metadataobject
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
Response 201
Resource created successfully
customersobject18 properties
idstring
Unique identifier, beginning with "CU".
created_atstring
Fixed timestamp, recording when this resource was created.
emailstring | null
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring | null
Customer's first name. Required unless a company_name is provided.
family_namestring | null
Customer's surname. Required unless a company_name is provided.
company_namestring | null
Customer's company name. Required unless a given_name and family_name are provided. For Canadian customers, the use of a company_name value will mean that any mandate created from this customer will be considered to be a "Business PAD" (otherwise, any mandate will be considered to be a "Personal PAD").
address_line1string | null
The first line of the customer's address.
address_line2string | null
The second line of the customer's address.
address_line3string | null
The third line of the customer's address.
citystring | null
The city of the customer's address.
regionstring | null
The customer's address region, county or department. For US customers a 2 letter ISO3166-2:US state code is required (e.g. CA for California).
postal_codestring | null
The customer's postal code.
country_codestring | null
languagestring | null
ISO 639-1 code. Used as the language for notification emails sent by GoCardless if your organisation does not send its own (see compliance requirements). Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If this is not provided, the language will be chosen based on the country_code (if supplied) or default to "en".
phone_numberstring | null
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring | null
For Swedish customers only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
danish_identity_numberstring | null
For Danish customers only. The civic/company number (CPR or CVR) of the customer. Must be supplied if the customer's bank account is denominated in Danish krone (DKK).
metadataobject
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
errorobjectrequiredGeneric error
6 properties
codeintegerdocumentation_urlstringerrorsarrayrequired
6 properties
reasonstringfieldstringrequest_pointerstringmessagestringrequiredmetadataobjectlinksobjectmessagestringrequiredrequest_idstringrequiredtypestringList customers#
/customersReturns a cursor-paginated list of your customers.
Query Parameters
| Name | Type | Description |
|---|---|---|
before | string | null | Cursor pointing to the end of the desired set. |
after | string | null | Cursor pointing to the start of the desired set. |
limit | integer | string | Number of records to return. |
created_at | object | 4 properties
|
sort_field | string | |
sort_direction | string | |
currency | string | |
action_required | string | Boolean indicating whether the customer has any actions required. |
Response 200
Successful response
customersarray18 properties
idstring
Unique identifier, beginning with "CU".
created_atstring
Fixed timestamp, recording when this resource was created.
emailstring | null
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring | null
Customer's first name. Required unless a company_name is provided.
family_namestring | null
Customer's surname. Required unless a company_name is provided.
company_namestring | null
Customer's company name. Required unless a given_name and family_name are provided. For Canadian customers, the use of a company_name value will mean that any mandate created from this customer will be considered to be a "Business PAD" (otherwise, any mandate will be considered to be a "Personal PAD").
address_line1string | null
The first line of the customer's address.
address_line2string | null
The second line of the customer's address.
address_line3string | null
The third line of the customer's address.
citystring | null
The city of the customer's address.
regionstring | null
The customer's address region, county or department. For US customers a 2 letter ISO3166-2:US state code is required (e.g. CA for California).
postal_codestring | null
The customer's postal code.
country_codestring | null
languagestring | null
ISO 639-1 code. Used as the language for notification emails sent by GoCardless if your organisation does not send its own (see compliance requirements). Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If this is not provided, the language will be chosen based on the country_code (if supplied) or default to "en".
phone_numberstring | null
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring | null
For Swedish customers only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
danish_identity_numberstring | null
For Danish customers only. The civic/company number (CPR or CVR) of the customer. Must be supplied if the customer's bank account is denominated in Danish krone (DKK).
metadataobject
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
metaobject2 properties
limitintegerrequiredcursorsobjectrequired
2 properties
beforestring | nullrequired
Cursor pointing to the end of the desired set.
afterstring | nullrequired
Cursor pointing to the start of the desired set.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
errorobjectrequiredGeneric error
6 properties
codeintegerdocumentation_urlstringerrorsarrayrequired
6 properties
reasonstringfieldstringrequest_pointerstringmessagestringrequiredmetadataobjectlinksobjectmessagestringrequiredrequest_idstringrequiredtypestringGet a single customer#
/customers/{customer_id}Retrieves the details of an existing customer.
Path Parameters
| Name | Type | Description |
|---|---|---|
customer_id | stringrequired | The customer id |
Response 200
Successful response
customersobject18 properties
idstring
Unique identifier, beginning with "CU".
created_atstring
Fixed timestamp, recording when this resource was created.
emailstring | null
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring | null
Customer's first name. Required unless a company_name is provided.
family_namestring | null
Customer's surname. Required unless a company_name is provided.
company_namestring | null
Customer's company name. Required unless a given_name and family_name are provided. For Canadian customers, the use of a company_name value will mean that any mandate created from this customer will be considered to be a "Business PAD" (otherwise, any mandate will be considered to be a "Personal PAD").
address_line1string | null
The first line of the customer's address.
address_line2string | null
The second line of the customer's address.
address_line3string | null
The third line of the customer's address.
citystring | null
The city of the customer's address.
regionstring | null
The customer's address region, county or department. For US customers a 2 letter ISO3166-2:US state code is required (e.g. CA for California).
postal_codestring | null
The customer's postal code.
country_codestring | null
languagestring | null
ISO 639-1 code. Used as the language for notification emails sent by GoCardless if your organisation does not send its own (see compliance requirements). Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If this is not provided, the language will be chosen based on the country_code (if supplied) or default to "en".
phone_numberstring | null
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring | null
For Swedish customers only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
danish_identity_numberstring | null
For Danish customers only. The civic/company number (CPR or CVR) of the customer. Must be supplied if the customer's bank account is denominated in Danish krone (DKK).
metadataobject
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
errorobjectrequiredGeneric error
6 properties
codeintegerdocumentation_urlstringerrorsarrayrequired
6 properties
reasonstringfieldstringrequest_pointerstringmessagestringrequiredmetadataobjectlinksobjectmessagestringrequiredrequest_idstringrequiredtypestringUpdate a customer#
/customers/{customer_id}Updates a customer object. Supports all of the fields supported when creating a customer.
Path Parameters
| Name | Type | Description |
|---|---|---|
customer_id | stringrequired | The customer id |
Request Body
customersobject16 properties
emailstring | null
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring | null
Customer's first name. Required unless a company_name is provided.
family_namestring | null
Customer's surname. Required unless a company_name is provided.
company_namestring | null
Customer's company name. Required unless a given_name and family_name are provided. For Canadian customers, the use of a company_name value will mean that any mandate created from this customer will be considered to be a "Business PAD" (otherwise, any mandate will be considered to be a "Personal PAD").
address_line1string | null
The first line of the customer's address.
address_line2string | null
The second line of the customer's address.
address_line3string | null
The third line of the customer's address.
citystring | null
The city of the customer's address.
regionstring | null
The customer's address region, county or department. For US customers a 2 letter ISO3166-2:US state code is required (e.g. CA for California).
postal_codestring | null
The customer's postal code.
country_codestring | null
languagestring | null
ISO 639-1 code. Used as the language for notification emails sent by GoCardless if your organisation does not send its own (see compliance requirements). Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If this is not provided, the language will be chosen based on the country_code (if supplied) or default to "en".
phone_numberstring | null
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring | null
For Swedish customers only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
danish_identity_numberstring | null
For Danish customers only. The civic/company number (CPR or CVR) of the customer. Must be supplied if the customer's bank account is denominated in Danish krone (DKK).
metadataobject
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
Response 200
Successful response
customersobject18 properties
idstring
Unique identifier, beginning with "CU".
created_atstring
Fixed timestamp, recording when this resource was created.
emailstring | null
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring | null
Customer's first name. Required unless a company_name is provided.
family_namestring | null
Customer's surname. Required unless a company_name is provided.
company_namestring | null
Customer's company name. Required unless a given_name and family_name are provided. For Canadian customers, the use of a company_name value will mean that any mandate created from this customer will be considered to be a "Business PAD" (otherwise, any mandate will be considered to be a "Personal PAD").
address_line1string | null
The first line of the customer's address.
address_line2string | null
The second line of the customer's address.
address_line3string | null
The third line of the customer's address.
citystring | null
The city of the customer's address.
regionstring | null
The customer's address region, county or department. For US customers a 2 letter ISO3166-2:US state code is required (e.g. CA for California).
postal_codestring | null
The customer's postal code.
country_codestring | null
languagestring | null
ISO 639-1 code. Used as the language for notification emails sent by GoCardless if your organisation does not send its own (see compliance requirements). Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If this is not provided, the language will be chosen based on the country_code (if supplied) or default to "en".
phone_numberstring | null
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring | null
For Swedish customers only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
danish_identity_numberstring | null
For Danish customers only. The civic/company number (CPR or CVR) of the customer. Must be supplied if the customer's bank account is denominated in Danish krone (DKK).
metadataobject
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
errorobjectrequiredGeneric error
6 properties
codeintegerdocumentation_urlstringerrorsarrayrequired
6 properties
reasonstringfieldstringrequest_pointerstringmessagestringrequiredmetadataobjectlinksobjectmessagestringrequiredrequest_idstringrequiredtypestringRemove a customer#
/customers/{customer_id}Removed customers will not appear in search results or lists of customers (in our API or exports), and it will not be possible to load an individually removed customer by ID.
Path Parameters
| Name | Type | Description |
|---|---|---|
customer_id | stringrequired | The customer id |
Request Body
customersobjectResponse 204
Resource deleted successfully (no content)
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
errorobjectrequiredGeneric error
6 properties
codeintegerdocumentation_urlstringerrorsarrayrequired
6 properties
reasonstringfieldstringrequest_pointerstringmessagestringrequiredmetadataobjectlinksobjectmessagestringrequiredrequest_idstringrequiredtypestring