CFX Pay
  1. Hardcode 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. Hardcode integration

payin_create

POST
https://api.cfxpay.io/{{param_environment}}/{{param_company}}/gateway/payin_create
Last modified:2024-02-29 16:46:47
Create a new payin.

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

Body Params application/json

Example
{
    "payment_type_id": "a88eb69672cc1f8483d481a56259dcaa",
    "amount": "50.00",
    "description": "Payment test",
    "tracking_id": "55616f79-0bdd-42f2-8943-165ae7359001",
    "callback_url": "https://api.cfxpay.io/webhook_test",
    "return_url": "https://cfxpay.io",
    "cancel_url": "https://cfxpay.io",
    "customer": {
        "first_name": "Satoshi",
        "last_name": "Nakamoto",
        "document_number": "28276469686",
        "email": "dev@cfxpay.io",
        "phone": "5511999999999",
        "address": "R. Jose Simoes, 596",
        "city": "Sao Paulo",
        "country": "BR",
        "zip": "01508001",
        "device_id": "123123123",
        "ip": "182.147.131.140"
    }
}

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/payin_create' \
--header 'Language: PORTUGUESE_BR' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
    "payment_type_id": "a88eb69672cc1f8483d481a56259dcaa",
    "amount": "50.00",
    "description": "Payment test",
    "tracking_id": "55616f79-0bdd-42f2-8943-165ae7359001",
    "callback_url": "https://api.cfxpay.io/webhook_test",
    "return_url": "https://cfxpay.io",
    "cancel_url": "https://cfxpay.io",
    "customer": {
        "first_name": "Satoshi",
        "last_name": "Nakamoto",
        "document_number": "28276469686",
        "email": "dev@cfxpay.io",
        "phone": "5511999999999",
        "address": "R. Jose Simoes, 596",
        "city": "Sao Paulo",
        "country": "BR",
        "zip": "01508001",
        "device_id": "123123123",
        "ip": "182.147.131.140"
    }
}'

Responses

馃煝200Success
application/json
Body

Example
{
    "server": "01",
    "code": 0,
    "message": "Success",
    "identifier": "1708459481804055808",
    "type": "LOG_INFO",
    "caller": "_gateway_payin_create",
    "caller_id": "1708459480212169629",
    "translation_message": "Sucesso",
    "gateway": [
        {
            "transaction_id": "1708459481626763970",
            "merchant_id": "cfxpaygateway_merchant",
            "tracking_id": "55616f79-0bdd-42f2-8943-185ce7359001",
            "api_transaction_id": "3ad3383d-3cea-49e7-b1a5-d688668b0bcc",
            "payment_type_id": "a88eb69672cc1f8483d481a56259dcaa",
            "callback_url": "https://api.cfxpay.io/webhook_test",
            "return_url": "https://cfxpay.io",
            "cancel_url": "https://cfxpay.io",
            "country": "BR",
            "source": "DEPOSIT",
            "origin": "PROVIDER_01",
            "status": "PENDING",
            "currency_symbol": "BRL",
            "amount": "50.00",
            "amount_fee": "0.00",
            "amount_final": "50.00",
            "exchange_symbol": "USD",
            "exchange_rate": "5.33049040",
            "exchange_amount": "9.38",
            "exchange_amount_fee": "0.00",
            "exchange_amount_final": "9.38",
            "checkout_url": "https://checkout.cfxpay.io/#/invoice/55616f79-0bdd-42f2-8943-185ce7359001",
            "checkout_info": {
                "description": "PIX",
                "type": "QRCODE",
                "code": "00020101021226910014br.gov.bcb.pix2569qrcode.pix.com.br/pixqrcode/v2/d4ace62a7907bd90a3d4ea2aa5c85652046009Sao ***630444F1",
                "amount": "50.00",
                "symbol": "BRL",
                "expire_utc": "1708545881",
                "language_default": "PORTUGUESE_BR",
                "instructions": [
                    {
                        "language": "ENGLISH",
                        "instruction_01": "Open your bank's app",
                        "instruction_02": "Select the pay option through PIX",
                        "instruction_03": "Select the option QR Code",
                        "instruction_04": "Scan the QR code with your phone's camera",
                        "instruction_05": "Authorize payment"
                    },
                    {
                        "language": "SPANISH",
                        "instruction_01": "Abre la aplicaci贸n de tu banco",
                        "instruction_02": "Seleccione la opci贸n de pago a trav茅s de PIX",
                        "instruction_03": "Seleccione la opci贸n C贸digo QR",
                        "instruction_04": "Escanea el c贸digo QR con la c谩mara de tu tel茅fono",
                        "instruction_05": "Autorizar pago"
                    },
                    {
                        "language": "PORTUGUESE_BR",
                        "instruction_01": "Abra o aplicativo do seu banco",
                        "instruction_02": "Selecione a op莽茫o de pagamento via PIX",
                        "instruction_03": "Selecione a op莽茫o C贸digo QR",
                        "instruction_04": "Digitalize o c贸digo QR com a c芒mera do seu telefone",
                        "instruction_05": "Autorizar pagamento"
                    }
                ]
            },
            "customer": {
                "first_name": "Satoshi",
                "last_name": "Nakamoto",
                "document_number": "28266469781",
                "email": "dev@cfxpay.io",
                "country": "BR",
                "city": "Sao Paulo",
                "address": "R. Jose Simoes, 596",
                "zip": "01508001",
                "phone": "5511999999999",
                "device_id": "123123123",
                "ip": "182.147.131.140"
            }
        }
    ]
}
馃煚400Wrong Params
Modified at聽2024-02-29 16:46:47
Previous
payment_type
Next
payin_check
Built with