Differences

This shows you the differences between two versions of the page.

Link to this comparison view

gateways:square_platform [2020/12/01 01:45] – created foxybrettgateways:square_platform [2020/12/23 19:24] (current) – [Setting Up Square Platform for Foxy] foxybrett
Line 36: Line 36:
 If you want to enable a live one, just populate the same fields that don't have the ''test_'' prefix. Note that the ''additional_fields'' is JSON stringified, and the ''square_platform_split_payment_logic'' is escaped a second time. (Yes, we know that's a bit awkward. It will be tidied up in a future API release.) If you want to enable a live one, just populate the same fields that don't have the ''test_'' prefix. Note that the ''additional_fields'' is JSON stringified, and the ''square_platform_split_payment_logic'' is escaped a second time. (Yes, we know that's a bit awkward. It will be tidied up in a future API release.)
  
-The ''square_platform_split_payment_logic'' set on the ''hosted_payment_gateways'', made into a project JSON object, looks like this:+The ''square_platform_split_payment_logic'' set on the ''hosted_payment_gateways'', made into a proper JSON object, looks like this:
 <code javascript> <code javascript>
 "test_square_platform_split_payment_logic": { "test_square_platform_split_payment_logic": {
Line 53: Line 53:
 This allows you to specify default payment splitting logic for the item subtotal, tax, and shipping. For instance, the above example would split 70% of the item subtotal to your platform, 0% of the tax (ie. the merchant assumes all tax liability), and 100% of the shipping to you (which would be appropriate if you're functioning as the fulfillment provider). This allows you to specify default payment splitting logic for the item subtotal, tax, and shipping. For instance, the above example would split 70% of the item subtotal to your platform, 0% of the tax (ie. the merchant assumes all tax liability), and 100% of the shipping to you (which would be appropriate if you're functioning as the fulfillment provider).
  
-You can also //override// this logic using the [[/v/2.0/pre_payment_webhook|pre-payment webhook]], which allows you to do custom logic per transaction. This could be useful if you want to take into account your own wholesale prices, or do custom fees based on products, or handle discounts and coupons more specifically. To override, you'd return a ''payment_logic'' node (instead of the ''square_platform_split_payment_logic'').+You can also //override// this logic using the [[/v/2.0/pre_payment_webhook|pre-payment webhook]], which allows you to do custom logic per transaction. This could be useful if you want to take into account your own wholesale prices, or do custom fees based on products, or handle discounts and coupons more specifically. To override, you'd return a ''payment_logic'' node (instead of the ''square_platform_split_payment_logic''). Note that you //would not// stringify the JSON in the webhook response. (We realize this is inconsistent and we hate it too. It'll be tidied in a future API release to avoid stringifying JSON.)
  
 ==== Square's Fees ==== ==== Square's Fees ====

Site Tools