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, ADYEN, SHOPIFY, AMAZONPS, PAYPAL, PAYPALFF, CASHAPP, VENMO, BTC, LTC.

newsletterboolean
affiliatestring

Must not be greater than 16 characters.

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": "116.188.229.154",
    "country_code": "bz",
    "user_agent": "labore",
    "asn": 8,
    "email": "nlebsack@example.org",
    "discord_user_id": null,
    "discord_user_username": null,
    "discord_access_token": null,
    "discord_refresh_token": null,
    "coupon": null,
    "gateway": "STRIPE",
    "newsletter": false,
    "affiliate": "swekifk"
  }'

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