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: "jane.doe@example.com" 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: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Unauthorized - authentication failed content: application/json: schema: $ref: '#/components/schemas/Error' Forbidden: description: Forbidden - insufficient permissions content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' TooManyRequests: description: Rate limit exceeded (500 req/min) headers: X-RateLimit-Limit: schema: type: integer X-RateLimit-Remaining: schema: type: integer X-RateLimit-Used: schema: type: integer X-RateLimit-Reset: schema: type: integer schemas: Error: type: object properties: error: type: string description: type: string error_code: type: string sub_code: type: string error_info: type: object properties: timestamp: type: string format: date-time path: type: string Paging: type: object properties: skip: type: integer take: type: integer TokenRequest: type: object required: - api_key - client_secret properties: api_key: type: string description: Unique client identifier client_secret: type: string description: Client secret key token_name: type: string description: Optional custom token identifier TokenResponse: type: object properties: token: type: string description: JWT bearer token valid_until: type: string format: date-time description: Token expiration timestamp (ISO 8601) token_name: type: string description: Token identifier Wallet: type: object properties: id: type: string type: type: string currency: type: string description: ISO 4217 currency code name: type: string owner: type: string funding: type: object properties: name: type: string country: type: string account_number: type: string bic: type: string iban: type: string balance: type: number format: double user_tags: type: object state: type: string WalletStatement: type: object properties: id: type: string currency: type: string start: type: string format: date-time end: type: string format: date-time items: type: array items: type: object properties: type: type: string id: type: string description: type: string execution_id: type: string date: type: string format: date-time action: type: string debit: type: number credit: type: number fees: type: number rate: type: number balance: type: number counterpart: type: object user_tags: type: object paging: $ref: '#/components/schemas/Paging' Group: type: object properties: type: type: string id: type: string description: type: string locked: type: boolean name: type: string user_tags: type: object wallet: type: string GroupWithInfo: allOf: - $ref: '#/components/schemas/Group' - type: object properties: wallet_details: $ref: '#/components/schemas/Wallet' payment_funding: type: object payment_status: type: object GroupCreateRequest: type: object required: - wallet - name properties: wallet: type: string description: Wallet ID to associate with the group name: type: string description: type: string user_tags: type: object GroupUpdateRequest: type: object properties: name: type: string description: type: string user_tags: type: object BankDetails: type: object description: Bank details for a beneficiary (schema varies by country/currency) additionalProperties: true Entity: type: object description: Entity information (person or organization) additionalProperties: true Beneficiary: type: object properties: id: type: string type: type: string active: type: boolean name: type: string entity_type: type: string enum: [individual, company] country: type: string description: ISO 3166-2 country code currency: type: string description: ISO 4217 currency code entity: $ref: '#/components/schemas/Entity' bank_details: $ref: '#/components/schemas/BankDetails' user_tags: type: object BeneficiaryDetail: allOf: - $ref: '#/components/schemas/Beneficiary' - type: object properties: status: type: string payments: type: array items: type: object issues: type: array items: type: object BeneficiaryCreateRequest: type: object required: - entity_type - country - currency - entity - bank_details properties: entity_type: type: string enum: [individual, company] id: type: string description: Optional custom beneficiary ID country: type: string description: ISO 3166-2 country code currency: type: string description: ISO 4217 currency code tags: type: array items: type: string user_tags: type: object entity: $ref: '#/components/schemas/Entity' bank_details: $ref: '#/components/schemas/BankDetails' BeneficiaryInviteRequest: type: object required: - firstName - lastName - email properties: firstName: type: string middleName: type: string lastName: type: string email: type: string format: email beneficiaryId: type: string payGroupId: type: string invoiceCurrency: type: string user_tags: type: object BeneficiaryInviteResponse: type: object properties: invite: type: string format: date-time update: type: string format: date-time create: type: string format: date-time name: type: string ImportJobStatus: type: object properties: job_id: type: string started_at: type: string format: date-time completed_at: type: string format: date-time total: type: integer processed: type: integer processing: type: integer failed: type: integer status: type: string enum: [pending, processing, completed, failed] progress: type: array items: type: object PaymentAmount: type: object properties: value: type: number currency: type: string description: ISO 4217 currency code PaymentSource: type: object description: Source wallet or account for the payment properties: wallet: type: string description: Wallet ID group: type: string description: Group ID PaymentTarget: type: object description: Target beneficiary for the payment properties: beneficiary: type: string description: Beneficiary ID PaymentExecution: type: object properties: date: type: string format: date description: Scheduled execution date (YYYY-MM-DD) Payment: type: object properties: id: type: string correlation_id: type: string description: type: string purpose: type: string source: $ref: '#/components/schemas/PaymentSource' target: $ref: '#/components/schemas/PaymentTarget' amount: $ref: '#/components/schemas/PaymentAmount' execution: $ref: '#/components/schemas/PaymentExecution' approved: type: boolean final: type: boolean attachments: type: array items: type: string user_tags: type: object info: type: object properties: status: type: string funding: type: object credit: type: object rate: type: number fees: type: object PaymentCreateRequest: type: object required: - source - target - amount - execution properties: correlation_id: type: string description: type: string purpose: type: string source: $ref: '#/components/schemas/PaymentSource' target: $ref: '#/components/schemas/PaymentTarget' amount: $ref: '#/components/schemas/PaymentAmount' execution: $ref: '#/components/schemas/PaymentExecution' approved: type: boolean final: type: boolean attachments: type: array items: type: string user_tags: type: object PaymentUpdateRequest: type: object properties: description: type: string purpose: type: string source: $ref: '#/components/schemas/PaymentSource' target: $ref: '#/components/schemas/PaymentTarget' amount: $ref: '#/components/schemas/PaymentAmount' execution: $ref: '#/components/schemas/PaymentExecution' approved: type: boolean final: type: boolean attachments: type: array items: type: string user_tags: type: object