ResourcesInvoices

Refund an invoice

Request a full or partial provider refund through the canonical refund ledger.

Omit amount to refund the full remaining refundable balance. Partial amounts are decimal strings in the invoice currency; response amounts use integer minor units. Provider credentials and raw provider payloads are never returned.

POST
/v2/invoices/{invoice}/refunds

Authorization

bearerAuth storeAuth
AuthorizationBearer <token>

Provide your SellApp API key as a bearer token.

In: header

X-STORE<token>

Select the SellApp store for this API request.

In: header

Path Parameters

invoice*integer

The invoice path parameter.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://sell.app/api/v2/invoices/0/refunds" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "invoice": {
      "id": 0,
      "payment": {
        "fee": {
          "base": "string",
          "currency": "string",
          "units": 0,
          "vat": 0,
          "total": {
            "exclusive": "string",
            "inclusive": "string"
          }
        },
        "gateway": {
          "data": {
            "total": {
              "base": "string",
              "currency": "string",
              "units": 0,
              "vat": 0,
              "total": {
                "exclusive": "string",
                "inclusive": "string"
              }
            },
            "customer_email": "string",
            "transaction_id": "string"
          },
          "type": "string"
        },
        "subtotal": {
          "base": "string",
          "currency": "string",
          "units": 0,
          "vat": 0,
          "total": {
            "exclusive": "string",
            "inclusive": "string"
          }
        },
        "expires_at": "2019-08-24T14:15:22Z",
        "full_price": {
          "base": "string",
          "currency": "string",
          "units": 0,
          "vat": 0,
          "total": {
            "exclusive": "string",
            "inclusive": "string"
          }
        },
        "original_amount": {
          "base": "string",
          "currency": "string",
          "units": 0,
          "vat": 0,
          "total": {
            "exclusive": "string",
            "inclusive": "string"
          }
        }
      },
      "status": {
        "history": [
          {
            "setAt": "2019-08-24T14:15:22Z",
            "status": "string",
            "updatedAt": "2019-08-24T14:15:22Z"
          }
        ],
        "status": {
          "setAt": "2019-08-24T14:15:22Z",
          "status": "string",
          "updatedAt": "2019-08-24T14:15:22Z"
        }
      },
      "webhooks": [
        "string"
      ],
      "feedback": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "store_id": 0,
      "coupon_id": null,
      "subscription_id": null,
      "customer_information": {
        "id": 0,
        "email": "string",
        "country": "string",
        "location": "string",
        "ip": "string",
        "proxied": true,
        "browser_agent": "string",
        "vat": {
          "amount": 0,
          "country": "string"
        },
        "discord_data": {},
        "billing_details": {}
      },
      "product_variants": [
        {
          "id": 0,
          "product_id": 0,
          "title": "string"
        }
      ]
    },
    "refund": {
      "status": "pending",
      "provider": "string",
      "provider_refund_id": "string",
      "amount_cents": 0,
      "currency": "USD"
    }
  }
}
{
  "message": "Unauthenticated."
}
{
  "message": "This action is unauthorized."
}
{
  "message": "Rule not found."
}
{
  "message": "The given data was invalid.",
  "errors": {
    "data": [
      "The data field is required."
    ]
  }
}