What you get from this chapter
After reading this chapter, you can:- Choose pre-tax pricing, both prices, or tax-inclusive pricing based on how you price your products and whether you need to declare a tax amount you calculated yourself.
- Know which tax items Waffo must configure, and which business rules you need to confirm before integrating.
- Build payment and refund requests correctly, and handle amount changes, empty values, and errors in inquiry and Webhooks.
ONE_TIME_PAYMENT) support pre-tax pricing, both prices, and tax-inclusive pricing.
The payment request examples below use POST /api/v1/order/create, and the result is read through POST /api/v1/order/inquiry.
Subscription supports only pre-tax pricing; both prices and tax-inclusive pricing are not supported. For request fields, see Subscription create API.
Choose how to pass the amounts
First decide whether your product prices already include tax, then decide whether you need to declare the tax amount you calculated to Waffo. The three approaches are determined by the combination of amount fields in the request.
When you calculate the tax yourself, confirm the validation policy for your tax calculation.
After you pass a tax-inclusive price, discounts, currency conversion, and fees can still affect the amount the customer finally pays. For field combinations and examples, see “Integration details” below.
Tax items configured by Waffo
The following tax items are configured by Waffo. Tell Waffo the transaction behavior you need, and confirm the Sandbox and Production configurations separately.Differences between the tax service options
Calculation Only: Waffo calculates the tax amount and collects it from the customer at payment time, then remits the collected tax to you through Settlement; you are responsible for remitting it to the tax authority. After tax extraction completes, each tax amount can be read fromorderTaxAmountin the Order inquiry API and the corresponding Webhook.Full Tax Service: Waffo handles the tax amount calculation, the tax collection, and the remittance; before integrating, confirm the applicable scope and the division of responsibilities with Waffo.
Validation policy for your tax calculation
This configuration applies only to both prices. Pre-tax pricing and tax-inclusive pricing do not use this declared tax amount validation.- Strict
- Loose
Compare the tax amount you declared with the Waffo calculated value. On a mismatch, Waffo can be configured either to reject the transaction or to overwrite it with the Waffo calculated value.
Integration details
Before you integrate
Tax configuration is managed by Waffo. Before integrating, provide the Merchant ID, the Sandbox or Production environment, the country of sale, and the product category, and confirm that the environment already has the required tax agreement and payment methods. The tax-inclusive price on this page is a price in the order currency. It does not mean that the Merchant bears the tax, and it is not guaranteed to equal the amount the customer actually pays after currency conversion, fees, and discounts.Passing parameters when creating an order
All amounts use strings, and the currency isorderCurrency. Provide at least one amount basis; the tax-inclusive price must be greater than zero and meet the currency precision requirements. Country codes use ISO 3166-1 alpha-3, for example PHL. See Amounts and currencies.
For pre-tax pricing, omit the entire
taxInfo object. Passing an empty object {} also returns A0003 because the field combination is invalid. Omitting taxInfo does not mean requesting a tax exemption.
The following JSON only shows the tax-related fragment of the order creation request. You still need to fill in the common parameters such as Merchant, payment method, customer, request identifiers, time, and signature.
To compare the three approaches, assume the order and payment currency are both USD, the applicable tax rate is 10%, and there are no discounts or extra fees. The tax rate and amounts below are used only to explain the calculation; they do not represent the actual tax rate of PHL or your tax agreement; the result when passing both prices depends on the declared-value validation policy in your actual configuration.
- Pre-tax pricing
- Both prices
- Tax-inclusive pricing
10.00 and the customer pays 110.00. If there is no matching taxable configuration, you cannot conclude from this example alone that 10.00 will always be added.Read the payment result
The creation response returns order identifiers, status, and next actions, without the tax amount fields in this section. After creating the order, usePOST /api/v1/order/inquiry to read these fields. Order inquiry and PAYMENT_NOTIFICATION return the tax fields in the table below. Inquiry fields are in the response’s data object; for the outer Webhook structure, see Webhook event types.
A pre-tax pricing response can have
orderTaxAmount while having no taxInfo. Therefore, the presence of taxInfo cannot be used to determine whether tax is charged.
An intermediate state of tax-inclusive pricing can also show orderAmount = "110.00", an empty orderTaxAmount, and taxInfo.orderAmountInclTax = "110.00" at the same time. In this case, do not subtract or add tax again. Keep your original request value, and reconcile the result against the status and amounts in the final inquiry or Webhook.
For the complete fields and response examples, see Order inquiry API.
orderTaxAmount is already included in the tax-inclusive total expression; do not add it to finalDealAmount again. When payment is not complete, do not treat the currently calculated amount as an amount already charged. For Webhook signature verification and status handling, see Webhook overview.
How to pass refund amounts
The refund amount also uses the order currency.refundAmount means the pre-tax refund amount; whether you can pass taxInfo.refundAmountInclTax is determined by how the original payment order was submitted.
The following is a partial request for
POST /api/v1/order/refund; you still need to fill in the common parameters such as the original order number, the refund request identifier, and the reason.
- Pre-tax amount only
- Both amounts
- Tax-inclusive amount only
Applies to all three original payment order types. Pass only
refundAmount, and Waffo calculates the corresponding tax refund.POST /api/v1/refund/inquiry and REFUND_NOTIFICATION, read mainly:
While a refund is in progress or has failed, the returned calculated amount does not mean the customer has received the refund; reconcile the arrival against the final successful status.
When retrying the same
paymentRequestId or refundRequestId, keep the original amount, tax-inclusive amount, and submission approach unchanged. Inquire about an unknown result first, then decide the next step; see Idempotency.
Common errors
Integration checklist
- Confirm the tax agreement, product information, and billing detail requirements with Waffo in the target environment.
- Build requests using one pricing approach, and verify the results for no tax, taxable, missing postcode, and each enabled policy when the declaration does not match.
- Save the original request values, the order currency amounts, and the customer payment currency amounts separately.
- Verify how the fields of tax-inclusive pricing change between the creation intermediate state and after payment completes.
- Verify full and partial refunds by original payment order type, and check the inquiry and Webhook.