documentUpload

Playtech.API. documentUpload

Methods

# (static) initiateDocumentUpload(request) → {Promise.<{redirectURL: string, reference: string, sessionId: string, uploadCode: string, nationality: string, accessToken: string}>}

Initiates document upload flow and returns a URL to be opened in an iframe / popup / new window.
Parameters:
Name Type Description
request Object
Properties
Name Type Attributes Description
service string <optional>
successUrl string <optional>
errorUrl string <optional>
documentType string <optional>
remotePaymentAccountId string <optional>
Returns:
Type
Promise.<{redirectURL: string, reference: string, sessionId: string, uploadCode: string, nationality: string, accessToken: string}>
Example
Playtech.API.documentUpload.initiateDocumentUpload({
     errorUrl: 'https://error.com',
     documentType: 'PASSPORT',
     service: 'netverify',
     successUrl: 'https://success.com',
     remotePaymentAccountId: 'ePIl8ceR',
}).then(data => {...});

# (static) setUploadedDocumentUrl(request) → {Promise.<void>}

Stores a link to an externally stored document.
Parameters:
Name Type Description
request Object
Properties
Name Type Attributes Description
URL string <optional>
documentId string <optional>
Returns:
Type
Promise.<void>
Example
Playtech.API.documentUpload.setUploadedDocumentUrl({
    URL: 'https://example.com/image.jpg',
    documentId: '123'
}).then(() => {...});