diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml index 38f41cd35..49100e04c 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,7 @@ resources: create_kyc_link: endpoint: post /customers/{customerId}/kyc-link body_param_name: KycLinkCreateRequest + retrieve_end_user_terms: get /customers/end-user-terms # 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 e7f98bd63..a7214bfd8 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -826,6 +826,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error500' + /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 @@ -3716,6 +3738,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error401' + '403': + description: Customer has not accepted the End User Terms + content: + application/json: + schema: + $ref: '#/components/schemas/Error403' '412': description: Counterparty doesn't support UMA version content: @@ -10499,6 +10527,11 @@ webhooks: id: Customer:019542f5-b3e7-1d02-0000-000000000002 platformCustomerId: 4b7c1e9d3f5a8e2 customerType: INDIVIDUAL + endUserTermsConsent: + acceptedAt: '2025-07-21T17:30:00Z' + ipAddress: 203.0.113.42 + termsVersion: '2025-10-13' + acceptanceMethod: CHECKBOX region: US currencies: - USD @@ -10521,6 +10554,11 @@ webhooks: id: Customer:019542f5-b3e7-1d02-0000-000000000003 platformCustomerId: 7a2f9d4e1b8c3f5 customerType: BUSINESS + endUserTermsConsent: + acceptedAt: '2025-07-21T17:30:00Z' + ipAddress: 203.0.113.42 + termsVersion: '2025-10-13' + acceptanceMethod: CHECKBOX region: US currencies: - USD @@ -11750,6 +11788,7 @@ components: | Error Code | Description | |------------|-------------| | INVALID_INPUT | Invalid input provided | + | END_USER_TERMS_VERSION_NOT_FOUND | The submitted End User Terms version is not supported | | MISSING_MANDATORY_USER_INFO | Required customer information is missing | | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed | | INVITATIONS_NOT_CONFIGURED | Invitations are not configured | @@ -11790,6 +11829,7 @@ components: | STABLECOIN_PROVIDER_ACCOUNT_SELECTION_REQUIRED | Multiple active provider account links exist; pass `stablecoinProviderAccountId` to select one | enum: - INVALID_INPUT + - END_USER_TERMS_VERSION_NOT_FOUND - MISSING_MANDATORY_USER_INFO - INVITATION_ALREADY_CLAIMED - INVITATIONS_NOT_CONFIGURED @@ -12038,6 +12078,39 @@ components: - BUSINESS description: Whether the customer is an individual or a business entity example: INDIVIDUAL + 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 + maxLength: 45 + 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: V1 + acceptanceMethod: + $ref: '#/components/schemas/EndUserTermsAcceptanceMethod' + EndUserTermsConsent: + allOf: + - $ref: '#/components/schemas/EndUserTermsConsentRequest' ContactVerificationStatus: type: string description: Status of an individual contact-verification channel (email or phone). `PENDING` means verification is required but not yet completed; `VERIFIED` means the channel has been confirmed. @@ -12076,6 +12149,10 @@ components: example: 9f84e0c2a72c4fa customerType: $ref: '#/components/schemas/CustomerType' + endUserTermsConsent: + $ref: '#/components/schemas/EndUserTermsConsent' + readOnly: true + description: The customer's recorded acceptance of the End User Terms. Omitted until acceptance has been recorded. region: type: string description: Country code (ISO 3166-1 alpha-2) representing the customer's regional identity and regulatory jurisdiction. @@ -12867,6 +12944,9 @@ 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' + description: Evidence that the customer accepted the Grid End User Terms. Unregulated platforms must provide this before initiating customer-scoped transactions; those transactions fail until consent is recorded. This can be supplied during customer creation or in a later customer update. IndividualCustomerCreateRequest: title: Individual Customer Create Request allOf: @@ -13156,6 +13236,9 @@ components: type: string description: Optional UMA address identifier. If provided, the customer's UMA address will be updated. This is an optional identifier to route payments to the customer. example: $john.doe@uma.domain.com + endUserTermsConsent: + $ref: '#/components/schemas/EndUserTermsConsentRequest' + description: Evidence that the customer accepted the Grid End User Terms. Unregulated platforms must provide this before initiating customer-scoped transactions; those transactions fail until consent is recorded. IndividualCustomerUpdateRequest: title: Individual Customer Update Request allOf: @@ -13232,6 +13315,21 @@ components: type: object description: Additional error details additionalProperties: true + EndUserTerms: + type: object + required: + - version + - url + properties: + version: + type: string + description: Current version identifier of the Grid End User Terms. + example: V1 + 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. @@ -21709,6 +21807,41 @@ components: example: FULL_NAME: Jane Receiver NATIONALITY: FR + Error403: + type: object + required: + - message + - status + - code + properties: + status: + type: integer + enum: + - 403 + description: HTTP status code + code: + type: string + description: | + | Error Code | Description | + |------------|-------------| + | FORBIDDEN | Insufficient permissions | + | USER_NOT_READY | Customer exists but is not ready for operation | + | COUNTERPARTY_NOT_ALLOWED | Counterparty has not been enabled for your account | + | VELOCITY_LIMIT_EXCEEDED | Counterparty has exceeded velocity limits | + | END_USER_TERMS_NOT_ACCEPTED | Customer has not accepted the End User Terms | + enum: + - FORBIDDEN + - USER_NOT_READY + - COUNTERPARTY_NOT_ALLOWED + - VELOCITY_LIMIT_EXCEEDED + - END_USER_TERMS_NOT_ACCEPTED + message: + type: string + description: Error message + details: + type: object + description: Additional error details + additionalProperties: true ExecuteQuoteRequest: type: object description: Optional body for executing a quote. Only needed to request a specific Strong Customer Authentication factor (`scaFactor`) for the challenge this call issues; omit the body entirely otherwise. @@ -22058,39 +22191,6 @@ components: type: string description: The UMA address of the customer claiming the invitation example: $invitee@uma.domain - Error403: - type: object - required: - - message - - status - - code - properties: - status: - type: integer - enum: - - 403 - description: HTTP status code - code: - type: string - description: | - | Error Code | Description | - |------------|-------------| - | FORBIDDEN | Insufficient permissions | - | USER_NOT_READY | Customer exists but is not ready for operation | - | COUNTERPARTY_NOT_ALLOWED | Counterparty has not been enabled for your account | - | VELOCITY_LIMIT_EXCEEDED | Counterparty has exceeded velocity limits | - enum: - - FORBIDDEN - - USER_NOT_READY - - COUNTERPARTY_NOT_ALLOWED - - VELOCITY_LIMIT_EXCEEDED - message: - type: string - description: Error message - details: - type: object - description: Additional error details - additionalProperties: true SandboxSendRequest: type: object required: diff --git a/mintlify/payouts-and-b2b/onboarding/disclosures.mdx b/mintlify/payouts-and-b2b/onboarding/disclosures.mdx index 05004b0bd..8b5f10e04 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 with the `endUserTermsConsent` field when you create or update the customer. 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. Customer responses include the full `endUserTermsConsent` object after acceptance is recorded. + ## 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 e7f98bd63..a7214bfd8 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -826,6 +826,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error500' + /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 @@ -3716,6 +3738,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error401' + '403': + description: Customer has not accepted the End User Terms + content: + application/json: + schema: + $ref: '#/components/schemas/Error403' '412': description: Counterparty doesn't support UMA version content: @@ -10499,6 +10527,11 @@ webhooks: id: Customer:019542f5-b3e7-1d02-0000-000000000002 platformCustomerId: 4b7c1e9d3f5a8e2 customerType: INDIVIDUAL + endUserTermsConsent: + acceptedAt: '2025-07-21T17:30:00Z' + ipAddress: 203.0.113.42 + termsVersion: '2025-10-13' + acceptanceMethod: CHECKBOX region: US currencies: - USD @@ -10521,6 +10554,11 @@ webhooks: id: Customer:019542f5-b3e7-1d02-0000-000000000003 platformCustomerId: 7a2f9d4e1b8c3f5 customerType: BUSINESS + endUserTermsConsent: + acceptedAt: '2025-07-21T17:30:00Z' + ipAddress: 203.0.113.42 + termsVersion: '2025-10-13' + acceptanceMethod: CHECKBOX region: US currencies: - USD @@ -11750,6 +11788,7 @@ components: | Error Code | Description | |------------|-------------| | INVALID_INPUT | Invalid input provided | + | END_USER_TERMS_VERSION_NOT_FOUND | The submitted End User Terms version is not supported | | MISSING_MANDATORY_USER_INFO | Required customer information is missing | | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed | | INVITATIONS_NOT_CONFIGURED | Invitations are not configured | @@ -11790,6 +11829,7 @@ components: | STABLECOIN_PROVIDER_ACCOUNT_SELECTION_REQUIRED | Multiple active provider account links exist; pass `stablecoinProviderAccountId` to select one | enum: - INVALID_INPUT + - END_USER_TERMS_VERSION_NOT_FOUND - MISSING_MANDATORY_USER_INFO - INVITATION_ALREADY_CLAIMED - INVITATIONS_NOT_CONFIGURED @@ -12038,6 +12078,39 @@ components: - BUSINESS description: Whether the customer is an individual or a business entity example: INDIVIDUAL + 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 + maxLength: 45 + 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: V1 + acceptanceMethod: + $ref: '#/components/schemas/EndUserTermsAcceptanceMethod' + EndUserTermsConsent: + allOf: + - $ref: '#/components/schemas/EndUserTermsConsentRequest' ContactVerificationStatus: type: string description: Status of an individual contact-verification channel (email or phone). `PENDING` means verification is required but not yet completed; `VERIFIED` means the channel has been confirmed. @@ -12076,6 +12149,10 @@ components: example: 9f84e0c2a72c4fa customerType: $ref: '#/components/schemas/CustomerType' + endUserTermsConsent: + $ref: '#/components/schemas/EndUserTermsConsent' + readOnly: true + description: The customer's recorded acceptance of the End User Terms. Omitted until acceptance has been recorded. region: type: string description: Country code (ISO 3166-1 alpha-2) representing the customer's regional identity and regulatory jurisdiction. @@ -12867,6 +12944,9 @@ 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' + description: Evidence that the customer accepted the Grid End User Terms. Unregulated platforms must provide this before initiating customer-scoped transactions; those transactions fail until consent is recorded. This can be supplied during customer creation or in a later customer update. IndividualCustomerCreateRequest: title: Individual Customer Create Request allOf: @@ -13156,6 +13236,9 @@ components: type: string description: Optional UMA address identifier. If provided, the customer's UMA address will be updated. This is an optional identifier to route payments to the customer. example: $john.doe@uma.domain.com + endUserTermsConsent: + $ref: '#/components/schemas/EndUserTermsConsentRequest' + description: Evidence that the customer accepted the Grid End User Terms. Unregulated platforms must provide this before initiating customer-scoped transactions; those transactions fail until consent is recorded. IndividualCustomerUpdateRequest: title: Individual Customer Update Request allOf: @@ -13232,6 +13315,21 @@ components: type: object description: Additional error details additionalProperties: true + EndUserTerms: + type: object + required: + - version + - url + properties: + version: + type: string + description: Current version identifier of the Grid End User Terms. + example: V1 + 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. @@ -21709,6 +21807,41 @@ components: example: FULL_NAME: Jane Receiver NATIONALITY: FR + Error403: + type: object + required: + - message + - status + - code + properties: + status: + type: integer + enum: + - 403 + description: HTTP status code + code: + type: string + description: | + | Error Code | Description | + |------------|-------------| + | FORBIDDEN | Insufficient permissions | + | USER_NOT_READY | Customer exists but is not ready for operation | + | COUNTERPARTY_NOT_ALLOWED | Counterparty has not been enabled for your account | + | VELOCITY_LIMIT_EXCEEDED | Counterparty has exceeded velocity limits | + | END_USER_TERMS_NOT_ACCEPTED | Customer has not accepted the End User Terms | + enum: + - FORBIDDEN + - USER_NOT_READY + - COUNTERPARTY_NOT_ALLOWED + - VELOCITY_LIMIT_EXCEEDED + - END_USER_TERMS_NOT_ACCEPTED + message: + type: string + description: Error message + details: + type: object + description: Additional error details + additionalProperties: true ExecuteQuoteRequest: type: object description: Optional body for executing a quote. Only needed to request a specific Strong Customer Authentication factor (`scaFactor`) for the challenge this call issues; omit the body entirely otherwise. @@ -22058,39 +22191,6 @@ components: type: string description: The UMA address of the customer claiming the invitation example: $invitee@uma.domain - Error403: - type: object - required: - - message - - status - - code - properties: - status: - type: integer - enum: - - 403 - description: HTTP status code - code: - type: string - description: | - | Error Code | Description | - |------------|-------------| - | FORBIDDEN | Insufficient permissions | - | USER_NOT_READY | Customer exists but is not ready for operation | - | COUNTERPARTY_NOT_ALLOWED | Counterparty has not been enabled for your account | - | VELOCITY_LIMIT_EXCEEDED | Counterparty has exceeded velocity limits | - enum: - - FORBIDDEN - - USER_NOT_READY - - COUNTERPARTY_NOT_ALLOWED - - VELOCITY_LIMIT_EXCEEDED - message: - type: string - description: Error message - details: - type: object - description: Additional error details - additionalProperties: true SandboxSendRequest: type: object required: diff --git a/openapi/components/schemas/customers/Customer.yaml b/openapi/components/schemas/customers/Customer.yaml index 1e11a5c7c..63a206965 100644 --- a/openapi/components/schemas/customers/Customer.yaml +++ b/openapi/components/schemas/customers/Customer.yaml @@ -15,6 +15,12 @@ properties: example: 9f84e0c2a72c4fa customerType: $ref: ./CustomerType.yaml + endUserTermsConsent: + $ref: ./EndUserTermsConsent.yaml + readOnly: true + description: >- + The customer's recorded acceptance of the End User Terms. Omitted until + acceptance has been recorded. region: type: string description: >- diff --git a/openapi/components/schemas/customers/CustomerCreateRequest.yaml b/openapi/components/schemas/customers/CustomerCreateRequest.yaml index 47d1e0765..a3764774f 100644 --- a/openapi/components/schemas/customers/CustomerCreateRequest.yaml +++ b/openapi/components/schemas/customers/CustomerCreateRequest.yaml @@ -54,3 +54,10 @@ 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 + description: >- + Evidence that the customer accepted the Grid End User Terms. Unregulated + platforms must provide this before initiating customer-scoped + transactions; those transactions fail until consent is recorded. This + can be supplied during customer creation or in a later customer update. diff --git a/openapi/components/schemas/customers/CustomerUpdateRequest.yaml b/openapi/components/schemas/customers/CustomerUpdateRequest.yaml index 7f3c56a58..12df32e28 100644 --- a/openapi/components/schemas/customers/CustomerUpdateRequest.yaml +++ b/openapi/components/schemas/customers/CustomerUpdateRequest.yaml @@ -49,3 +49,9 @@ properties: Optional UMA address identifier. If provided, the customer's UMA address will be updated. This is an optional identifier to route payments to the customer. example: $john.doe@uma.domain.com + endUserTermsConsent: + $ref: ./EndUserTermsConsentRequest.yaml + description: >- + Evidence that the customer accepted the Grid End User Terms. Unregulated + platforms must provide this before initiating customer-scoped + transactions; those transactions fail until consent is recorded. diff --git a/openapi/components/schemas/customers/EndUserTerms.yaml b/openapi/components/schemas/customers/EndUserTerms.yaml new file mode 100644 index 000000000..b39f6ac6e --- /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: V1 + 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..a80ca5cd9 --- /dev/null +++ b/openapi/components/schemas/customers/EndUserTermsConsent.yaml @@ -0,0 +1,2 @@ +allOf: + - $ref: ./EndUserTermsConsentRequest.yaml diff --git a/openapi/components/schemas/customers/EndUserTermsConsentRequest.yaml b/openapi/components/schemas/customers/EndUserTermsConsentRequest.yaml new file mode 100644 index 000000000..a5e30dfa7 --- /dev/null +++ b/openapi/components/schemas/customers/EndUserTermsConsentRequest.yaml @@ -0,0 +1,22 @@ +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 + maxLength: 45 + 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: V1 + acceptanceMethod: + $ref: ./EndUserTermsAcceptanceMethod.yaml diff --git a/openapi/components/schemas/errors/Error400.yaml b/openapi/components/schemas/errors/Error400.yaml index 97bcaad55..e38f562c2 100644 --- a/openapi/components/schemas/errors/Error400.yaml +++ b/openapi/components/schemas/errors/Error400.yaml @@ -15,6 +15,7 @@ properties: | Error Code | Description | |------------|-------------| | INVALID_INPUT | Invalid input provided | + | END_USER_TERMS_VERSION_NOT_FOUND | The submitted End User Terms version is not supported | | MISSING_MANDATORY_USER_INFO | Required customer information is missing | | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed | | INVITATIONS_NOT_CONFIGURED | Invitations are not configured | @@ -55,6 +56,7 @@ properties: | STABLECOIN_PROVIDER_ACCOUNT_SELECTION_REQUIRED | Multiple active provider account links exist; pass `stablecoinProviderAccountId` to select one | enum: - INVALID_INPUT + - END_USER_TERMS_VERSION_NOT_FOUND - MISSING_MANDATORY_USER_INFO - INVITATION_ALREADY_CLAIMED - INVITATIONS_NOT_CONFIGURED diff --git a/openapi/components/schemas/errors/Error403.yaml b/openapi/components/schemas/errors/Error403.yaml index c07ddfb47..d188da909 100644 --- a/openapi/components/schemas/errors/Error403.yaml +++ b/openapi/components/schemas/errors/Error403.yaml @@ -18,11 +18,13 @@ properties: | USER_NOT_READY | Customer exists but is not ready for operation | | COUNTERPARTY_NOT_ALLOWED | Counterparty has not been enabled for your account | | VELOCITY_LIMIT_EXCEEDED | Counterparty has exceeded velocity limits | + | END_USER_TERMS_NOT_ACCEPTED | Customer has not accepted the End User Terms | enum: - FORBIDDEN - USER_NOT_READY - COUNTERPARTY_NOT_ALLOWED - VELOCITY_LIMIT_EXCEEDED + - END_USER_TERMS_NOT_ACCEPTED message: type: string description: Error message diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index f18130315..b6143351f 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -143,6 +143,8 @@ paths: $ref: paths/customers/customers.yaml /customers/{customerId}: $ref: paths/customers/customers_{customerId}.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/quotes/quotes.yaml b/openapi/paths/quotes/quotes.yaml index 9fbfa63f2..84da3101a 100644 --- a/openapi/paths/quotes/quotes.yaml +++ b/openapi/paths/quotes/quotes.yaml @@ -140,6 +140,12 @@ post: application/json: schema: $ref: ../../components/schemas/errors/Error401.yaml + '403': + description: Customer has not accepted the End User Terms + content: + application/json: + schema: + $ref: ../../components/schemas/errors/Error403.yaml '412': description: Counterparty doesn't support UMA version content: diff --git a/openapi/webhooks/customer-update.yaml b/openapi/webhooks/customer-update.yaml index 2a811dac0..bd000a915 100644 --- a/openapi/webhooks/customer-update.yaml +++ b/openapi/webhooks/customer-update.yaml @@ -76,6 +76,11 @@ post: id: Customer:019542f5-b3e7-1d02-0000-000000000002 platformCustomerId: 4b7c1e9d3f5a8e2 customerType: INDIVIDUAL + endUserTermsConsent: + acceptedAt: '2025-07-21T17:30:00Z' + ipAddress: 203.0.113.42 + termsVersion: '2025-10-13' + acceptanceMethod: CHECKBOX region: US currencies: - USD @@ -98,6 +103,11 @@ post: id: Customer:019542f5-b3e7-1d02-0000-000000000003 platformCustomerId: 7a2f9d4e1b8c3f5 customerType: BUSINESS + endUserTermsConsent: + acceptedAt: '2025-07-21T17:30:00Z' + ipAddress: 203.0.113.42 + termsVersion: '2025-10-13' + acceptanceMethod: CHECKBOX region: US currencies: - USD