CFX Pay
  1. Basic Integration
CFX Pay
  • Introduction
  • Integration Types
  • API Standards
  • Status Flow
  • Lists
  • SPEI Mexico
  • PIX Brazil
  • Basic Integration
    • checkout_create
      POST
  • Intermediary Integration
    • checkout_form
      POST
  • Hardcode integration
    • balance_merchant
      GET
    • payment_type
      GET
    • payin_create
      POST
    • payin_check
      GET
    • payout_create
      POST
    • payout_check
      GET
  • Notification
    • How it works
  1. Basic Integration

checkout_create

POST
https://api.cfxpay.io/{{param_environment}}/{{param_company}}/gateway/checkout_create
Last modified:2024-02-23 13:39:42

Use this endpoint to generate a new checkout URL for your clients to complete the entire payment process, from selecting the payment type to confirmation. If you have any questions about this flow, see Integration Types.

When you redirect your user to the generated URL they will go through the following screens:

📌

If you want to use our paywall page but need customization for your brand, please contact us.

  1. Select payment type page

  1. Payer information form page

  1. Invoice page

Request

Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
Header Params
Language
string 
required
Language list
Example:
PORTUGUESE_BR
Body Params application/json
tracking_id
string <uuid>
required
External tracking reference for the transaction UUID_v4.
amount
string 
required
Amount of the invoice.
The decimal separator used is a "dot" "."
<= 10 characters
Examples:
20.0025.4542.10
Match pattern:
^\d+(\.\d{2})?$
country
enum<string> 
required
Country code.
>= 2 characters<= 2 characters
Allowed values:
ARBRCLCOCRECSVMXPAPEGT
currency_symbol
enum<string> 
required
Currency symbol code.
>= 3 characters<= 3 characters
Allowed values:
ARSBRLCLPCOPCRCGTQMXNPENUSD
callback_url
string <uri>
required
The URL that receive notifications when a transaction is created or change STATUS.
Example:
https://api.cfxpay.io/webhook_test
cancel_url
string <uri>
optional
The URL to redirect the customer if the transaction is canceled.
Example:
https://cfxpay.io
return_url
string <uri>
optional
The URL to redirect the customer after the transaction is completed.
Example:
https://cfxpay.io
category
enum<string> 
optional
Category of the payment.
>= 3 characters<= 20 characters
Allowed values:
CREDIT_CARDCASHONLINEPIXBOLETOSPEI
description
string 
optional
A short description.
<= 100 characters
Example:
Payment user: 1234567890
kind
enum<string> 
optional
Specify the PROVIDER if needed.
>= 11 characters<= 11 characters
Allowed values:
PROVIDER_01PROVIDER_02
payment_type_id
string <md5>
optional
Preferential payment method ID.
This ID is returned in the endpoint payment_type.
>= 32 characters<= 32 characters
Example:
a88eb69672cc1f8483d481a56259dcaa
Match pattern:
^[a-fA-F0-9]{32}$
Example
{
    "tracking_id": "53c4042b-a565-473b-b511-1080605e0d96",
    "amount": "951.37",
    "callback_url": "https://api.cfxpay.io/webhook_test",
    "country": "BR",
    "currency_symbol": "BRL",
    "category": "PIX",
    "description": "Payment transaction at Legros and Sons",
    "kind": "PROVIDER_01",
    "payment_type_id": "a88eb69672cc1f8483d481a56259dcaa",
    "cancel_url": "https://cfxpay.io",
    "return_url": "https://cfxpay.io"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://api.cfxpay.io/{{param_environment}}/{{param_company}}/gateway/checkout_create' \
--header 'Language: PORTUGUESE_BR' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
    "tracking_id": "53c4042b-a565-473b-b511-1080605e0d96",
    "amount": "951.37",
    "callback_url": "https://api.cfxpay.io/webhook_test",
    "country": "BR",
    "currency_symbol": "BRL",
    "category": "PIX",
    "description": "Payment transaction at Legros and Sons",
    "kind": "PROVIDER_01",
    "payment_type_id": "a88eb69672cc1f8483d481a56259dcaa",
    "cancel_url": "https://cfxpay.io",
    "return_url": "https://cfxpay.io"
}'

Responses

🟢200Success
application/json
Body
server
string 
required
code
integer 
required
message
string 
required
identifier
string 
required
type
string 
required
caller
string 
required
caller_id
string 
required
translation_message
string 
required
gateway
array [object {1}] 
optional
checkout_url
string 
required
Example
{
    "server": "01",
    "code": 0,
    "message": "Success",
    "identifier": "1708387760806181217",
    "type": "LOG_INFO",
    "caller": "_checkout_create",
    "caller_id": "1708387760769894631",
    "translation_message": "Sucesso",
    "gateway": [
        {
            "checkout_url": "https://checkout.cfxpay.io/#/create/U2FsdGVkX18ZZzI5NCtfjsjzMioqIWumcsGQb4yYdINe0Q9Yyu66HCxKPDmsEYt0vDVhtowqrQ98L5eS8CyzltBeB6E0BTbEhnjuDQJaMbx3GQCatP90UFxAaV2rLNbc0i_I4zKplq7o5Pm2ijAPzeCW95LikSmO7sbWH95nsTGMFXHd0ECsl0Mo6Cy_fAiy_M1NqpbU4uaOO_8C0F-tTkTukpcjvnaE3hLWiGoiW5_cbnp4dgn4R-9hFn_zlu67FRvTZnJxrqFaC6zGUU0539Mk0waZ2YgJ9_kTk1lHBDZ9bAqrL012eeBUTiUXVZeNNIzcjFHixUMbz-qTHgKppPBv0pALx3JOzwNk_mB3mYAvsjFAbloGQauuycVmznSD_dxAdB946hyWraCPL_l4SACP8__Xy-fypxwIu9AS0X2uExG-gebmjU2NxyuaxRt8jAgvQFBguZjBu90qg3H2ZExkLyxGED0LCSUBZAQDpWvzv0lJTwzFELd0VXjzuatTKzGDn_ECRY9xqgNhaYiK0Fre6OXAJKAVnhXPm4B_Ax0C8PRqjfC2RPrzBXuV-Uk0kNYN_vkOTkUZqUAI_5syL-DGKqtYDBpBGkpsV4p7FuI="
        }
    ]
}
🟠400Wrong Params
Modified at 2024-02-23 13:39:42
Previous
PIX Brazil
Next
checkout_form
Built with