Authorize Charge

Authorize already created charge on a debit card

POST {{ BASE_URL }}/v1/corporate/authorize-charge

Body Parameters

Property
Data Type
Description
Example
Required

type

string

Type of authorization. Check below for list of types

"pin"

Yes

reference

string

Transaction reference returned in charge api

"23456789876CBD"

No

deviceIp

string

IP address of the customer's device or your device

"192.168.206.32"

Yes

authorize

object

The object that holds authorize properties

{...}

Yes

authorize.pin

string

Debit card pin

"1111"

If type is pin

authorize.otp

string

OTP sent to customer

"037895"

If type is otp

authorize.phone

string

Customer's phone number

"08137031202"

If type is phone

authorize.birthday

string

Customer birthday

"1992-01-12"

If type is birthday

import Axios from 'axios';

// set the api url
const API_URL = `${BASE_URL}/v1/corporate/authorize-charge`;

// define request body
const data = {
    type: "pin",
    reference: "TSX64D469F547F04752",
    deviceIp: "",
    authorize: {
      pin: "1111",
      otp: "",
      phone: "",
      birthday: "",
      address: {
        city: "",
        state: "",
        zipCode: "",
        address: ""
      }
    }
}

// make request using axios
Axios({
    method: "POST",
    url: `${API_URL}`,
    headers: {
        lg: 'en',
        ch: 'web'
        Authorization: `Bearer ${API_KEY}`,
        'Content-Type': 'application/json',
    },
    data: data
}).then((resp) => {
    console.log(resp)
}).catch((err) => {
    console.log(err)
})

Authorization types

Type
Description

pin

Customer's debit card pin

otp

OTP sent to customer's phone/email

phone

Customer's phone number

birthday

Customer's birthday

Last updated