---
updatedAt: 2026-08-20T08:30:45.000Z
agentTools:
  projectIndex: https://mamopay.readme.io/llms.txt
---

# Initiate Payment

API to initiate payments 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 payments, 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 payment ID.<br>
3- You get the payment details (redirect, GET /payments/{paymentId}, 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 payment using the same card.<br>


# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Payments",
    "version": "1.6",
    "contact": {
      "name": "api@mamopay.com"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.dev.business.mamopay.com/manage_api/v1",
      "description": "Sandbox server"
    },
    {
      "url": "https://business.mamopay.com/manage_api/v1",
      "description": "Production server"
    }
  ],
  "security": [
    {
      "Authorization": [
        "Bearer sk-123abc-abcd-1234-1234-123123123123"
      ]
    }
  ],
  "paths": {
    "/payments": {
      "post": {
        "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"
          }
        ],
        "tags": [
          "Payments"
        ],
        "summary": "Initiate Payment",
        "description": "API to initiate payments by merchant. <br>\n<h3>About MIT (Merchant Initiated Transaction)</h3>\nMerchant Initiated Transactions (MIT) allows a business to use card details, that were stored during previous payments, to charge their customers.<br>\n<br>\n<h3>How do MITs work?</h3>\n1- You request a payment link with the option to save the card details.<br>\n2- You save the payment ID.<br>\n3- You get the payment details (redirect, GET /payments/{paymentId}, 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>\n4- You call the below API to initiate a payment using the same card.<br>\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "card_id": {
                    "type": "string",
                    "description": "Saved card ID retrieved from the initial payment 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": {
                    "type": "string",
                    "description": "The external ID allows non Mamo IDs to be associated with a given payment."
                  },
                  "hold_and_charge_later": {
                    "type": "boolean",
                    "default": false,
                    "description": "Indicates whether to place the payment on hold and charge it later using the \"captures\" API."
                  }
                },
                "required": [
                  "card_id",
                  "amount"
                ],
                "example": {
                  "card_id": "CARD-5DF50209F8",
                  "amount": 10,
                  "custom_data": {
                    "internal_customer_id": "0114120d-c394-4cce-9cdb-4ccbae605748",
                    "val1": true,
                    "val2": "custom value"
                  },
                  "external_id": "ORDER-12345",
                  "hold_and_charge_later": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "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": [
                        "captured",
                        "failed"
                      ]
                    },
                    "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"
                        },
                        "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"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "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"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "error_code": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "messages": [
                      "Card does not exist"
                    ],
                    "error_code": "UNPROCESSABLE ENTITY"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number"
                    },
                    "error": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "status": 500,
                    "error": "Internal Server Error"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```