Retrieves the PayRequest status, you should fetch the Pay Request and show the result to your customers.
The Pay Request object returned.
The ID of the Pay Request generated by Tyro.
The Pay Secret associated with this Pay Request. This is used by the frontend to submit the Pay Request. Pay Secret expire after 24 hours from the time the Pay Request was created. It’s recommended to avoid logging or storing the pay secret for security reasons.
The id of the location as specified by the Tyro Connect system
Details about the provider that processed the payment.
The name of the provider that processed the payment. More providers will be supported at a later date.
The payment method used
Contains information about the partner that created the Pay Request.
An identifier that has been generated by the origin. This can be used for reconciliation of orders in the app partner’s system.
Easily identifiable reference for the order.
Name of the app partner that created the Pay Request.
The Pay Method details for the Pay Request
The id of the Pay Method attached to the Pay Request.
The Tyro generated ID of the customer linked to the Pay Method.
When set to true, the pay method will be saved after a successful payment.
Optional field that determines how the funds will be captured. The default is AUTOMATIC which captures the funds when the Pay Request is submitted. MANUAL can be used to indicate that the funds are held and to only authorise the payment when the Pay Request is submitted. The funds can be captured at a later time via the CAPTURE action.
The total amount to capture (in smallest currency unit). You cannot capture more than the authorised amount.
This is the amount in smallest currency unit. e.g 12520 (in cents) is $125.20
This is always AUD
The current status of this Pay Request managed by Tyro.
List of supported card type/brand/networks for this Pay Request. If null it is unrestricted.
The total amount (in smallest currency unit)
This is the amount in smallest currency unit. e.g 12520 (in cents) is $125.20
This is always AUD
List of Transaction Results
Merchant for this transaction
3ds authentication details for this transaction
Order for this transaction
Card used for this transaction
The result of this operation
The transaction for the operation
3D Secure details for this Pay Request
Current 3D Secure status for this Pay Request
Additional data for this transaction
// Javascript sample code
async function showPaymentResult() {
const paySecret = new URLSearchParams(window.location.search).get(
"paySecret"
);
if (!paySecret) {
return;
}
const tyro = Tyro();
await tyro.init(paySecret);
const payRequest = await tyro.fetchPayRequest();
switch (payRequest.status) {
case "PROCESSING":
return showProcessing();
case "SUCCESS":
return showSuccess();
case "FAILED":
return showFail();
...
}
}