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_atin 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.
Create a terms link
Api-Versionis required, as on every/api/v0request. If it’s missing or the value isn’t supported, the request fails with400andfield: "Api-Version".redirect_uriis only needed for redirect mode. Leave it out for an iframe-only link. Sent blank (""or only spaces), it is400 ERRCUS_1712.
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
400 and only the terms errors, and no customer is created.
Send exactly one of the two proofs.
- A. Signed agreement (hosted page)
- B. Acceptance on your own screen
Errors
400 validation errors
Signed agreement and acceptance token errors
Testing
- Get a signed agreement id on sandbox by following the hosted terms page testing steps.
- Create the customer with that
signed_agreement_idintermsAcceptance. - Send the same
signed_agreement_idon a second Create customer request. You should get409 ERRCUS_1612. - Make sure
termsAcceptanceis sent on every Create customer request.