Skip to content

Pago Fácil

Last updated: 13th January 2022

Start accepting payment using Pago Fácil, a favorite payment method in Argentina.

If you want to use a gateway model for accepting Pago Fácil payments, you will need to arrange an agreement with our provider, dLocal, and create merchant details (specifically, x_login and x_trans_key) and a secret key with them. Share these details with our Customer Support team and we'll get you up and running. If you have already been onboarded for one of our other dLocal payment methods, you can use the same credentials.

Model

Collecting

Payment flow

Cash

Payment method type

Voucher

One-step payment

Authorization

Capture

Refund

Partial refund

Chargeback

Recurring payment


Overview

Pago Fácil can be used by either redirecting the customer to a statically hosted ticket (redirect integration method) or by rendering the complete ticket within your own checkout flow (direct integration method).

Payments follow a two-step process:


Step 1: Request payment

Endpoints

You can find the full list, as well as complete request and response examples, in our API reference.

    post

    https://api.checkout.com/payments

    Request examples

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      {
      "source": {
      "type": "pagofacil",
      "integration_type": "redirect",
      "country": "AR",
      "payer": {
      "name": "Bruce Wayne",
      "email": "bruce@wayne-enterprises.com"
      },
      "description": "simulate Pago Fácil Demo Payment"
      },
      "amount": 100,
      "currency": "ARS"
      }

      Response examples

      Whether you used the direct or redirect integration_type, you should get a 202 response with the status field set to Pending. This means your request has been accepted.

        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        {
        "id": "pay_edov5e5m4zreda7hs4mnzgusze",
        "status": "Pending",
        "customer": {
        "id": "cus_gghyd2m6wkgebnxvkndfwxeaji"
        },
        "_links": {
        "self": {
        "href": "https://api.sandbox.checkout.com/payments/pay_edov5e5m4zreda7hs4mnzgusze"
        },
        "redirect": {
        "href": "https://sandbox.dlocal.com/collect/pay/pay/M-b91e48a5-92e2-4726-8847-055f0ed793f1?xtid=CATH-ST-1587999296-88241435"
        },
        "simulator:payment-succeed": {
        "href": "http://sb-gateway-internal.cko.lon/dlocal-internal/pagofacil/payments/pay_edov5e5m4zreda7hs4mnzgusze/succeed"
        },
        "simulator:payment-expire": {
        "href": "http://sb-gateway-internal.cko.lon/dlocal-internal/pagofacil/payments/pay_edov5e5m4zreda7hs4mnzgusze/expire"
        }
        }
        }

        Step 2: Redirect the customer or render the ticket

        To capture and complete the payment, you need to provide the customer with a Pago Fácil ticket by following one of two flows:

        Redirect the customer

        When using the redirect integration method, make sure your customer is aware that they will be redirected to the ticket page when they select your Pay now button, and that they should print or save the ticket.

        Using the redirection URL returned in the response above via _links.redirect, redirect your customer to the static, hosted Pago Fácil ticket page. Once redirected, your customer should save or print the ticket.

        A button on the page will allow them to return to your shop:

        • If the ticket is still valid, they will be redirected to your success URL.
        • If the ticket has expired, they will be redirected to your failure URL.

        Your payment confirmation page should make it clear to the customer that their purchase has not yet been completed. Explain that it has been reserved and is pending payment before the order can be completed and the goods/services can be delivered.

        Render the ticket

        Redirect your customer to your payment confirmation page, where you should summarize their order and render the Pago Fácil ticket so they can complete the payment.

        Your payment confirmation page should make it clear to the customer that their purchase has not yet been completed. Explain that it has been reserved and is pending payment before the order can be completed and the goods/services can be delivered.

        To get the components necessary to render the ticket, use the 'get payment details' endpoint below. This will return a ticket object which contains the components to display the ticket.

        Tips for displaying the ticket

        • Separate the ticket number into two groups of four digits (for example: 1234 - 1234). It makes it easier for customers to dictate it to cashiers.
        • Include the currency and amount on the ticket.
        • Make sure the expiry date is clear and visible, and use the dd/mm/yyyy format.
        • Make it clear to the customer that their payment will be credited immediately.
        • Include payment instructions to help customers unfamiliar with the payment process.
        • A store locator is a helpful feature. Just link it to google.com/maps/search/pagofacil/.
        • Include a save button so customers can easily save the ticket on their phone.
        • Include a print button for customers who want to print their ticket.
        • As a fallback, the ticket object should also contain the URL to the static, hosted Pago Fácil ticket.

        Here's an example:

        Fago pacil ticket example

        Get details about a payment

        Using the following endpoint, pass the payment id (for example, pay_hcklpcd45ymepcr7thciirbdaa) from the payment response to get details about the payment.

        Use the details below to set up your request.

        Endpoints

        You can find the full list, as well as complete request and response examples, in our API reference.

          get

          https://api.checkout.com/payments/{payment_id}

          Response examples

          The response will differ depending on which integration_type (redirect or direct) you used in the initial payment request.

            1
            2
            3
            4
            5
            6
            7
            8
            9
            10
            11
            12
            13
            14
            15
            16
            17
            18
            19
            20
            21
            22
            23
            24
            25
            26
            27
            28
            29
            30
            31
            32
            33
            34
            35
            {
            "id": "pay_edov5e5m4zreda7hs4mnzgusze",
            "requested_on": "2020-04-27T14:54:56Z",
            "source": {
            "type": "pagofacil",
            "dlocal_order_id": "9aa40b2e9f834a84ab4147d8f7b3f305",
            "dlocal_payment_id": "D-30150-9b3ce372-6b57-4141-ba39-86b8e8aa6de6",
            "integration_type": "redirect",
            "description": "simulate Pago Fácil Demo Payment"
            },
            "amount": 100,
            "currency": "ARS",
            "payment_type": "Regular",
            "status": "Pending",
            "risk": {
            "flagged": false
            },
            "customer": {
            "id": "cus_gghyd2m6wkgebnxvkndfwxeaji"
            },
            "_links": {
            "redirect": {
            "href": "https://sandbox.dlocal.com/collect/pay/pay/M-b91e48a5-92e2-4726-8847-055f0ed793f1?xtid=CATH-ST-1587999296-88241435"
            },
            "simulator:payment-succeed": {
            "href": "http://sb-gateway-internal.cko.lon/dlocal-internal/pagofacil/payments/pay_edov5e5m4zreda7hs4mnzgusze/succeed"
            },
            "simulator:payment-expire": {
            "href": "http://sb-gateway-internal.cko.lon/dlocal-internal/pagofacil/payments/pay_edov5e5m4zreda7hs4mnzgusze/expire"
            },
            "self": {
            "href": "https://api.sandbox.checkout.com/payments/pay_edov5e5m4zreda7hs4mnzgusze"
            }
            }
            }

            Refunds and chargebacks

            Refund a payment

            You can refund a Pago Fácil payment using our refund API. Partial and multiple – as well as full – refunds are allowed.

            The customer will get an email (the email address is taken from the source.payer.email property in the initial payment request) from dLocal asking for their banking details. Once the customer has provided their details, dLocal will transfer the money to the customer's bank account.

            The payment status will update to refunded and you will receive a payment_refunded (or payment_refund_declined, if unsuccessful) webhook notification.

            A refund processing fee may apply.

            Chargebacks

            There is no chargeback mechanism for Pago Fácil.


            Webhooks

            WebhooksDescription

            payment_pending

            Sent when a payment request is successfully initiated.

            payment_capture_pending

            Sent when the acquirer is in the process of accepting the payment.

            payment_captured

            Sent when the customer has completed the payment with the ticket.

            payment_expired

            Sent when the ticket has expired.

            payment_declined

            Sent when there was a failure in creating the payment.

            payment_refund_pending

            Sent when a refund is successfully initiated.

            payment_refunded

            Sent when a refund is successfully processed.

            payment_refund_declined

            Sent when a refund is declined.


            Testing

            To start testing, you'll need to:

            • create a test account, and
            • contact your Customer Success Manager or Integrations engineer to activate Pago Fácil payments in the sandbox environment.

            In your sandbox environment, you can test payment capture and expiration, as well as refund success and failure.

            In order to test these actions, pass the string "simulate" as part of the source.description field in the initial payment request.

            When you do, you will receive additional hypermedia links in the _links object in the payment response and in the 'get payment details' response.

            Use the URLs contained in the simulator:payment-succeed, simulator:payment-expire, simulator:refund-succeed and simulator:refund-fail hypermedia objects to simulate the respective action/state change on the test payment.

            You can only test the direct payment flow in sandbox.