Life hack: working with prepaid orders
Published 08.05.2022 09:40 in Cases
All AlterCPA Moe delivery services have the ability to work with prepayment. In this case, the amount of the order in the reports remains the same, the declared value does not disappear anywhere, but the cash on delivery payment for delivery is zero.
To implement this mechanism, add two custom fields to your offer:
prepay
- prepayment option for the order. The value 0 corresponds to a postpaid order, 1 - a fully prepaid order, 2 - an order with a partial prepayment.prepaid
- prepayment amount in order currency, optional field.
Inside the offer, these fields will look like this:
prepay Order prepayment [select] [options:0=No prepayment|1=Full prepayment|2=Partial prepayment] prepaid Prepayment amount [type:number] [min:0] [step:0.01]
When working with your delivery services, you can get data from these fields in the meta array:
- - for
meta[prepay]=0
we useprice
- - for
meta[prepay]=1
we use0
- - for
meta[prepay]=2
we useprice - meta[prepaid]