Payout
This endpoint initiates a payout order.
POST - Sandbox
https://sandbox.paypaygateway.com/fn-execute/payment/payout
POST - Production
https://api.paypaygateway.com/fn-execute/payment/payout
Header Parameters
| Parameter | Description | Type | R/O |
|---|---|---|---|
Authorization | Authorization header containing your Secret Key | string | R |
mid | mid header containing your merchant ID | string | O |
Body Parameters
| Parameter | Description | Type | R/O |
|---|---|---|---|
referenceNo | The unique number provided by the merchant is used to track payouts. (max. 32 characters) | string | R |
amount | Amount to payout, in the minor unit of your selected currency. All currencies are standardized to 100 units. For example, an amount of 100 in EUR is equal to 1€ | number | R |
currency | Code of the currency. Must consist of 3 capital letters. | string | R |
creditCard | An object that contains credit card data. | object | R |
holder | Cardholder name. | string | R |
number | Cardholder number. Must be between 13 and 19 characters long. | string | R |
expiryMonth | Card expiry month. 1 or 2 digits, between 1 and 12. | string | R |
expiryYear | Card expiry year. 2 or 4 digits. | string | R |
firstName | Customer first name | string | R |
lastName | Customer last name | string | R |
email | Customer email | string | R |
phone | Customer phone number. Must contain from 8 to 15 characters. | string | R |
country | Customer country code. Should be 2 or 3 characters long. | string | R |
street | Customer street | string | R |
city | Customer city | string | R |
zip | Customer zip | string | R |
ip | Customer ip | string | R |
dateOfBirth | Customer date of birth. (YYYY-MM-DD) | string | R |
notifyUrl | URL to send notifications when the payout status changes | string | R |
hash | The unique SHA-256 hash value of the request body | string | R |
{
"referenceNo": "d43aaaca80e842a890f5dfad095f456",
"amount": 50000,
"currency": "EUR",
"creditCard": {
"holder": "Alex Fox",
"number": "4242424242424242",
"expiryMonth": "08",
"expiryYear": "2027",
},
"customer": {
"firstName": "Alex",
"lastName": "Fox",
"email": "somaaaaaik@mail.com",
"phone": "15551134567",
"country": "NJ",
"street": "2495 Lake Road",
"city": "Merchantville",
"zip": "08109",
"ip": "192.168.1.1",
"dateOfBirth": "2000-08-24",
},
"notifyUrl": "https://example.com",
"hash": "9cbd219ef45d7957262bca36c080b383ca7cdfb08e9f1fcc0dec0bfe4d97ac4b"
}
Responses
Response Payout
200
{
"status": 'successful',
"code": '2007',
"messagetype": 'payout',
"message": {
"status": 'SUCCESS',
"referenceNo": '1770115577184-15',
"payoutId": '6981d1fb9a9ccb0513fd4ae7',
"amount": 50000,
"currency": 'EUR'
}
}
| Parameter | Description | Type |
|---|---|---|
status | Response status | string |
code | Response code | string |
messagetype | Response message type | string |
message | Response message | object |
200
{
"status": 'successful',
"code": '2007',
"messagetype": 'payout',
"message": {
"status": 'PAYOUT_REQUESTED',
"referenceNo": '1770115577184-15',
"payoutId": '6981d1fb9a9ccb0513fd4ae7',
"amount": 50000,
"currency": 'EUR'
}
}
| Parameter | Description | Type |
|---|---|---|
status | Response status | string |
code | Response code | string |
messagetype | Response message type | string |
message | Response message | object |
400
{
"status": "failure",
"code": "1039",
"messagetype": "payout",
"message": {
"error": "Invalid creditCard.holder: It must be a string"
}
}
| Parameter | Description | Type |
|---|---|---|
status | Response status | string |
code | Response code | string |
messagetype | Response message type | string |
message | Response message | object |