0 purchases
propaga
Propaga offers B2B BNPL by embedding financing and flexible payment options at distributors' checkout.
By connecting to our API, you can implement our BNPL button (and flow!) directly into your flutter application and manage the entire loan service.
Features #
This package uses your internal unique ID to identify the corner store or user.
We validate corner stores with an external verification and an OTP.
As a distributor, you can accept a corner store's propaga credit as a form of payment.
Getting started #
To use the package, you just need to add this line to your pubspec.yaml file:
dependencies:
propaga: <stable-version>
copied to clipboard
Usage #
To implement the button, you can simply call it like in the following example:
PropagaButton(
isActive: isActivePropagaButton,
onSelect: () {},
token: '<your-awesome-token>',
cornerStoreId: '14578',
totalAmount: 8000
);
copied to clipboard
For context,
(1) cornerStoreID - refers to your internal ID for the user requesting credit
(2) TotalAmount - refers to the total amount of the order or the total amount of credit required to fulfill the order (e.g. $400, which makes up 2 cocacola boxes which was everything added to cart)
The button will display simple information to the user in the "payment method" section. The infomation can include:
pre-registration status
registration status
waitinglist status
credit limit exceeded status
minimum transaction status
If you want to call the complete flow, you can use the startPropaga function as follows:
startPropaga(
context,
PropagaPayment(
onSuccessTransaction: (PropagaResponse response) {},
onErrorTransaction: (PropagaError error) {},
totalAmount: 8000,
token: 'pr_test_MUhd1z9e0F2JFnq',
cornerStoreId: '14578',
wholesalerTransactionId: "wholesalerId-123",
products: [
Products(
externalSKU: '12312',
name: 'Nombre',
quantity: 3
),
]
)
)
copied to clipboard
Here, onSuccessTransaction is a callback that you can use to get information if the transaction was successful. Similarly, if the transaction was unsuccessful, the onErrorTransaction callback returns an error map with the status code and error message.
The PropagaResponse follows the following interface:
class PropagaResponse {
PropagaResponse({
required this.transactionId,
required this.totalAmountWithInterest,
required this.cornerStoreId,
required this.paymentDate,
});
final String transactionId;
final double totalAmountWithInterest;
final String cornerStoreId;
final String paymentDate;
}
copied to clipboard
And for errors, PropagaError uses the following interface:
class PropagaError {
PropagaError({
required this.errorCode,
required this.errorMessage
});
final String errorCode;
final String errorMessage;
}
copied to clipboard
The startPropaga function is used to start the payment flow, which includes the following steps:
The user clicks the PropagaButton to initiate the payment flow.
The startPropaga function is called, passing in the necessary parameters, including the PropagaPayment object, which contains information about the transaction and callbacks for handling success and error cases.
Propaga validates the transaction information and returns a response or error, depending on the outcome.
If the transaction is successful, the onSuccessTransaction callback is triggered and the PropagaResponse object is returned.
If the transaction is unsuccessful, the onErrorTransaction callback is triggered and the PropagaError object is returned.
In conclusion, Propaga provides a simple and powerful way for corner stores in LatAm to access financing with just a click of a button and similarly enables distributors to grow GMV, increase retention, and digitize payments. Moreover, the PropagaButton and startPropaga functions make it easy for developers to embed Propaga's tool into their Flutter applications.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.