diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml index 38f41cd35..294f0c937 100644 --- a/.stainless/stainless.yml +++ b/.stainless/stainless.yml @@ -113,6 +113,9 @@ resources: business_customer_create_request: '#/components/schemas/BusinessCustomerCreateRequest' individual_customer_update_request: '#/components/schemas/IndividualCustomerUpdateRequest' business_customer_update_request: '#/components/schemas/BusinessCustomerUpdateRequest' + end_user_terms: '#/components/schemas/EndUserTerms' + end_user_terms_consent: '#/components/schemas/EndUserTermsConsent' + end_user_terms_consent_request: '#/components/schemas/EndUserTermsConsentRequest' # Internal-account management (list/update/export under this resource) internal_account_list_response: '#/components/schemas/InternalAccountListResponse' internal_account_update_request: '#/components/schemas/InternalAccountUpdateRequest' @@ -139,6 +142,11 @@ resources: create_kyc_link: endpoint: post /customers/{customerId}/kyc-link body_param_name: KycLinkCreateRequest + retrieve_end_user_terms: get /customers/end-user-terms + retrieve_end_user_terms_consent: get /customers/{customerId}/end-user-terms-consent + update_end_user_terms_consent: + endpoint: patch /customers/{customerId}/end-user-terms-consent + body_param_name: EndUserTermsConsentRequest # Subresources define resources that are nested within another for more powerful # logical groupings, e.g. `cards.payments`. subresources: diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 132abc89f..0590a75db 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -826,6 +826,109 @@ paths: application/json: schema: $ref: '#/components/schemas/Error500' + /customers/{customerId}/end-user-terms-consent: + get: + summary: Get a customer's End User Terms consent + description: Retrieve the End User Terms acceptance recorded for one customer. + operationId: getCustomerEndUserTermsConsent + tags: + - Customers + security: + - BasicAuth: [] + parameters: + - name: customerId + in: path + required: true + description: Unique Grid identifier for the customer. + schema: + type: string + responses: + '200': + description: End User Terms consent retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserTermsConsent' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: Customer or consent record not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + patch: + summary: Update a customer's End User Terms consent + description: Record or replace the End User Terms acceptance for one customer. + operationId: updateCustomerEndUserTermsConsent + tags: + - Customers + security: + - BasicAuth: [] + parameters: + - name: customerId + in: path + required: true + description: Unique Grid identifier for the customer. + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserTermsConsentRequest' + responses: + '200': + description: End User Terms consent updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserTermsConsent' + '400': + description: Invalid input or unsupported terms version + content: + application/json: + schema: + $ref: '#/components/schemas/Error400' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: Customer not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + /customers/end-user-terms: + get: + summary: Get the current Grid End User Terms + description: Retrieve the current version and Grid-hosted URL of the End User Terms. + operationId: getEndUserTerms + tags: + - Customers + security: + - BasicAuth: [] + responses: + '200': + description: Current End User Terms retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserTerms' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' /customers/{customerId}/kyc-link: parameters: - name: customerId @@ -12819,6 +12922,35 @@ components: type: object description: Additional error details additionalProperties: true + EndUserTermsAcceptanceMethod: + type: string + description: Method the customer used to affirmatively accept the End User Terms. + enum: + - CHECKBOX + - CLICK_TO_ACCEPT + example: CHECKBOX + EndUserTermsConsentRequest: + type: object + required: + - acceptedAt + - ipAddress + - termsVersion + - acceptanceMethod + properties: + acceptedAt: + type: string + format: date-time + description: Date and time when the customer accepted the End User Terms. + ipAddress: + type: string + description: IP address of the device the customer used when accepting the terms. + example: 198.51.100.24 + termsVersion: + type: string + description: Version identifier of the accepted Grid End User Terms. + example: '2026-07-31' + acceptanceMethod: + $ref: '#/components/schemas/EndUserTermsAcceptanceMethod' CustomerCreateRequest: type: object required: @@ -12856,6 +12988,8 @@ components: type: string description: Optional UMA address identifier. If not provided during customer creation, one will be generated by the system. If provided during customer update, the UMA address will be updated to the provided value. This is an optional identifier to route payments to the customer. This is an optional identifier to route payments to the customer. example: $john.doe@uma.domain.com + endUserTermsConsent: + $ref: '#/components/schemas/EndUserTermsConsentRequest' IndividualCustomerCreateRequest: title: Individual Customer Create Request allOf: @@ -13221,6 +13355,31 @@ components: type: object description: Additional error details additionalProperties: true + EndUserTermsConsent: + allOf: + - $ref: '#/components/schemas/EndUserTermsConsentRequest' + - type: object + required: + - customerId + properties: + customerId: + type: string + description: Unique Grid identifier for the customer. + EndUserTerms: + type: object + required: + - version + - url + properties: + version: + type: string + description: Current version identifier of the Grid End User Terms. + example: '2026-07-31' + url: + type: string + format: uri + description: URL where Grid hosts this version of the End User Terms. + example: https://www.lightspark.com/legal/grid/enduserterms KycLinkCreateRequest: type: object description: Request body for generating a hosted KYC link for an existing customer. diff --git a/mintlify/payouts-and-b2b/onboarding/disclosures.mdx b/mintlify/payouts-and-b2b/onboarding/disclosures.mdx index 05004b0bd..b54d6445e 100644 --- a/mintlify/payouts-and-b2b/onboarding/disclosures.mdx +++ b/mintlify/payouts-and-b2b/onboarding/disclosures.mdx @@ -19,6 +19,10 @@ Copy Lightspark's End User Terms and append them to your own terms of service, s Present the combined terms in your onboarding or consent flow, and require each end user to affirmatively accept them (for example, an unchecked checkbox or an "I Agree" button) before they can use Grid. +Use `GET /customers/end-user-terms` to retrieve the current terms URL and version. Record acceptance when you create the customer with `endUserTermsConsent`, or later with `PATCH /customers/{customerId}/end-user-terms-consent`. The acceptance record includes the timestamp, device IP address, terms version, and acceptance method. Grid rejects versions that it does not recognize. + +For unregulated platforms, Grid does not open customer accounts until you record this acceptance. You can retrieve the current record with `GET /customers/{customerId}/end-user-terms-consent`. + ## Provide evidence of your consent flow Send Lightspark evidence that your end users are shown the End User Terms and consent to them. Provide both: diff --git a/openapi.yaml b/openapi.yaml index 132abc89f..0590a75db 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -826,6 +826,109 @@ paths: application/json: schema: $ref: '#/components/schemas/Error500' + /customers/{customerId}/end-user-terms-consent: + get: + summary: Get a customer's End User Terms consent + description: Retrieve the End User Terms acceptance recorded for one customer. + operationId: getCustomerEndUserTermsConsent + tags: + - Customers + security: + - BasicAuth: [] + parameters: + - name: customerId + in: path + required: true + description: Unique Grid identifier for the customer. + schema: + type: string + responses: + '200': + description: End User Terms consent retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserTermsConsent' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: Customer or consent record not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + patch: + summary: Update a customer's End User Terms consent + description: Record or replace the End User Terms acceptance for one customer. + operationId: updateCustomerEndUserTermsConsent + tags: + - Customers + security: + - BasicAuth: [] + parameters: + - name: customerId + in: path + required: true + description: Unique Grid identifier for the customer. + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserTermsConsentRequest' + responses: + '200': + description: End User Terms consent updated successfully + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserTermsConsent' + '400': + description: Invalid input or unsupported terms version + content: + application/json: + schema: + $ref: '#/components/schemas/Error400' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '404': + description: Customer not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error404' + /customers/end-user-terms: + get: + summary: Get the current Grid End User Terms + description: Retrieve the current version and Grid-hosted URL of the End User Terms. + operationId: getEndUserTerms + tags: + - Customers + security: + - BasicAuth: [] + responses: + '200': + description: Current End User Terms retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserTerms' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' /customers/{customerId}/kyc-link: parameters: - name: customerId @@ -12819,6 +12922,35 @@ components: type: object description: Additional error details additionalProperties: true + EndUserTermsAcceptanceMethod: + type: string + description: Method the customer used to affirmatively accept the End User Terms. + enum: + - CHECKBOX + - CLICK_TO_ACCEPT + example: CHECKBOX + EndUserTermsConsentRequest: + type: object + required: + - acceptedAt + - ipAddress + - termsVersion + - acceptanceMethod + properties: + acceptedAt: + type: string + format: date-time + description: Date and time when the customer accepted the End User Terms. + ipAddress: + type: string + description: IP address of the device the customer used when accepting the terms. + example: 198.51.100.24 + termsVersion: + type: string + description: Version identifier of the accepted Grid End User Terms. + example: '2026-07-31' + acceptanceMethod: + $ref: '#/components/schemas/EndUserTermsAcceptanceMethod' CustomerCreateRequest: type: object required: @@ -12856,6 +12988,8 @@ components: type: string description: Optional UMA address identifier. If not provided during customer creation, one will be generated by the system. If provided during customer update, the UMA address will be updated to the provided value. This is an optional identifier to route payments to the customer. This is an optional identifier to route payments to the customer. example: $john.doe@uma.domain.com + endUserTermsConsent: + $ref: '#/components/schemas/EndUserTermsConsentRequest' IndividualCustomerCreateRequest: title: Individual Customer Create Request allOf: @@ -13221,6 +13355,31 @@ components: type: object description: Additional error details additionalProperties: true + EndUserTermsConsent: + allOf: + - $ref: '#/components/schemas/EndUserTermsConsentRequest' + - type: object + required: + - customerId + properties: + customerId: + type: string + description: Unique Grid identifier for the customer. + EndUserTerms: + type: object + required: + - version + - url + properties: + version: + type: string + description: Current version identifier of the Grid End User Terms. + example: '2026-07-31' + url: + type: string + format: uri + description: URL where Grid hosts this version of the End User Terms. + example: https://www.lightspark.com/legal/grid/enduserterms KycLinkCreateRequest: type: object description: Request body for generating a hosted KYC link for an existing customer. diff --git a/openapi/components/schemas/customers/CustomerCreateRequest.yaml b/openapi/components/schemas/customers/CustomerCreateRequest.yaml index 47d1e0765..a82792e34 100644 --- a/openapi/components/schemas/customers/CustomerCreateRequest.yaml +++ b/openapi/components/schemas/customers/CustomerCreateRequest.yaml @@ -54,3 +54,5 @@ properties: If provided during customer update, the UMA address will be updated to the provided value. This is an optional identifier to route payments to the customer. This is an optional identifier to route payments to the customer. example: $john.doe@uma.domain.com + endUserTermsConsent: + $ref: ./EndUserTermsConsentRequest.yaml diff --git a/openapi/components/schemas/customers/EndUserTerms.yaml b/openapi/components/schemas/customers/EndUserTerms.yaml new file mode 100644 index 000000000..b3202c95e --- /dev/null +++ b/openapi/components/schemas/customers/EndUserTerms.yaml @@ -0,0 +1,14 @@ +type: object +required: + - version + - url +properties: + version: + type: string + description: Current version identifier of the Grid End User Terms. + example: '2026-07-31' + url: + type: string + format: uri + description: URL where Grid hosts this version of the End User Terms. + example: https://www.lightspark.com/legal/grid/enduserterms diff --git a/openapi/components/schemas/customers/EndUserTermsAcceptanceMethod.yaml b/openapi/components/schemas/customers/EndUserTermsAcceptanceMethod.yaml new file mode 100644 index 000000000..f4d315ae6 --- /dev/null +++ b/openapi/components/schemas/customers/EndUserTermsAcceptanceMethod.yaml @@ -0,0 +1,6 @@ +type: string +description: Method the customer used to affirmatively accept the End User Terms. +enum: + - CHECKBOX + - CLICK_TO_ACCEPT +example: CHECKBOX diff --git a/openapi/components/schemas/customers/EndUserTermsConsent.yaml b/openapi/components/schemas/customers/EndUserTermsConsent.yaml new file mode 100644 index 000000000..fe5a090d2 --- /dev/null +++ b/openapi/components/schemas/customers/EndUserTermsConsent.yaml @@ -0,0 +1,9 @@ +allOf: + - $ref: ./EndUserTermsConsentRequest.yaml + - type: object + required: + - customerId + properties: + customerId: + type: string + description: Unique Grid identifier for the customer. diff --git a/openapi/components/schemas/customers/EndUserTermsConsentRequest.yaml b/openapi/components/schemas/customers/EndUserTermsConsentRequest.yaml new file mode 100644 index 000000000..58c1cdd0d --- /dev/null +++ b/openapi/components/schemas/customers/EndUserTermsConsentRequest.yaml @@ -0,0 +1,21 @@ +type: object +required: + - acceptedAt + - ipAddress + - termsVersion + - acceptanceMethod +properties: + acceptedAt: + type: string + format: date-time + description: Date and time when the customer accepted the End User Terms. + ipAddress: + type: string + description: IP address of the device the customer used when accepting the terms. + example: 198.51.100.24 + termsVersion: + type: string + description: Version identifier of the accepted Grid End User Terms. + example: '2026-07-31' + acceptanceMethod: + $ref: ./EndUserTermsAcceptanceMethod.yaml diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index f18130315..aeb83db8b 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -143,6 +143,10 @@ paths: $ref: paths/customers/customers.yaml /customers/{customerId}: $ref: paths/customers/customers_{customerId}.yaml + /customers/{customerId}/end-user-terms-consent: + $ref: paths/customers/customers_{customerId}_end-user-terms-consent.yaml + /customers/end-user-terms: + $ref: paths/customers/customers_end-user-terms.yaml /customers/{customerId}/kyc-link: $ref: paths/customers/customers_{customerId}_kyc-link.yaml /customers/{customerId}/verify-email: diff --git a/openapi/paths/customers/customers_end-user-terms.yaml b/openapi/paths/customers/customers_end-user-terms.yaml new file mode 100644 index 000000000..fd10b0089 --- /dev/null +++ b/openapi/paths/customers/customers_end-user-terms.yaml @@ -0,0 +1,21 @@ +get: + summary: Get the current Grid End User Terms + description: Retrieve the current version and Grid-hosted URL of the End User Terms. + operationId: getEndUserTerms + tags: + - Customers + security: + - BasicAuth: [] + responses: + '200': + description: Current End User Terms retrieved successfully + content: + application/json: + schema: + $ref: ../../components/schemas/customers/EndUserTerms.yaml + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error401.yaml diff --git a/openapi/paths/customers/customers_{customerId}_end-user-terms-consent.yaml b/openapi/paths/customers/customers_{customerId}_end-user-terms-consent.yaml new file mode 100644 index 000000000..c491e3de3 --- /dev/null +++ b/openapi/paths/customers/customers_{customerId}_end-user-terms-consent.yaml @@ -0,0 +1,80 @@ +get: + summary: Get a customer's End User Terms consent + description: Retrieve the End User Terms acceptance recorded for one customer. + operationId: getCustomerEndUserTermsConsent + tags: + - Customers + security: + - BasicAuth: [] + parameters: + - name: customerId + in: path + required: true + description: Unique Grid identifier for the customer. + schema: + type: string + responses: + '200': + description: End User Terms consent retrieved successfully + content: + application/json: + schema: + $ref: ../../components/schemas/customers/EndUserTermsConsent.yaml + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error401.yaml + '404': + description: Customer or consent record not found + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error404.yaml +patch: + summary: Update a customer's End User Terms consent + description: Record or replace the End User Terms acceptance for one customer. + operationId: updateCustomerEndUserTermsConsent + tags: + - Customers + security: + - BasicAuth: [] + parameters: + - name: customerId + in: path + required: true + description: Unique Grid identifier for the customer. + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: ../../components/schemas/customers/EndUserTermsConsentRequest.yaml + responses: + '200': + description: End User Terms consent updated successfully + content: + application/json: + schema: + $ref: ../../components/schemas/customers/EndUserTermsConsent.yaml + '400': + description: Invalid input or unsupported terms version + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error400.yaml + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error401.yaml + '404': + description: Customer not found + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error404.yaml