Papaya Global Workforce Payments API

REST API for managing global workforce payments, beneficiaries, wallets, and payment instructions across international markets.

OpenAPI Specification

papaya-global-workforce-payments-api.yml Raw ↑
openapi: 3.1.0
info:
  title: Papaya Global Workforce Payments API
  description: >
    REST API for managing global workforce payments, beneficiaries, wallets,
    and payment instructions across 160+ countries. Provides endpoints for
    creating and managing wallets, beneficiaries, payment groups, and payment
    instructions for international payroll and contractor payments.
  version: 1.0.0
  contact:
    name: Papaya Global Support
    url: https://docs.papayaglobal.com/
  termsOfService: https://www.papayaglobal.com/terms-of-service/
  license:
    name: Proprietary
    url: https://www.papayaglobal.com/terms-of-service/

servers:
  - url: https://api.papayaglobal.com/api/v1
    description: Production
  - url: https://sandbox.papayaglobal.com/api/v1
    description: Sandbox

security:
  - BearerAuth: []

tags:
  - name: Authentication
    description: Obtain access tokens for API authentication
  - name: Wallets
    description: Manage organizational wallets for payment funding
  - name: Groups
    description: Manage payment groups to consolidate payment requests
  - name: Beneficiaries
    description: Manage payment recipients including individuals and organizations
  - name: Payments
    description: Manage payment instructions and execution

paths:
  /token:
    post:
      operationId: createToken
      summary: Obtain Access Token
      description: >
        Authenticates with API key and client secret to obtain a JWT bearer
        token valid for 24 hours. Use the token in subsequent requests via the
        Authorization: Bearer header.
      tags:
        - Authentication
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequest'
            example:
              api_key: "82725488-22bf-40d1-ace6-9ea6ee42f870"
              client_secret: "MySecret!!!"
              token_name: "82725488-22bf"
      responses:
        '201':
          description: Token created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/wallets:
    get:
      operationId: listWallets
      summary: List Wallets
      description: Retrieve a list of organizational wallets with optional filtering.
      tags:
        - Wallets
      parameters:
        - name: id
          in: query
          schema:
            type: string
          description: Filter by wallet ID
        - name: active_only
          in: query
          schema:
            type: boolean
          description: Return only active wallets
        - name: currency
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter by currency code (ISO 4217)
        - name: skip
          in: query
          schema:
            type: integer
            default: 0
          description: Number of records to skip for pagination
        - name: take
          in: query
          schema:
            type: integer
            default: 50
          description: Number of records to return
      responses:
        '200':
          description: List of wallets
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Wallet'
                  paging:
                    $ref: '#/components/schemas/Paging'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'

  /payments/wallets/{id}/statement:
    get:
      operationId: getWalletStatement
      summary: Get Wallet Statement
      description: Retrieve transaction statement for a specific wallet within a date range.
      tags:
        - Wallets
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Wallet ID
        - name: start
          in: query
          schema:
            type: string
            format: date-time
          description: Start date-time for statement period (YYYY-MM-DDTHH:mm:ssZ)
        - name: end
          in: query
          schema:
            type: string
            format: date-time
          description: End date-time for statement period (YYYY-MM-DDTHH:mm:ssZ)
        - name: skip
          in: query
          schema:
            type: integer
            default: 0
        - name: take
          in: query
          schema:
            type: integer
            default: 50
      responses:
        '200':
          description: Wallet statement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletStatement'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /payments/groups:
    post:
      operationId: createGroup
      summary: Create Payment Group
      description: Create a new payment group to consolidate payment requests.
      tags:
        - Groups
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupCreateRequest'
      responses:
        '201':
          description: Payment group created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    get:
      operationId: listGroups
      summary: List Payment Groups
      description: Retrieve a list of payment groups with optional filtering.
      tags:
        - Groups
      parameters:
        - name: id
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter by group IDs
        - name: name
          in: query
          schema:
            type: string
        - name: description
          in: query
          schema:
            type: string
        - name: locked
          in: query
          schema:
            type: array
            items:
              type: boolean
        - name: wallet
          in: query
          schema:
            type: array
            items:
              type: string
        - name: skip
          in: query
          schema:
            type: integer
            default: 0
        - name: take
          in: query
          schema:
            type: integer
            default: 50
      responses:
        '200':
          description: List of payment groups
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/GroupWithInfo'
                  paging:
                    $ref: '#/components/schemas/Paging'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/groups/{id}:
    get:
      operationId: getGroup
      summary: Get Group Details
      description: Retrieve detailed information about a specific payment group.
      tags:
        - Groups
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Payment group details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupWithInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateGroup
      summary: Update Payment Group
      description: Update details of an existing payment group.
      tags:
        - Groups
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupUpdateRequest'
      responses:
        '200':
          description: Updated payment group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteGroup
      summary: Delete Payment Group
      description: Delete a payment group and optionally clear associated payments.
      tags:
        - Groups
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: clear
          in: query
          schema:
            type: boolean
          description: Clear associated payments when deleting
      responses:
        '200':
          description: Group deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  group:
                    type: object
                    properties:
                      id:
                        type: string
                      result:
                        type: string
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                        id:
                          type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /payments/groups/{id}/lock:
    patch:
      operationId: lockGroup
      summary: Lock Payment Group
      description: Lock a payment group to prevent further modifications.
      tags:
        - Groups
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Group locked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: unlockGroup
      summary: Unlock Payment Group
      description: Unlock a payment group to allow modifications.
      tags:
        - Groups
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Group unlocked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /payments/beneficiaries:
    post:
      operationId: createBeneficiary
      summary: Create Beneficiary
      description: Create a new payment beneficiary (individual or organization).
      tags:
        - Beneficiaries
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BeneficiaryCreateRequest'
      responses:
        '201':
          description: Beneficiary created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Beneficiary'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    get:
      operationId: listBeneficiaries
      summary: List Beneficiaries
      description: Retrieve a paginated list of beneficiaries with optional filtering.
      tags:
        - Beneficiaries
      parameters:
        - name: id
          in: query
          schema:
            type: array
            items:
              type: string
        - name: country
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter by country code (ISO 3166-2)
        - name: currency
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter by currency code (ISO 4217)
        - name: skip
          in: query
          schema:
            type: integer
            default: 0
        - name: take
          in: query
          schema:
            type: integer
            default: 50
      responses:
        '200':
          description: List of beneficiaries
          content:
            application/json:
              schema:
                type: object
                properties:
                  facets:
                    type: object
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Beneficiary'
                  paging:
                    $ref: '#/components/schemas/Paging'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/beneficiaries/{id}:
    get:
      operationId: getBeneficiary
      summary: Get Beneficiary Details
      description: Retrieve detailed information about a specific beneficiary.
      tags:
        - Beneficiaries
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Beneficiary details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BeneficiaryDetail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateBeneficiary
      summary: Update Beneficiary
      description: Update an existing beneficiary's details.
      tags:
        - Beneficiaries
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BeneficiaryCreateRequest'
      responses:
        '200':
          description: Beneficiary updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Beneficiary'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /payments/beneficiaries/{id}/collect:
    get:
      operationId: collectBeneficiaryInfo
      summary: Collect Beneficiary Bank Details
      description: Generate a URL for collecting bank details from a beneficiary directly.
      tags:
        - Beneficiaries
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: country
          in: query
          schema:
            type: string
        - name: currency
          in: query
          schema:
            type: string
        - name: entity_type
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Collection URL generated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  country:
                    type: string
                  currency:
                    type: string
                  entity_type:
                    type: string
                  expires:
                    type: string
                    format: date-time
                  url:
                    type: string
                    format: uri
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /payments/beneficiaries/invite:
    post:
      operationId: inviteBeneficiary
      summary: Invite Beneficiary
      description: Send an invitation to a beneficiary to complete their profile.
      tags:
        - Beneficiaries
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BeneficiaryInviteRequest'
            example:
              firstName: "Jane"
              lastName: "Doe"
              email: "[email protected]"
      responses:
        '201':
          description: Invitation sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BeneficiaryInviteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/beneficiaries/invite/resend:
    post:
      operationId: resendBeneficiaryInvite
      summary: Resend Beneficiary Invitation
      description: Resend an invitation to a beneficiary.
      tags:
        - Beneficiaries
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - beneficiaryId
              properties:
                beneficiaryId:
                  type: string
      responses:
        '200':
          description: Invitation resent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BeneficiaryInviteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/beneficiaries/import:
    post:
      operationId: importBeneficiaries
      summary: Bulk Import Beneficiaries
      description: Import multiple beneficiaries in bulk via an asynchronous job.
      tags:
        - Beneficiaries
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                update_payments:
                  type: boolean
                signature:
                  type: string
                items:
                  type: array
                  items:
                    $ref: '#/components/schemas/BeneficiaryCreateRequest'
      responses:
        '202':
          description: Import job started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportJobStatus'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/beneficiaries/import/{job_id}:
    get:
      operationId: getBeneficiaryImportStatus
      summary: Get Beneficiary Import Status
      description: Check the status of a bulk beneficiary import job.
      tags:
        - Beneficiaries
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Import job status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportJobStatus'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /payments/beneficiaries/validate:
    post:
      operationId: validateBeneficiaries
      summary: Validate Beneficiaries
      description: Validate beneficiary data before import.
      tags:
        - Beneficiaries
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      entity_type:
                        type: string
                      bank_details:
                        type: object
                      entity:
                        type: object
      responses:
        '200':
          description: Validation results
          content:
            application/json:
              schema:
                type: object
                properties:
                  totals:
                    type: object
                  valid:
                    type: array
                    items:
                      type: object
                  invalid:
                    type: array
                    items:
                      type: object
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/beneficiaries/schema/{entity_type}/{country}/{currency}:
    get:
      operationId: getBeneficiarySchema
      summary: Get Beneficiary Schema
      description: Retrieve the JSON schema for beneficiary data for a specific entity type, country, and currency combination.
      tags:
        - Beneficiaries
      parameters:
        - name: entity_type
          in: path
          required: true
          schema:
            type: string
            enum: [individual, company]
        - name: country
          in: path
          required: true
          schema:
            type: string
          description: ISO 3166-2 country code
        - name: currency
          in: path
          required: true
          schema:
            type: string
          description: ISO 4217 currency code
        - name: entity_country
          in: query
          schema:
            type: string
          description: Entity's country of origin if different
      responses:
        '200':
          description: Beneficiary schema
          content:
            application/json:
              schema:
                type: object
                properties:
                  currency:
                    type: string
                  country:
                    type: string
                  entity_type:
                    type: string
                  schema:
                    type: object
                    description: JSON Schema for the beneficiary data
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /payments/beneficiaries/bulkimport/invite:
    post:
      operationId: bulkInviteBeneficiaries
      summary: Bulk Invite Beneficiaries
      description: Send invitations to multiple beneficiaries in bulk.
      tags:
        - Beneficiaries
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    $ref: '#/components/schemas/BeneficiaryInviteRequest'
      responses:
        '202':
          description: Bulk invite job started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportJobStatus'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/payments:
    post:
      operationId: createPayment
      summary: Create Payment Instruction
      description: Create a new payment instruction for a beneficiary.
      tags:
        - Payments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentCreateRequest'
      responses:
        '201':
          description: Payment instruction created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    get:
      operationId: listPayments
      summary: List Payment Instructions
      description: Retrieve a paginated list of payment instructions.
      tags:
        - Payments
      parameters:
        - name: skip
          in: query
          schema:
            type: integer
            default: 0
        - name: take
          in: query
          schema:
            type: integer
            default: 50
      responses:
        '200':
          description: List of payment instructions
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Payment'
                  paging:
                    $ref: '#/components/schemas/Paging'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/payments/{id}:
    get:
      operationId: getPayment
      summary: Get Payment Details
      description: Retrieve details of a specific payment instruction.
      tags:
        - Payments
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Payment instruction details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updatePayment
      summary: Update Payment Instruction
      description: Update an existing payment instruction.
      tags:
        - Payments
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentUpdateRequest'
      responses:
        '200':
          description: Payment updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /payments/payments/approve:
    patch:
      operationId: approvePayment
      summary: Approve Payment
      description: Approve one or more payment instructions.
      tags:
        - Payments
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: string
          description: Payment ID to approve
      responses:
        '200':
          description: Payment approved
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                        id:
                          type: string
                        result:
                          type: string
                        correlation_id:
                          type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: unapprovePayment
      summary: Unapprove Payment
      description: Remove approval from a payment instruction.
      tags:
        - Payments
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: string
          description: Payment ID to unapprove
      responses:
        '200':
          description: Payment unapproved
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                        id:
                          type: string
                        result:
                          type: string
                        correlation_id:
                          type: string
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/payments/{id}/send:
    post:
      operationId: executePayment
      summary: Execute Payment
      description: Execute (send) an approved payment instruction.
      tags:
        - Payments
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Payment executed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /payments/payments/cancel:
    post:
      operationId: cancelPayment
      summary: Cancel Payment
      description: Cancel a payment instruction.
      tags:
        - Payments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
              properties:
                id:
                  type: string
                cancel_reason:
                  type: string
      responses:
        '200':
          description: Payment cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/payments/import:
    post:
      operationId: importPayments
      summary: Bulk Import Payments
      description: Import multiple payment instructions in bulk via an asynchronous job.
      tags:
        - Payments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    $ref: '#/components/schemas/PaymentCreateRequest'
      responses:
        '202':
          description: Import job started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportJobStatus'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /payments/payments/import/{job_id}:
    get:
      operationId: getPaymentImportStatus
      summary: Get Payment Import Status
      description: Check the status of a bulk payment import job.
      tags:
        - Payments
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Import job status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportJobStatus'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

  responses:
    BadRequest:
      description: Bad request - missing or invalid parameters
      content:
 

# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/papaya-global/refs/heads/main/openapi/papaya-global-workforce-payments-api.yml