Programs

Pay for order with points

Changed on

Pays for an order with points from the member's card. The amount and points come from the card definition's pay-with-points exchange ratio, limited by the order total, the card balance, card spending caps, and the optional payment_limit. The binding cap is returned as details.spending_cap.

The program and member must be ACTIVE, and the program must be inside its validity window. The card must belong to the member. The card definition must have pay-with-points enabled and an exchange-ratio formula. The order must already exist, identified by id or source_id.

Modes:

  • TRANSACTION (default): creates a PENDING order transaction and a PENDING card transaction. Returns 202. The same order can be paid again; each call creates a new transaction.
  • DRY_RUN: simulates the payment and doesn't create a transaction. Returns 200 with status SIMULATED.
post/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments

Request

  • Base URL
    https://api.voucherify.io
  • URL
    https://api.voucherify.io/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments
  • Auth
    • API key in header X-App-Id and API key in header X-App-Token
    • or HTTP bearer

Request body

card_idstring required

Unique identifier of the member's loyalty card to spend points from (format lcrd_...).

mode'TRANSACTION' | 'DRY_RUN' nullable

Payment mode. TRANSACTION creates a PENDING order transaction processed asynchronously (HTTP 202). DRY_RUN only simulates the payment and returns the calculation result (HTTP 200); no transaction is created. Defaults to TRANSACTION when omitted or null.

Response

Dry run result (mode DRY_RUN). No transaction was created; the returned transaction has status SIMULATED and no id.

status'DRY_RUN' required

Result status. DRY_RUN for dry-run mode.

messagestring required

Human-readable result message. DRY_RUN mode: "Dry run mode. No transaction was created. This is only a simulation.".

Changes

    • breaking

      the //////// response's property type changed from object to no type for status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • warning

      removed the optional property ///////// from the response with the status

    • info

      added subschema #2 to the //////// response property allOf list for the response status

    • breaking

      the //////// response's property type changed from no type to object for status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      added the optional property ///////// to the response with the status

    • info

      removed subschema #2 from the //////// response property allOf list for the response status