PayPaga
  1. Pay In - Direct API Integration
PayPaga
  • Introduction
    • Introduction
    • API Reference
    • Errors
    • Standard Codes and Values
  • Authorization
    • Authorization
    • OAuth 2.0 Token Generation
  • Pay In - Direct API Integration
    • Pay In - Direct API Integration
    • Pay In - Payment Options
      POST
    • Pay In - Payment Processing
      POST
    • Pay In - Query Transactions
      GET
  • Pay In - PayURL Integration
    • Pay In - PayURL Integration
    • Pay In - Create PayURL
  • Pay Out - Direct API Integration
    • Pay Out - Direct API Integration
    • Pay Out - Query Transactions
    • Pay Out - Payment Processing
  • Pay Out - Examples
    • Pay Out - Brazil
    • Pay Out - Mexico
    • Pay Out - Argentina (V2)
    • Pay Out - Colombia (V2)
    • Pay Out - Ecuador (V2)
    • Pay Out - Guatemala (V2)
    • Pay Out - Peru (V2)
  • Transactions Status Notification
    • Transactions Status Notification
  • Query Balance
    • Query Balance
  • Appendix
    • Transaction Status Definitions and Lifecycle
  1. Pay In - Direct API Integration

Pay In - Payment Processing

Developing
Develop Env
https://merchant-api.stg.paypaga.com
Develop Env
https://merchant-api.stg.paypaga.com
POST
https://merchant-api.stg.paypaga.com
/payment
Executes a Pay In payment transaction referencing a prior Pay In - Payment Options transaction intent, indicating the selected payment method and supplying any payment method specific data.
Required fields by country and payment method (details and definitions provided in the Pay In - Payment Options)
All Pay In transactions where asynchronous end user interaction is required will transition to an Expired status if the payment remains in a Pending status after a time limit. Payment method expiration times are as follows:
México
Bank Transfer (SPEI) – 72 hours after initiation
Pay With Cash – 168 hours after initiation
Brasil
Bank Transfer (PIX) – 72 hours after initiation
A transaction in Initiated state where no Payment Method has been selected will transition to an Expired status after 96 hours. A notification will be sent when a transaction has expired as described in Transactions Status Notification.
CountryPayment MethodField
BRBNKTRFirst name
BRBNKTRLast name
BRBNKTRCPF - Cadastro de Pessoas Físicas (11 digits unformatted)
Error codes for Pay In Payment Processing
Error codeDescription
100Input validations error(s)
101The transaction is already processed
102The transaction has failed previously
105The transaction total amount doesn't match with the transaction total amount previously sent in the payment options endpoint (applies only when total amount > 0)
106Payment processing failed, please contact our IT support team
109Required Transaction Fields are missing
111transaction_total must be greater than 0 and less than 10000000.00
112Selected Payment Method Not Found
113Transaction Configuration Not Found
114Transaction Rejected Due To Payment Method Limits
123Merchant id mismatch
151Country or currency is invalid
195Bad Request
196Error To Connect to the Partner
500Unexpected error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://merchant-api.stg.paypaga.com/payment' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
  "transaction_id": "20240201-0028-5510-a83b-82042d2bc79d",
  "merchant_id": "4392a925-8eb1-4ba5-bbd4-e6085c15758d",
  "transaction_total": 100.03,
  "payment_method_code": "BNKTR",
  "currency": "BRL",
  "merchant_transaction_reference": "abc4561698162696828",
  "transaction_fields": [
    {
      "name": "first_name",
      "value": "Barão"
    },
    {
      "name": "last_name",
      "value": "Praça"
    },
    {
      "name": "cpf_number",
      "value": "12234514789"
    }
  ]
}'
Response Response Example
200 - Success
{
  "transaction_id": "20240202-1733-0118-90ca-7b779a307568",
  "transaction_payment_mode": "ASYNCHRONOUS",
  "payment_method_reference": "1441258800171",
  "message": "Transaction Successfully",
  "next_steps_detail_instructions": [
    {
      "type": "label",
      "key": "main_instructions",
      "label": "Instructions",
      "description": "Keep the reference number, after locating a near agency ask the cashier by telling you want to pay a Paycash reference and share the reference number. Make sure you get a ticket to confirm the payment"
    },
    {
      "key": "reference_url",
      "label": "Click here for a payment details page.",
      "description": "http://ec2-3-140-103-165.us-east-2.compute.amazonaws.com:8085/formato.php?referencia=MTQ0MTI1ODgwMDE3MQ==&interno=1"
    }
  ]
}

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

🟠400Bad Request
🔴500Server Error
Previous
Pay In - Payment Options
Next
Pay In - Query Transactions
Built with