This site requires javascript to be enabled.

Pix

Results for

Results for Searching

Integration

Before you begin

  • Make sure you are boarded with Pix
  • Build your server integration

Using MyCheckout hosted payment pages

MyCheckout hosted payment pages is the optimal solution if you're looking for the quickest way to accept payments and a hassle-free experience for your consumers.

Make the Create hosted checkout API call, submitting the required properties.

Below, you'll find an example API call with the essential data. To add more information with additional properties, please visit to our API Reference.
  • returnUrl - the URL that the consumer is redirected to after the payment flow has finished. 
  • variant - the created styling of the checkout page tailored to your consumer's preferences.
  • locale - the language that will be used for your hosted checkout page.

Property Data type Required
order object yes
amountOfMoney object yes
currencyCode string yes
amount integer yes
customer object yes
billdingAddress object yes
countryCode string yes
fiscalNumber object yes
locale string no
variant string no

Additionally, you can add hostedCheckoutSpecificInput object, featuring the following strings:

POST HOSTEDCHECKOUT REQUEST
{   "order",
      "amountOfMoney" : {
      "currencyCode" : "BRL"
         "amount" : 1000,
      },
      "customer" : {
         "billingAddress" : {
      },
      "countryCode" : "BR"
      }
   }
}

POST HOSTEDCHECKOUT RESPONSE
{   "RETURNMAC": "89084bf6-d736-40a0-a5a0-2e6fb50baeae",
  "hostedCheckoutId": "067f7c64-6969-71ff-ba79-2d1cf4246ae1",
  "partialRedirectUrl": "pay1.checkout.worldline-solutions.com/checkout/9991-04b38b3ce0f5443599838b4fec060e76:067f7c64-6969-71ff-ba79-2d1cf4246ae1:41a98d29c2d347ff9582ea0d691fe883"
   }

From the response, the important properties are:

  • hostedCheckoutId– can be used in subsequent API calls to retrieve the transaction details, (with Get hosted checkout status API call);
  • partialRedirectUrl– is used to create the URL to which the customer needs to be redirected, By default, we configure every account with the subdomain payment, so you can always connect https://payment/. with the partialRedirectUrl, for example:

https://payment.pay1.preprod.checkout.worldline-solutions.com/checkout/9992-6ce05357a95344********

For more information on customizing the checkout page, please refer to our detailed guide on MyCheckout hosted payment pages.

The hostedCheckoutId is only valid for 2 hours. Ensure to store the createdPaymentOutput.payment.id from Get hosted checkout status response to be able to retrieve data after 2 hours have elapsed via Get payment API call. Alternatively, we can also send a webhook event that will contain it.

Using your own checkout page

You can build a direct integration using our SDKs (or integrate our API from scratch). Depending on your integration needs, there are several options available.

Client encryption

Our Client API allows you to perform various actions. All you need is to be able to create a session via the POST/v1/{merchantId}/sessions API call, which will grant you access to the Client API. It's highly recommended that you use our Client SDKs, provided for the following programming languages:

We also have reference implementations showing how to use these SDKs on GitHub.

Non-encrypted data

If you wish to do a direct server-to-server API call, go for this option. The difference with the other options mentioned before is that you don't need to submit the encryptedCustomerInput property. After the consumer selects the payment product, you need to perform the following:

  1. Make a POST /v1/{merchantId}/payments API call.
  2. Add the order object containing the required properties.
  3. Add the redirectPaymentMethodSpecificInput object containing the required properties.
  4. Add the redirectionData object containing the returnUrl property. 
Below, you'll find an example request containing the essential data. For more information, please refer to our API Reference.
Property Data type Required
order object yes
amountOfMoney object yes
currencyCode string yes
amount integer yes
customer object yes
billdingAddress object yes
countryCode string yes
contactDetails string yes
emailAddress string yes
fiscalNumber string yes
personalInformation string yes
name string yes
firstName string yes
surname string yes
redirectPaymentMethodSpecificInput object yes
paymentProductId string no
redirectionData string no
returnUrl string no
Below, you'll find an example request containing the essential data. For more information, please refer to our API Reference.
POST PAYMENTS REQUEST
"id" : "000008800510000157710000100001",
   "order" : {
      "amountOfMoney" : {
         "currencyCode" : BRL,
         "amount" : "1000"
      },
      "customer" : {
         "billingAddress" : {
         "countryCode": "BR"
      }
      "contactDetails": {
         "emailAddress": "America_Lynch@hotmail.com"
       },
       "fiscalNumber": "88463060315",
       "personalInformation": {
         "name": {
           "firstName": "Brandon",
           "surname": "Johnson"
         }
       }
     }
   },
   "redirectPaymentMethodSpecificInput": {
     "paymentProductId": "6105",
     "redirectionData": {
       "returnUrl": "https://example.com"
     }
   }
 }
POST PAYMENTS RESPONSE
"id" : "000008800510000157710000100001",
{
  "creationOutput": {
    "additionalReference": "30102024020000000827",
    "externalReference": "301020240200000008270000100001"
  },
  "merchantAction": {
    "actionType": "SHOW_INSTRUCTIONS",
    "renderingData":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IM3xNjNsoAaSB4vOclm8GVl1ZzH1+X11UE4aSnVGJ5sGIZaA3E48ER3TbrAlNPabsWgr3JiB4HDEbMbb7VpYbgp0OueGOFBWogdXADyWl3stltHvMfNS71WE+CwW6Ize5tENPM3N1YQTLPfZk4QlcwZg9o/MfrGqLOXqGikRyJazbPq65riMeCg0Bih7UrwilrYwPBCbL1LxhoZCFdw2WnhogeYFZgPZTJc+o7ojXk/V5y9qKjWFUe8h7QQjBgFUQU86eTukb/tRHZiCFUUWowxPsNrJLIhghVwPDBRvDJdhVBcngJeKVLW0aW0qfnagjy4xWsQZjlDay/t6ca8vvzTb6JnP+Z/AC6oHS9e91/NgAAAABJRU5ErkJggg=="
      },
      {
        "key": "PIXCODE",
        "value": "00020101021226780014br.gov.bcb.pix2556fake-pix.com.br/qr/v2/ACA4311F88661BC0D48200487EF1BCD95204000053039865802BR5910FAKEPIX Ltda6008CURITIBA62070503***25240"
      }
    ]
  },
  "payment": {
    "id": "301020240200000008270000100001",
    "paymentOutput": {
      "amountOfMoney": {
        "amount": 1000,
        "currencyCode": "BRL"
      },
      "references": {
        "paymentReference": "C1230000KG5A"
      },
      "paymentMethod": "redirect",
      "redirectPaymentMethodSpecificOutput": {
        "paymentProductId": 6105,
        "bankAccountBban": {
          "accountHolderName": "Johnson"
        }
      }
    },
    "status": "PENDING_PAYMENT",
    "statusOutput": {
      "isCancellable": true,
      "isRetriable": false,
      "statusCategory": "PENDING_PAYMENT",
      "statusCode": 55,
      "statusCodeChangeDateTime": "20250408062549",
      "isAuthorized": false,
      "isRefundable": false
    }
  }
}
Next Process flows