Skip to content

feat: add payment method type PixQr - #1678

Open
bsayak03 wants to merge 3 commits into
mainfrom
pixQr/newpmt
Open

feat: add payment method type PixQr#1678
bsayak03 wants to merge 3 commits into
mainfrom
pixQr/newpmt

Conversation

@bsayak03

@bsayak03 bsayak03 commented Jul 7, 2026

Copy link
Copy Markdown

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Added a new payment method type PixQr

How did you test it?

  1. Payment link - PixAutomaticoPush (J1)
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_v27sbs7B9tFuSPvk6WnBoKcLfcZ5EH116aWMiUTRPpKSLQloJY7s4vtp908b4HRC' \
--data-raw '{
    "amount": 0,
    "currency": "BRL",
    "merchant_order_reference_id": "17777",
    "confirm": false,
    "payment_link": true,
    
    "session_expiry": 600000,
    "capture_method": "automatic",
    "payment_type": "setup_mandate",
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "in sit",
            "user_agent": "amet irure esse"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "state": "NL",
            "zip": "94122",
            "country": "BR",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "random@juspay.in"
    },
    "return_url": "https://www.example.com",
    "metadata": {
        "Field 1": "Additional Information1 from PSP-Receiver",
        "Field 2": "Additional Information2 from PSP-Receiver"
    },
    "billing_descriptor": {
        "statement_descriptor": "Its my second payment request"
    },
    "description": "Its'\''s my first payment request",
    "feature_metadata": {
        "pix_automatico_additional_details": {
            "type": "pix_automatico_push",
            "retry_policy": true,
            "time": 8600,
            "mandate_details": {
                "fixed_recurring_amount": 5000,
                
                "start_date": "2026-08-23",
                "end_date": "2027-06-09",
                "periodicity": "monthly"
            }
        }
    },
    "customer": {
        "id": "cus_eef0KnZEoPUxxdXpC06N"
    }
}'
Screenshot 2026-08-19 at 15 35 45 Screenshot 2026-08-19 at 15 40 27

SDK is not handling this particular next_action type

    "next_action": {
        "type": "wait_screen_information",
        "display_from_timestamp": 1787134137831690000,
        "display_to_timestamp": 1787142737831690000,
        "poll_config": {
            "delay_in_secs": 5,
            "frequency": 1720
        }
    },
  1. Payment link - PixAutomaticoQr (J2)
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_v27sbs7B9tFuSPvk6WnBoKcLfcZ5EH116aWMiUTRPpKSLQloJY7s4vtp908b4HRC' \
--data-raw '{
    "amount": 0,
    
    "currency": "BRL",
    "confirm": false,
    "payment_link": true,
    "session_expiry": 600000,
    "capture_method": "automatic",
    "payment_type": "setup_mandate",
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "in sit",
            "user_agent": "amet irure esse"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "state": "NL",
            "zip": "94122",
            "country": "BR",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "random@juspay.in"
    },
    "return_url": "https://www.example.com",
    "metadata": {
        "Field 1": "Additional Information1 from PSP-Receiver",
        "Field 2": "Additional Information2 from PSP-Receiver"
    },
    "billing_descriptor": {
        "statement_descriptor": "It'\''s my second payment request"
    },
    "description": "It'\''s my first payment request",
    "feature_metadata": {
        "pix_automatico_additional_details": {
            "type": "pix_automatico_qr",
            "retry_policy": true,
            "mandate_details": {
                "fixed_recurring_amount": 5000,
                
                "start_date": "2026-08-23",
                "end_date": "2027-06-09",
                "periodicity": "monthly"
            }
        }
    },
    "merchant_order_reference_id": "16503867",
    "customer": {
        "id": "cus_eef0KnZEoPUxxdXpC06N"
    }
}'
Screenshot 2026-08-19 at 13 38 22 Screenshot 2026-08-19 at 13 38 13
  1. Payment Link - PixAutomaticoQr (J3)
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_v27sbs7B9tFuSPvk6WnBoKcLfcZ5EH116aWMiUTRPpKSLQloJY7s4vtp908b4HRC' \
--data-raw '{
    "amount": 10,
    "currency": "BRL",
    "confirm": false,
    "payment_link": true,
    "session_expiry": 600000,
    "capture_method": "automatic",
    "payment_type": "new_mandate",
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "in sit",
            "user_agent": "amet irure esse"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "state": "NL",
            "zip": "94122",
            "country": "BR",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "random@juspay.in"
    },
    "return_url": "https://www.example.com",
    "metadata": {
        "Field 1": "Additional Information1 from PSP-Receiver",
        "Field 2": "Additional Information2 from PSP-Receiver"
    },
    "billing_descriptor": {
        "statement_descriptor": "It'\''s my second payment request"
    },
    "description": "It'\''s my first payment request",
    "merchant_order_reference_id": "17777",
    "feature_metadata": {
        "pix_additional_details": {
            "immediate": {
                "time": 86400
            }
        },
        "pix_automatico_additional_details": {
            "type": "pix_automatico_qr",
            "retry_policy": true,
            "time": 8600,
            "mandate_details": {
                "fixed_recurring_amount": 5000,
                
                "start_date": "2026-08-23",
                "end_date": "2027-06-09",
                "periodicity": "monthly"
            }
        }
    },
    "customer": {
        "id": "cus_eef0KnZEoPUxxdXpC06N"
    }
}'
Screenshot 2026-08-19 at 15 31 38 Screenshot 2026-08-19 at 15 31 28
  1. Payment Link - PixAutomaticoQr (J4)
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Accept-Language: pt' \
--header 'api-key: dev_v27sbs7B9tFuSPvk6WnBoKcLfcZ5EH116aWMiUTRPpKSLQloJY7s4vtp908b4HRC' \
--data-raw '{
    "amount": 10,
    "currency": "BRL",
    "merchant_order_reference_id": "17777",
    "confirm": false,
    "payment_link": true,
    "session_expiry": 600000,
    "capture_method": "automatic",
    "payment_type": "setup_mandate",
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "in sit",
            "user_agent": "amet irure esse"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "state": "NL",
            "zip": "94122",
            "country": "BR",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "random@juspay.in"
    },
    "return_url": "https://www.example.com",
    "metadata": {
        "Field 1": "Additional Information1 from PSP-Receiver",
        "Field 2": "Additional Information2 from PSP-Receiver"
    },
    "billing_descriptor": {
        "statement_descriptor": "It'\''s my second payment request"
    },
    "description": "It'\''s my first payment request",
    "connector_metadata": {
        "santander": {
            "pix_automatico": {
                "cit": {
                    "retry_policy": true,
                    "contract_id": "16503867",
                    "mandate_details": {
                        "amount": 5,
                        "start_date": "2026-04-17",
                        "end_date": "2027-10-01",
                        "periodicity": "weekly"
                    }
                }
            }
        }
    },
        "feature_metadata": {
        "pix_additional_details": {
            "scheduled": {
                "date": "2026-09-10"
            }
        },
        "pix_automatico_additional_details": {
            "type": "pix_automatico_qr",
            "retry_policy": true,
            "time": 8600,
            "mandate_details": {
                "fixed_recurring_amount": 5000,
                
                "start_date": "2026-08-25",
                "end_date": "2027-06-09",
                "periodicity": "monthly"
            }
        }
    },
    "customer": {
        "id": "cus_eef0KnZEoPUxxdXpC06N"
    }
}'
Screenshot 2026-08-19 at 15 34 15 Screenshot 2026-08-19 at 15 34 25

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@semanticdiff-com

Copy link
Copy Markdown

Review changes with  SemanticDiff

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

Shivam25092001
Shivam25092001 previously approved these changes Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add payment method type PixQr

2 participants