Getnet DocsGetnet Docs

Configuration by API

This document applies to the following countries:

ArgentinaBrazilChileMexicoPortugalSpainUruguay

For other countries check the Configuration via Portal document.

To configure Web Checkout by API you must follow the three steps.

Step 1: Get seller registration data

This step is only required if this is the seller’s first time setting up Web Checkout.

To send this request, you must you must provide a seller ID in the request path.

FieldTypeDescriptionExampleRequired
sellerIDStringSeller ID to be used in the query.672c0dd1-28b1-4136-b230-de68c1b92ae0✅

Request

Example of request:

curl https://api.globalgetnet.com/dpy/web-checkout/v1/sellers \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'

200 Response

Example of response:

{
  "type": "object",
  "description": "Response to an BR seller request",
  "properties": {
    "seller_id": {
      "type": "string",
      "writeOnly": true,
      "format": "uuid",
      "example": "a9c99f03-025c-4251-a9f5-de73ef593523"
    },
    "merchant_id": {
      "type": "string",
      "writeOnly": true,
      "format": "uuid",
      "example": "ecd1c020-dd5f-4511-8006-88ad6b3459db"
    },
    "seller_code": {
      "type": "string",
      "writeOnly": true,
      "example": "0000012345"
    },
    "trade_name": {
      "type": "string",
      "writeOnly": true,
      "example": "Smart Shop"
    },
    "email": {
      "type": "string",
      "writeOnly": true,
      "format": "email",
      "example": "[email protected]"
    },
    "country": {
      "type": "string",
      "writeOnly": true,
      "example": "BR"
    },
    "currencies": {
      "type": "array",
      "writeOnly": true,
      "items": {
        "type": "string"
      },
      "example": [
        "BRL"
      ]
    },
    "payments": {
      "type": "object",
      "writeOnly": true,
      "properties": {
        "instant_payment": {
          "type": "object",
          "properties": {
            "enable": {
              "type": "boolean"
            }
          }
        },
        "bankslip": {
          "type": "object",
          "properties": {
            "enable": {
              "type": "boolean"
            }
          }
        },
        "credit": {
          "type": "object",
          "properties": {
            "enable": {
              "type": "boolean"
            },
            "brands": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "enable": {
                    "type": "boolean"
                  },
                  "brand": {
                    "type": "string",
                    "example": "VISA"
                  },
                  "currencies": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "example": [
                      "BRL"
                    ]
                  },
                  "threeds": {
                    "type": "boolean"
                  },
                  "suported_installments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "schema": {
                          "type": "string",
                          "example": "with_interest"
                        },
                        "schema_name": {
                          "type": "string",
                          "example": "Issuer Plan",
                          "nullable": true
                        },
                        "installments": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [
                            1,
                            2,
                            3,
                            4
                          ]
                        },
                        "installments_with_interest": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [
                            3,
                            4
                          ]
                        }
                      }
                    },
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "debit": {
          "type": "object",
          "properties": {
            "enable": {
              "type": "boolean"
            },
            "brands": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "enable": {
                    "type": "boolean"
                  },
                  "brand": {
                    "type": "string",
                    "example": "VISA"
                  },
                  "currencies": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "example": [
                      "BRL"
                    ]
                  },
                  "threeds": {
                    "type": "boolean"
                  },
                  "suported_installments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "schema": {
                          "type": "string",
                          "example": "no_interest"
                        },
                        "schema_name": {
                          "type": "string",
                          "example": "Merchant Installment",
                          "nullable": true
                        },
                        "installments": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [
                            1,
                            2,
                            3,
                            4
                          ]
                        },
                        "installments_with_interest": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [
                            3,
                            4
                          ]
                        }
                      }
                    },
                    "nullable": true
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Using the information from the response, you can proceed with configuring Web Checkout via the API.

Step 2: Put technical configuration

In the step of technical configurations, merchants can customize the appearance of the Web Checkout interface displayed to customers. This allows the checkout experience to align with the branding of the merchant’s e-commerce site.

Available customization options include brand color, accent color, and font, also, the seller will configure the redirect URLs that are used to send customers to predefined endpoints when a transaction is approved or declined during the checkout process.

Two URLs must be provided:

  • Success: for approved transactions.
  • Error: for declined transactions.

Both URLs are required to successfully complete the integration.

A webhook notification must be provided, along with a username and password.

The table below lists the fields that are required to send.

FieldTypeDescriptionExampleRequired
success_urlStringRedirect URL in case of successful checkout.https://www.google.com/success✅
error_urlStringRedirect URL in case of an error during checkout.https://www.google.com/error✅
urlStringWebhook URL to receive payment notifications.https://webhook/bce0b3b3-49b6-4680-88d7-4e23131d91b2✅
userStringUsername for webhook authentication.1cb9c739-8452-4436-816b-a833960b7680✅
passwordStringPassword for webhook authentication.78ce12f6-665b-4354-8eaf-f0384413aaa8✅
hide_getnet_logoBooleanHide the Getnet logo at the checkout when set as true.true or false—

Request

Example of request:

curl https://api.globalgetnet.com/dpy/web-checkout/v1/technical-configurations/672c0dd1-28b1-4136-b230-de68c1b92ae0 \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "layout_customization": {
    "color": {
      "primary": "#de3131",
      "accent": "#257FA4"
    },
    "type_face": "Open Sans",
    "hide_getnet_logo": "false"
  },
  "success_url": "https://www.google.com/success",
  "error_url": "https://www.google.com/error",
  "notification": {
    "url": "https://webhook/bce0b3b3-49b6-4680-88d7-4e23131d91b2",
    "authentication_type": "user_credentials",
    "user_credentials": {
      "user": "1cb9c739-8452-4436-816b-a833960b7680",
      "password": "78ce12f6-665b-4354-8eaf-f0384413aaa8"
    }
  }
}'

200 Response

Example of response:

{
  "layout_customization": {
    "color": {
      "primary": "#de3131",
      "accent": "#257FA4"
    },
    "type_face": "Open Sans",
    "hide_getnet_logo": "false"
  },
  "success_url": "https://www.google.com/success",
  "error_url": "https://www.google.com/error",
  "notification": {
    "url": "https://webhook/bce0b3b3-49b6-4680-88d7-4e23131d91b2",
    "authentication_type": "user_credentials",
    "user_credentials": {
      "user": "1cb9c739-8452-4436-816b-a833960b7680"
    }
  }
}

Step 3: Put business configuration

Merchants can optionally configure their checkout experience by enabling or disabling specific payment operations. These settings determine which payment methods, such as Credit Cards, Debit Cards, Boleto (bank slip), PIX (instant payment), or QR Code, are displayed during the checkout process.

Is possible to configure the installment options available to their customers, allowing them to define key aspects of the installment experience. These configurations include the installment plans to be offered, the number of installments available, and the party responsible for absorbing interest fees, which may be assumed by the cardholder or by the merchant.

The table below lists the fields that are required to send.

For each attribute of the object type, described in the table, the enable parameter must be filled in with true or false.

FieldTypeDescriptionExampleRequired
instant_paymentObjectPayment method.—✅
bankslipObjectPayment method.—✅
creditObjectPayment method.—✅
debitObjectPayment method.—✅
enableBooleanIf the payment method will be accepted.true✅
qr_code_checkoutObject(Argentina only). Displays the QR Code as a payment option on the Web Checkout screen.—✅

⚠️ Important: The QR Code is available only for Argentina and uses the enable parameter, filled with true or false. When you enable qr_code_checkout, the QR Code starts being displayed as a payment option on the Web Checkout screen, with no changes to your integration.

Request

Example of request:

curl https://api.globalgetnet.com/dpy/web-checkout/v1/business-configurations/672c0dd1-28b1-4136-b230-de68c1b92ae0 \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "instant_payment": {
    "enable": true
  },
  "bankslip": {
    "enable": true
  },
  "qr_code_checkout": {
    "enabled": true
  },
  "mbway": {
    "enabled": true
  },
  "multibanco": {
    "enabled": true
  },
  "credit": {
    "enable": true,
    "brands": [
      {
        "enable": true,
        "brand": "VISA",
        "currencies": [
          "BRL"
        ],
        "threeds": true,
        "suported_installments": [
          {
            "schema_name": "with_interest",
            "installments": [
              1,
              2,
              3
            ],
            "installments_with_interest": [
              2,
              3
            ]
          }
        ]
      }
    ]
  },
  "debit": {
    "enable": true,
    "brands": [
      {
        "enable": true,
        "brand": "VISA",
        "currencies": [
          "BRL"
        ],
        "threeds": true
      },
      {
        "enable": true,
        "brand": "MASTER",
        "currencies": [
          "BRL"
        ],
        "threeds": true
      }
    ]
  }
}'

200 Response

Example of response:

{
  "instant_payment": {
    "enable": true
  },
  "bankslip": {
    "enable": true
  },
  "qr_code_checkout": { 
    "enable": true 
  },
  "mbway": {
    "enabled": true
  },
  "multibanco": {
    "enabled": true
  },
  "credit": {
    "enable": true,
    "brands": [
      {
        "enable": true,
        "brand": "VISA",
        "currencies": [
          "BRL"
        ],
        "threeds": true,
        "suported_installments": [
          {
            "schema_name": "plan_emisor",
            "installments": [
              1,
              2,
              3
            ],
            "installments_with_interest": [
              2,
              3
            ]
          }
        ]
      }
    ]
  },
  "debit": {
    "enable": true,
    "brands": [
      {
        "enable": true,
        "brand": "VISA",
        "currencies": [
          "BRL"
        ],
        "threeds": true
      },
      {
        "enable": true,
        "brand": "MASTER",
        "currencies": [
          "BRL"
        ],
        "threeds": true
      }
    ]
  }
}

The configuration is done!

Next Step