Referência da API
commerce
36 endpoints nesta área. Cada um tem a sua própria página com os respetivos parâmetros, a respetiva resposta e um pedido que pode executar.
| Método | Caminho | O que faz | Permissão |
|---|---|---|---|
| GET | /v1/carts | List the open baskets in scope. | billing.payment.manage |
| POST | /v1/carts | Open a shopping cart. | billing.payment.manage |
| POST | /v1/carts/adopt | Carry a guest basket into the signed-in account. | billing.payment.manage |
| GET | /v1/carts/{cartId} | Get a cart. | billing.payment.manage |
| POST | /v1/carts/{cartId}/checkout | Check out a cart — place and charge an order. | billing.payment.manage |
| POST | /v1/carts/{cartId}/lines | Add a line to a cart. | billing.payment.manage |
| DELETE | /v1/carts/{cartId}/lines/{lineId} | Remove a line from a cart. | billing.payment.manage |
| DELETE | /v1/carts/{cartId}/promo-code | Remove the discount code from a cart. | billing.payment.manage |
| PUT | /v1/carts/{cartId}/promo-code | Type a discount code into a cart. | billing.payment.manage |
| GET | /v1/order/config/{planCode} | Everything a signed-in customer configures for one plan. | billing.view |
| GET | /v1/orders | List orders in scope. | billing.view |
| GET | /v1/orders/{orderId} | Get an order. | billing.view |
| POST | /v1/orders/{orderId}/cancel | Cancel your own unpaid order. | billing.payment.manage |
| POST | /v1/orders/{orderId}/card-payment | Open a card payment the customer's browser confirms. | billing.payment.manage |
| POST | /v1/orders/{orderId}/card-payment/confirm | Settle the order from the card payment the browser confirmed. | billing.payment.manage |
| POST | /v1/orders/{orderId}/customer-action | Reopen the checkout for a payment that is waiting on the customer. | billing.payment.manage |
| POST | /v1/orders/{orderId}/lines/{lineId}/auth-code | Send a new authorisation (EPP) code for your domain transfer. | billing.payment.manage |
| POST | /v1/orders/{orderId}/pay | Pay an order that was placed but not charged. | billing.payment.manage |
| POST | /v1/orders/{orderId}/payment-attempt/withdraw | Withdraw a payment waiting on the customer, to pay another way. | billing.payment.manage |
| GET | /v1/orders/{orderId}/payment-options | The payment gateways this order may be settled on. | billing.payment.manage |
| GET | /v1/orders/{orderId}/payment-step | Whether this order can be paid, awaits the bank, or is settling. | billing.payment.manage |
| POST | /v1/orders/{orderId}/payment-step-abandoned | Tell staff the customer left an in-place payment step without paying. | billing.payment.manage |
| POST | /v1/orders/{orderId}/paypal | Open a PayPal order for the browser to complete. | billing.payment.manage |
| POST | /v1/orders/{orderId}/paypal-subscription | Pay an order with ONE PayPal approval that also renews its subscriptions. | billing.payment.manage |
| POST | /v1/orders/{orderId}/paypal/capture | Capture a PayPal order the buyer completed. | billing.payment.manage |
| GET | /v1/orders/{orderId}/paypal/local | The regional bank methods that can pay this order through PayPal. | billing.payment.manage |
| POST | /v1/orders/{orderId}/paypal/local | Open a PayPal order paid by a regional bank method and return the bank's page. | billing.payment.manage |
| GET | /v1/orders/{orderId}/refund-eligibility | Preview an order's refund eligibility. | billing.view |
| POST | /v1/orders/{orderId}/refund-request | Request a refund for an order. | billing.payment.manage |
| POST | /v1/orders/{orderId}/top-up-and-pay | Add account credit with a saved card, then pay the whole order from credit. | billing.payment.manage |
| GET | /v1/payment-options | The payment rails a purchase in this currency may be settled on. | billing.payment.manage |
| POST | /v1/promo-codes/quote | Preview what a discount code takes off these items. | billing.payment.manage |
| GET | /v1/refund-requests | List the organization's refund requests. | billing.view |
| GET | /v1/refund-requests/{refundRequestId} | Get a refund request. | billing.view |
| POST | /v1/refund-requests/{refundRequestId}/approve | Approve a pending refund request (staff). | billing.refund |
| POST | /v1/refund-requests/{refundRequestId}/reject | Reject a pending refund request (staff). | billing.refund |