Pay4fun
Online payments with convenience and security
Website: p4f.com
Set up Account
Step 1: Create merchant account
To create an account send connection request at the merchant.p4f.com or contact manager directly. Submit the required documents to verify your account and gain access.
Step 2: Get required credentials
Credentials that have to be issued:
- Merchant ID
- Merchant Key
- Merchant Secret
Connect Provider Account
Step 1. Connect Provider account at the Corefy Dashboard
Press Connect at Pay4fun Provider Overview page in 'New connection' section and choose Provider account option to open Connection form.
Enter credentials:
- Merchant ID → Merchant ID
- Merchant Key → Merchant Key
- Merchant Secret → Merchant Secret
Success
You have connected Pay4fun Provider account!
API examples:
Data set to create a payments
POST /api/commerce/payment-invoices HTTP/1.1
{
"data": {
"type": "payment-invoice",
"attributes": {
"service": "pay4fun_brl_hpp",
"commerce_account": "Hello world",
"currency": "BRL",
"amount": 100,
"flow": "charge",
"gateway_options": {
"cardgate": {
"tokenize": ""
}
},
"test_mode": true,
"options": {
"allow_partially": false,
"bypass_hpp": false,
"send_operation_context_on_return": false
},
"reference_id": "d0ed0d7f-d983-4901-a843-aad52374ba81",
"service_fields": []
}
}
}
Data set to create a payout
POST /api/commerce/payout-invoices HTTP/1.1
{
"data": {
"type": "payout-invoice",
"attributes": {
"service": "pay4fun_brl",
"commerce_account": "hello world",
"currency": "BRL",
"amount": 100,
"test_mode": true,
"reference_id": "fcabc311-32c1-4fec-ac46-130d253d94bb",
"fields": {
"account_email": "[email protected]"
},
"options": {
"attempts_limit": 0,
"split_mode": false,
"allow_partially": false,
"auto_process": true
}
}
}
}
Additional information
Constants for Provider account
If some parameters are not sent in the transaction creation request, they will take the values from the set constants.
Here is a list of constants with their corresponding parameters:
- LANG → language
- merchant_logo → Here you can set your own logo on HPP page
- layout_color → Here you can set desired color on HPP page
Default values for Provider account
If some parameters are not passed in the request to create a transaction and the corresponding constants have no values, then default values will be passed instead.
Here is the list of default values with their corresponding parameters:
- lang → 'en'
Still looking for help connecting your Pay4fun account?