Products

REST Assured With the Pagos Data Ingest API

Author

Mina Deegan

Solutions Engineering Lead

February 16, 2024

February 16, 2024

February 16, 2024

Pagos delivers payments insights and optimization opportunities previously considered unattainable without significant internal data analysis and a lot of work. This is only possible because we’ve built powerful products like Peacock and Canary on a foundation of straight-forward data ingestion. That is to say, Pagos delivers unmatched and immediate value by making it easy for you to connect our platform to your payment processors so we can ingest your historical and ongoing payments data. And when we say our platform is powered by ingested data, we mean it; at this point, we’ve processed over five billion transaction events—150 events per second—with millions of rows of data ingested every day.

Depending on your payment processor, connecting to Pagos can be as simple as three to four basic steps—no coding knowledge required. In no time, you’ll see your data reflected in dashboards of visualizations in Peacock and can start receiving alerts on unexpected changes in your payment metrics through Canary. These no-code data connections are game changing for most businesses looking to quickly get off the ground with Pagos, especially given the material impact the insights Pagos generates can have on your business. No work to get started and opportunities to make a difference right away. What is there not to like?

That being said, some of our customers seek a more robust data ingest option. Maybe you have your own payment switch that routes transactions to multiple  providers and you want to supercharge your payments analytics and monitoring capabilities with Pagos. Maybe you want to enrich your payments data with additional details that you’d rather not share with your payment processors. Or perhaps, you use payment processors for which we don’t have a no-code connection built out yet. If so, the Pagos Data Ingest API may be a perfect option to stream your existing data and efficiently leverage the power of Peacock and Canary.

What is the Data Ingest API?

Pagos Data Ingest is a RESTful API, and an alternative and complementary option to our no-code data connections. Using it, you can stream real-time data into our data platform to visualize in Peacock and monitor with Canary. This allows you ultimate flexibility and control to share and monitor your own data feeds using just a few endpoints covering the key data types for your payments data. The Pagos Data Dictionary covers all data types you will need to map your data to our Pagos responses. With these tools, you can connect and interpret your data into meaningful insights.

A key feature of the Data Ingest API is that we built it to support upsert use cases; using the object_id as a the key, we allow customers to both insert and update the same object as statuses change—or to add data even after the original event, or insert.

It should be noted that we also provide file-based approaches for more batch operations. In this case, the fields and data types are the same, but a customer can simply drop files into a dedicated SFTP folder and we will ingest them upon receipt. 

Empowering Use Cases

The versatility of Pagos Ingest API extends beyond mere data ingestion. Here are just a couples ways it can supercharge your payments analytics:

Payment Data Platform out of the Box

Do you want to empower your payment operations team to spend more time managing operations or building visualization and monitoring rules?  Peacock takes your verification, transaction, decline, refund, chargeback, and cost data, and presents them in digestible dashboards of charts and graphs. Even more, Peacock has robust filtering, meaning you can dig deep into your data to visualize metrics for specific customer segments. With the Data Ingest API, you can send us whatever payments data you want to view in Peacock’s interface and immediately gain deeper insights.

The example below shows how to stream a single transaction to Pagos - one line of code and you can be leveraging our data platform for visualization and monitoring!

curl --request POST \
     --url https://api.sandbox.nest.pagosapi.com/v1/xxxxxxx-xxxx-4958-98e2-978cf6f94955/transactions \
     --header 'content-type: application/json' \
     --header 'Authorization: Bearer xxxxxx' \
     --data '
{
  "transaction_id": "00000b66",
  "amount": 1299,
  "currency": "usd",
  "created": "2023-12-03T09:33:57.000Z",
  "status": "settled",
  "verification": false,
  "stored_credential": "recurring",
  "order": {
    "id": "test72d80a53",
    "description": "test transaction",
    "descriptor": "P* PEACOCK"
  },
  "transaction_response": {
    "processor_response_code": "00"
  },
  "payment_method_details": {
    "payment_method_type": "card",
    "id": "05baac5f",
    "card": {
      "bin": "558967",
      "last4": "4918",
      "expiry_month": "07",
      "expiry_year": "2025",
      "fingerprint": null,
      "vaulted": null,
      "attributes": {
        "network": "MASTERCARD",
        "product_id": "MWB",
        "type": "credit",
        "category": null,
        "issuer_bank": "CHASE BANK USA, N.A.",
        "issuer_country": "US",
        "payroll": false,
        "healthcare": false,
        "durbin_regulated": false,
        "commercial": false
      }
  }
},
  "merchant": {
    "merchant_id": null,
    "merchant_account_id": "US MID"
  },
  "additional_data": {
    "metadata": {
      "retry": "0"
    }
  },
  "pagos_codes": {
    "pagos_status": "settled",
    "pagos_payment_method": "card",
    "pagos_transaction_response": "approved",
    "pagos_stored_credential": "recurring",
    "pagos_network": "mastercard"
  }
}
'

Augment PSP Data with Metadata

This is a common use case with customers today; they make their payments data more relevant to their goals and business realities by adding details about marketing campaigns, retry strategies, and even marketplace data (e.g. which warehouse or vendor is providing a product or service). You can enrich your payment service provider (PSP) data with valuable business context by passing custom metadata. The Data Ingest API includes a metadata field, meaning you can tag transactions in your processor data to identify retry attempts, customer segments, or marketplace sellers—all without sharing any of that context with the processors themselves. Suddenly it’s easier than ever to analyze payment performance across defined categories.

Building on the example above, here is an example of a simple metadata enrichment call. You can take the same object, but adjust the metadata structure with new or updated values. In this example (not repeating the object for brevity), you could add a new marketing campaign identifier into the metadata object and the transaction record would be updated.

curl --request POST \
     --url https://api.sandbox.nest.pagosapi.com/v1/xxxxxxx-xxxx-4958-98e2-978cf6f94955/transactions \
     --header 'content-type: application/json' \
     --header 'Authorization: Bearer xxxxxx' \
     --data '
{
     "transaction_id": "00000b66",
     "amount": 1299,
     "currency": "usd",
     "created": "2023-12-03T09:33:57.000Z",
     "status": "settled",
     "verification": false,
     "stored_credential": "recurring",
     "order": {
       "id": "test72d80a53",
       "description": "test transaction",
       "descriptor": "P* PEACOCK"
     },
  .......
    "additional_data": {
      "metadata": {
        "retry": "0",
        "campaign_id": "ut34yeuw"
      }
    },
.........
}

How to Get Started

Curious about how Pagos Ingest API can support your specific use case? Getting started is simple:

  1. Create a Pagos Account: Sign up for a Pagos account to access our suite of tools and APIs.

  2. Review Our Documentation: Explore our comprehensive documentation and data dictionary to learn more about the API process and data specification.

  3. Prepare Your Data: Whether you’re sending data via file or API, prepare your data for seamless integration.

  4. Reach Out to Us: Get in touch with our team to initiate testing in our sandbox environment.

Are You Ready?

In today's fast-paced digital landscape, having access to accurate and actionable payment data is essential for staying ahead of the curve. With Pagos Ingest API, you can unlock the full potential of your payment analytics, streamline your operations, and capitalize on emerging opportunities with confidence.

Ready to take your payments analytics to the next level? Explore the possibilities with Pagos today!

LinkedIn
Share on X
Facebook