SAP BLOG Instant Payments in Brazil (PIX) in SAP S/4HANA Cloud

SAP Blog

Kayıtlı Üye
Katılım
22 Ara 2017
Mesajlar
1,925
Tepki puanı
7
Puanları
6
Instant payments represent a new arrangement within the Brazilian financial system that allows 24/7 transactions in real-time between different institutions without the need for intermediaries such as card schemes, acquirers, or issuers. This blog post helps you understand the individual functionalities and solutions regarding Brazilian Instant Payments in SAP S/4 HANA Cloud.

This blog is divided into 2 parts:

Accounts Payable


After you purchased any goods or services, the supplier sends you the invoice that contains a QR code information with the PIX link and the transaction ID which you need during the payment process.

The following process explains to you the steps of configuring the system and the PIX data transfer from the master data through document posting and payment run to the payment media. When you create the payment media, the system fills out segments J and J52 PIX or segments A and B with the PIX key in the payment file, depending on how you enter the PIX keys for document posting.

Bank Master Data​


Create a technical bank in the Manage Banks app. To maintain multiple aliases, each entry needs the complete key filled out in database tables Customer Master (Bank Details) (KNBK table) and Vendor Master (Bank Details) (LFBK table).

  • Enter the bank country/region, which is the same as the payment system country.
  • Choose a bank key, the bank number, and a bank name.
  • Choose Payment System as the bank category.

image1-8.png


Define Alias Types​


To define Alias types, go to Configure your solution in Manage Your Solution App. Look for the configuration activity Define Alias Types for Bank Accounts in the settings related to Bank Account Alias.
image2-8.png


This configuration activity allows you to define possible Alias types, description, and validation routine as regular expression.



regex-change.png


It is required to have the Alias Types named in this way to work with PMW format BR_FEBRABAN_A.

Examples of regular expression used for validation:

  • Email with limited length to 77: ^(?=.{6,77}$)\w+(\.\w+)*@(\w+\.)+(\w{2,4})
  • Any string of length 32 characters: ^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}
  • Phone: ([0,+]{0,1}\s*[0-9]{2,3})?\s*\(?[0-9]{2}\)?\s*[0-9]{4,5}[- ]*[0-9]{4}

Define Payment System​


To define payment system, go to configuration activity Define Payment Systems in the settings related to Bank Account Alias.
image4-7.png


  1. Define payment system
    image5-6.png
  2. Define country in which the payment system is valid
    image6-4.png
  3. Assign Alias types to payment system
    image7-4.png

Business Partner Master Data​


Define the alias type and the payment system in the business partner master data in the Manage Business Partner Master Data app.

On the Bank Accounts tab, click on Create.
image8-3.png


Click on the Details arrow and on the Bank Information tab, enter the payment system, the alias type, and the alias itself, which can be, for example, the e-mail address of the business partner. Save your entries.
image9-3.png


You can also assign the alias type, payment system, and the alias itself to the business partner in the Maintain Business Partner app.

Open the relevant business partner data and on the Payment Transactions tab, choose the Alias button. In the popup window, enter the payment system, the alias type, and the alias itself, which can be, for example, the e-mail address of the business partner.
image10-3.png


Posting Supplier Invoice​


There are two types of payment that can be performed via posting of supplier invoices:

1. PIX Transfer (PIX key defined by Partner Bank Type)​


In this scenario, the proper PIX key used for the payment is defined by the Partner Bank Type (BSEG-BVTYP).
image11-3.png


In the Part. bank type popup window, you choose the relevant partner bank type that already contains the PIX key.
image12-2.png


2. QR code information received via incoming invoice​


When the company receives the PIX invoice with QR code, the payment is done via CNAB 240 with segments J and J52PIX. The information from the QR Code must be stored in the Supplier Invoice and then read during payment media creation.

To enter QR Code information, select the button Pix Info.

In the pop-up window, you can enter either:

  1. the URL Link (Dynamic QR) – 77-character long string
    image13-2.png
  2. or the Transaction ID (Static QR) – up to 35-character long string, and select PIX key via Partner Bank Type Field
    image14-2.png

image11-4.png

Adding QR Code to an Existing Invoice​


It is also possible to add PIX URL or Transaction ID to an existing invoice. You can do so in Manage Journal Entries App by clicking on the invoice and selecting Manage Additional Payment Attributes where you can enter the relevant value.
image15-2.png
image16-2.png


Payment Method for Outgoing Payments​


The payment method for outgoing payments must have the following parameters:

Payment method forOutgoing Payments
Payment method classificationBank transfer
Required master record specificationsBank details (Alias Required)
Payment mediumFormat: BR_FEBRABAN_A
Format Supplement: PIX

You can do the changes to the payment method in the configuration activity Set Up Payment Methods for Each Country/Reg.
image17-2.png


It is also necessary to assign the permitted payment system for Payment Method.
image18.png


CNAB240 Return File Processing​


After the bank executes the payment according to the information in the payment file, it sends back a return file. The return file contains payment confirmation or rejection data. To clear the relevant data, you need to import the received return file into your system.

Confirmation Return File​


Confirmation Return File contains payment confirmation. To upload the file, open the Manage Incoming Payment Files app and choose Import. In the File Type field, choose Bank Statement, and in the Format field, select the CNAB240 Payment Format (BRAZIL). Upload the file you received from the bank and choose Process.
image19.png


When the system processes the Confirmation Return File, it clears the Bill of Exchange Payment Request and the invoice.

Rejection Return File​


Rejection Return File contains up to five rejection error codes that explain the reason of the rejection. To upload the file, open the Manage Incoming Payment Files app and choose Import. In the File Type field, choose Bank Statement, and in the Format field, select the CNAB240 Payment Format (BRAZIL). Upload the file you received from the bank and choose Process.
image19-1.png


The error codes are displayed in the Memo Line of the Bank Statement Item.
image20.png


Error codes are maintained in the configuration activity Error Codes in settings for Electronic Bank Statement.
image21.png
image22.png




Accounts Receivable


When you sell any goods or services, you execute a payment run and send the payment data in a payment file (in format CNAB750) to the bank or payment system to request a dynamic or use a static QR code. The payment system generates a QR code and sends the data back to you. You print the invoice containing the QR code and send it to your customer.

Unique transaction IDs are generated automatically containing the company code, document number, and year. The transaction ID is inserted in the incoming payment file (BR_FEBRABAN_750) that you send to the bank. The transaction ID is mandatory in the case of dynamic QR codes. As soon as the payment is completed, you receive the payment status information from the bank.

The following process explains how to configure the system.

House Bank Master Data​


Assign your PIX key as an alternative bank account in your house bank master data using the Manage Bank Accounts app. The PIX Key for the relevant House Bank Account can be maintained in the field Alternative Bank Account Number on the House Bank Account Data screen.
image23.png
image24.png


Assign ISPB Code for House Bank​


Assign the relevant ISPB code to Company Code and House Bank in the view Assign ISPB Codes to Bank Codes configuration activity in settings for Payment Formats.

image25-1.png
image26-1.png


Correspondence Setup​


To display or print the received QR code in the invoice, you must first set up correspondence by assigning a correspondence program and variant to your company code.

  1. Add Correspondence SAPBR in the configuration activity Define Variants for Correspondence Types.
    image27.png
  2. Add Identifier SAPBR in the configuration activity Assign Labels and Company Codes to Correspondence Type Variants
    image28.png
  3. Assign form template FIN_FO_CORR_INTDOC_PIX_BR to application object FFO_CORR_INTDOC in the Assign Form Templates configuration activity.
    image29.png
    image30.png
  1. Maintain Form Derivation Rule ID FORM_MASTER_BR_PIX in configuration activity Define Rules for Determination of Master Form Template
    image31.png
    image32.png

QR Code Form Output​


In Display Correspondence History app, you can display the PDF Form with QR Code.

image33.png


Posting Customer Invoice​


No special handling is needed. When you post customer invoices, use the payment method you created with the payment medium format BR_FEBRABAN_750.

Payment Method for Incoming Payments​


The payment method for incoming payment must have the following parameters:

Payment method forIncoming Payments
Payment method classificationBill/exch.pyt.req
Posting detailsValue ‘R’ in the Sp. G/L Ind. B/Ex. B/Ex.Pmt.Req field
Payment mediumFormat: BR_FEBRABAN_750



You can do the changes to the payment method in the configuration activity Set Up Payment Methods for Each Country/Reg.

image34.png


Payment Media Creation for DMEE Payment Format CNAB750​


Execute the payment run for customer invoice with incoming payment method for format BR_FEBRABAN_750 in the App Manage Automatic Payments.

After you have executed payment run, Bill-of-Exchange (BoE) payment request is created and updated in the customer invoice.

CNAB750 Return File Processing​


After the bank executes the payment according to the information in the payment file, it sends back a return file. The return file contains payment confirmation or rejection data. To clear the relevant data, you need to import the received return file into your system.

Confirmation Return File​


Confirmation Return File contains payment confirmation. To upload the file, open the Manage Incoming Payment Files app and choose Import. In the File Type field, choose Bank Statement, and in the Format field, select the CNAB750 Payment Format (BRAZIL). Upload the file you received from the bank and choose Process.
image35.png


When the system processes the Confirmation Return File, it clears the Bill of Exchange Payment Request and the invoice.

Rejection Return File​


Rejection Return File contains up to five rejection error codes that explain the reason of the rejection. To upload the file, open the Manage Incoming Payment Files app and choose Import. In the File Type field, choose Bank Statement, and in the Format field, select the FEBRABAN CNAB 750 (BRAZIL) format. Upload the file you received from the bank and choose Process.
image35-1.png


The error codes are displayed in the Memo Line of the Bank Statement Item.

image36.png


Error codes are maintained in the configuration activity Error Codes in settings for Electronic Bank Statement.
image21-1.png


image37.png




Do you have any further comments regarding this topic? Do not hesitate to share them in the comment section below. You are also welcome to ask any questions about SAP S4/HANA Finance in the Community Q&A section.

Okumaya devam et...
 
Üst