API ReferenceInvoices

Mark pending invoice completed

Mark a pending invoice completed and start the normal delivery flow.

Mark a pending invoice completed and start the normal delivery flow, including customer delivery notifications.

Important

SellApp normally handles completion after payment is confirmed. Use manual completion only after independently confirming payment or deliberately authorizing delivery without it. This action can release the purchased products.

PATCH
/v2/invoices/{invoice}/mark-completed

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

application/json

application/json

curl -X PATCH "https://sell.app/api/v2/invoices/0/mark-completed" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": 1,
  "payment": {
    "fee": {
      "base": "0",
      "currency": "USD",
      "units": 1,
      "vat": 0,
      "total": {
        "exclusive": "0",
        "inclusive": "0"
      }
    },
    "gateway": {
      "data": {
        "total": {
          "base": "1999",
          "currency": "USD",
          "units": 1,
          "vat": 0,
          "total": {
            "exclusive": "1999",
            "inclusive": "1999"
          }
        },
        "customer_email": "adam.saltman@example.com",
        "transaction_id": "CQEGF35V"
      },
      "type": "COINBASE"
    },
    "subtotal": {
      "base": "1999",
      "currency": "USD",
      "units": 1,
      "vat": 0,
      "total": {
        "exclusive": "1999",
        "inclusive": "1999"
      }
    },
    "expires_at": "2024-01-10T19:33:11.000000Z",
    "full_price": {
      "base": "1999",
      "currency": "USD",
      "units": 1,
      "vat": 0,
      "total": {
        "exclusive": "1999",
        "inclusive": "1999"
      }
    },
    "original_amount": {
      "base": "1999",
      "currency": "USD",
      "units": 1,
      "vat": 0,
      "total": {
        "exclusive": "1999",
        "inclusive": "1999"
      }
    }
  },
  "status": {
    "history": [
      {
        "setAt": "2024-01-09T19:33:11.000000Z",
        "status": "PENDING",
        "updatedAt": "2024-01-09T21:17:46.000000Z"
      }
    ],
    "status": {
      "setAt": "2024-01-09T21:17:46.000000Z",
      "status": "COMPLETED",
      "updatedAt": "2024-01-09T21:17:46.000000Z"
    }
  },
  "webhooks": [],
  "feedback": "",
  "created_at": "2024-01-09T19:33:11.000000Z",
  "updated_at": "2024-01-09T21:17:46.000000Z",
  "store_id": 1,
  "coupon_id": null,
  "subscription_id": null,
  "customer_information": {
    "id": 1034,
    "email": "adam.saltman@example.com",
    "country": "Germany",
    "location": "Munich",
    "ip": "1.3.3.7",
    "proxied": false,
    "browser_agent": "Mozilla/4.9 (Windows 98; sl-SI; rv:1.9.1.20) Gecko/20110422 Firefox/21.0",
    "vat": {
      "amount": "0",
      "country": "US"
    },
    "discord_data": null,
    "billing_details": null
  },
  "product_variants": [
    {
      "id": 117214,
      "product_id": 97850,
      "title": "Founder Mode Credits"
    }
  ]
}
{
  "type": "authentication_error",
  "code": "unauthenticated",
  "message": "Unauthenticated.",
  "status": 401,
  "param": null,
  "request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
  "docs_url": "https://sell.app/docs/api/errors#unauthenticated"
}
{
  "type": "authorization_error",
  "code": "forbidden",
  "message": "This action is unauthorized.",
  "status": 403,
  "param": null,
  "request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
  "docs_url": "https://sell.app/docs/api/errors#forbidden"
}
{
  "type": "not_found_error",
  "code": "resource_not_found",
  "message": "Not Found.",
  "status": 404,
  "param": null,
  "request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
  "docs_url": "https://sell.app/docs/api/errors#resource-not-found"
}
{
  "type": "validation_error",
  "code": "validation_failed",
  "message": "The selected product variant id is invalid.",
  "status": 422,
  "param": "product_variant_id",
  "request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
  "docs_url": "https://sell.app/docs/api/errors#validation-failed",
  "errors": {
    "product_variant_id": [
      "The selected product variant id is invalid."
    ]
  }
}
{
  "type": "rate_limit_error",
  "code": "rate_limit_exceeded",
  "message": "Too Many Attempts.",
  "status": 429,
  "param": null,
  "request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
  "docs_url": "https://sell.app/docs/api/errors#rate-limit-exceeded"
}
{
  "type": "api_error",
  "code": "api_error",
  "message": "Server Error",
  "status": 500,
  "param": null,
  "request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
  "docs_url": "https://sell.app/docs/api/errors#api-error"
}