Skip to main content

Products

You can add the product (or service) you want to sell. The following will guide you through the process of adding a product.

Configuring Product Attributes

First, you need to understand the basic properties of the product:

  • Tag
  • Detail
  • Currency
  • Price
  • Quantity
  • Sold

product_field.png

Payment Provider

In addition to setting these properties, you also need to add payment providers to the product. Multiple payment providers can be added to a product.

To learn how to configure a payment provider, refer to Payment Provider

product_provider.png

Finally, fill in the Return URL. This is the URL to which the payment provider page will redirect after the payment is completed.

Success URL (Optional)

If you need the provider to redirect users directly to a custom URL instead of the Casdoor callback page, you can fill in the Success URL field. When configured, Casdoor will append the payment owner and transaction name as query parameters to your provided URL.

For example, if you set the Success URL to http://example.com/payment/success, users will be redirected to:

http://example.com/payment/success?transactionOwner={paymentOwner}&transactionName={paymentName}

You can include additional query parameters in your Success URL, such as:

http://example.com/payment/success?customParam=value&transactionOwner={paymentOwner}&transactionName={paymentName}
caution

Important: If you configure the Success URL field, you must manually call the NotifyPayment API to complete the transaction, otherwise the payment will fail.

Call the API endpoint: api/notify-payment/{paymentOwner}/{paymentName} using the parameters provided in the Success URL query string.

Preview the Product

You're done! Review the details and save:

product_preview