v1

latestOpenAPI 3.0.02026-07-1412068.2 KB
Payment Links

Update Payment Link

Allows a user to update payment link details<br><br>

patch/links/{linkId}

Path parameters

linkIdstring required

Payment link ID

Headers

Content-Typestring
Authorizationstring

Request body

namestring

The title of the payment link

descriptionstring

Payment description. This will appear on the payment checkout page.

capacityinteger

The number of times a payment link can be used. The capacity will be ignored when the subscription params exist.

activeboolean
return_urlstring uri

The URL which the customer will be redirected to after a successful payment.

failure_return_urlstring uri

The URL which the customer will be redirected to after a failure payment.

terms_and_conditions_urlstring uri

The URL to the terms and conditions page, if provided, the customer will be required to accept the terms before proceeding to payment.

processing_fee_percentagenumber
amountnumber

amount could be 0 with save_card 'required' option for card verification

amount_currency'AED' | 'USD' | 'EUR' | 'GBP' | 'SAR'
link_type'standalone' | 'modal' | 'inline'

Type of link to be created.

enable_tabbyboolean

Enables the ability for customers to buy now and pay later.

enable_messageboolean

Enables the ability for customers to add a message during the checkout process.

enable_tipsboolean

Enables the tips option. This will be displayed on the first screen.

save_card'off' | 'optional' | 'required'

Allows the merchant to enable the option to store card details to be used later on for Merchant Initiated Transactions.

enable_customer_detailsboolean

Enables adding customer details such as the name, email, and phone number. This screen will be displayed before the payment details screen.

enable_quantityboolean

When enabled, customers can specify the number of items they intend to purchase. This quantity will serve as a multiplier for the base amount.

enable_qr_codeboolean

Adds the ability to verify a payment through a QR code.

send_customer_receiptboolean

Enables the sending of customer receipts.

first_namestring

The first name of customer which will pre-populate in card info step.

last_namestring

The last name of customer which will pre-populate in card info step.

emailstring

The email of customer which will pre-populate in card info step.

external_idstring
hold_and_charge_laterboolean

Indicates whether to place the payment on hold and charge it later using the "captures" API.

custom_dataobject

Example request

{
  "name": "Chocolate Box - Small",
  "description": "12pcs Chocolate Box",
  "capacity": 15,
  "active": true,
  "return_url": "https://myawesomewebsite.com/paymentSuccess",
  "failure_return_url": "https://failurewebsite.com/paymentFailure",
  "processing_fee_percentage": 3,
  "amount": 219.99,
  "amount_currency": "AED",
  "enable_message": true,
  "enable_tips": true,
  "save_card": "string",
  "enable_tabby": true,
  "link_type": "modal",
  "enable_customer_details": true,
  "payment_methods": [
    "card",
    "wallet"
  ],
  "rules": {
    "allowed": [
      {
        "type": "bins"
      },
      {
        "list": [
          "424242"
        ]
      },
      {
        "decline_message": "Custom decline message for this rule"
      }
    ]
  },
  "subscription": {
    "frequency": "monthly",
    "frequency_interval": 1,
    "start_date": "2023/01/01",
    "end_date": "2023/01/31",
    "payment_quantity": 5
  },
  "first_name": "first name",
  "last_name": "last name",
  "email": "email@mamopay.com",
  "external_id": "external_id_1",
  "custom_data": {
    "val1": true,
    "val2": "custom value"
  }
}

Response

Successful response

idstring
namestring
descriptionstring
capacityinteger
activeboolean
return_urlstring
failure_return_urlstring
processing_fee_percentagenumber
link_typestring
amountnumber
amount_currencystring
send_customer_receiptboolean
enable_tabbyboolean
enable_messageboolean
enable_tipsboolean
save_cardstring
enable_quantityboolean
enable_customer_detailsboolean
payment_urlstring
first_namestring
last_namestring
emailstring
external_idstring
custom_dataobject

Example response

{
  "id": "MB-LINK-D8B07FB8C7",
  "name": "Chocolate Box - Small",
  "description": "12pcs Chocolate Box",
  "capacity": 15,
  "active": true,
  "return_url": "https://myawesomewebsite.com/paymentSuccess",
  "failure_return_url": "https://failurewebsite.com/paymentFailure",
  "amount": 219.99,
  "send_customer_receipt": true,
  "payment_url": "https://staging.business.mamopay.com/pay/dong22-579f10",
  "external_id": "exteral_id_1",
  "payment_methods": [
    "card",
    "wallet"
  ],
  "hold_and_charge_later": false,
  "rules": {
    "allowed": [
      {
        "type": "bins"
      },
      {
        "list": [
          "424242"
        ]
      },
      {
        "decline_message": "Custom decline message for this rule"
      }
    ]
  },
  "subscription": {
    "identifier": "MPB-SUB-2162171A86",
    "frequency": "monthly",
    "frequency_interval": 1,
    "start_date": "2023/01/01",
    "end_date": "2023/01/31",
    "payment_quantity": 5
  },
  "custom_data": {
    "internal_customer_id": "0114120d-c394-4cce-9cdb-4ccbae605748",
    "val1": true,
    "val2": "custom value"
  }
}