question

alexm avatar image
alexm asked alexm commented

Questions on Sale response

Hello,

I use the remote pay cloud API for semi-integration with Clover Flex.

The below is part of a successful sale response I received.

Can you explain these:
1) Difference between "success": true and "result": "SUCCESS" and "payment": { "result": "SUCCESS" } - Which one should I use to check if a sale was successful?

2) Payment ID, Order ID, Tender ID, External Payment ID, Reference ID, Transaction No, Token - What are they and which of these is the reference ID from the payment processor?

3) What are the fields I am supposed to save for audit purposes?

{
	"success": true,
	"result": "SUCCESS",
	"payment": {
		"id": "3SGT5BT0WMZP6",
		"order": {
			"id": "E3XZH10ZS8ZB4"
		},
		"tender": {
			"id": "1AZVE8JXPVKBR",
		},
		"amount": 2200,
		"externalPaymentId": "BAP1G3C00XGBB",
		"employee": {
			"id": "DFLTEMPLOYEE"
		},
		"createdTime": 1529615015297,
		"result": "SUCCESS",
		"cardTransaction": {
			"cardType": "DISCOVER",
			"entryType": "SWIPED",
			"type": "AUTH",
			"authCode": "OK8579",
			"referenceId": "817200000227",
			"transactionNo": null,
			"state": "CLOSED",
			"vaultedCard": {
				"last4": "6668",
				"cardholderName": "DISCOVER TEST CARD",
				"expirationDate": "1218",
				"token": "7297162975886668"
			}
		}
	}
}

Thank you.

Alex
Clover Flex
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Greg avatar image
Greg answered alexm commented
Hi @alexm,

We are in the process of having all this properly documented, so I'll share what I know:

1) In general, you can check for "success": true " to determine if a transaction went through. " result" will return upon completion of the secure payment flow "SUCCESS" if it at least reached the payment gateway successfully or "CANCEL" if there was a problem (user cancel, wrong card info, etc.) "payment": { "result": "SUCCESS" } refers to the Clover payment object created through a transaction, and in this case the payment has been successfully processed.

2) Payment ID, O rder ID are Clover UUIDs associated with payment, and order objects in our database, and these are created during the transaction. Tender ID is for type of payment used (including custom tenders), and is merchant-specific. E xternal Payment ID is set by the developer in SaleRequest for identifying transactions. Reference ID will be assigned by the RapidConnect gateway. Token is the generated value from TransArmor for vaulted card purposes.

3) For audit purposes, anything that normally goes on a receipt makes sense to keep. Merchant info, transaction info, order info, customer info. Also, depending on the type of transaction, the Sale Response will return "extra" fields (for example, EMV chip payments) that is required for receipts.
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

alexm avatar image alexm commented ·

Thank you, @Greg. That clears some things up.

0 Likes 0 ·

Welcome to the
Clover Developer Community