> ## Documentation Index
> Fetch the complete documentation index at: https://docs.swervpay.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create payout

> Create payout

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.swervpay.co/api/v1/payouts \
    -H "Authorization: Bearer <TOKEN>" \
    -H "Content-Type: application/json" \
    -d '{
      "bank_code": "user",
      "account_number": "user",
      "amount": "user",
      "currency": "NGN",
      "reference": "user",
      "narration": "user",
    }'
  ```

  ```javascript Node.js theme={null}
  import { SwervpayClient } from '@swervpaydev/sdk';

  const config = {
      secretKey: "<SECRET_KEY>",
      businessId: "<BUSINESS_ID>"
  }

  const swervpay = new SwervpayClient(config);

  await swervpay.payout.create({
      bank_code: "user",
      account_number: "user",
      amount: "user",
      currency: "NGN",
      reference: "user",
      narration: "user"
  })
  ```

  ```php PHP theme={null}
  use Swervpaydev\SDK\Swervpay;

  $config = [
  	'business_id' => '<BUSINESS_ID>',
  	'secret_key' => '<SECRET_KEY>'
  ];

  $client = new Swervpay($config);

  $client->payout()->create([
      "bank_code" => "user",
      "account_number" => "user",
      "amount" => "user",
      "currency" => "NGN",
      "reference" => "user",
      "naration" => "user"
  ]);
  ```

  ```go Go theme={null}
  package main

  import (
  	"context"
  	"fmt"
  	"github.com/swerv-ltd/swervpay-go"
  	"log"
  )

  func main() {
  	ctx := context.Background()

  	client := swervpay.NewSwervpayClient(&swervpay.SwervpayClientOption{
          BusinessID: "<BUSINESS_ID>",
          SecretKey: "<SECRET_KEY>",
      })

      data := swervpay.CreatePayoutBody{
          BankCode: "user",
          AccountNumber: "user",
          Amount: "user",
          Currency: "NGN",
          Reference: "user",
          Narration: "user"
      }

  	resp, err := client.Payout.Create(ctx, data)

  	if err != nil {
  		log.Fatal("error", err.Error())
  		return
  	}
  }
  ```
</RequestExample>


## OpenAPI

````yaml POST /payouts
openapi: 3.0.0
info:
  title: Swervpay Developer API Specification
  version: 0.0.0
servers:
  - url: https://api.swervpay.co/api/v1
    description: Production API
  - url: https://sandbox.swervpay.co/api/v1
    description: Sandbox API
security:
  - bearerAuth: []
paths:
  /payouts:
    post:
      tags:
        - payouts
      description: Create payout
      operationId: createPayout
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TypesCreatePayoutInput'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCreatePayoutResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
components:
  schemas:
    TypesCreatePayoutInput:
      type: object
      properties:
        account_number:
          type: string
        amount:
          type: number
        bank_code:
          type: string
        currency:
          type: string
        narration:
          type: string
        reference:
          type: string
    ResponseCreatePayoutResponse:
      type: object
      properties:
        id:
          type: string
        message:
          type: string
        reference:
          type: string
    UsererrorError:
      type: object
      properties:
        message:
          type: string
        values:
          type: object
          additionalProperties: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````