amount.value and isn’t added on top of it. The one exception is a YUNO_PROMOTION discount: you send the original amount and Yuno charges amount.value minus that discount (see Discounts).
Fee amount
A dedicated field (additional_data.order.fee_amount) allows you to specify the fee amount for your services that is included in the transaction.
In the following example you can see a request that clarifies that a 180 JPY fee amount is part of a 5000 JPY final transaction. This field is for informational purposes, the fee_amount is already included in the final transaction amount and is not added separately.
Shipping amount
A dedicated field (additional_data.order.shipping_amount) allows you to specify the shipping amount that is included in the transaction.
In the following example you can see a request that clarifies that a 270 JPY shipping amount is part of a 5000 JPY final transaction. This field is for informational purposes, the shipping_amount is already included in the final transaction amount and is not added separately.
Tips
A dedicated field (additional_data.order.tip_amount) allows you to specify the tips amount that is included in the transaction.
In the following example you can see a request that clarifies that a 50 JPY tip amount is part of a 5000 JPY final transaction. This field is for informational purposes, the tip_amount is already included in the final transaction amount and is not added separately.
Taxes
A dedicated array of objects (additional_data.order.taxes) allows you to specify the taxes amounts for your services that are included in the transaction.
In the following example, you can see a request that clarifies what taxes are part of a 1000.00 USD final transaction. This field is for informational purposes; the
taxes struct is already included in the final transaction amount and has not been added separately.
Discounts
A dedicated array of objects (additional_data.order.discounts) allows you to specify the discounts that are included in the transaction.
Each line has a type. MERCHANT (the default) is a discount you computed: id, name and unit_amount are required, and id and name have 3 to 255 characters. YUNO_PROMOTION is a promotion Yuno computes. The line carries either the quote_id of a promotion quote or a code, never both, and it rejects id, name and unit_amount. A YUNO_PROMOTION line with neither a quote_id nor a code returns 400. A MERCHANT line rejects quote_id, and any mix returns 400 INVALID_PARAMETERS. A code on a MERCHANT line is ignored without an error, and no promotion is applied. A line with no type is read as YUNO_PROMOTION when it carries a quote_id, or a code and no id or name; any other line with no type is a MERCHANT line. Write the type exactly as shown, in capitals: any other spelling returns 400. One YUNO_PROMOTION line per payment, whether it carries a quote or a code, and at most 10 discount lines in all. The YUNO_PROMOTION line, with a quote_id or a code, is accepted on Create Payment only: multi-method payments, payment links, checkout sessions and capture reject it with 400, and a payment that carries a subscription or an external_subscription rejects it with 422 PROMOTION_SUBSCRIPTION_UNSUPPORTED.
To redeem a promotion code, send it on the line instead of a quote_id: { "code": "SUMMER10" }. The code has 3 to 32 characters: letters, digits, - and _. Yuno trims the spaces around it. The line returns 400 INVALID_PARAMETERS, and no payment is created, when the code is blank or has another shape, when the line also has a quote_id, when the line also has a unit_amount, when a line with type: YUNO_PROMOTION also has an id or name, and when the payment has a second YUNO_PROMOTION line. A payment sent with X-Dry-Run: true that carries a code on a YUNO_PROMOTION line is also refused with 400 INVALID_PARAMETERS: a dry run takes no promotion code, so test codes in the sandbox. Create Payment lists the message of each rule, and Promotion codes describes the whole flow.
On the response and on every payment.* webhook Yuno fills the YUNO_PROMOTION line (quote_id, id = the promotion id, unit_amount in the payment currency and, when Yuno has it, name) and adds a discount_amount, the sum of those lines. Your MERCHANT lines keep their id, name and unit_amount; when the payment carries a Yuno promotion, the Create Payment answer, Retrieve Payment and the webhooks list the Yuno line first and mark yours with type: MERCHANT. amount is never rewritten; the net amount charged is on the transaction (transactions.amount). A payment sent with a code is answered the same way: Yuno swaps the code for a quote before it creates the payment, so the Create Payment answer holds the filled YUNO_PROMOTION line, with the quote_id of that quote, and never the code.
In the following example you can see a request that clarifies that a 5 USD discount amount is part of a 50 USD final transaction. Merchant-computed discounts are informational: the amount is already included in amount and is not added again.
Example
Customer validations
A dedicated object (customer_payer.merchant_customer_validations) allows you to specify certain customer validations rules for fraud prevention inquiries.
In the following example you can see a request that clarifies that customer has been previously verified outside Yuno.