Mayar icon

Mayar

Aksi API Mayar: balance, invoice, coupon, customer

Actions10

Invoice → Create

AI-generated

Summary

Create an invoice via the Mayar API.

Inputs

  • name (required) — Invoice name
  • email (required) — Customer email
  • mobile (required) — Customer mobile number
  • redirectUrl — Redirect URL after payment
  • description — Invoice description
  • expiredAt — ISO 8601 expiration datetime (optional)
  • items — Invoice items (at least one item required)
  • options — Retry and debug settings

Output shape

JSON object from Mayar API, or error object if continueOnFail is true

Response includes _meta with method, path, and body when debug is enabled.

Examples

Example 1: Create an invoice with one item

Provide name, email, mobile, and a single item with quantity and rate. Leave expiredAt and redirectUrl at defaults if not needed.

Links

Discussion