native_integration
Collection: native_integrations
A native integration represents a third party system natively integrated with Foxy which requires configuration settings and credentials.
Currently supported native integrations include Avalara, TaxJar, ONESOURCE, Webhook, Custom Tax, FedEx, and Apple Pay.
Notes
The config property is a JSON string whose structure depends on the provider value:
Avalara config properties:
service_url: Your Avalara Service URL. Usehttps://development.avalara.netfor test mode orhttps://avatax.avalara.netfor production.id: Your Avalara Account Number.key: Your Avalara License Key.company_code: The Company Code configured in your Avalara Account.use_ava_tax: (Boolean) true or false to use Avalara for live tax rates.enable_colorado_delivery_fee: (Boolean) true or false to enable the Colorado Delivery Fee.create_invoice: (Boolean) true or false. Commit details to Avalara as a Committed Sales Invoice after each transaction.use_address_validation: (Boolean) true or false. Validate customer addresses prior to completing the transaction.address_validation_countries: An array of country codes. Currently supports US and CA only.category_to_product_tax_code_mappings: An object mapping Foxy category codes to AvaTax tax codes.
TaxJar config properties:
api_token: Your SmartCalcs API Token from TaxJar.category_to_product_tax_code_mappings: (JSON) Mapping of Foxy category codes to TaxJar product tax codes.create_invoice: (Boolean) true or false. Commit transaction details to TaxJar.
ONESOURCE config properties:
service_url: The ONESOURCE service URL.external_company_id: Required external company ID.calling_system_number: Unique identifier for your ERP system.from_city: City matching your configured postal code and country.host_system: Unique name for your ERP system.company_role: Role in transaction: Buyer (B), Middleman (M), or Seller (S).part_number_product_option: Custom product option name for part number (e.g.,sku,isbn, orcode).product_order_priority: Comma-separated list of FoxyCart category codes for product listing order.audit_settings: Values includecapture_only,auth_and_capture, andnever.
Webhook config properties:
service: Can bejson,legacy_xml,webflow, orzapier.- For
jsonservice:title,encryption_key,url,events(array),version(integer). - For
legacy_xmlservice:title,url,events(array),version(integer). - For
webflowservice:site_id,site_name,collection_id,collection_name,sku_field_id,sku_field_name,inventory_field_id,inventory_field_name,auth,events(array),version(integer). zapierservice types are read only and must be created from zapier.com.
Custom Tax config properties:
url: The Custom Tax service URL for adding taxes to checkout.
FedEx setup:
FedEx uses a multi-step setup process rather than a single config payload. Create the integration by POSTing {"provider": "fedex"} (no config needed), then complete each step with a PATCH request that includes a step query parameter. At each step the response includes link relations (see the conditional link relationships below) indicating which action is available next.
- Step 1 — Accept EULA (
?step=eula) — required when status ispending_eula. Sendeula_agreed(Boolean, must betrue) andeula_version(String, must match the version shown in thefx:eula_agreementlink). - Step 2 — Validate Address (
?step=address) — required when status ispending_address. Sendaccount_number,account_name,street,city,postal_code, andcountry_code(all required), plus optionalstreet2,state, andis_residential(Boolean, defaults tofalse). On success, status becomespending_mfa(MFA required) orcomplete. - Step 3a — Generate MFA PIN (
?step=mfa_generate) — available when status ispending_mfa. Sendmfa_option(sms,email, orphone) to request a one-time PIN. - Step 3b — Verify MFA PIN (
?step=mfa_verify) — required when status ispending_mfa_pin. Sendmfa_pin(the received PIN). - Step 3c — Verify via Invoice (
?step=mfa_invoice) — alternative to the PIN flow when status ispending_mfa. Sendinvoice_number,invoice_date(YYYY-MM-DD),invoice_amount, andinvoice_currency. - Reset (
?step=reset) — available once a status is set. Clears all OAuth credentials and restarts setup frompending_eula.
Once setup is complete, config contains a JSON object with status: "complete" plus the OAuth credentials Foxy uses to request live shipping rates on your behalf.
Apple Pay:
Apple Pay is created by POSTing {"provider": "apple_pay"} with no config payload; the Apple Pay merchant registration is managed by Foxy. Deleting the integration unregisters the merchant and disables Apple Pay for the store.
Scopes are provider-dependent: the required scope depends on the integration's provider. Tax providers (Avalara, TaxJar, ONESOURCE, Custom Tax) require the taxes scope, webhook providers (Webhook, Webflow, Zapier) require the webhooks scope, shipping providers (FedEx) require the shipping_integrations scope, and payment providers (Apple Pay) require the payment_settings scope. See the Scopes guide for details.
Required Scopes How scopes work →
Actions
Properties (4)
provider String · Required The identifier string of this provider.
avalarataxjaronesourcewebhookcustom_taxfedexapple_pay config String · Required · max 2000 A JSON string containing the configuration values and credentials for this native integration. Not required for the FedEx and Apple Pay providers, which are configured through their own setup flows.
date_created String (nullable) · Read-only The date this resource was created.
date_modified String (nullable) · Read-only The date this resource was last modified.
Link Relations (9)
self This Native Integration Only present when the native integration is associated with a tax service provider (e.g., Avalara).
fx:eula_agreement PATCH Accept the FedEx EULA to continue setup. FedEx only. Present when the setup status is pending_eula.
fx:validate_address PATCH Validate the FedEx account address. FedEx only. Present when the setup status is pending_address.
fx:generate_mfa PATCH Request a FedEx MFA PIN via SMS, email, or phone. FedEx only. Present when the setup status is pending_mfa.
fx:validate_invoice PATCH Verify identity using a recent FedEx invoice instead of a PIN. FedEx only. Present when the setup status is pending_mfa. Alternative to the PIN flow.
fx:validate_mfa PATCH Submit the received FedEx MFA PIN. FedEx only. Present when the setup status is pending_mfa_pin.
fx:reset_connection PATCH Clear FedEx credentials and restart setup from pending_eula. FedEx only. Present whenever a setup status is set.
Example Representation
{
"_links": {
"curies": [
{
"name": "fx",
"href": "https://api.foxycart.com/rels/{rel}",
"templated": true
}
],
"self": {
"href": "https://api.foxycart.com/native_integrations/123",
"title": "This Native Integration"
},
"fx:store": {
"href": "https://api.foxycart.com/stores/456",
"title": "This Store"
}
},
"provider": "avalara",
"config": "{\"service_url\":\"https://development.avalara.net/\",\"id\":\"12345678\",\"key\":\"ASDFJASDFKJASDFKJ\",\"company_code\":\"CompanyCode\",\"use_ava_tax\":true,\"create_invoice\":true,\"use_address_validation\":false,\"address_validation_countries\":[],\"category_to_product_tax_code_mappings\":{\"1005\":\"PS081258\"}}",
"date_created": "2016-03-24T11:02:40-0700",
"date_modified": "2016-03-31T12:15:41-0700"
}