Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

API

Sample

Call the Token Lookup API endpoint to obtain the result of the token.

  • Trigger this API call when the paying customer has been re-directed to the returnURL, allowing up to 5 - 10 seconds to retrieve response and update your application with the results.

  • As this example is part of a successful payment flow, please take note of the below:

    • Token Status property = ‘PROCESSED_SUCCESSFUL’

    • Token Event Status = ‘WAITING’, ‘VALIDATED’, ‘PROCESSED_SUCCESSFUL’

Example Request

Code Block
languagejson
{{url}}/businesses/{{business-id}}/services/tokens/{{token-guid}}

Example Response

Code Block
languagejson
{
    "token": "3b796adf-a044-473e-b96f-3151eafd863d",
    "type": "EDDR",
    "time": "2024-03-26T03:10:00+00:00",
    "status": "PROCESSED_SUCCESSFUL",
    "statusDescription": "PROCESSED_SUCCESSFUL",
    "returnUrl": "https://www.payrix.com.au?ddr=123456789",
    "redirectToUrl": "https://sandbox.hosted.paymentsapi.io/ui/eddr/api/3b796adf-a044-473e-b96f-3151eafd863d",
    "template": "794c6bc8-e7c7-427c-bab6-a15d053ca532",
    "templateName": "Basic-eDDR",
    "transaction": null,
    "payer": {
        "business": {
            "businessId": "90129",
            "businessName": "Payrix Sandbox"
        },
        "payerId": "528830",
        "status": "ACTIVE",
        "statusCode": "A",
        "statusDescription": "Active",
        "statusChangeDate": null,
        "createdTime": "2024-03-26T03:10:20.203+00:00",
        "schedule": null,
        "uniqueReference": "EDDR-TOKEN-PAYER-U-1",
        "GroupReference": "EDDR-TOKEN-PAYER-GRP-1",
        "FamilyOrBusinessName": "Surname",
        "GivenName": "FirstName",
        "Email": "payer.eddr.1@payrix.com.au",
        "phone": "0733332222",
        "mobile": "0411228833",
        "address": {
            "line1": "1 Test St",
            "line2": "",
            "suburb": "Testville",
            "state": "QLD",
            "postCode": "4001",
            "country": "null"
        },
        "dateOfBirth": null,
        "extraInfo": {
            "xeroAutoDebitEnabled": false
        }
    },
    "schedule": null,
    "requestEddr": {
        "returnUrl": "https://www.payrix.com.au?ddr=123456789",
        "template": "Basic-eDDR",
        "payer": {
            "uniqueReference": "EDDR-TOKEN-PAYER-U-1",
            "familyOrBusinessName": "Surname",
            "overrideExisting": false,
            "retainSchedule": false,
            "GroupReference": "EDDR-TOKEN-PAYER-GRP-1",
            "givenName": "FirstName",
            "email": "payer.eddr.1@payrix.com.au",
            "phone": "0733332222",
            "mobile": "0411228833",
            "address": {
                "line1": "1 Test St",
                "line2": "null",
                "suburb": "Testville",
                "state": "QLD",
                "postCode": "4001",
                "country": null
            },
            "dateOfBirth": null,
            "extraInfo": {
                "xeroAutoDebitEnabled": true
            }
        },
        "schedule": null,
        "audit": {
            "username": "EddrTokenTests",
            "userIP": "444.888.000"
        }
    },
    "events": [
        {
            "event": "WAITING",
            "time": "2024-03-26T03:10:00+00:00",
            "description": null,
            "username": "API:  [EddrTokenTests]",
            "ip": "180.189.153.162 [444.888.000]"
        },
        {
            "event": "VALIDATED",
            "time": "2024-03-26T03:10:00+00:00",
            "description": null,
            "username": null,
            "ip": ""
        },
        {
            "event": "PROCESSED_SUCCESSFUL",
            "time": "2024-03-26T03:10:00+00:00",
            "description": null,
            "username": null,
            "ip": "180.189.153.162"
        }
    ]
}

...

This concludes the API workflow of implementing the Payrix eDDR page. Please refer Refer to the next steps in implementation or our other methods available for accepting payments.

...