Terms of Service
Use the Terms of Service API to generate a token that you can include when creating or updating an account. This records that the account holder accepted your terms of service, with an acceptance timestamp and request context (IP address, user agent). The token can be generated before an account exists—for example, to show terms during signup and then attach the token when the account is created.
Generate a terms-of-service token
Call this endpoint to obtain a one-time token. You do not need an account ID—the token is not tied to any account until you include it in a create or update account request.
Returns
A generated terms-of-service token. Include this value in terms_of_service.token when creating an account (POST /v1/accounts) or updating an account (PATCH /v1/accounts/:id).
curl --request GET \
--url https://api.framepayments.com/v1/terms-of-service \
--header 'Authorization: Bearer YOUR_SECRET_KEY'
{
"token": "xY7k2mN9pQ4rS1tU3vW6zA8bC0dE5fG"
}
Using the token when creating an account
When you create an account with POST /v1/accounts, include the token in the terms_of_service object. If you send only the token, the API will set the other fields for you: accepted_at (current time), ip_address, and user_agent (from the request). You can also send those fields yourself to override.
curl --request POST \
--url https://api.framepayments.com/v1/accounts \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"type": "individual",
"terms_of_service": {
"token": "xY7k2mN9pQ4rS1tU3vW6zA8bC0dE5fG"
},
"profile": {
"individual": {
"name": { "first_name": "Jane", "last_name": "Doe" },
"email": "jane@example.com"
}
}
}'
Using the token when updating an account
When you update an account with PATCH /v1/accounts/:id, you can send a terms_of_service object that includes the token. This replaces any existing terms-of-service data on the account with the new payload. As with create, if you send only the token, the API will set accepted_at, ip_address, and user_agent from the request.
Note: Any PATCH that includes terms_of_service replaces the entire stored value. Only the four fields (token, accepted_at, ip_address, user_agent) from your request are kept; previous terms-of-service data is removed.
curl --request PATCH \
--url https://api.framepayments.com/v1/accounts/ACCOUNT_ID \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"terms_of_service": {
"token": "xY7k2mN9pQ4rS1tU3vW6zA8bC0dE5fG"
}
}'