post https://spectrocoin.com/api/public/merchants/orders/create
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
redirectUrlprovided in the response is essential for custom integrations. It should be used to automatically redirect users to the payment window. - The
callbackUrlis critical for receiving callbacks about order status changes. Ensure this is a valid and reliable endpoint, read more about callbacks. - The
successUrlandfailureUrlallow for redirecting users to appropriate pages upon order completion or failure. Though optional, they are highly recommended. - Fields such as
payerDateOfBirth,payerEmail,payerName, andpayerSurnameare 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
orderIdvalues are unique within the same project to avoid conflicts. If managing multiple e-commerce systems under a single project, implement a mechanism to generate uniqueorderIdvalues. - Specify either
payCurrencyCodeandpayAmountorreceiveCurrencyCodeandreceiveAmount. If both specified, receive parameters will be selected.