Every Payment request body consists of :

  • command
  • payment data

Each payment type is an object that must contain the payment name and the amount paid. Multiple payment types occur when a payment or bill is split into different payment types.

The name of the payment type allows us to identify the individual payment amount made by each payment type in order to make the correct amount of payment in case of refunds.

GET

Description:
Fetches payment information using order id. A payment array and the total bill amount will be fetched. The payments array consists of different payment types with different payment amounts. This command will be helpful when processing refunds.

Request Body:

{
   command: 'Payment',
   method: 'get',
   version: '1.0',
   order_id: 255421
}

Response Body:

{
    command: 'Payment',
    method: 'get',
    version: '1.0',
    status_code: 200,
    error: null,
    total_amount: 48.50,
    payments: [
        {
            name: 'stripe', 
            data: {
                amt: 15.50, 
                transaction_id: '2322511', 
                type: 'sale'
            }
        },
        {
            name: 'moneris',  
            data: {
                amt: 25.00,  
                transaction_id: '102358', 
                emv_data: {
                    AC: '3554210',
                    AID: 'a00081102',
                    AIDNAME: 'MASTERCARD Debit/Credit',
                    APPLAB: 'MASTERCARD Credit',
                    ARC: '00',
                    CURR: 'CAD$',
                    CVM: 'No CVM',
                    IAD: '000125132',
                    MODE: 'Issuer',
                    PAN:'************2432',
                    TVR: '0000000000'
                }, 
                type: 'sale' 
            }
        },
        {
            name: 'Oliver Cash', 
            data: {
                amt: 8.00
            }
        }
    ]
}

Parameters:

Attribute NameAttribute TypeDescriptionEnumRequired (binary)
commandstringHigh level command name to interact with Olivernull1
methodstringThese correspond to create, read, update, and delete (or CRUD) operationsnull1
versionstringThe version of the command usednull1
order_idstringUnqiue identifier of an ordernull1

POST

Description:
Add a new payment record with transaction details (payment name, transaction id, amount, emv data, etc) to Oliver.

Request Body:

{
    command: 'Payment',
    method: 'post',
    version: '1.0',
    data: {
        payment_type: {
            name: 'fortispay',
            payment_ID: uidv4()
            data: {
                amt: 40.00,
                transaction_id: 64224,
                emv_data: {
                    AC: '400012531',
                    AID: 'a000532114',
                    AIDNAME: 'VISA Debit/Credit',
                    APPLAB: 'VISA Credit',
                    ARC: '00',
                    CURR: 'USD$',
                    CVM: 'No CVM',
                    IAD: '0654134452',
                    MODE: 'Issuer',
                    PAN: '************2532',
                    TVR: '0000000000'
                }
                  }
        }
    }
}

Response Body:

{
    command: 'Payment',
    method: 'post',
    version: '1.0',
    status: 200,
    error: null
}

Parameters:

Attribute NameAttribute TypeDescriptionEnumRequired (binary)
commandstringHigh level command name to interact with Olivernull1
methodstringThese correspond to create, read, update, and delete (or CRUD) operationsnull1
versionstringThe version of the command usednull1
payment_typejs objectA js object that contains details about a transaction that is processed by a specific payment provider. It consists of name, payment_ID and data attributesnull1
namestringName of the payment providernull1
payment_IDstringUnique identifier generated by uuidv4 assigned to each payment objectnull1
amtfloat, 2 decimal placesTransaction amountnull1
transaction_idintegerTransaction ID generated by the payment providernull0
emv_datajs objectEMV data of a physical card transaction such as AC, AID, AIDNAME, IAD, PAN etcnull0