openapi: 3.2.0 info: title: Network Check API version: 1.0.0 servers: - url: https://sandbox.trustly.one/api/v1 description: Sandbox tags: - name: networkCheckApi paths: /customers/lookup: get: operationId: networkCheckApi_get-customer-lookup summary: Look up whether a user is known to Trustly description: 'Checks whether a user has previously used Trustly, based on one or more provided identifiers (email or phone). Merchants can use this endpoint without having to launch Trustly widget/lightbox. One such use case could be to use this endpoint early in the payment funnel — before the user reaches the payment selection screen — to determine whether to surface Trustly as the top payment option. A `true` response indicates the user is already familiar with Pay by Bank and is more likely to complete a Trustly-powered transaction. **How it works:** The lookup queries Trustly''s user database across all stored identifiers. If any provided identifier matches a known Trustly user, `isInTrustlyNetwork` is returned as `true`. **Authentication:** Requests must be authenticated with HTTP Basic Auth using your `accessId` as the username and `accessKey` as the password.' tags: - networkCheckApi parameters: - name: email in: query description: User's email address. required: true schema: type: string format: email - name: phone in: query description: User's phone number in ITU E.164 format. required: false schema: type: string responses: '200': description: Lookup result content: application/json: schema: $ref: '#/components/schemas/CustomerLookupResponse' '400': description: Bad Request — missing mandatory fields or invalid email content: application/json: schema: $ref: '#/components/schemas/CustomerLookupResponse' '401': description: Access not authorized content: application/json: schema: $ref: '#/components/schemas/Get-customer-lookupRequestUnauthorizedError' '500': description: Internal server error content: application/json: schema: description: Any type security: - HTTPBasic: [] components: schemas: BaseException: type: object properties: domain: type: string code: type: integer location: type: string message: type: string occurredAt: type: integer title: BaseException CustomerLookupResponseErrorsListItems: type: object properties: code: type: integer message: type: string location: type: string domain: type: string occurredAt: type: integer title: CustomerLookupResponseErrorsListItems Get-customer-lookupRequestUnauthorizedError: type: object properties: errors: type: array items: $ref: '#/components/schemas/BaseException' required: - errors title: Get-customer-lookupRequestUnauthorizedError CustomerLookupResponse: type: object properties: isInTrustlyNetwork: type: boolean description: True if a transaction has ever been made with any of the provided identifiers. errorsList: type: array items: $ref: '#/components/schemas/CustomerLookupResponseErrorsListItems' description: Present only on error responses. title: CustomerLookupResponse securitySchemes: HTTPBasic: type: http scheme: basic description: ''