Mamo Transactions API

The Transactions API from Mamo — 7 operation(s) for transactions.

OpenAPI Specification

mamo-transactions-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Mamo Business Business Details Transactions API
  version: '1.6'
  description: Mamo Business API follows the REST model. Its purpose is to enable Mamo Business users to automate payment link generation, charges, subscriptions, disbursements, recipients, cards, expenses and webhooks. Accepts JSON request bodies and returns JSON responses.
  contact:
    name: Mamo API Support
    email: api@mamopay.com
servers:
- url: https://business.mamopay.com/manage_api/v1
  description: Production server
- url: https://sandbox.dev.business.mamopay.com/manage_api/v1
  description: Sandbox server
security:
- bearerAuth: []
tags:
- name: Transactions
paths:
  /cards/transactions/{transactionId}:
    get:
      tags:
      - Transactions
      summary: Fetch Transaction Details
      description: Fetches detailed information for a specific card transaction<br><br>
      parameters:
      - name: transactionId
        in: path
        schema:
          type: string
          default: CTX-4584B3DEC9
        required: true
        description: Transaction ID
        example: CTX-4584B3DEC9
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      - name: Authorization
        in: header
        schema:
          type: string
        example: Bearer <your sandbox api key>
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  kind:
                    type: string
                    description: Type of transaction
                  merchant_name_formatted:
                    type: string
                    description: Formatted merchant name
                  amount_currency:
                    type: string
                    description: Transaction amount currency
                  billing_amount_currency:
                    type: string
                    description: Billing amount currency
                  status:
                    type: string
                    enum:
                    - success
                    - reversed
                    - declined
                    - refunded
                    description: Transaction status
                  card_last4:
                    type: string
                    description: Last 4 digits of card
                  id:
                    type: string
                    description: Transaction identifier
                  merchant_name:
                    type: string
                    nullable: true
                    description: Raw merchant name
                  amount:
                    type: number
                    description: Transaction amount
                  billing_amount:
                    type: number
                    description: Billing amount
                  card_name:
                    type: string
                    description: Name of the card
                  card_holder_name:
                    type: string
                    description: Card holder name
                  created_at:
                    type: string
                    description: Transaction creation date
                  updated_at:
                    type: string
                    description: Transaction last update date
                  expense:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                        - incomplete
                        - pending_review
                        - ready
                        - synced
                        description: Expense status
                      description:
                        type: string
                        nullable: true
                        description: Expense description
                      invoice_number:
                        type: string
                        nullable: true
                        description: Invoice number
                      id:
                        type: string
                        description: Expense identifier
                      category:
                        type: string
                        nullable: true
                        description: Expense category
                      tax_code:
                        type: string
                        nullable: true
                        description: Tax code
                      payment_account:
                        type: string
                        nullable: true
                        description: Payment account
                      expense_account:
                        type: string
                        nullable: true
                        description: Expense account
                      vendor:
                        type: string
                        nullable: true
                        description: Vendor information
                      receipt_uploaded:
                        type: boolean
                        description: Whether receipt is uploaded
                      created_at:
                        type: string
                        description: Expense creation date
                      updated_at:
                        type: string
                        description: Expense last update date
                example:
                  kind: purchase
                  merchant_name_formatted: ACQUIRER NAME
                  amount_currency: USD
                  billing_amount_currency: AED
                  status: success
                  card_last4: '9315'
                  id: CTX-4584B3DEC9
                  merchant_name: null
                  amount: 30
                  billing_amount: 114.05
                  card_name: Phu's card test2
                  card_holder_name: MCS integration
                  created_at: 03 Mar 2025, 01:41PM
                  updated_at: 03 Mar 2025, 01:41PM
                  expense:
                    status: incomplete
                    description: null
                    invoice_number: null
                    id: EXP-CCC03C324C
                    category: null
                    tax_code: null
                    payment_account: null
                    expense_account: null
                    vendor: null
                    receipt_uploaded: false
                    created_at: 03 Mar 2025, 01:41PM
                    updated_at: 03 Mar 2025, 01:41PM
        '403':
          description: Unauthorised
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: string
                  error_code:
                    type: string
                example:
                  messages:
                  - Unauthorized
                  error_code: UNAUTHORIZED
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: string
                  error_code:
                    type: string
                example:
                  messages:
                  - Transaction not found
                  error_code: RECORD_NOT_FOUND
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                  error:
                    type: string
                example:
                  status: 500
                  error: Internal Server Error
      operationId: getCardsTransactionsTransactionid
  /cards/transactions:
    get:
      tags:
      - Transactions
      summary: Fetching Card Transactions
      description: Fetches all transactions for cards<br><br>
      parameters:
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      - in: query
        name: page
        schema:
          type: integer
        example: 1
      - in: query
        name: per_page
        schema:
          type: integer
        example: 100
      - name: Authorization
        in: header
        schema:
          type: string
        example: Bearer <your sandbox api key>
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        kind:
                          type: string
                          description: Type of transaction
                        merchant_name_formatted:
                          type: string
                          description: Formatted merchant name
                        amount_currency:
                          type: string
                          description: Transaction amount currency
                        billing_amount_currency:
                          type: string
                          description: Billing amount currency
                        status:
                          type: string
                          enum:
                          - success
                          - reversed
                          - declined
                          - refunded
                          description: Transaction status
                        card_last4:
                          type: string
                          description: Last 4 digits of card
                        id:
                          type: string
                          description: Transaction identifier
                        merchant_name:
                          type: string
                          nullable: true
                          description: Raw merchant name
                        amount:
                          type: number
                          description: Transaction amount
                        billing_amount:
                          type: number
                          description: Billing amount
                        card_name:
                          type: string
                          description: Name of the card
                        card_holder_name:
                          type: string
                          description: Card holder name
                        created_at:
                          type: string
                          description: Transaction creation date
                        updated_at:
                          type: string
                          description: Transaction last update date
                        expense:
                          type: object
                          description: Associated expense information
                          properties:
                            status:
                              type: string
                              enum:
                              - incomplete
                              - pending_review
                              - ready
                              - synced
                              description: Expense status
                            description:
                              type: string
                              nullable: true
                              description: Expense description
                            invoice_number:
                              type: string
                              nullable: true
                              description: Invoice number
                            id:
                              type: string
                              description: Expense identifier
                            category:
                              type: string
                              nullable: true
                              description: Expense category
                            tax_code:
                              type: string
                              nullable: true
                              description: Tax code
                            payment_account:
                              type: string
                              nullable: true
                              description: Payment account
                            expense_account:
                              type: string
                              nullable: true
                              description: Expense account
                            vendor:
                              type: string
                              nullable: true
                              description: Vendor information
                            receipt_uploaded:
                              type: boolean
                              description: Whether receipt is uploaded
                            created_at:
                              type: string
                              description: Expense creation date
                            updated_at:
                              type: string
                              description: Expense last update date
                  pagination_meta:
                    type: object
                    properties:
                      page:
                        type: integer
                        description: Current page number
                      per_page:
                        type: integer
                        description: Items per page
                      total_pages:
                        type: integer
                        description: Total number of pages
                      next_page:
                        type: integer
                        nullable: true
                        description: Next page number
                      prev_page:
                        type: integer
                        nullable: true
                        description: Previous page number
                      from:
                        type: integer
                        description: Starting item number
                      to:
                        type: integer
                        description: Ending item number
                      total_count:
                        type: integer
                        description: Total number of items
                example:
                  data:
                  - kind: purchase
                    merchant_name_formatted: ACQUIRER NAME
                    amount_currency: AED
                    billing_amount_currency: AED
                    status: declined
                    card_last4: '7552'
                    id: CTX-ADE2D190C3
                    merchant_name: null
                    amount: 5
                    billing_amount: 5
                    card_name: Block ATM card
                    card_holder_name: MCS integration
                    created_at: 04 Aug 2025, 03:32PM
                    updated_at: 04 Aug 2025, 03:32PM
                    expense:
                      status: incomplete
                      description: null
                      invoice_number: null
                      id: EXP-CCC03C324C
                      category: null
                      tax_code: null
                      payment_account: null
                      expense_account: null
                      vendor: null
                      receipt_uploaded: false
                      created_at: 03 Mar 2025, 01:41PM
                      updated_at: 03 Mar 2025, 01:41PM
                  - kind: purchase
                    merchant_name_formatted: ACQUIRER NAME
                    amount_currency: AED
                    billing_amount_currency: AED
                    status: declined
                    card_last4: '7552'
                    id: CTX-C698A05F66
                    merchant_name: null
                    amount: 5
                    billing_amount: 5
                    card_name: Block ATM card
                    card_holder_name: MCS integration
                    created_at: 04 Aug 2025, 03:31PM
                    updated_at: 04 Aug 2025, 03:31PM
                    expense: {}
                  pagination_meta:
                    page: 1
                    per_page: 100
                    total_pages: 2
                    next_page: 2
                    prev_page: null
                    from: 1
                    to: 100
                    total_count: 148
        '403':
          description: Unauthorised
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: string
                  error_code:
                    type: string
                example:
                  messages:
                  - Unauthorized
                  error_code: UNAUTHORIZED
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                  error:
                    type: string
                example:
                  status: 500
                  error: Internal Server Error
      operationId: getCardsTransactions
  /charges/{chargeId}:
    get:
      tags:
      - Transactions
      summary: Fetch Transaction Info
      description: This API enables you to retrieve detailed information about a specific charge by providing the charge ID.<br>It is designed to give you a comprehensive view of transaction details.<br><br>
      parameters:
      - in: path
        name: chargeId
        schema:
          type: string
          default: MPB-CHRG-E0CE93E071
        required: true
        description: Transaction ID / Charge ID
        example: MPB-CHRG-E0CE93E071
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      - name: Authorization
        in: header
        schema:
          type: string
        example: Bearer <your sandbox api key>
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                    - confirmation_required
                    - captured
                    - refund_initiated
                    - processing
                    - failed
                    - refunded
                  id:
                    type: string
                  amount:
                    type: number
                  amount_currency:
                    type: string
                  refund_amount:
                    type: number
                  refund_status:
                    type: string
                  billing_descriptor:
                    type: string
                  custom_data:
                    type: object
                  created_date:
                    type: string
                  subscription_id:
                    type: string
                    description: Value is set for subscriptions only. For one-time payments, this will be null.
                  next_payment_date:
                    type: string
                    description: Value is set for subscriptions only. For one-time payments, this will be null.
                  settlement_amount:
                    type: number
                  settlement_currency:
                    type: string
                  settlement_date:
                    type: string
                  customer_details:
                    type: object
                    properties:
                      name:
                        type: string
                      email:
                        type: string
                      phone_number:
                        type: string
                      comment:
                        type: string
                  payment_method:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - CREDIT MASTERCARD
                        - CREDIT VISA
                        - CREDIT AMERICAN EXPRESS
                        - DEBIT MASTERCARD
                        - DEBIT VISA
                        - DEBIT AMERICAN EXPRESS
                      card_holder_name:
                        type: string
                      card_last4:
                        type: string
                      origin:
                        type: string
                  error_code:
                    type: string
                  error_message:
                    type: string
                example:
                  status: captured
                  id: MPB-CHRG-E0CE93E071
                  amount: 100
                  amount_currency: AED
                  refund_amount: 0
                  refund_status: No refund
                  billing_descriptor: Mamo*Merchant
                  custom_data:
                    internal_customer_id: 0114120d-c394-4cce-9cdb-4ccbae605748
                    val1: true
                    val2: custom value
                  created_date: 2023-05-31-11-18-57
                  subscription_id: MPB-SUB-B764EDCBA2
                  next_payment_date: 05/06/2023
                  settlement_amount: 356.42
                  settlement_currency: AED
                  settlement_date: 05/06/2023
                  customer_details:
                    name: Mamo User
                    email: email@mamopay.com
                    phone_number: '+971551234567'
                    comment: Dolore voluptate possimus et.
                  payment_method:
                    type: CREDIT VISA
                    card_holder_name: Mamo User
                    card_last4: •••• 4242
                    origin: UAE card
                  error_code: generic
                  error_message: Unknown reason - user should contact their bank to find out
        '403':
          description: Unauthorised
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: string
                  error_code:
                    type: string
                example:
                  messages:
                  - Unauthorized
                  error_code: UNAUTHORIZED
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: string
                  error_code:
                    type: string
                example:
                  messages:
                  - Charge record was not found
                  error_code: RECORD_NOT_FOUND
        '500':
          description: Unexpected error
      operationId: getChargesChargeid
  /charges:
    get:
      tags:
      - Transactions
      summary: Fetching Transactions
      description: Fetches all transactions for a given business<br><br>
      parameters:
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      - in: query
        name: page
        schema:
          type: integer
        example: 1
      - in: query
        name: per_page
        schema:
          type: integer
        example: 10
      - name: Authorization
        in: header
        schema:
          type: string
        example: Bearer <your sandbox api key>
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          default: MPB-CHRG-D8B07FB8D7
                        status:
                          type: string
                          default: captured
                        amount:
                          type: number
                          default: 122.87
                        amount_currency:
                          type: string
                          default: AED
                        refund_amount:
                          type: string
                          default: 0
                        refund_status:
                          type: string
                          default: No refund
                        billing_descriptor:
                          type: string
                        custom_data:
                          type: object
                        created_date:
                          type: string
                        subscription_id:
                          type: string
                          description: Value is set for subscriptions only. For one-time payments, this will be null.
                        next_payment_date:
                          type: string
                          description: Value is set for subscriptions only. For one-time payments, this will be null.
                        settlement_amount:
                          type: number
                        settlement_currency:
                          type: string
                        settlement_date:
                          type: string
                        customer_details:
                          type: object
                          properties:
                            name:
                              type: string
                            email:
                              type: string
                            phone_number:
                              type: string
                            comment:
                              type: string
                        payment_method:
                          type: object
                          properties:
                            type:
                              type: string
                            card_holder_name:
                              type: string
                            card_last4:
                              type: string
                            origin:
                              type: string
                        settlement_fee:
                          type: string
                        settlement_vat:
                          type: string
                        payment_link_id:
                          type: string
                        payment_link_url:
                          type: string
                        error_code:
                          type: string
                        error_message:
                          type: string
                  pagination_meta:
                    type: object
                    properties:
                      page:
                        type: number
                      per_page:
                        type: number
                      total_pages:
                        type: number
                      next_page:
                        type: number
                      prev_page:
                        type: number
                      from:
                        type: number
                      to:
                        type: number
                      total_count:
                        type: number
                example:
                  data:
                  - status: captured
                    id: MPB-CHRG-E0CE93E071
                    amount: 100
                    amount_currency: AED
                    refund_amount: '0.0'
                    refund_status: No refund
                    billing_descriptor: Mamo*Merchant
                    custom_data:
                      internal_customer_id: 0114120d-c394-4cce-9cdb-4ccbae605748
                      val1: true
                      val2: custom value
                    created_date: 2023-05-31-11-18-57
                    subscription_id: MPB-SUB-B764EDCBA2
                    next_payment_date: 05/06/2023
                    settlement_amount: 356.42
                    settlement_currency: AED
                    settlement_date: 05/06/2023
                    customer_details:
                      name: Mamo User
                      email: email@mamopay.com
                      phone_number: '+971551234567'
                      comment: Dolore voluptate possimus et.
                    payment_method:
                      type: CREDIT VISA
                      card_holder_name: Mamo User
                      card_last4: •••• 4242
                      origin: UAE card
                    settlement_fee: AED 3.20
                    settlement_vat: AED 0.16
                    payment_link_id: MB-LINK-01E6ADB6DE
                    payment_link_url: https://staging.business.mamopay.com/pay/dong22-579f10
                    error_code: generic
                    error_message: Unknown reason - user should contact their bank to find out
                  pagination_meta:
                    page: 1
                    per_page: 10
                    total_pages: 5
                    next_page: 2
                    prev_page: null
                    from: 1
                    to: 10
                    total_count: 47
        '403':
          description: Unauthorised
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: string
                  error_code:
                    type: string
                example:
                  messages:
                  - Unauthorized
                  error_code: UNAUTHORIZED
        '500':
          description: Unexpected error
      operationId: getCharges
    post:
      tags:
      - Transactions
      summary: Initiate Payment
      description: 'API to initiate transactions by merchant. <br> <h3>About MIT (Merchant Initiated Transaction)</h3> Merchant Initiated Transactions (MIT) allows a business to use card details, that were stored during previous transactions, to charge their customers.<br> <br> <h3>How do MITs work?</h3> 1- You request a payment link with the option to save the card details.<br> 2- You save the charge ID.<br> 3- You get the charge details (redirect, GET /charge, or webhook) which will include the ID of the card used to make the payment, you can save either one of the IDs so you always have access to the card ID.<br> 4- You call the below API to initiate a transaction using the same card.<br> '
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                card_id:
                  type: string
                  description: Saved card ID retrieved from the initial transaction made with MIT-enabled link.
                amount:
                  type: number
                  description: Amount to be charged.
                  default: 10
                  minimum: 1
                currency:
                  type: string
                  default: AED
                  description: The three-letter ISO currency code, default is AED
                send_customer_receipt:
                  type: boolean
                  default: true
                  description: Enables the sending of customer receipts.
                custom_data:
                  type: object
                  description: Key-value object that can be used to pass custom data.
                external_id:
         

# --- truncated at 32 KB (51 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mamo/refs/heads/main/openapi/mamo-transactions-api-openapi.yml