Create a subscription checkout link

Creates a checkout link for purchasing a subscription plan. The link can be shared with users to complete their subscription purchase.

POST
/sdk/subscriptions/checkout-links
X-Stash-Api-Key<token>

API key authentication for server-side SDK operations. Used for secure server-to-server communication.

In: header

planstring

Plan ID or code for the subscription

referenceId?string

Optional client reference ID for tracking

currencystring

Currency code (e.g., USD)

regionCode?string

Optional region code (2-3 letter country code)

paymentMethod?string

Optional preferred payment method

metadata?object

Optional custom key-value metadata

Empty Object

userpie.sdk.checkout_links.SubscriptionCheckoutLinkUser

User information for the subscription checkout

Response Body

curl -X POST "https://test-api.stash.gg/sdk/subscriptions/checkout-links" \  -H "Content-Type: application/json" \  -d '{    "plan": "string",    "currency": "string",    "user": {      "id": "string"    }  }'
{
  "id": "string",
  "url": "string"
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string",
      "property1": null,
      "property2": null
    }
  ]
}

How is this guide?