Skip to content
You are reading the pinned copy of v1.0, which is also the latest release. Read the latest.

Payment methods (admin API)

Admin routes of the payment methods module. Every route needs a staff session and the permission named on it; send X-Resolve-Locale: false to receive every locale of a translatable field for editing.

List payment methods

Parameters:

  • isActive in query (boolean, optional).
  • page in query (number, min 1, optional).
  • pageSize in query (number, min 1, max 100, optional).
  • provider in query ("cod", "gift_card", "manual", "paypal", "stripe", optional).

Responses:

  • 200: Methods retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

Create payment method

Request body: CreatePaymentMethodDto.

Responses:

  • 201: Created.
  • 400: Invalid input.
  • 409: Code already in use.

Soft-delete payment method

Parameters:

  • id in path (string, required).

Responses:

  • 204: Deleted.
  • 404: Not found.

Get payment method

Parameters:

  • id in path (string, required).

Responses:

  • 200: Method retrieved.
  • 404: Not found.

Update payment method

Parameters:

  • id in path (string, required).

Request body: UpdatePaymentMethodDto.

Responses:

  • 200: Updated.
  • 400: Invalid input.
  • 404: Not found.

Reorder payment methods

Request body: ReorderPaymentMethodsDto.

Responses:

  • 204: Reordered.
  • 400: Invalid ids payload.
  • 404: One or more ids unknown.
  • code (string, pattern ^[a-z0-9_]+$, min length 2, max length 50, required).
  • name (PaymentTranslatableDto, required).
  • description (OptionalTranslatableDto, optional).
  • provider ("cod", "gift_card", "manual", "paypal", "stripe", required).
  • isActive (boolean, optional).
  • isTestMode (boolean, optional).
  • sortOrder (number, min 0, optional).
  • config (object, optional).
  • fr (string, optional).
  • en (string, optional).
  • ar (string, optional).
  • default (string, optional).
  • fr (string, optional).
  • en (string, optional).
  • ar (string, optional).
  • default (string, required).
  • ids (array of string, required).
As seen on Open Source Alternatives The Merchant Engine badge