Embedded

Update an embedded payment request (amount and/or rewards) before payment initiation

Update an embedded payment request (amount and/or rewards) before payment initiation

patch/api/v1/embedded/payment-requests

Request body

merchant_idstring uuid

Merchant ID. Defaults to the logged-in merchant if not provided. Required for admin tokens.

payment_tokenstring required

Payment token identifying the request to update

amountinteger

Minor-unit amount (e.g. cents)

Example request

{
  "merchant_id": "550e8400-e29b-41d4-a716-446655440000",
  "payment_token": "ptok_abcd1234",
  "amount": 1530,
  "rewards": {
    "extra_rewards": 150,
    "total_rewards": 300,
    "description": "Updated loyalty bonus"
  }
}

Response

Success

successboolean required

Indicates if the request was successful

Example response

{
  "success": true,
  "data": {
    "payment_token": "ptok_abcd1234",
    "amount": 1530,
    "rewards": {
      "extra_rewards": 150,
      "total_rewards": 300,
      "description": "Updated loyalty bonus"
    },
    "expires_in": 750
  }
}

Changes

Changed in 3 of the 8 revisions of this API.214

  • b372e7d5563d113See the full diff
    • the error/code response's property type/format changed from string/ to / for status 400

      response-property-type-changed

    • removed the optional property error/errors from the response with the 400 status

      response-optional-property-removed

    • added the new optional request property merchant_id

      new-optional-request-property

    • added the optional property error/metadata to the response with the 400 status

      response-optional-property-added

    • added subschema #1 subschema #2 to the error/code response property allOf list for the response status 400

      response-property-all-of-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 367 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog