This endpoint is used for creating a Pay Request. Your server should create a Pay Request as soon as the total payment amount is known. Once the Pay Request is created, your frontend will use Tyro.js to collect the customer's payment details and invoke submit() to execute the payment.
Created
When the provided payload is not valid.
When you don't have the right permissions to create a Pay Request for the provided location.
{- "locationId": "tc-cool-3000",
- "origin": {
- "orderId": "0f448ac1-862a-4c7b-bdb4-a3b7cdbf444"
}, - "provider": {
- "name": "TYRO",
- "method": "CARD"
}, - "total": {
- "amount": 10000,
- "currency": "AUD"
}
}
{- "id": "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149",
- "locationId": "tc-cool-3000",
- "provider": {
- "name": "TYRO",
- "method": "CARD"
}, - "origin": {
- "orderId": "1f448ac1-862a-4c7b-bdb4-a3b7cdbf6145"
}, - "status": "AWAITING_PAYMENT_INPUT",
- "supportedNetworks": [
- "visa",
- "mastercard"
], - "action": null,
- "capture": {
- "method": "AUTOMATIC"
}, - "paySecret": "$2a$10$20qRi3XjN1PkTlEVDiYjHefra7c6i2i7yVNu9o5GGTO7ADsWNDuya",
- "total": {
- "amount": 10000,
- "currency": "AUD"
}
}