Mandate Import Entry
Mandate Import Entries are added to a Mandate Import. Each entry corresponds to one mandate to be imported into GoCardless.
To import a mandate you will need:
- Identifying information about the customer (name/company and address)
- Bank account details, consisting of an account holder name and either an IBAN or local bank details
- Amendment details (SEPA only)
We suggest you provide a record_identifier (which is unique within the context of a
single mandate import) to help you to identify mandates that have been created once the
import has been processed by GoCardless. You can
list the mandate import entries,
match them up in your system using the record_identifier, and look at the links
fields to find the mandate, customer and customer bank account that have been imported.
Restricted: This API is currently only available for approved integrators - please get in touch if you would like to use this API.
Add a mandate import entry#
/mandate_import_entriesFor an existing mandate import, this endpoint can be used to add individual mandates to be imported into GoCardless.
You can add no more than 30,000 rows to a single mandate import.
If you attempt to go over this limit, the API will return a record_limit_exceeded error.
Request Body
mandate_import_entriesobject6 properties
linksobject
1 properties
mandate_importstring
Unique identifier, beginning with "IM".
record_identifierstring
A unique identifier for this entry, which you can use (once the import has been processed by GoCardless) to identify the records that have been created. Limited to 255 characters.
mandateobject
3 properties
referencestring
Unique reference. Different schemes have different length and character set requirements. GoCardless will generate a unique reference satisfying the different scheme requirements if this field is left blank.
authorisation_sourcestring
This field is ACH specific, sometimes referred to as SEC code.
This is the way that the payer gives authorisation to the merchant. web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC code: WEB) telephone: Authorisation is provided orally over telephone (maps to SEC code: TEL) paper: Authorisation is provided in writing and signed, or similarly authenticated (maps to SEC code: PPD)
webtelephonepapermetadataobject
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.
customerobject
16 properties
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").
emailstring
Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
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".
address_line1string
The first line of the customer's address. Required if mandate import scheme is either bacs or sepa.
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. Required if mandate import scheme is either bacs or sepa.
country_codestring
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.
bank_accountobject
8 properties
account_holder_namestring
Name of the account holder, as known by the bank. The full name provided when the customer is created is stored and is available via the API, but is transliterated, upcased, and truncated to 18 characters in bank submissions. This field is required unless the request includes a customer bank account token.
account_numberstring
Bank account number - see local details for more information. Alternatively you can provide an iban.
bank_codestring
Bank code - see local details for more information. Alternatively you can provide an iban.
branch_codestring
Branch code - see local details for more information. Alternatively you can provide an iban.
country_codestring
ISO 3166-1 alpha-2 code. Defaults to the country code of the iban if supplied, otherwise is required.
ibanstring
International Bank Account Number. Alternatively you can provide local details. IBANs are not accepted for Swedish bank accounts denominated in SEK - you must supply local details.
account_typestring
Bank account type. Required for USD-denominated bank accounts. Must not be provided for bank accounts in other currencies. See local details for more information.
savingscheckingmetadataobject
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.
amendmentobject
3 properties
original_mandate_referencestring
The unique SEPA reference for the mandate being amended. Required if mandate
import scheme is sepa.
original_creditor_idstring
The creditor identifier of the direct debit originator. Required if mandate
import scheme is sepa.
original_creditor_namestring
Data about the original mandate to be moved or modified.
Response 201
Resource created successfully
mandate_import_entriesobject4 properties
record_identifierstring
A unique identifier for this entry, which you can use (once the import has been processed by GoCardless) to identify the records that have been created. Limited to 255 characters.
created_atstring
Fixed timestamp, recording when this resource was created.
linksobject
Related resources
4 properties
mandate_importstring
The ID of the mandate import. This is returned when you create a Mandate Import.
mandateobjectcustomerobjectcustomer_bank_accountobjectprocessing_errorsobject
Per-resource processing errors
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectList all mandate import entries#
/mandate_import_entriesFor an existing mandate import, this endpoint lists all of the entries attached.
After a mandate import has been submitted, you can use this endpoint to associate records
in your system (using the record_identifier that you provided when creating the
mandate import).
Response 200
Successful response
mandate_import_entriesarray4 properties
record_identifierstring
A unique identifier for this entry, which you can use (once the import has been processed by GoCardless) to identify the records that have been created. Limited to 255 characters.
created_atstring
Fixed timestamp, recording when this resource was created.
linksobject
Related resources
4 properties
mandate_importstring
The ID of the mandate import. This is returned when you create a Mandate Import.
mandateobjectcustomerobjectcustomer_bank_accountobjectprocessing_errorsobject
Per-resource processing errors
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_idstringtypestringmetadataobjectlinksobject