Create Order

This endpoint is used to create a merchant order, which is the foundation of all SpectroCoin e-commerce plugins and integrations. It initiates by generating a pre-order and returns a response containing a redirectUrl to the pre-order payment window. Users accessing the redirectUrl are guided through selecting the currency, network, and completing the payment, which then creates the final order based on the pre-order.

  • The redirectUrl provided in the response is essential for custom integrations. It should be used to automatically redirect users to the payment window.
  • The callbackUrl is critical for receiving callbacks about order status changes. Ensure this is a valid and reliable endpoint, read more about callbacks.
  • The successUrl and failureUrl allow for redirecting users to appropriate pages upon order completion or failure. Though optional, they are highly recommended.
  • Fields such as payerDateOfBirth, payerEmail, payerName, and payerSurname are optional but applicable if the merchant project has the "For Verified Payers Only" setting enabled. This enhances security by allowing payments only from verified SpectroCoin users. Learn more about verified payers only.
  • Ensure that orderId values are unique within the same project to avoid conflicts. If managing multiple e-commerce systems under a single project, implement a mechanism to generate unique orderId values.
  • Specify either payCurrencyCode and payAmount or receiveCurrencyCode and receiveAmount. If both specified, receive parameters will be selected.
Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!