1. Pay Out Request

A Pay Out transaction occurs when a Customer requests a withdrawal in the Merchant website. Confirmed withdrawals will be debited from the Merchant wallet account.

1. Send a Pay Out Request

Receives an API request from Merchant and store it under a Key for further recover

post
Body
idinteger · int64Optional
merchantIdinteger · int64Required
merchantInvoiceIdstring · min: 1Required
currencystring · max: 3Required
amountnumber · currencyRequired
hashstring · max: 300Required
targetCustomerEmailstring · email · min: 1Required
pixKeyTypestring · min: 1Required
confirmationUrlstring · uri · min: 1Required
labelIdinteger · int64 | nullableOptional
bankCodeinteger · int32Optional
bankAccountstring | nullableOptional
bankBranchstring | nullableOptional
bankAccountTypestring | nullableOptional
idiomstring | nullableOptional
targetCustomerMainIdstring | nullableOptional
targetCustomerIdinteger · int64Optional
convertedCurrencystring | nullableOptional
convertedAmountnumber · doubleOptional
apiProcessIdinteger · int32Optional
contaCertaFailbooleanOptional
fullNamestring | nullableOptional
targetCustomerBirthDatestring | nullableOptional
targetCustomerPhoneNumberCountryCodestring | nullableOptional
targetCustomerPhoneNumberAreaCodestring | nullableOptional
targetCustomerPhoneNumberstring | nullableOptional
Responses
post
/1.0/GoOut/Process
POST /1.0/GoOut/Process HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 610

{
  "id": 1,
  "merchantId": 1,
  "merchantInvoiceId": "text",
  "currency": "text",
  "amount": 1,
  "hash": "text",
  "targetCustomerEmail": "[email protected]",
  "pixKeyType": "text",
  "confirmationUrl": "https://example.com",
  "labelId": 1,
  "bankCode": 1,
  "bankAccount": "text",
  "bankBranch": "text",
  "bankAccountType": "text",
  "idiom": "text",
  "targetCustomerMainId": "text",
  "targetCustomerId": 1,
  "convertedCurrency": "text",
  "convertedAmount": 1,
  "apiProcessId": 1,
  "contaCertaFail": true,
  "fullName": "text",
  "targetCustomerBirthDate": "text",
  "targetCustomerPhoneNumberCountryCode": "text",
  "targetCustomerPhoneNumberAreaCode": "text",
  "targetCustomerPhoneNumber": "text"
}
{
  "transactionId": 1,
  "merchantInvoiceId": "text",
  "currency": "text",
  "amount": 1,
  "convertedCurrency": "text",
  "convertedAmount": 1,
  "feeAmount": 1,
  "status": 1,
  "message": "text",
  "apiMessage": "text",
  "customerEmail": "text",
  "hash": "text",
  "process": "text",
  "txType": "text",
  "txOrigin": "text"
}

Payout Request Parameters Specification

The following table provides a list of parameters required for Payout Request transaction:

:

Parameter
Type
Description
Required

amount

Decimal

Payout amount (2 digits after the decimal point)

Yes

merchantInvoiceId

String

Merchant’s transaction unique identifier (maximum 250 chars)

Yes

language

String

Customer’s desired language ( pt-BR, en-US or es-ES )

No

currency

String

Payout currency ( ISO 4217

  • 3 characters code )

Yes

confirmationUrl

String

Merchant’s confirmation URL

Yes

merchantId

Integer

Merchant’s unique identifier at Pay4Fun

Yes

hash

String

Request hash to avoid fraud (check Appendix 1 – Generating the Hash section)

Yes

targetCustomerMainId

String

Locks the transaction to a specific Customer’s Main Id

Yes

targetCustomerEmail

String

The target Customer e-mail

Yes

fullName

String

Customer’s full name

Yes

targetCustomerBirthDate

String

Customer’s birth date (format yyyy-mm-dd)

Yes

pixKeyType

String

Pix key type to be performed: CPF, Email, Telefone or DadosBancarios

yes

If parameter pixKeyType = “DadosBancarios”, the bellow parameters are MANDATORY

Parameter
Type
Description
Description

bankCode

String

Bank’s Code

Yes/No

bankBranch

String

Customer’s bank branch

Yes/No

bankAccount

String

Customer’s bank account

Yes/No

bankAccountType

String

Customer’s bank account type: SAVING or PERSONAL

Yes/No

If parameter pixKeyType = “Telefone”, the bellow parameters are MANDATORY

Parameter
Type
Description

targetCustomerPhoneNu mberCountryCode

String

Customer’s phone country code

Yes/No

targetCustomerPhoneNu mberAreaCode

String

Customer’s phone area code

Yes/No

targetCustomerPhoneNumber

String

Customer’s mobile phone number

Yes/No

PAYOUT HASH SEED STRING Generation

To generate the seed string for hash creation in PayOut requests, follow the concatenation order below:

  1. merchant’s ID;

  2. payout amount with cents (without comma or decimal point);

  3. merchant invoice ID;

  4. target customer’s email;

  5. merchant’s secret;

Example: Considering a Payout amount of 10.00 USD, related to the Customer email [email protected]. Assuming merchant’s ID is 34567, merchant Invoice ID is 12345 and merchant’s secret is “abcdef”, the seed string for sign hash generation would be (in that order):

Seed string = [email protected]

JSON Request sample:

A valid JSON request file would be like:

{
"amount": 10.00,
"merchantInvoiceId": "ABC777",
"language": "pt-BR",
"currency": "BRL",
"confirmationUrl": "https://url.com/confirmation_url",
"merchantId": 0,
"hash": "878F6A389131E58AE25210CE335A1A9BCB594EAE9F2",
"targetCustomerEmail": "[email protected]",
"targetCustomerMainId": "11111111111",
"pixKeyType": "DadosBancarios",
"bankCode": "15",
"bankBranch": "12345",
"bankAccount": "678-9",
"bankAccountType": "personal"
}

Last updated

Was this helpful?