📨Create Transaction

Overview

This endpoint allows you to initiate a payment transaction. Ensure your request includes all required parameters and valid authorization headers to process the payment successfully.

HTTP Request

 https://malum.co/api/v2/payment/create

Headers

HeaderValue

MALUM

{BUSINESS_ID}:{SECRET_KEY}

Request Body

Send data in JSON format. The following table outlines all parameters, noting which are required:

ParameterTypeRequiredDescription

amount

float

Yes

Amount to be collected.

currency

string

Yes

Currency code (e.g., EUR, USD, JPY, AUD, GBP, RUB).

customer_email

string

Yes

Email address of the customer.

cancel_url

string

Yes

URL to navigate to if the transaction is cancelled.

success_url

string

Yes

URL to redirect the customer to after successful payment.

webhook_url

string

Yes

URL to send webhook notifications to.

buyer_pays_fees

boolean

No

Whether the customer should pay the merchant fee.

metadata

string

No

Additional metadata about the transaction (max 255 chars).

Success Response

A successful request returns the following JSON structure:

{
  "status": "success",
  "bpf": false,
  "transaction_id": "TRN_XXXXXXXXX",
  "link": "https://malum.co/checkout/TRN_XXXXXXXXX",
  "timestamp": 10000000
}

Error Response

An unsuccessful request returns the following JSON structure, indicating the nature of the error:

{
  "status": "failed",
  "error": "Amount is too high.",
  "timestamp": 10000000
}

Additional Notes

  • Ensure that all required parameters are included in your request.

  • The Authorization header should be properly formatted with your business ID and secret key.

Last updated