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
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring
Customer's first name. Required unless a company_name is provided.
family_namestring
Customer's surname. Required unless a company_name is provided.
company_namestring
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
The first line of the customer's address.
address_line2string
The second line of the customer's address.
address_line3string
The third line of the customer's address.
citystring
The city of the customer's address.
regionstring
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
The customer's postal code.
country_codestring
languagestring
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
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring
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
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
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring
Customer's first name. Required unless a company_name is provided.
family_namestring
Customer's surname. Required unless a company_name is provided.
company_namestring
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
The first line of the customer's address.
address_line2string
The second line of the customer's address.
address_line3string
The third line of the customer's address.
citystring
The city of the customer's address.
regionstring
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
The customer's postal code.
country_codestring
languagestring
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
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring
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
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
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectList customers#
/customersReturns a cursor-paginated list of your customers.
Response 200
Successful response
customersarray18 properties
idstring
Unique identifier, beginning with "CU".
created_atstring
Fixed timestamp, recording when this resource was created.
emailstring
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring
Customer's first name. Required unless a company_name is provided.
family_namestring
Customer's surname. Required unless a company_name is provided.
company_namestring
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
The first line of the customer's address.
address_line2string
The second line of the customer's address.
address_line3string
The third line of the customer's address.
citystring
The city of the customer's address.
regionstring
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
The customer's postal code.
country_codestring
languagestring
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
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring
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
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
limitintegercursorsobject
2 properties
beforestring
Cursor pointing to the end of the desired set.
afterstring
Cursor pointing to the start of the desired set.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectGet a single customer#
/customers/{customer_id}Retrieves the details of an existing customer.
Path Parameters
| Name | Type | Description |
|---|---|---|
customer_idrequired | string | 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
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring
Customer's first name. Required unless a company_name is provided.
family_namestring
Customer's surname. Required unless a company_name is provided.
company_namestring
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
The first line of the customer's address.
address_line2string
The second line of the customer's address.
address_line3string
The third line of the customer's address.
citystring
The city of the customer's address.
regionstring
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
The customer's postal code.
country_codestring
languagestring
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
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring
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
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
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectUpdate 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_idrequired | string | The customer id |
Request Body
customersobject16 properties
emailstring
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring
Customer's first name. Required unless a company_name is provided.
family_namestring
Customer's surname. Required unless a company_name is provided.
company_namestring
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
The first line of the customer's address.
address_line2string
The second line of the customer's address.
address_line3string
The third line of the customer's address.
citystring
The city of the customer's address.
regionstring
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
The customer's postal code.
country_codestring
languagestring
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
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring
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
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
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
given_namestring
Customer's first name. Required unless a company_name is provided.
family_namestring
Customer's surname. Required unless a company_name is provided.
company_namestring
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
The first line of the customer's address.
address_line2string
The second line of the customer's address.
address_line3string
The third line of the customer's address.
citystring
The city of the customer's address.
regionstring
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
The customer's postal code.
country_codestring
languagestring
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
ITU E.123 formatted phone number, including country code.
swedish_identity_numberstring
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
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
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectRemove 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.
The action of removing a customer cannot be reversed, so please use with care.
Path Parameters
| Name | Type | Description |
|---|---|---|
customer_idrequired | string | 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
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobject