Skip to content

JavaScript Examples

Verify Bank Slip By Payload

Full documents can be viewed here

javascript
const axios = require('axios')

try {
    const { data } = await axios.get('https://developer.easyslip.com/api/v1/verify', {
        params: {
            payload: 'PAYLOAD',
        },
        headers: {
            Authorization: 'Bearer YOUR_ACCESS_TOKEN',
        },
    })

    console.log(data)
} catch (error) {
    console.error('Error', error)
}

Verify Bank Slip By Image

Full documents can be viewed here

javascript
const axios = require('axios')
const FormData = require('form-data')
const fs = require('fs')

try {
    const formData = new FormData()
    formData.append('file', fs.createReadStream('IMAGE_PATH'))

    const { data } = await axios.post('https://developer.easyslip.com/api/v1/verify', formData, {
        headers: {
            Authorization: 'Bearer YOUR_ACCESS_TOKEN',
        },
    })

    console.log(data)
} catch (error) {
    console.error('Error', error)
}

Verify Bank Slip By Base64

Full documents can be viewed here

javascript
const axios = require('axios')

try {
    const { data } = await axios.post(
        'https://developer.easyslip.com/api/v1/verify',
        {
            image: 'BASE64',
        },
        {
            headers: {
                Authorization: 'Bearer YOUR_ACCESS_TOKEN',
            },
        },
    )

    console.log(data)
} catch (error) {
    console.error('Error', error)
}