# Low Code JS Source: https://docs.fractalpay.com/EmbeddedPayments Fractal JS in depth Welcome to the Widgets API documentation. This API allows you to integrate and interact with various payment widgets seamlessly. You can embed buttons for payments, request payments, and display transaction tables. ### Widget Usage ### Pay Link **Pay Button** HTML implementation ```html theme={null} Pay ``` React/Vue js implementation ```java theme={null} import { GetPaymentPage } from 'fractalpay'; ``` **Description**: This widget generates a button that, when clicked, opens a payment page for the amount `8.00`. **Parameters**: * `amount` (number): The amount of the widget to open the payment page for. **Example**: ```html theme={null} Pay ``` ```html theme={null} ``` ### Request Link **Request Payment Button** HTML implementation ```html theme={null} Request payment ``` React/Vue js implementation ```java theme={null} import { RequestPaymentonClick } from 'fractalpay'; ``` **Description**: This widget generates a button that, when clicked, sends a payment request to the specified phone number for the amount of `8.00`. **Parameters**: * `amount` (number): The value of the widget to send the payment request for. * `recipient_phone` (string): The phone number of the recipient. **Example**: ```html theme={null} Request payment ``` React/Vue js ```html theme={null} ``` ### Transactions Table **Transactions Table** HTML implementation ```html theme={null}
``` React/Vue js implementation ```java theme={null} import { CompletedTransactions } from 'fractalpay'; ``` **Description**: This widget generates a table to display complete transactions. **Parameters**: * `id` (string): The ID of the table element. In this case, it is `fractal_complete_transactions`. **Example**: ```html theme={null}
``` React/Vue.js ```html theme={null} ``` ### Installing JS & NPM Package To use these widgets, include the following script tag in your HTML: ```html theme={null} ``` Replace `{{merchant_public_key}}` with your actual merchant public key. To use these widgets in a react/Vue.js app, install the following npm package: ```java theme={null} npm i fractal-pay-now ``` To use the components in a react/Vue.js app, use the below line to import the proper npm function: ```java theme={null} import { --flag-- } from 'fractalpay'; ``` ### Error Handling and FAQs ### Error Handling **Error Codes:** * **400 Bad Request**: The request was invalid or cannot be otherwise served. * **401 Unauthorized**: Authentication is required and has failed or has not yet been provided. * **404 Not Found**: The requested resource could not be found. * **500 Internal Server Error**: An error occurred on the server. ### FAQs and Troubleshooting * **Q: What should I do if I receive a 401 Unauthorized error?** **A:** Ensure that your API key is correct and included in the request header. * **Q: How do I update the settings of a widget?** **A:** Use the PUT /widgets/ endpoint with the new settings in the request body. # Webhooks Source: https://docs.fractalpay.com/Webhooks # Webhook Events This page documents the various webhook events that can be triggered by the Payrix platform. Webhooks are used to notify your application when specific events occur. ## Table of Contents 1. [Payment Success](#payment-success) 2. [Merchant Onboarding](#merchant-onboarding) 3. [Merchant Approval](#merchant-approval) 4. [Documents Signed](#documents-signed) ## Payment Success ### Event: `payment.success` #### Description This event is triggered when a payment is successfully processed. #### Payload Example ```json theme={null} { "event_type": "payment.success", "data": { "transaction_id": "txn_a7f0b5340a", "merchant_id": "example-merchant-guid", "amount": 1.00, "net_amount": 0.95, "fee_amount": 0.05, "order_id": "example-order-id", "last_four": "0043", "brand": "VISA", "link_id": "" } } ``` #### Explanation * `transaction_id`: Unique identifier for the transaction. * `merchant_id`: Unique identifier for the merchant. * `amount`: Total amount of the payment. * `net_amount`: Amount received after fees. * `fee_amount`: Fee amount charged for the transaction. * `order_id`: Identifier for the associated order. * `last_four`: Last four digits of the card used. * `brand`: Card brand (e.g. VISA, Mastercard). * `link_id`: Associated pay link ID, if applicable. ## Merchant Onboarding ### Event: `merchant.onboarding` #### Description This event is triggered when a merchant completes the onboarding process. #### Payload Example ```json theme={null} { "event_type": "merchant.onboarding", "data": { "merchant_key": "example-guid", "merchant_id": "example-merchant-id", "business_name": "Example Business", "email": "merchant@example.com", "public_key": "example-public-key" } } ``` #### Explanation * `merchant_key`: Unique key assigned to the merchant. * `merchant_id`: Unique identifier for the merchant. * `business_name`: Name of the merchant's business. * `email`: Merchant's contact email. * `public_key`: Public key associated with the merchant. ## Merchant Approval ### Event: `merchant.approval` #### Description This event is triggered when a merchant's application is approved. #### Payload Example ```json theme={null} { "event_type": "merchant.approval", "data": { "merchant_id": "example-merchant-guid", "business_name": "Example Business", "email": "merchant@example.com", "company_id": "example-company-id" } } ``` #### Explanation * `merchant_id`: Unique identifier for the merchant. * `business_name`: Name of the merchant's business. * `email`: Merchant's contact email. * `company_id`: Unique identifier for the associated company. ## Documents Signed ### Event: `documents.signed` #### Description This event is triggered when a merchant completes signing the required documents. #### Payload Example ```json theme={null} { "event_type": "documents.signed", "data": { "merchant_id": "example-merchant-guid", "business_name": "Example Business", "website": "https://example.com", "email": "merchant@example.com", "company_id": "example-company-id" } } ``` #### Explanation * `merchant_id`: Unique identifier for the merchant. * `business_name`: Name of the merchant's business. * `website`: Merchant's website URL. * `email`: Merchant's contact email. * `company_id`: Unique identifier for the associated company. # Charge Customer Source: https://docs.fractalpay.com/api-reference/customers/charge-customer post /customers/charge/{customerId} Charge Customer # Create Customer Source: https://docs.fractalpay.com/api-reference/customers/create-customer post /customers/add Create Customer # Get Customer Source: https://docs.fractalpay.com/api-reference/customers/get-customer get /customers/{customerId} Get Customer # Get Customers Source: https://docs.fractalpay.com/api-reference/customers/get-customers get /customers Get Customers # Request Card Source: https://docs.fractalpay.com/api-reference/customers/request-card post /customers/request-card/{customerId} Request Card # Full Merchant Submit Source: https://docs.fractalpay.com/api-reference/merchant-onboarding/full-merchant-submit post /onboarding Full Merchant Submit # Get Merchants by Client Source: https://docs.fractalpay.com/api-reference/merchant-onboarding/get-merchants-by-client get /merchant Get Merchants by Client # Create Link Source: https://docs.fractalpay.com/api-reference/payment-collection-methods/create-payment-link post /pay-link Create Link # Payment Request Source: https://docs.fractalpay.com/api-reference/payment-collection-methods/payment-request post /requests Payment Request # Payment Request Customer Source: https://docs.fractalpay.com/api-reference/payment-collection-methods/payment-request-customer post /requests/{customerId} Payment Request Customer # Payment Link Source: https://docs.fractalpay.com/api-reference/payment-collection-methods/qr-payment-link post /order/api-qr_code_link Payment Link # Capture Pre-Authorization Source: https://docs.fractalpay.com/api-reference/preauthorizations/capture-pre-authorization post /preauth/capture Capture Pre-Authorization # Increment Pre-Authorization Source: https://docs.fractalpay.com/api-reference/preauthorizations/increment-pre-authorization post /preauth/update Increment Pre-Authorization # Pre-Authorization with Token Source: https://docs.fractalpay.com/api-reference/preauthorizations/pre-authorization-with-token post /preauth Pre-Authorization with Token # Get Transaction Source: https://docs.fractalpay.com/api-reference/transactions/get-transaction get /merchant/transactions/{transaction_id} Get Transaction # Get Transactions Source: https://docs.fractalpay.com/api-reference/transactions/get-transactions get /merchant/transactions Get Transactions # Return Sale Source: https://docs.fractalpay.com/api-reference/transactions/return-sale post /order/sales-return Return Sale # Void Sale Source: https://docs.fractalpay.com/api-reference/transactions/void-sale post /order/sales-void Void Sale # GooglePay™ Web Integration Source: https://docs.fractalpay.com/googlepay ### Add Google Pay to your application (Web) Reach out to your Fractal point of contact to obtain a `FRACTAL_GATEWAY_MERCHANT_ID` Follow the [Google Pay Web developer documentation](https://developers.google.com/pay/api/web) to integrate Google Pay into your website. ### Tokenization Specification Use the following values in the the TokenizationSpecification: ```json theme={null} { "gateway": "fractal" "gatewayMerchantId": FRACTAL_GATEWAY_MERCHANT_ID } ``` ### Supported Authentication Methods * PAN\_ONLY * CRYPTOGRAM\_3DS ### Supported Card Networks * Amex * MasterCard * Discover * Visa ## Obtain a Production Merchant ID from Google Ensure that you follow the [Google Pay Web brand guidelines](https://developers.google.com/pay/api/web/guides/brand-guidelines) and complete all items on the [Google Pay Web integration checklist](https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist). Follow [these instructions](https://developers.google.com/pay/api/web/guides/test-and-deploy/publish-your-integration) to publish Google Pay integeration and receive a merchant ID that can be used in the production environment. ## Send the Google Pay token in the Preauth API The Google Pay API response is a [PaymentData](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) object. The field containing the encrypted payment information is `paymentMethodData.tokenizationData.token` This token should be sent in the [/preauth](/api-reference/preauthorizations/pre-authorization-with-token) request ```json theme={null} { "Token": { "type": "google_pay", "data": GOOGLE_PAY_TOKEN }, ... } ``` # Implementation Guide Source: https://docs.fractalpay.com/implementationguide Integrations simplified # Implementation Guide Information for partners who will integrate Fractal's features into their apps. This guide provides partners with all the information to set up, test, and launch Fractal integration as part of their application. This process includes four main phases: 1. [Creating an SOW](#pre-implementation) - Work with Fractal to create a Scope of Work describing your integration and identifying requirements across the Fractal Platform. 2. [Sandbox Setup](#sandbox-setup) - In the Fractal Sandbox environment, you will define the settings and workflows utilized in the platform features of Fractal for your integration. * Merchant Boarding * Payment Acceptance * Fees and Billing * Funding 3. [Testing and Migration](#testing-and-migration) - Once your sandbox application is set up, Fractal will help to test and migrate your implementation to the Fractal Production environment. 4. [Merchant Support Features](#merchant-support-features) - Enabling Fractal Merchant Support features gives your merchants the ability to manage disputes and run reports. The diagram below illustrates how the Payments Integration and Support features work together to provide the benefits of the Fractal platform: ![Fractal Payment Workflow](https://uploads-ssl.webflow.com/663a214d683281c78ab2ac7c/666c5c4c3eb4d5128f01b838_TinyPNG%20illustration.png) *** # Scope Of Work Creation This resource outlines the Scope of Work requirements pre-Implementation. All integrating Partners and software platforms work with the Fractal Solution Engineers and Sales Team to create a Scope of Work that describes what your integration will look like and the associated requirements across the Fractal Platform. During Pre-Implementation, you will work with a Fractal Solution Engineer to fill in the Integration form. This page includes details about all of the information that you we will add to the form. ## Table of Contents * 1. [Overview](#overview) * 2. [Merchant Onboarding Details](#merchant-onboarding-details) * 3. [Payment Workflow](#payment-workflow) * 4. [Risk and Compliance](#risk-and-compliance) * 5. [Funding/Disbursement](#funding-disbursement-integration) * 6. [Partner Launch Timeline](#partner-pf-launch-timeline) ## Overview Building a Scope of Work with our Prospect Platforms involves a discussion about Features and Risk Considerations and collects data on how our Clients hope to leverage the Fractal Platform across the 4 Merchant Support features related to Payment Facilitation: * Merchant Boarding * Payment Acceptance * Fees, Billing, and Funding - tbd * Merchant Support - tbd ## Merchant Onboarding Details ### Boarding Integration Select your Merchant Boarding Integration. See the onboarding Integration Options table for an explanation of each option. | Boarding Integration Options | Note | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Portal - TBD | Clients will be boarded via the Fractal portal. | | [Signup Form](https://staging-hosted.fractalpay.com/merchant-onboarding/02b3232aed11c23c7a8cbc164c48b51cbc09d7640ef84774467fb06d23e580eb6c4cfbc48c8715dab5e3d2be1310a201047caa60d3a72f61270cd374eb6ff2fa4f3c39433c08d3bbe94a44f78f83b4f09629b1751aeee1ba6ade0b7229a1d321aa3688798aa52c51b9953a1dba4cca5d614af674d5cf792679b4c464ca6fbc7c123495de989326e0d11856b952cf86) | Merchants will be boarded via an online signup form. | | [Full API Boarding](/api-reference/merchant-onboarding/full-merchant-submit) | The Full Boarding API is a managed service allowing you complete flexibility in the creation of new merchant locations. | | Bulk | Fractal will work with you to meet the necessary technical and underwriting requirements for bulk onboarding, simplifying the process of migrating your existing Merchants to Fractal from another platform. | | [Onboarding Webhooks](https://docs.fractalpay.com/Webhooks#merchant-onboarding) | The onboarding webhooks provide you complete awareness around the merchant onboarding process. | ## Payment Workflow | Question | Note | Payment Methods | | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Please describe your ideal payment workflow: | **Example:** - Customer visits your website, selects products, clicks "pay now". - The customer enters payment information to pay for the product. - Payment is approved, and the customer is given the option to save card details for future payments. - The product is dispatched. | - Tokenization & Recurring Payments - Direct Portal Payments & Quick Charge - Bridge Payments Custom Portal - Direct API Payments - Card Present Payments - eCommerce & Online Payments | | Payment Integration Options | Note | | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | [Widgets](https://ui.fractalpay.com/PayWidget) | A suite of link and payment widgets that can be seamlessly embedded into your application. | | [Links](https://docs.fractalpay.com/api-reference/endpoint/Create%20iFrame) | An iframe solution where the payment capture process will occur either within the iFrame or on a hosted page. | | [Fractal JS](https://docs.fractalpay.com/EmbeddedPayments#faqs-and-troubleshooting) | An embeddable JavaScript tokenizer that encrypts card data, ensuring PCI compliance for your application. | | [Wallet](/api-reference/customers/request-card) | Provides merchants with a collection of card-on-file and billing-on-file solutions via API. | | [Charges Webhooks](https://docs.fractalpay.com/Webhooks#payment-success) | A feature that allows the platform to receive real-time notifications when charges are captured on our hosted solutions. | ## Risk and Compliance ### Disputes and Chargebacks | Question | Note | | ---------------------------------------------- | ---------------------------------------------- | | Portal Only | Disputes are managed via the portal | | API Integration chargeback documents/responses | Disputes are managed by Partner/Client via API | ## Funding | Question | Note | | ---------------- | ------------------------------------ | | Fractal Only | Funding is managed via Fractal only. | | Next-Day Funding | Funding is available the next day. | ## Partner Launch Timeline ### Projected Timeline | Question | Description | | ------------------------------------------- | ------------------------------------------- | | Implementation Kick-Off Call: | Date of the first implementation call | | Anticipated Integration Target Start Date: | When do you expect to start the integration | | Anticipated Integration Target Finish Date: | Expected date to finalize integration | | Target Beta Onboarded: | Estimated Target Beta Onboarded Date | | Target Full Launch: | Target full launch date | # Introduction Source: https://docs.fractalpay.com/introduction Welcome to the Fractal documentation Hero Light Hero Dark ## Welcome Welcome to the documentation for our suite of Gateway APIs. This set of tools is designed to empower developers and SaaS platforms by providing a seamless and efficient interface to manage all things payments. From the onboarding of companies to the streamlined handling of payments, this suite of APIs is purpose-built to be robust, secure, and easy to integrate.