building-columnsGet Payment Link

Generate a payment gateway link for an existing reseller transaction. This endpoint returns a redirect URL that sends the customer to the selected payment provider.

Method: GET Endpoint: https://malum.co/api/v3/reseller/payment_link Response format: JSON


Required query parameters

Parameter
Type
Example
Notes

transaction_code

string (UUID v4)

193a3981-XXXX-XXXX-XXXX-241a26f3b74e

Must be a valid UUID v4 of a previously created order

payment_method

string

WERTEUR,WERT,...

Payment gateway identifier, case-insensitive, spaces removed


How it works

  1. The API validates the transaction_code format (must be UUID v4).

  2. The system normalizes payment_method:

    • Spaces removed

    • Converted to lowercase

  3. The backend checks if a matching gateway integration file exists.

  4. The transaction is loaded using transaction_code.

  5. The transaction must exist and still be in pending status.

  6. The selected gateway module generates a redirect URL.

  7. The API responds with a URL where the customer should be redirected.


Example request


Success response

Field notes

  • redirect_url is where you should send the customer to complete the payment.

  • The URL may point to an intermediary redirect or directly to a third-party gateway page.

  • timestamp is a server-side Unix timestamp of the response.

  • Malum is hidden and not shown.


Error responses

Errors return JSON with:

  • status: failed

  • message: description of the problem

  • data: may be empty or include debug information

Common messages include:

  • Invalid Request. Missing transaction code.

  • Invalid transaction code format.

  • An error with the payment method occurred, please try again later.

  • Transaction not found.

  • Transaction is not pending anymore.

  • An error occurred, please try again later.


Integration flow summary

  1. Create an order using the checkout endpoint and store the transaction_code.

  2. Retrieve available methods via payment_options.

  3. Call payment_link with the chosen payment_method.

  4. Redirect your customer to the returned redirect_url.

Last updated