Cart Resources
Get Cart Contents
- Description
- Gets the current contents of the cart.
- Method
- GET
- URL
- https://api.iwannaticket.com.au/api/v2/cart/{cartId}
Output
| Name | Type | Description |
|---|---|---|
| key | String | The ID of this cart. |
| total | Currency | The total price for this cart. |
| gst | Currency | GST included in this price. |
| sales | List[CartSale] | The reserved sales currently in the cart. |
| expirySeconds | Number | The number of seconds until the cart expires. |
Pay for Cart
- Description
- Attempts to pay for the contents of the cart.
- Method
- POST
- URL
- https://api.iwannaticket.com.au/api/v2/cart/{cartId}/payment
The credit card is not required if the sale is for $0.
Input
| Name | Type | Description |
|---|---|---|
| amount | Number | The amount to be paid. |
| creditCard | optional CreditCard | The card to be charged. |
Output
| Name | Type | Description |
|---|---|---|
| type | String | The type of result.
|
| payments | List[CartSalePaymentResponse] | The payments attempted and what happened. |
| amount | Currency | The value of the cart that should be paid. |
Lock Cart
- Description
- Lock all RESERVED sales in the cart before payment.
- Method
- POST
- URL
- https://api.iwannaticket.com.au/api/v2/cart/{cartId}/lock
Input
The body of the request contains payee details, which are additional fields on the payee. Those listed here are required, but others may be present.
| Name | Type | Description |
|---|---|---|
| FIRST_NAME | String | Payee first name |
| LAST_NAME | String | Payee last name |
| String | Payee email |
Unlock Cart
- Description
- Unlock all LOCKED sales in the cart after a payment failure.
- Method
- POST
- URL
- https://api.iwannaticket.com.au/api/v2/cart/{cartId}/unlock