1. Home
  2. Library
  3. SDK .NET
  4. Connect/Join .NET

Connect/Join .NET

Some business lines requiere several actors to be involved in an operation, in these cases Sr. Pago offers a tool named connect/join. Which enables payment distribution between several Sr. Pago accounts without involving a transfer.

To use this it is only needed that the affiliated is registered in Sr. Pago’s platform and calculate the total amount that will be transferred to that user.

For example:

Let Alice and Bob operate a business, Alice has implemented the ecommerce platform and it is intended that Bob will earn the 70% of all operations. In case there’s an operation with a total amount of $10, Alice will assign Bob $7

To achieve this, Alice will need to add the following lines to her charge element

 

chargeParams.Add("connect_account", “<Cuenta principal>");
            chargeParams.Add("connect_fees", new List<Dictionary<string, object>> { new
            Dictionary<string, object> {{ "account", “<Cuenta afiliada>" }, { "amount", <Monto neto a ingresar> }, {
"reference", "<Referencia>" }, { "description", “<Descripción del monto>" }} });

Afterwards Alice will only need to make the charge as she normally does and Bob will automatically have that amount in his account.

[email protected] user must be a registered client under the Join modality, otherwise the operation won’t be successful

 

ChargesService charges = new ChargesService();
            ChargesResponse charge = await charges.Create(chargeParams);
            if (charge.success)
            {
                //Exito
                Operation result = charge.result;
                ViewData["Message"] = result.authorization_code;
            }
            else
            {
                //Error
                string code = charge.error.code;
                string message = charge.error.message;
                ViewData["Message"] = "Hubo un error" + message;
            }

 

Was this article helpful to you? Yes 8 No