Skip to main content

InitPaymentModelDTO

This document describes the InitPaymentModelDTO, which defines the data transfer object (DTO) structure of a payment initialization request for the NoWallet API.
It is used by merchants to initiate a payment process by specifying essential transaction details, customer information, and payment preferences.

JSON Response Example

The JSON section provides a sample structure that a merchant would send when initializing a payment transaction. Key fields include:

  • transaction_id: A unique identifier for the transaction.
  • additional_infos: Customer information such as email, name, and phone number.
  • amount: The amount to be transacted.
  • callback_url: The URL where the merchant will receive the payment result.
  • return_url: The URL where the customer will be redirected after payment.
  • country_code: The country code for the transaction.
  • operators_code: The mobile money operator codes for the transaction.
  • method: The type of transaction (e.g., CASHIN, CASHOUT, MERCHANT).
  • tunnel: The mode of transaction (e.g., API, CHECKOUTPAGE).
  • operator_otp: The OTP from the operator if required.

This example helps developers visualize the expected format and key components of a valid payment initialization request.

Example Payload

Here is an example of a valid payload for the InitPaymentModelDTO:

{
"transaction_id": "ca3a65bb-9008-443d-8d4b-61c3b0006438",
"additional_infos": {
"customer_email": "[email protected]",
"customer_lastname": "Doe",
"customer_firstname": "John",
"customer_phone": "+237691234567"
},
"amount": 200,
"callback_url": "https://example.com/callback",
"return_url": "https://example.com/return",
"country_code": "CM",
"operators_code": ["OM"],
"method": "MERCHANT",
"tunnel": "CHECKOUTPAGE",
"operator_otp": "123456"
}

Properties

The Properties table details each field included in the request payload:

  • The Name of the field,
  • Its Type (e.g., string, array),
  • Whether it is Required or not,
  • Any Restrictions that apply to the field,
  • A brief Description of the field's purpose.
NameTypeRequiredRestrictionsDescription
transaction_idstringtruenonean id generated by the merchant
additional_infosobjecttruenoneclient informations like email, lastname, firstname, phone
amountnumbertruenonetransaction amount
callback_urlstringtruenoneurl where the merchant will receive the payment final result, the callback url must be a valid url and must be http POST method only
return_urlstringtruenoneurl where client will be redirect after payment, the return url must be a valid url
country_codestringtruenonecountry code of the transaction, the country code must be a valid ISO 3166-1 alpha-2 or alpha-3 country code
operators_codearraytruenonemobile money operator code of the transaction, the operator code must be an array and a valid operator code, refer to our documentation for a list of valid operator codes
methodstringtruenonethe type of transaction to be made, methods can be: CASHIN(PAYOUT), CASHOUT (CASHOUT), MERCHANT(PAYIN)
tunnelstringtruenonethe type of tunnel(mode) to be used, tunnels can be: CHECKOUTPAGE(Payment interface to finalize transaction), API (Api mode make directly transaction, API tunnel is allowed for single operators_code ex : ['OM'], and customer_phone is required)
operator_otpstringfalsenoneotp from operator if it's need to be verified by the merchant

This section helps developers correctly populate each field to ensure the smooth creation of payment transactions.

Enumerated Values

The Enumerated Values section specifies the acceptable values for the method and tunnel properties:

PropertyValue
methodCASHIN
methodMERCHANT
methodCASHOUT
tunnelAPI
tunnelCHECKOUTPAGE

This ensures that only supported values are used, maintaining consistency and avoiding invalid transactions.

Was this page helpful?