Payment Object

The payment object represents a single payment of a specific type. Each payment type can have a different set of details futher describing the payment (see Payment Details below.)

Name

Type

Description

method

string, required

the payment method

amount

float, required

the amount paid

currency

string, optional, ISO 4217 alpha-3 currency code

the payment currency, an ISO 4217 three letter code

details

Payment Details, optional

the method-dependent details of the payment

Payment Details

The format of the payment details depends on the payment method used. The below table shows the mapping from the value stored in method to the available keys in details.

The other mapping in the payment details is a freeform mapping in which retailer specific details can be stored.

card:

Name

Type

Description

$schema_type

const: "card", optional

this schemas’s type

po_number

string, optional

purchase order number

other

mapping, optional

retailer-specific payment details

number

string, optional

the last four digits of the card number

type

string, optional

the card type

issue

string, optional

the issue number

start

string, optional

the start date

end

string, optional

the end date

cash:

Name

Type

Description

$schema_type

const: "cash", optional

this schemas’s type

po_number

string, optional

purchase order number

other

mapping, optional

retailer-specific payment details

change

float, required

change due

rounding

float, optional

rounding amount

giftcard:

Name

Type

Description

$schema_type

const: "giftcard", optional

this schemas’s type

po_number

string, optional

purchase order number

other

mapping, optional

retailer-specific payment details

number

string, optional

the card number

type

string, optional

the card type

expiry

string, optional

the card expiry date

balance

float, optional

the current balance on card

other:

Name

Type

Description

$schema_type

const: "other", optional

this schemas’s type

po_number

string, optional

purchase order number

other

mapping, optional

retailer-specific payment details

voucher:

Name

Type

Description

$schema_type

const: "voucher", optional

this schemas’s type

po_number

string, optional

purchase order number

other

mapping, optional

retailer-specific payment details

change

float, optional

change due as a voucher