# Create a customer Endpoint: POST /customers Version: 1.0.0 Security: Biller Access Token (Staging), Biller Access Token (Production) ## Request fields (application/json): - `name` (string) The full name of the customer. Example: "John Doe" - `people` (array) A list of people associated with the customer. Can include contacts, representatives, or stakeholders. Example: [{"name":"Jane Smith","email":"jane.smith@example.com"}] - `people.id` (string) The internal id of the person. - `people.firstName` (string) The first name of the person. - `people.lastName` (string) The last name of the person. - `people.email` (string) The email of the person. - `people.phoneNo` (string) The phone number of the person. - `people.isPrimaryContact` (boolean) True if this person is a primary contact. - `people.isIncludedInCommunications` (boolean) True if this person is included in the customers communications. - `addresses` (array) A list of addresses for the customer. Currently, only one address is supported. Example: [{"line1":"2 Catherine Pl","city":"London","state":"NY","postCode":"SW1E 6HF"}] - `addresses.id` (string) The internal id of the address. - `addresses.city` (string) The name of the city. - `addresses.postalCode` (string) The postal code. - `addresses.country` (string) The name of the biller country. - `addresses.addressLine1` (string) The name of the street, and the house or building number. - `externalData` (object) References about the customer from external platforms Adfin integrates with. - `externalData.connectorType` (string, required) The customer connector type. Possible values (non-exclusive): XERO, QUICKBOOKS - `externalData.id` (string, required) The ID of the Customer in the external platform. - `externalData.name` (string) The name of the Customer in the external platform. ## Response 200 fields (application/json): - `id` (string) The Adfin id of the customer. - `externalId` (string) The id of the customer from the platform that is integrating with Adfin. - `name` (string) The full name of the customer. - `creationTime` (string) The time the customer was created. - `lastUpdatedTime` (string) The last time when the customer was updated. - `people` (array) The list of people assigned to the customer. - `people.id` (string) The internal id of the person. - `people.firstName` (string) The first name of the person. - `people.lastName` (string) The last name of the person. - `people.email` (string) The email of the person. - `people.phoneNo` (string) The phone number of the person. - `people.isPrimaryContact` (boolean) True if this person is a primary contact. - `people.isIncludedInCommunications` (boolean) True if this person is included in the customers communications. - `addresses` (array) The list of the addresses for the customer. - `addresses.id` (string) The internal id of the address. - `addresses.city` (string) The name of the city. - `addresses.postalCode` (string) The postal code. - `addresses.country` (string) The name of the biller country. - `addresses.addressLine1` (string) The name of the street, and the house or building number. - `directDebitMandate` (object) Direct Debit details. - `directDebitMandate.id` (string) The id of the direct debit mandate. - `directDebitMandate.status` (string) The status of the Direct Debit Mandate, if any present. * CREATED: The Direct Debit Mandate was created with success. * PENDING: The Direct Debit Mandate was signed and accepted by the customer and it is in the Payment Provider's accepted timeframe. * ACTIVE: The Direct Debit Mandate was confirmed by the Payment Provider. * CANCELLED: The Direct Debit Mandate was cancelled directly by the customer. * MIGRATING: The Direct Debit Mandate is in process of migrating from one payment provider to another.. Possible values (non-exclusive): CREATED, PENDING, ACTIVE, CANCELLED, MIGRATING - `directDebitMandate.statusReasonCode` (string) The reason why the direct debit mandate is in a certain status. * PENDING_DD_CAPABILITY - The direct debit mandate was signed, but not yet submitted to the payment provider as the biller onboarding is still in progress. * PENDING_ACTIVATION - The direct debit mandate was signed, but not yet activated by the payment provider. * MIGRATED - The direct debit mandate was migrated to a new payment provider. * BANK_ACCOUNT_CHANGED - The direct debit mandate was created due to a bank account change (bank switching). * INCORRECT_BANK_DETAILS - The direct debit mandate has incorrect bank account details. * OTHER - Unknown reason. Possible values (non-exclusive): PENDING_DD_CAPABILITY, PENDING_ACTIVATION, MIGRATED, BANK_ACCOUNT_CHANGED, INCORRECT_BANK_DETAILS, OTHER - `directDebitMandate.statusReason` (string) Reason explaining the current status of the direct debit mandate, especially useful for failure cases. - `directDebitMandate.creationTime` (string) The time when the mandate was created - `directDebitMandate.lastUpdatedTime` (string) The last time when the mandate was updated - `directDebitMandate.authorisationTime` (string) The time when the mandate was signed by the customer - `directDebitMandate.submissionTime` (string) The time when the mandate was submitted to the payment provider - `directDebitMandate.url` (string) The URL where the customer can sign the direct debit mandate. - `timezone` (string) The timezone of the customer. - `discount` (object) The customer discount details. - `discount.percentage` (number) The discount as a percentage to be applied for the invoices. - `discount.period` (integer) The period in hours until the discount expires. - `externalData` (array) References about this customer from external platforms Adfin integrates with, such as ID, etc. - `externalData.connectorType` (string, required) The customer connector type. Possible values (non-exclusive): XERO, QUICKBOOKS - `externalData.id` (string, required) The ID of the Customer in the external platform. - `externalData.name` (string) The name of the Customer in the external platform. - `tags` (array) The tag ids associated with the customer. ## Response 400 fields ## Response 401 fields ## Response 422 fields ## Response 500 fields