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 Name

Attribute Type

Description

Enum

Required (binary)

command

string

High level command name to interact with Oliver

null

1

method

string

These correspond to create, read, update, and delete (or CRUD) operations

null

1

version

string

The version of the command used

null

1

order_id

string

Unqiue identifier of an order

null

1

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 Name

Attribute Type

Description

Enum

Required (binary)

command

string

High level command name to interact with Oliver

null

1

method

string

These correspond to create, read, update, and delete (or CRUD) operations

null

1

version

string

The version of the command used

null

1

payment_type

js object

A js object that contains details about a transaction that is processed by a specific payment provider. It consists of name, payment_ID and data attributes

null

1

name

string

Name of the payment provider

null

1

payment_ID

string

Unique identifier generated by uuidv4 assigned to each payment object

null

1

amt

float, 2 decimal places

Transaction amount

null

1

transaction_id

integer

Transaction ID generated by the payment provider

null

0

emv_data

js object

EMV data of a physical card transaction such as AC, AID, AIDNAME, IAD, PAN etc

null

0


Did this page help you?