Create customer

POST https://api.ecurring.com/customers

Create a customer

Parameters

None

Request attributes

gender
string
Optional - The gender of the customer. Used to determine the salutation in communication with the customer. Possible values: m / f
first_name
string
The first name of the customer
middle_name
string
Optional - The middle name of the customer
last_name
string
The last name of the customer
email
string
The email address of the customer
company_name
string
Optional - The name of the company of the customer
vat_number
string
Optional - The vat number of the company of the customer
bank_holder
string
The full name of the bank account holder (this can be different from the name of the customer). This field is only required when adding a subscription to a plan that does not use the "online payment" mandate method.
iban
string
The IBAN of the customer. This field is only required when adding a subscription to a plan that does not use the "online payment" mandate type.
postalcode
string
Optional - The postalcode of the address of the customer
house_number
string
Optional - The house number of the address of the customer
house_number_add
string
Optional - The house number addition of the address of the customer
street
string
Optional - The street of the address of the customer
city
string
Optional - The city of the address of the customer
country_iso2
string
Optional - The 2 letter ISO code of the country of residence of the customer
language
string
Optional - The preferred communication language of the customer. Any notifications sent to the customer will be in this language. Possible values: nl / en. Defaults to nl.
telephone
string
Optional - The telephone number of the customer

Examples

Creating a customer with minimal required fields

Request

POST /customers HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
{
    "data": {
        "type": "customer",
        "attributes": {
        	"first_name": "Customer",
        	"last_name": "Test",
        	"email": "customer.test@ecurring.com"
        }
    }
}

Response

HTTP/1.1 201 Created
Content-Type: application/vnd.api+json
{
    "links": {
        "self": "https://api.ecurring.test/customers/1"
    },
    "data": {
        "type": "customer",
        "id": "1",
        "links": {
            "self": "https://api.ecurring.test/customers/1"
        },
        "attributes": {
            "gender": null,
            "first_name": "Customer",
            "middle_name": null,
            "last_name": "Test",
            "company_name": null,
            "vat_number": null,
            "bank_holder": null,
            "iban": null,
            "payment_method": "directdebit",
            "bank_verification_method": null,
            "card_holder": null,
            "card_number": null,
            "postalcode": null,
            "house_number": null,
            "house_number_add": null,
            "street": null,
            "city": null,
            "country_iso2": null,
            "email": "customer.test@ecurring.com",
            "telephone": null,
            "language": "nl",
            "created_at": "2018-10-10T12:09:24+02:00",
            "updated_at": "2018-10-10T12:09:24+02:00"
        },
        "relationships": {
            "subscriptions": {
                "links": {
                    "related": "https://api.ecurring.test/customers/1/subscriptions"
                },
                "data": []
            }
        }
    }
}

Creating a customer with additional information

Request

POST /customers HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
{
    "data": {
        "type": "customer",
        "attributes": {
        	"gender": "f",
        	"first_name": "Customer",
        	"last_name": "Test",
        	"bank_holder": "C Test",
        	"iban": "NL19ABNA0940161854",
        	"email": "customer.test@ecurring.com",
        	"telephone": "+31202616739",
        	"street": "Keizersgracht",
        	"house_number": "313",
        	"city": "Amsterdam",
        	"postalcode": "1016EE",
        	"country_iso2": "NL"
        }
    }
}

Response

HTTP/1.1 201 Created
Content-Type: application/vnd.api+json
{
    "links": {
        "self": "https://api.ecurring.com/customers/1"
    },
    "data": {
        "type": "customer",
        "id": "1",
        "links": {
            "self": "https://api.ecurring.com/customers/1"
        },
        "attributes": {
            "gender": "f",
            "first_name": "Customer",
            "middle_name": null,
            "last_name": "Test",
            "company_name": null,
            "vat_number": null,
            "bank_holder": "C Test",
            "iban": "NL19ABNA0940161854",
            "payment_method": "directdebit",
            "bank_verification_method": null,
            "card_holder": "C Test",
            "card_number": "1854",
            "postalcode": "1016EE",
            "house_number": "313",
            "house_number_add": null,
            "street": "Keizersgracht",
            "city": "Amsterdam",
            "country_iso2": "NL",
            "language": "nl",
            "email": "customer.test@ecurring.com",
            "telephone": "+31202616739",
            "created_at": "2018-02-01T11:21:09+01:00",
            "updated_at": "2018-02-01T11:21:09+01:00"
        },
        "relationships": {
            "subscriptions": {
                "links": {
                    "related": "https://api.ecurring.com/customers/1/subscriptions"
                },
                "data": []
            }
        }
    }
}