Creating an Invoice Using the API
API documentation for the method of creating an invoice using Crypto Payments from E-Gates:
Creating an Invoice
This method allows you to create an invoice for payment using Crypto Payments from E-Gates.
Request
URL: /api/external/v1/gateway/create-payment-invoice Method: POST
Required Parameters:
timestamp(integer, required) - Current time in Unix timestamp format.ticker(string, required) - Cryptocurrency ticker for payment.payment_method(string, required) - Payment method, e.g., "ETHER".amount(string, required) - Payment amount.order_number(string, required) - Order number.
Additional Parameters:
success_url(string, optional) - URL to redirect to after successful payment.error_url(string, optional) - URL to redirect to in case of payment error.callback_url(string, optional) - Callback URL.sender_name(string, optional) - Sender's name.purpose_of_payment(string, optional) - Purpose of the payment.meta_data(json, optional) - Additional metadata in JSON format.
Example Request:
Response
Successful response:
success(boolean) - Indicates if the request was successful.status(null) - Response status (may be null).response(object) - Object containing data about the created invoice.invoice_id(string) - Unique identifier of the invoice.redirect_link(string) - Link to proceed with the invoice payment.currency(string) - Invoice currency.payment_method(string) - Payment method.amount(string) - Invoice amount.address(string) - Cryptocurrency send address.status(string) - Invoice status (e.g., "PENDING").type(string) - Invoice type (e.g., "CRYPTO").order_number(string) - Order number.created_at(integer) - Invoice creation time in Unix timestamp format.success_url,error_url,callback_url(null or string) - URLs for redirecting after successful payment, error, or callback.
Example Successful Response:
Possible Invoice Statuses:
PENDING - Invoice is awaiting payment.
SUCCESS - Invoice payment was successfully completed.
SUCCESS_SMALL_AMOUNT - Payment successfully completed, but the amount is less than expected.
CANCEL - Invoice was canceled.
Note: To create a correct request signature, use the signature generation methods mentioned in the previous description (e.g., for PHP or JS).
Last updated