Alfred Integration Documentation
  • 🌐Welcome
    • Getting Started
    • alfred Overview
      • Authentication
      • Core Concepts & Use Cases
      • System Resource Names
      • Error & Status Codes
      • Required Documents for KYC by Country
      • Example Workflow Execution
    • Postman Collection
  • 🔌PENNY API General Integration
    • Penny API - Operations
      • Account Information + Get uuid Initial Transaction
      • KYC Lite + Get Access Token
      • KYC Full
      • Payment Method + Get Process Token
      • Add Bank or Update Bank
      • Submit Transaction
      • {URL-Customer-Webhook}
      • Approval Invoice (Pay Out Only)
    • Penny API - Reports
      • Consult Quote
      • Consult Payment Wallet
      • Consult All Invoices
      • Consult Individual Invoice by Invoice ID
      • Consult transactions by User's Wallet
  • 🖱️Stellar Blockchain Integration
    • Stellar API Integration - Operations
      • Auth (Get)
      • Auth (Post)
      • (Stellar) My Info - Get Account info & uuid Initial Transaction
      • KYC Lite + Get Access Token
      • KYC Full
      • Payment Method + Get Process Token
      • Add Bank or Update Bank
      • Submit Transaction
      • {URL-Customer-Webhook}
      • Approval Invoice (Pay Out Only)
    • Stellar API Integration - Reports
      • Consult All Invoices
      • Consult Payment Wallet
      • Consult Individual Invoice by Invoice ID
      • Consult transactions by User's Wallet
  • 🎒Educational Content
    • Step-by-Step Videos
      • Getting Started
      • API Integration
      • Pay Out Requirements by Country
        • 🇲🇽Mexico
        • 🇦🇷Argentina
        • 🇧🇷Brazil
Powered by GitBook
On this page
  1. PENNY API General Integration
  2. Penny API - Operations

{URL-Customer-Webhook}

Create a webhook to communicate with the alfred ecosystem to receive invoices


Description:

This endpoint is designed to communicate with alfred ecosystem to receive invoices for any "Pay Out" transactions.

Mode:

POST

Node:

CURL:
curl --location --globoff '{URL-Customer-Webhook}' \
--header 'Content-Type: application/json' \
--header 'User-Agent: Insomnia/2023.5.6' \
--header 'x-api-key: alfredpay.tmBXiGDA7RJnFCS9875hbjh6bjR6OKHtp' \
--data '{
   "invoices": "154b2b72-1280-445d-9bbb-7002f23aff30",
   "date_invoices": "2023-09-25 17:28:03-0000",
   "signature_invoices": "0a0fO/VVWIvrij2CgdeVmpQVrpTp9z619kEIyJpWLK8="
}'

Considerations:

In order to confirm a signature authorizing a transaction, the signature and invoice date must be validated with the following algorithm:

Algorithm: const crypto = require('crypto'); function encryptData(data) { const dataBuffer = Buffer.from(data, "utf8"); const secretKeyBytes = Buffer.from("secret", "base64"); const hmac = crypto.createHmac("sha256", secretKeyBytes); hmac.update(dataBuffer); const encryptedData = hmac.digest("base64"); return encryptedData; } const dataToEncrypt = "2023-09-25 13:48:20.890-0400d9b3146b-24e0-447089621b56125086bb"; const encryptedData = encryptData(dataToEncrypt); console.log(encryptedData);

Last updated 1 year ago

🔌