For more control over how your payments are routed or presented to customers, you can build your own Flexa Payments integration using the Flexa API.

Before you embark on building your integration, take some time to understand the core concepts and resources that underpin Flexa Payments.

Learn about using commerce intents

Flexa Payments uses the concept of a commerce intent to represent any attempt to collect a digital currency payment from a customer. As a core resource of the Flexa API, commerce intents can be created and retrieved individually, but are often created indirectly through another resource (such as a link or flexcode).

Commerce intents are designed to be very flexible in order to support the widest variety of payment interactions and other experiences. At a minimum, every commerce intent includes the following data elements:

  • Debit and credit objects, which track amounts requested to be paid (“debits”) against any amounts actually paid or credited (“credits”);
  • A brand or MID (for distributed deployments), which determines how a payment will be presented to a customer and how we will account for the resulting payout; and
  • A status, which indicates whether a commerce intent has been fulfilled according to its desired outcome (such as the completion of a payment or verification of an offer).

To collect payment from a customer using a commerce intent, provide either your brand or mid identifier and then pass the total amount as a debit object, like so:

{
  "asset": "assets/iso4217/usd",
  "brand": "brands/h30i5d4aP590c4",
  "debits": [
    {
      "kind": "total_due",
      "amount": "43.90"
    }
  ]
}

A commerce intent that includes a total debit object will be considered completed after the customer populates their payment preferences (usually through a Flexa-hosted commerce page or Flexa-enabled app) and fulfills any pending digital currency payment_requests.

For more information on the parameters available for customizing commerce intents, see the commerce intent object documentation.

Get access to prepare your API-only integration

API-only integrations require a substantial amount of development effort, even from the most experienced payments enablement teams. Because an API-only integration requires you to create your digital currency payments acceptance UI from scratch, you will likely need to account for an extensive set of payment methods and edge cases, and even moreso if you expect to accept any more than a few digital currencies.

If you would like to have your API keys enabled for an API-only integration, contact our Partnerships team for access and further guidance.