Issues a partial or full refund for an order.
Optional. The amount that you want to refund for an order. If not included full refund will be issued.
curl -X "POST" "https://api.lemonsqueezy.com/v1/orders/1/refund" \ -H 'Accept: application/vnd.api+json' \ -H 'Content-Type: application/vnd.api+json' \ -H 'Authorization: Bearer {api_key}' \ -d $'{ "data": { "type": "orders", "id": "1", "attributes": { "amount": 100 } } }'
Returns an Order object with updated refunded attributes.
refunded
{ "type": "orders", "id": "1", "attributes": { "store_id": 1, "customer_id": 1, "identifier": "104e18a2-d755-4d4b-80c4-a6c1dcbe1c10", "order_number": 1, "user_name": "John Doe", "user_email": "[email protected]", "currency": "USD", "currency_rate": "1.0000", "subtotal": 999, "setup_fee": 999, "discount_total": 0, "tax": 200, "total": 1199, "refunded_amount": 100, "subtotal_usd": 999, "setup_fee_usd": 999, "discount_total_usd": 0, "tax_usd": 200, "total_usd": 1199, "refunded_amount_usd": 100, "tax_name": "VAT", "tax_rate": "20.00", "tax_inclusive": false, "status": "paid", "status_formatted": "Paid", "refunded": false, "refunded_at": null, "subtotal_formatted": "$9.99", "setup_fee_formatted": "$9.99", "discount_total_formatted": "$0.00", "tax_formatted": "$2.00", "total_formatted": "$11.99", "refunded_amount_formatted": "$1.00", "first_order_item": { "id": 1, "order_id": 1, "product_id": 1, "variant_id": 1, "product_name": "Test Limited License for 2 years", "variant_name": "Default", "price": 1199, "created_at": "2021-08-17T09:45:53.000000Z", "updated_at": "2021-08-17T09:45:53.000000Z", "test_mode": false }, "urls": { "receipt": "https://app.lemonsqueezy.com/my-orders/104e18a2-d755-4d4b-80c4-a6c1dcbe1c10?signature=8847fff02e1bfb0c7c43ff1cdf1b1657a8eed2029413692663b86859208c9f42" }, "created_at": "2021-08-17T09:45:53.000000Z", "updated_at": "2021-08-17T09:45:53.000000Z", "test_mode": false } }
Previous
Next