SellAuth

Checkout

Checkout Endpoints allow you to create checkout sessions for your shop. Business Plan Subscription is required to create checkout sessions.

Create Checkout Session

Creates a new checkout session for the shop. This endpoint requires an API key and must be called from your backend.

POST
/v1/shops/{shopId}/checkout

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Request Body

application/jsonRequired
cartRequiredarray<object>
ipstring

Must be a valid IP address.

country_codestring

Must contain only letters. Must be 2 characters.

user_agentstring
asninteger
emailstring

Must be a valid email address.

discord_user_idstring
discord_user_usernamestring
discord_access_tokenstring
discord_refresh_tokenstring
couponstring
gatewaystring

The payment gateway to preselect. CUSTOMERBALANCE, STRIPE, SQUARE, SUMUP, MOLLIE, SKRILL, AUTHORIZENET, LEMONSQUEEZY, NMI, AMAZONPS, PAYPAL, PAYPALFF, CASHAPP, VENMO, BTC, LTC.

newsletterboolean

Path Parameters

shopIdRequiredinteger
curl -X POST "https://api.sellauth.com/v1/shops/{shopId}/checkout" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "cart": [
      {
        "productId": 123,
        "variantId": 456,
        "quantity": 1
      }
    ],
    "ip": "160.20.137.115",
    "country_code": "yc",
    "user_agent": "deserunt",
    "asn": 15,
    "email": "teichmann@example.com",
    "discord_user_id": null,
    "discord_user_username": null,
    "discord_access_token": null,
    "discord_refresh_token": null,
    "coupon": null,
    "gateway": "STRIPE",
    "newsletter": false
  }'

{
  "success": true,
  "invoice_id": 632,
  "invoice_url": "https://sellauth-shop.mysellauth.test/checkout/98b3f45d848c5-0000000000632",
  "url": "https://checkout.stripe.com/c/pay/cs_test_a139AH1zApQWCLRABDj7fBVDZ0puTeWxKQMeOENUVAv0NzDmBVbCwSKYTX"
}