merchantLogostring · uri · max: 600 · nullableOptional
layoutColorstring · max: 7 · nullableOptional
labelIdinteger · int64 · nullableOptional
paymentMethodIdinteger · int32Optional
paymentMethodstring · nullableOptional
fullNamestring · nullableOptional
lockByNamebooleanOptional
birthDatestring · nullableOptional
emailstring · nullableOptional
zipcodestring · nullableOptional
Responses
200
Success
400
Bad Request
post
/1.0/Go/Process
Transaction Parameters
The following table provides a list of parameters required for transaction processing:
Parameter
Type
Description
Required
hash
String
Anti-fraud hash. Refer to Appendix 1 for generation details.
Yes
amount
Decimal
Payment amount with up to 2 decimal places.
Yes
merchantInvoiceId
String
Unique transaction ID for merchants. Maximum of 250 characters.
Yes
language
String
Preferred language for customer: pt-BR, en-US, or es-ES.
No
currency
String
Currency code as per ISO 4217 (3 characters). Supported Currencies: BRL, GBP, USD, EUR.
Yes
okUrl
String
Redirection URL upon successful transaction.
Yes
notOkUrl
String
Redirection URL upon transaction failure.
Yes
confirmationUrl
String
URL for merchant’s transaction confirmation.
Yes
labelId
Integer
Label for transaction tagging. Refer to Appendix 3 for details.
No
Make sure to send the correct information to the API. Pay4Fun takes no responsibility for incorrect amount or currency parameters sent to the API.
Onboard Data Parameters
To enhance the user experience, you can provide your customer's personal data. If provided, we'll automatically populate the appropriate fields during the transaction process. Otherwise, the customer will be prompted to enter this information themselves.
Note: We only process the customer's initial data submission. Subsequent submissions of the same data will be ignored, so it's only necessary to send this information once.
Parameter
Type
Description
Required
zipcode
String
Brazilian postal code.
No
email
String
Customer's email address.
No
birthDate
String
Birthdate in yyyy-MM-dd format.
No
fullName
String
Customer's full name.
No
p4fMainId
String
Customer's CPF.
No
Payment Method Parameters
Display Pay4Fun GO as a Single Icon: By doing this, you should avoid specifying any Payment Method parameters in your request. We will present all available payment methods, letting the customer select their preferred option.
Use Individual Icons for Each Payment Method: If you opt for this, include just ONE of the parameters—either paymentMethod or paymentMethodId—in your request. Based on this, we'll guide the customer directly to the confirmation screen for their chosen payment method.
Parameter
Type
Description
Required
paymentMethod
String
Desired Payment Method: PIX, Boleto, or BankTransfer.
No
paymentMethodId
Integer
Check Error! Not a valid result for table. section for more details
No
Branding
Parameter
Type
Description
Required
merchantLogo
String
Merchant logo URL (https). Max height: 40 pixels.
No
layoutColor
String
Hexadecimal color code.
No
Want to change the look of Pay4Fun's interface? You can!
Change the Header Color: Use the "layoutColor" parameter and provide a color code (like #FF5733).
Add Your Logo: Use the "merchantLogo" parameter and give the link to your logo image.
Just remember to include these when making Pay In requests.
Pay in hash seed string generation
To generate the seed string for hash creation in Pay in requests (See Appendix – Generating the Hash), follow the concatenation order below:
Merchant’s ID
Pay in amount (expressed in cents and always including two decimal places)
Merchant’s invoice ID
Merchant’s secret
Example: Consider a Pay in request of $10.00 USD tied to merchant’s invoice ID ABC777. Given:
Merchant’s ID: 34567
Merchant’s secret: abcdef
The resulting seed string becomes:
Security Note: The Merchant's secret is crucial for hash integrity. Ensure it remains confidential to prevent unauthorized hash generation.
Key Point: Always include cents in the seed string, even for whole amounts like $1000.00.
The P4F API will generate its hash for verification. If there's a mismatch, likely due to an attempt to forge a request without the authentic Merchant's secret, the transaction will be declined.
Payment Methods
Retrieve a List of Payment Methods available for P4F GO API
get
Header parameters
merchantIdstringOptional
hashstringOptional
Responses
200
Success
400
processing_error
get
/1.0/Go/PaymentMethods
How to Create a Seed String for Payment Methods:
To make a seed string for hash generation:
Start with the Merchant's ID.
Add the Merchant's Secret.
For detailed hash generation, see Appendix 1.
Example: If your Merchant's ID is 34567 and Secret is abcdef, then:
Seed string = 34567abcdef