List coupons
List coupons for a payment request
Returns the coupons associated with the payment request identified by :id. Internally the payment request’s id is injected as forPaymentLinkId into the coupon query, so only coupons that apply to this request are returned. The request must belong to the store resolved from the API key (a 404/validation error is raised otherwise).
Authentication
Send the merchant API key in x-api-key (alias x-account-api-key). Requires scope Merchant.payment_link.read. Optionally scope to a store with x-application-account-id.
Path parameters
id— the payment request id.
Query parameters (coupon filter)
page,per_page— pagination (defaults 1 / 10).discountType—ONE_TIME,REPEATING,UNLIMITED.discountKind—FIXED,PERCENTAGE.status—ACTIVE,INACTIVE,EXPIRED,MAXED_OUT.paymentRequestApplicability—ALL,SPECIFIC,NONE.filter— free-text search across couponcode,name,description.sort/sorter— order by allowed fieldscode,createdAt,name.
There is no request body.
Notas: Handler: paymentLinksService.getCoupons -> couponService.findMany with forPaymentLinkId injected from the path id. Accepts deprecated alias paths GET /v1/payment-links/:id/coupons and GET /v1/payment-link/:id/coupons. Coupon record shape is inferred from the Coupons model.
Authentication
Path parameters
Headers
Scope the request to a specific store / account instead of the one resolved from the API key. Aliases: the x-account-id header, or the application_account_id / account_id query parameter.
Query parameters
Filter with the query language. Accepts a string expression or a URL-encoded JSON object following Prisma’s where clause.
Allowed fields: code, name, description
Allowed operators: equals, not, in, notIn, lt, lte, gt, gte, contains, startsWith, endsWith, like
String format: field:operator:value, comma-separated. The operator defaults to equals (field:value), and | works as a separator. Group with AND(...) or OR(...) — AND is the default.
JSON format: {"OR":[{"name":{"contains":"Jane"}}]}
Sort by one or more fields, comma-separated.
Allowed fields: code, createdAt, name
Formats: field (ascending by default), +field, -field, field:asc, field:desc (| also works as the separator).
Alternative to sort: a JSON string mapping a field to a direction (asc / desc).
Allowed fields: createdAt, name, code
