Create payout
## Payouts API
This endpoint allows you to create a new payout by submitting the necessary details regarding the transaction.
### HTTP Method
`POST`
### Endpoint
`{{url}}/api/v1/payouts`
### Request Body
| Field | Type | **Required** | **Description** |
| --- | --- | --- | --- |
| requestId | string | Yes | A unique request ID is specified by the client in the request. |
| pspId | string | No, if not provided will use pspSelection logic to choose PSP based on routing rule | The ID of the Payment Service Provider |
| manisPaymentMethodName | string | Yes | a payment method name of Manis definition |
| amount | decimal | Yes | Sender amount |
| `fundingCurrency` | string | Yes | The currency in which the payout is funded (e.g., "SGD"). |
| `customerId` | string | Yes | The unique identifier for the customer making the payout |
| `beneficiaryId` | string | Yes | The unique identifier for the beneficiary receiving the payout |
| `paymentType` | string | Yes | The type of payment used for the payout <br>Enum: WALLET <br>CARD <br>CASH <br>GLOBAL_TRANSFER <br>LOCAL_TRANSFER <br>GLOBAL_TRANSFER_FAST <br>LOCAL_TRANSFER_FAST <br>SWIFT <br>PROXY |
| `walletType` | string | Conditional(Nium only) | Specifies the type of wallet supported for the payment method. It depends on the country and currency, with different wallets available for each country. <br>Possible Values: <br> <br>China: Alipay <br> <br>Indonesia: OVO, GOPAY, DANA, LINKAJA, SHOPEEPAY <br> <br>Philippines: GCASH, PAYMAYA, SHOPEEPAY, STARPAY, TAYOCASH, PALAWANPAY, LULU, USSC, GRABPAY, MAYA, BAYAD, COINSPH, JUANCASH, IREMIT |
| `purposeCode` | string | Conditional | The purpose for the payment, i.e. SELF |
| `description` | string | Yes(Nium Only) | Payment Narration. |
| `beneficiaryAmount` | string | No | The amount of money that the beneficiary will receive |
| `sourceOfFunds` | string | Conditional(Nium Only) | source of funds |
| `webhookUrl` | string | No | HTTPS endpoint to receive async payout status updates via POST |
#### **Response Body**
200 OK
| Field | Type | **Description** |
| --- | --- | --- |
| `manisTransactionId` | string | ID of payout request in manis |
| `pspPayoutId` | string | Payout request id in PSP |
| `beneficiaryId` | string | Beneficiary id |
| `paymentType` | string | The method used for the payout <br>Enum: WALLET <br>CARD <br>CASH <br>GLOBAL_TRANSFER <br>LOCAL_TRANSFER <br>GLOBAL_TRANSFER_FAST <br>LOCAL_TRANSFER_FAST <br>SWIFT <br>PROXY |
| `walletType` | string | Specifies the type of wallet supported for the payment method. It depends on the country and currency, with different wallets available for each country |
| `transaction` | object | |
| └─`id` | string | ID of transaction in Manis |
| └─`requestId` | string | The client specifies a unique request ID in the request. |
| └─`customerId` | string | ID of the customer |
| └─`merchantId` | string | ID of the merchant |
| └─`pspId` | string | ID of the PSP |
| └─`paymentType` | string | The type of payment used for the payout <br>Enum: WALLET <br>CARD <br>CASH <br>GLOBAL_TRANSFER <br>LOCAL_TRANSFER <br>GLOBAL_TRANSFER_FAST <br>LOCAL_TRANSFER_FAST <br>SWIFT <br>PROXY |
| └─`status` | string | Status of payout <br>PENDING <br>COMPLETED <br>FAILED <br>EXPIRED <br>REFUNDED <br>CANCELLED |
| └─`currency` | string | Currency |
| └─`amount` | decimal | Amount of transaction |
| └─`description` | string | Description |
| └─`lastStatusUpdatedAt` | date(yyyy-MM-dd'T'HH:mm:ss.SSS'Z') | Last time update status |
| └─`createdBy` | string | |
| └─`createdAt` | date(yyyy-MM-dd'T'HH:mm:ss.SSS'Z') | |
| └─`updatedBy` | string | |
| └─`updatedAt` | date(yyyy-MM-dd'T'HH:mm:ss.SSS'Z') | |
| `createdBy` | string | |
| `createdAt` | date(yyyy-MM-dd'T'HH:mm:ss.SSS'Z') | |
| `updatedBy` | string | |
| `updatedAt` | date(yyyy-MM-dd'T'HH:mm:ss.SSS'Z') | |
400 BAD REQUEST
| **Field** | **Type** |
| --- | --- |
| `type` | string |
| `status` | number |
| `timestamp` | date(yyyy-MM-dd'T'HH:mm:ss.SSS'Z') |
| `title` | string |
| `soaCode` | string |
| `fieldErrors` | array |
| └─ `object` | string |
| └─ `field` | string |
| └─ `rejectedValue` | string |
| └─ `message` | string |
401 UNAUTHORIZED
Headers
X-Mock-Scenario
see supported scenarios https://dev.azure.com/eastgate-software/Manis-PaymentCenter/_wiki/wikis/Manis-PaymentCenter.wiki/8348/PSP-mock-module-guidance
Request
This endpoint expects a string.
Response
OK
createdAt
createdBy
updatedAt
updatedBy
pspPayoutId
transaction
beneficiaryId
pspPayoutMethod
manisTransactionId

