Skip to main content
Before Endl can create a customer for you, the customer must accept Endl’s terms. You prove that acceptance by sending termsAcceptance on Create customer (POST /api/v0/customer). There are two ways to collect the acceptance:

Hosted terms page guide

Showing the hosted page in an iframe or by redirect, the endl.terms.* events, what the customer sees, security, a test checklist and an FAQ.

Flow with the hosted page

1

Your backend creates a terms link

POST /api/v0/terms/links returns { url, expires_at }.
2

You show the url to the customer

In an iframe or as a full page — see the hosted terms page guide.
3

The customer accepts

Endl gives you the signed agreement id, by postMessage (iframe) or by redirect.
4

Your backend creates the customer with it

POST /api/v0/customer with termsAcceptance — see below.
  • A link works only once and expires. expires_at in the response says when; links currently last 15 minutes.
  • The signed agreement id is created only when the customer accepts. Endl sends it to you once, and no endpoint returns it again, so save it when it arrives.
  • Each signed agreement id can be used for one customer only.
  • Api-Version is required, as on every /api/v0 request. If it’s missing or the value isn’t supported, the request fails with 400 and field: "Api-Version".
  • redirect_uri is only needed for redirect mode. Leave it out for an iframe-only link. Sent blank ("" or only spaces), it is 400 ERRCUS_1712.
See Create terms link for the full request, response and errors, and the hosted terms page guide for how to show the returned url.

Send termsAcceptance on Create customer

termsAcceptance is required on POST /api/v0/customer for:
  • individual customers, created with full data or imported with a shareToken
  • business customers, created with full data or imported with a shareToken
It’s checked before anything else. If it’s missing or invalid, the request fails with 400 and only the terms errors, and no customer is created. Send exactly one of the two proofs.
The other customer fields are shortened in these examples. Send the full request as described on the Create customer page.
Breaking change: a Create customer request without termsAcceptance now fails with 400 ERRCUS_1700.

Errors

400 validation errors

Signed agreement and acceptance token errors

Testing

  1. Get a signed agreement id on sandbox by following the hosted terms page testing steps.
  2. Create the customer with that signed_agreement_id in termsAcceptance.
  3. Send the same signed_agreement_id on a second Create customer request. You should get 409 ERRCUS_1612.
  4. Make sure termsAcceptance is sent on every Create customer request.