JSON schema for transactions

Looking at the example transaction.auth event, I think I require some clarification around this section:

  "offer": null,
  "auth": true,
  "cleared": false,

I take it offer is a nullable string (uuid), and the two booleans will be swapped for a transaction.clear event?

On another note, on the section in the bottom of the response:

  "identifiers": {
    "MID": "12345678",
    "mastercardTransactionSequenceNumber": "0000000000000",
    "mastercardRefNumber": "AABBCCDDE",
    "amexApprovalCode": "AA00BB",
    "visaAuthCode": "000000"

These appear to be all null in a test transaction for a test visa. Will that be the case in production as well? Or is one guaranteed to be present (on a per scheme basis)? Could you provide us with a json schema so we know which fields are nullable?
(I hope I have not missed a relevant section of documentation)

Thanks in advance for your time!

Sidenote: the example has brand.logoUrl, whereas the test environment is returning brand.logoURL, can you confirm which is we should be integrating against?

Hi Peter,

Great questions and yes:
offer, mastercardTransactionSequenceNumber, mastercardRefNumber, amexApprovalCode, visaAuthCode can all be null. For the scheme identifiers, all will be null in production - except for the scheme that handles the transaction. (In test, they all appear as null, as the transaction does not actually go to the schemes to get a number/code.

On an authorised transaction:"auth" :true, "cleared": false
on a cleared transaction: "auth" :true, "cleared": true

You can clear transactions in test to test this yourself.

Finally, the JSON response will match the test environment: logoURL.

1 Like

Thanks a lot for the clarification Doug!

Hi Doug,

I am having some trouble following the wording of the second paragraph of https://fidel.uk/docs/transactions/#refund-transactions

Could I trouble you for an example (preferably in partial json, does not have to be the complete object) of what the relation is between the content of a transaction.clear event and a transaction.refund event?

(Is there a wait to issue a refund in test? I hope I have not missed an obvious way to self-service here).

Hi Peter,

I created a transaction in my test program at a specific location:

I then create a transaction at the same location refunding the entire amount to simulate a refund. In this case it is -£10.

Now, let’s look at the JSON:

The initial transaction:
“id”: “00992d83-ea67-4c82-ab16-5573b2909f8d”,
“offer”: null,
“programId”: “b4b6d68f-a05a-4cc5-8b9f-f6e82cd988d0”,
“refundTransactionId”: “f785b8e9-61b6-4be6-8951-b4b2a6f9733a”,
“updated”: “2020-06-25T14:26:57.388Z”,
“wallet”: null

The refunded transaction:
“id”: “f785b8e9-61b6-4be6-8951-b4b2a6f9733a”,
“offer”: null,
“originalTransactionId”: “00992d83-ea67-4c82-ab16-5573b2909f8d”,
“programId”: “b4b6d68f-a05a-4cc5-8b9f-f6e82cd988d0”,
“updated”: “2020-06-25T14:26:41.527Z”,
“wallet”: null

You can see that the initial transaction has a field indicating the refundTransactionId. The refund transaction has the originalTransactiionId field populated in the opposite way.

Thanks for the clarification, much appreciated.