Replacement Orders: Required Payment Method Setup

  • Updated

When is ReplacementPayment used?

When creating a replacement order, the customer should not be charged again. Instead, the replacement order should "inherit" the payment from the original order.

To make this process work without errors in the payment flow, a dedicated payment method must be configured:
ReplacementPayment.

If this payment method is missing, the replacement order will fail with the following error:

Key: CapturePaymentError
Details: The given key 'replacementpayment' was not present in the dictionary.

How to configure ReplacementPayment

  1. Go to the payment methods configuration. Configuration -> orders -> payment types 


     
  2. Add the payment type

  3. Add the following object under with JSON or see the table below.
{
    "name": "ReplacementPayment",
    "paymentMethodName": "ReplacementPayment",
    "providerName": "EmptyPayment",
    "displayName": "ReplacementPayment",
    "isEmptyPayment": true,
    "displayInCart": false,
    "editable": false,
    "enableUpdateAuthorizationAmount": false,
    "enableExtendAuthorizationTime": false,
    "authorizationTimeInDays": 0,
    "hidden": true,
    "validOnMarkets": [],
    "validForStores": [],
    "disableTransactions": false,
    "requiresCredit": false,
    "isZeroOrLessCreditAllowed": false,
    "isZeroOrLessCreditNotSentToProvider": false,
    "readOnly": false,
    "getDetailsFromProvider": false,
    "properties": [],
    "creditPriority": 0,
    "capturePriority": 0,
    "paymentProviderFee": 0
}


 

FieldValue / Setting
Payment settings nameReplacement Payment
Payment method nameReplacementPayment
Provider nameEmptyPayment
Display nameReplacementPayment
Is empty paymentOn
HiddenOn



Important notes

  • providerName is set to EmptyPayment since no actual payment transaction should be made.
  • displayInCart is false so the method will not appear as an option at checkout.
  • hidden is true, meaning the method is only used internally for replacement processes.
  • This payment method should only be used when creating replacement orders.

 

 

Was this article helpful?