What should my receipt contain?

What should the receipt contain?

Do you want more flexibility on your receipts, you can print and send out your own. In order to do this, you have to make sure that your custom receipts contain the following:

Seller’s Information
In order to get the seller’s information, you have to use the parametre merchantDetails (for every line print: Value)

Receipt Type
There are two types of receipts; the consumer’s and the business’. In order to get it, you have the use the parametre: receiptType.value

Transaction Type
There are several types of transactions. In order to get it, you have the use the parametre: transactionType.value

Amount and Currency
From the transaction, you need to call amount and currency. You do this by using the parametre: amountAndCurrency.value

Payment Details 
For example masked card number, card type. This can be found in the parametre: paymentDetails
For every line print label and value

Status
Status shows the status of the receipt.
Use the parametre statusText.value

Date and time
This shows the date and time.
This can be found in the parametres date.value and time.value

Clearing details
These are details regarding the transactions and can be found in the parametre: clearingDetails
For every line print label and value

Print Receipt
This will print out the receipt and the total amount.
If the parametre: printTipLine is “true”.

Print signature line
This will print a signature line of a merchants’ receipt.
If the parametre: printSignatureLine is “true”.

Access to receipt data
The receipts are already added to the transaction’s reference that you receive following a succesful transaction. The transaction provides access to the receipt for both merchant and customer.

Receipt

Example on receipt

How to access receipt data

// For the Merchant Receipt

MPReceipt *receipt = transaction.merchantReceipt;

// For the Customer Receipt

//MPReceipt *receipt = transaction.customerReceipt;

NSLog(@”MERCHANT DETAILS”);

for (MPReceiptLineItem* lineItem in receipt.merchantDetails)

{

NSString *label = lineItem.label;

NSString *value = lineItem.value;

NSLog(@”%@: %@”, label, value);

}

NSLog(@” “);

NSLog(@”%@: %@”, receipt.receiptType.label, receipt.receiptType.value);

NSLog(@”%@: %@”, receipt.transactionType.label, receipt.transactionType.value);

NSLog(@”%@: %@”, receipt.amountAndCurrency.label, receipt.amountAndCurrency.value);

NSLog(@” “);

NSLog(@”PAYMENT DETAILS”);

for (MPReceiptLineItem* lineItem in receipt.paymentDetails)

{

NSString *label = lineItem.label;

NSString *value = lineItem.value;

NSLog(@”%@: %@”, label, value);

}

NSLog(@” “);

NSLog(@”%@: %@”, receipt.statusText.label, receipt.statusText.value);

NSLog(@”%@: %@”, receipt.date.label, receipt.date.value);

NSLog(@”%@: %@”, receipt.time.label, receipt.time.value);

NSLog(@” “);

NSLog(@”CLEARING DETAILS”);

for (MPReceiptLineItem* lineItem in receipt.clearingDetails)

{

NSString *label = lineItem.label;

NSString *value = lineItem.value;

NSLog(@”%@: %@”, label, value);

}

NSLog(@” “);

// — Optional

NSLog(@”%@: %@”, receipt.identifier.label, receipt.identifier.value);

// —

// When offering Tip Adjust

if(receipt.printTipLine)

{

NSLog(@”TIP : ___________________”);

NSLog(@”TOTAL : ___________________”);

}

// — Only for the Merchant Receipt

if(receipt.printSignatureLine)

{

NSLog(@”Customer Signature:”);

NSLog(@”___________________”);

}

Didn't find what you were searching for?

Was this article helpful?
Dislike 0
Views: 3