openapi: 3.0.0
info:
  title: PawaPay Merchant API V2
  description: Please find complete documentation from https://docs.pawapay.io/.
  version: v2
  x-logo:
    url: https://global-uploads.webflow.com/62824591015aa314fd308df1/6411b26596e3de3f52551c00_Logopawapay-p-500.png
    href: https://docs.pawapay.io/
    altText: PawaPay logo
servers:
  - url: https://api.sandbox.pawapay.io
    description: PawaPay Merchant API sandbox
  - url: https://api.pawapay.io
    description: PawaPay Merchant API production
security:
  - bearerAuth: []
tags:
  - name: deposits
    x-displayName: Deposits
  - name: split-payments
    x-displayName: Split Payments
  - name: checkouts
    x-displayName: Checkouts
  - name: payouts
    x-displayName: Payouts
  - name: refunds
    x-displayName: Refunds
  - name: remittances
    x-displayName: Remittances
  - name: payment-page
    x-displayName: Payment Page
  - name: toolkit
    x-displayName: Toolkit
  - name: finances
    x-displayName: Finances
paths:

  ## Deposits
  /v2/deposits:
    post:
      tags:
        - deposits
      summary: Initiate deposit
      operationId: initiateDeposit
      requestBody:
        $ref: '#/components/requestBodies/DepositCreationRequest'
      parameters:
        - $ref: '#/components/parameters/Content-Digest'
        - $ref: '#/components/parameters/Signature'
        - $ref: '#/components/parameters/Signature-Input'
        - $ref: '#/components/parameters/Accept-Signature'
        - $ref: '#/components/parameters/Accept-Digest'
      responses:
        '200':
          description: Request has valid payload. See 'status' to confirm if payment was accepted for processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositCreationResponse'
              examples:
                ACCEPTED:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                    created: '2020-10-19T11:17:01Z'
                DUPLICATE_IGNORED:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: DUPLICATE_IGNORED
                    created: '2020-10-19T11:17:01Z'
                PROVIDER_TEMPORARILY_UNAVAILABLE:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: PROVIDER_TEMPORARILY_UNAVAILABLE
                      failureMessage: The provider 'MTN_MOMO_ZMB' is currently not able to process payments. Please consult our status page for downtime information on all providers. Programmatic access is also available, please consult our API docs.
                INVALID_PHONE_NUMBER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PHONE_NUMBER
                      failureMessage: The phone number '2607634' seems to be invalid for the provider 'MTN_MOMO_ZMB'.
                INVALID_CURRENCY:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_CURRENCY
                      failureMessage: The currency 'USD' is not supported with provider 'MTN_MOMO_ZMB'. Please consult API docs for supported currencies.
                INVALID_AMOUNT:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_AMOUNT
                      failureMessage: The provider MTN_MOMO_ZMB only supports up to '2' decimal places in amount.
                AMOUNT_OUT_OF_BOUNDS:
                  value:
                    depositId:
                    status: REJECTED
                    failureReason:
                      failureCode: AMOUNT_OUT_OF_BOUNDS
                      failureMessage: The amount needs to be more than '1' and less than '20000' for provider 'MTN_MOMO_ZMB'.
        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DepositResponseId'
                  - $ref: '#/components/schemas/DepositFailureResponse'
              examples:
                INVALID_INPUT:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: Request does not include the required parameter 'amount'.
                INVALID_PARAMETER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Value for parameter 'provider' is invalid. Please consult API documentation for validation rules.
                UNSUPPORTED_PARAMETER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'amnt'. Please remove unsupported parameters from request body.
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DepositResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DepositResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DepositResponseId'
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  /v2/deposits/{depositId}:
    get:
      tags:
        - deposits
      summary: Check deposit status
      operationId: getDeposit
      parameters:
        - $ref: '#/components/parameters/DepositId'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositSearchResult'
              examples:
                COMPLETED:
                  value:
                    status: FOUND
                    data:
                      depositId: 8917c345-4791-4285-a416-62f24b6982db
                      status: COMPLETED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      payer:
                        type: MMO
                        accountDetails:
                          phoneNUmber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      customerMessage: To ACME company
                      clientReferenceId: 'REF-987654321'
                      created: '2020-10-19T08:17:01Z'
                      providerTransactionId: '12356789'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                ACCEPTED:
                  value:
                    status: FOUND
                    data:
                      depositId: 8917c345-4791-4285-a416-62f24b6982db
                      status: ACCEPTED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      payer:
                        type: MMO
                        accountDetails:
                          phoneNUmber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: To ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                PROCESSING:
                  value:
                    status: FOUND
                    data:
                      depositId: 8917c345-4791-4285-a416-62f24b6982db
                      status: PROCESSING
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      payer:
                        type: MMO
                        accountDetails:
                          phoneNUmber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: To ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                IN_RECONCILIATION:
                  value:
                    status: FOUND
                    data:
                      depositId: 8917c345-4791-4285-a416-62f24b6982db
                      status: IN_RECONCILIATION
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      payer:
                        type: MMO
                        accountDetails:
                          phoneNUmber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: To ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                FAILED:
                  value:
                    status: FOUND
                    data:
                      depositId: 8917c345-4791-4285-a416-62f24b6982db
                      status: FAILED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      payer:
                        type: MMO
                        accountDetails:
                          phoneNUmber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: To ACME company
                      created: '2020-10-19T08:17:01Z'
                      failureReason:
                        failureCode: PAYMENT_NOT_APPROVED
                        failureMessage: The customer did not approve the authorisation for this payment
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                NOT_FOUND:
                  value:
                    status: NOT_FOUND
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  /v2/deposits/resend-callback/{depositId}:
    post:
      tags:
        - deposits
      summary: Resend deposit callback
      operationId: depositsResendCallback
      parameters:
        - $ref: '#/components/parameters/DepositId'
      responses:
        '200':
          description: Request has been accepted for processing by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositResendCallbackResponse'
              examples:
                ACCEPTED:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                NOT_FOUND:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: NOT_FOUND
                      failureMessage: Payout with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found
                INVALID_STATE:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_STATE
                      failureMessage: Payout with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 has not finished processing
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  ## Split Payments
  /v2/split-payments:
    post:
      tags:
        - split-payments
      summary: Initiate split payment
      operationId: createSplitPayment
      requestBody:
        $ref: '#/components/requestBodies/SplitPaymentCreationRequest'
      parameters:
        - $ref: '#/components/parameters/Content-Digest'
        - $ref: '#/components/parameters/Signature'
        - $ref: '#/components/parameters/Signature-Input'
        - $ref: '#/components/parameters/Accept-Signature'
        - $ref: '#/components/parameters/Accept-Digest'
      responses:
        '200':
          description: Request has valid payload. See `status` to confirm if the split payment was accepted for processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SplitPaymentCreationResponse'
              examples:
                ACCEPTED:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                    created: '2025-01-15T10:30:00Z'
                DUPLICATE_IGNORED:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: DUPLICATE_IGNORED
                    created: '2025-01-15T10:30:00Z'
                PAYOUT_EXCEEDS_DEPOSIT:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: PAYOUT_EXCEEDS_DEPOSIT
                      failureMessage: The total split payout amount is greater than the deposit amount.
                INVALID_CURRENCY:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_CURRENCY
                      failureMessage: The currency 'EUR' is not supported with provider 'MTN_MOMO_ZMB'. Please consult API docs for supported currencies.
        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SplitPaymentResponseId'
                  - $ref: '#/components/schemas/SplitPaymentFailureResponse'
              examples:
                INVALID_INPUT:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: "Request does not include the required parameter 'payer'."
                INVALID_PARAMETER:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Customer message length should not be greater than 22
                UNSUPPORTED_PARAMETER:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'unsupported'. Please remove unsupported parameters from request body.
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SplitPaymentResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SplitPaymentResponseId'
                  - $ref: '#/components/schemas/SplitPaymentAuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
                SPLIT_PAYMENTS_NOT_ALLOWED:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: SPLIT_PAYMENTS_NOT_ALLOWED
                      failureMessage: Your PawaPay account has not been configured to make split payments using 'MTN_MOMO_ZMB'.
        '500':
          description: An unknown failure has occured.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SplitPaymentResponseId'
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    splitPaymentId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  /v2/split-payments/{splitPaymentId}:
    get:
      tags:
        - split-payments
      summary: Check split payment status
      operationId: getSplitPayment
      parameters:
        - $ref: '#/components/parameters/SplitPaymentId'
      responses:
        '200':
          description: Request has been processed by PawaPay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SplitPaymentSearchResult'
              examples:
                COMPLETED:
                  value:
                    status: FOUND
                    data:
                      splitPaymentId: 8917c345-4791-4285-a416-62f24b6982db
                      status: COMPLETED
                      amount: '100.00'
                      currency: ZMW
                      country: ZMB
                      payer:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260973024434'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: To ACME company
                      created: '2025-01-15T10:30:00Z'
                      providerTransactionId: '12356789'
                      splits:
                        - payoutId: 6f53f5f3-2f97-4879-8ed6-50072fe9d2fc
                          status: COMPLETED
                          amount: '100.00'
                          recipient:
                            type: MMO
                            accountDetails:
                              phoneNumber: '260973024456'
                              provider: MTN_MOMO_ZMB
                          clientReferenceId: 'REF-987654321'
                          customerMessage: To ACME company
                          providerTransactionId: '12356789'
                          created: '2025-01-15T10:35:00Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                PAYOUT_FAILED:
                  value:
                    status: FOUND
                    data:
                      splitPaymentId: 8917c345-4791-4285-a416-62f24b6982db
                      status: PAYOUT_FAILED
                      amount: '100.00'
                      currency: ZMW
                      country: ZMB
                      payer:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260973024434'
                          provider: MTN_MOMO_ZMB
                      customerMessage: To ACME company
                      clientReferenceId: 'REF-987654321'
                      created: '2025-01-15T10:30:00Z'
                      providerTransactionId: '12356789'
                      splits:
                        - payoutId: 6f53f5f3-2f97-4879-8ed6-50072fe9d2fc
                          status: FAILED
                          amount: '100.00'
                          recipient:
                            type: MMO
                            accountDetails:
                              phoneNumber: '260973024456'
                              provider: MTN_MOMO_ZMB
                          customerMessage: To ACME company
                          clientReferenceId: 'REF-987654321'
                          providerTransactionId: '12356789'
                          created: '2025-01-15T10:35:00Z'
                          failureReason:
                            failureCode: WALLET_LIMIT_REACHED
                            failureMessage: The account '260973024456' has reached a transaction limit. Consult API docs for possible transaction limits.
                FAILED:
                  value:
                    status: FOUND
                    data:
                      splitPaymentId: 8917c345-4791-4285-a416-62f24b6982db
                      status: FAILED
                      amount: '100.00'
                      currency: ZMW
                      country: ZMB
                      payer:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260973024434'
                          provider: MTN_MOMO_ZMB
                      customerMessage: To ACME company
                      clientReferenceId: 'REF-987654321'
                      splits: []
                      failureReason:
                        failureCode: PAYMENT_NOT_APPROVED
                        failureMessage: The payer did not approve the payment.
                NOT_FOUND:
                  value:
                    status: NOT_FOUND

  ## Checkouts
  /v2/checkouts:
    post:
      tags:
        - checkouts
      summary: Initiate checkout
      operationId: createCheckout
      requestBody:
        $ref: '#/components/requestBodies/CheckoutCreationRequest'
      parameters:
        - $ref: '#/components/parameters/Content-Digest'
        - $ref: '#/components/parameters/Signature'
        - $ref: '#/components/parameters/Signature-Input'
        - $ref: '#/components/parameters/Accept-Signature'
        - $ref: '#/components/parameters/Accept-Digest'
      responses:
        '200':
          description: Request has valid payload. See `status` to confirm if the checkout was accepted for processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutCreationResponse'
              examples:
                ACCEPTED:
                  value:
                    checkoutId: afb57b93-7849-49aa-babb-4c3ccbfe3d79
                    status: ACCEPTED
                    redirectUrl: https://checkout.sandbox.pawapay.io/7mVk1x8UbTamQ64xGR
                    created: '2026-03-27T10:30:00Z'
                    expiresAt: '2026-03-27T11:30:00Z'
                    checkoutCode: 7mVk1x8UbTamQ64xGR
                DUPLICATE_IGNORED:
                  value:
                    checkoutId: afb57b93-7849-49aa-babb-4c3ccbfe3d79
                    status: DUPLICATE_IGNORED
                    created: '2026-03-27T10:30:00Z'
                INVALID_PHONE_NUMBER:
                  value:
                    checkoutId: afb57b93-7849-49aa-babb-4c3ccbfe3d79
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PHONE_NUMBER
                      failureMessage: The phone number '2607634' seems to be invalid for the provider 'MTN_MOMO_ZMB'.
        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutFailureResponse'
              examples:
                INVALID_INPUT:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: "Request does not include the required parameter 'returnUrl'."
                INVALID_PARAMETER:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Value for parameter 'reason' is invalid. Please consult API documentation for validation rules.
                UNSUPPORTED_PARAMETER:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'unsupported'. Please remove unsupported parameters from request body.
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occured.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  /v2/checkouts/{checkoutId}:
    get:
      tags:
        - checkouts
      summary: Check checkout status
      operationId: getCheckout
      parameters:
        - $ref: '#/components/parameters/CheckoutId'
      responses:
        '200':
          description: Request has been processed by PawaPay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSearchResult'
              examples:
                WAITING_PAYMENT:
                  value:
                    status: FOUND
                    data:
                      checkoutId: afb57b93-7849-49aa-babb-4c3ccbfe3d79
                      status: WAITING_PAYMENT
                      redirectUrl: https://checkout.sandbox.pawapay.io/7mVk1x8UbTamQ64xGR
                      created: '2026-03-27T10:30:00Z'
                      countries: []
                      amounts: []
                      depositsHistory: []
                      metadata: {}
                      reason: {}
                      checkoutCode: 7mVk1x8UbTamQ64xGR
                COMPLETED:
                  value:
                    status: FOUND
                    data:
                      checkoutId: afb57b93-7849-49aa-babb-4c3ccbfe3d79
                      status: COMPLETED
                      redirectUrl: https://checkout.sandbox.pawapay.io/7mVk1x8UbTamQ64xGR
                      returnUrl: https://merchant.example.com/checkout-result
                      returnMethod: INSTANT
                      defaultLanguage: en
                      countries:
                        - ZMB
                      expiresAfter: 60
                      amounts:
                        - country: ZMB
                          currency: ZMW
                          amount: '100'
                      payer:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260973024434'
                          provider: MTN_MOMO_ZMB
                          allowCustomerToOverride: true
                      clientReferenceId: ORDER-123
                      created: '2026-03-27T10:30:00Z'
                      providerTransactionId: PROVIDER-TXN-123
                      depositStatus: COMPLETED
                      deposit:
                        depositId: eac4d2f3-cf36-4a24-a9eb-7014c630f8f0
                        status: COMPLETED
                        created: '2026-03-27T10:35:00Z'
                        providerTransactionId: PROVIDER-TXN-123
                        amount: '100'
                        currency: ZMW
                        country: ZMB
                        payer:
                          type: MMO
                          accountDetails:
                            phoneNumber: '260973024434'
                            provider: MTN_MOMO_ZMB
                        customerMessage: To ACME company
                      depositsHistory:
                        - depositId: eac4d2f3-cf36-4a24-a9eb-7014c630f8f0
                          status: COMPLETED
                          created: '2026-03-27T10:35:00Z'
                          providerTransactionId: PROVIDER-TXN-123
                          amount: '100'
                          currency: ZMW
                          country: ZMB
                          payer:
                            type: MMO
                            accountDetails:
                              phoneNumber: '260973024434'
                              provider: MTN_MOMO_ZMB
                          customerMessage: To ACME company
                      metadata:
                        orderId: ORDER-123
                        customerId: CUST-456
                      reason:
                        en: GOODS PURCHASE
                      checkoutCode: 7mVk1x8UbTamQ64xGR
                FAILED:
                  value:
                    status: FOUND
                    data:
                      checkoutId: afb57b93-7849-49aa-babb-4c3ccbfe3d79
                      status: FAILED
                      redirectUrl: https://checkout.sandbox.pawapay.io/7mVk1x8UbTamQ64xGR
                      created: '2026-03-27T10:30:00Z'
                      countries: []
                      amounts: []
                      providerTransactionId: PROVIDER-TXN-123
                      depositStatus: FAILED
                      deposit:
                        depositId: eac4d2f3-cf36-4a24-a9eb-7014c630f8f0
                        status: FAILED
                        created: '2026-03-27T10:35:00Z'
                        providerTransactionId: PROVIDER-TXN-123
                        failureReason:
                          failureCode: PAYMENT_NOT_APPROVED
                          failureMessage: The payer did not approve the payment.
                      depositsHistory:
                        - depositId: eac4d2f3-cf36-4a24-a9eb-7014c630f8f0
                          status: FAILED
                          created: '2026-03-27T10:35:00Z'
                          providerTransactionId: PROVIDER-TXN-123
                          failureReason:
                            failureCode: PAYMENT_NOT_APPROVED
                            failureMessage: The payer did not approve the payment.
                      metadata: {}
                      reason: {}
                      checkoutCode: 7mVk1x8UbTamQ64xGR
                EXPIRED:
                  value:
                    status: FOUND
                    data:
                      checkoutId: afb57b93-7849-49aa-babb-4c3ccbfe3d79
                      status: EXPIRED
                      redirectUrl: https://checkout.sandbox.pawapay.io/7mVk1x8UbTamQ64xGR
                      created: '2026-03-27T10:30:00Z'
                      countries: []
                      amounts: []
                      depositsHistory: []
                      metadata: {}
                      reason: {}
                      checkoutCode: 7mVk1x8UbTamQ64xGR
                CANCELLED:
                  value:
                    status: FOUND
                    data:
                      checkoutId: afb57b93-7849-49aa-babb-4c3ccbfe3d79
                      status: CANCELLED
                      redirectUrl: https://checkout.sandbox.pawapay.io/7mVk1x8UbTamQ64xGR
                      created: '2026-03-27T10:30:00Z'
                      countries: []
                      amounts: []
                      depositsHistory: []
                      metadata: {}
                      reason: {}
                      checkoutCode: 7mVk1x8UbTamQ64xGR
                NOT_FOUND:
                  value:
                    status: NOT_FOUND
        '401':
          description: Authentication failed. Make sure you have added the API token into the header.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occured.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  /v2/checkouts/{checkoutId}/expire:
    post:
      tags:
        - checkouts
      summary: Expire checkout
      operationId: expireCheckout
      parameters:
        - $ref: '#/components/parameters/CheckoutId'
      responses:
        '200':
          description: Request has been processed by PawaPay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutExpirationResponse'
              examples:
                EXPIRED:
                  value:
                    checkoutId: afb57b93-7849-49aa-babb-4c3ccbfe3d79
                    status: EXPIRED
                    expiredAt: '2026-03-27T10:45:00Z'
                    reason: MANUAL_EXPIRY
                    expiredBy: API
        '401':
          description: Authentication failed. Make sure you have added the API token into the header.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '404':
          description: The specified checkout was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutFailureResponse'
              examples:
                NOT_FOUND:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: NOT_FOUND
                      failureMessage: Checkout with ID afb57b93-7849-49aa-babb-4c3ccbfe3d79 not found.
        '500':
          description: An unknown failure has occured.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  ## Payouts
  /v2/payouts:
    post:
      tags:
        - payouts
      summary: Initiate payout
      operationId: createPayout
      parameters:
        - $ref: '#/components/parameters/Content-Digest'
        - $ref: '#/components/parameters/Signature'
        - $ref: '#/components/parameters/Signature-Input'
        - $ref: '#/components/parameters/Accept-Signature'
        - $ref: '#/components/parameters/Accept-Digest'
      requestBody:
        $ref: '#/components/requestBodies/PayoutCreationRequest'
      responses:
        '200':
          description: Request has been accepted for processing by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutCreationResponse'
              examples:
                ACCEPTED:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                    created: '2020-10-19T11:17:01Z'
                DUPLICATE_IGNORED:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: DUPLICATE_IGNORED
                    created: '2020-10-19T11:17:01Z'
                PROVIDER_TEMPORARILY_UNAVAILABLE:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: PROVIDER_TEMPORARILY_UNAVAILABLE
                      failureMessage: The provider 'MTN_MOMO_ZMB' is currently not able to process payments. Please consult our status page for downtime information on all providers. Programmatic access is also available, please consult our API docs.
                INVALID_PHONE_NUMBER:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PHONE_NUMBER
                      failureMessage: The phone number '2607634' seems to be invalid for the provider 'MTN_MOMO_ZMB'.
                INVALID_CURRENCY:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_CURRENCY
                      failureMessage: The currency 'USD' is not supported with provider 'MTN_MOMO_ZMB'. Please consult API docs for supported currencies.
                INVALID_AMOUNT:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_AMOUNT
                      failureMessage: The provider MTN_MOMO_ZMB only supports up to '2' decimal places in amount.
                AMOUNT_OUT_OF_BOUNDS:
                  value:
                    payoutId:
                    status: REJECTED
                    failureReason:
                      failureCode: AMOUNT_OUT_OF_BOUNDS
                      failureMessage: The amount needs to be more than '1' and less than '20000' for provider 'MTN_MOMO_ZMB'.
        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/PayoutFailureResponse'
              examples:
                INVALID_INPUT:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: Request does not include the required parameter 'amount'.
                INVALID_PARAMETER:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Value for parameter 'provider' is invalid. Please consult API documentation for validation rules.
                UNSUPPORTED_PARAMETER:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'amnt'. Please remove unsupported parameters from request body.
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/payouts/bulk:
    post:
      tags:
        - payouts
      summary: Initiate bulk payouts
      operationId: createPayouts
      requestBody:
        $ref: '#/components/requestBodies/BulkPayoutCreationRequest'
      parameters:
        - $ref: '#/components/parameters/Content-Digest'
        - $ref: '#/components/parameters/Signature'
        - $ref: '#/components/parameters/Signature-Input'
        - $ref: '#/components/parameters/Accept-Signature'
        - $ref: '#/components/parameters/Accept-Digest'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PayoutCreationResponse'
              examples:
                Mixed Response:
                  value:
                    - payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                      status: ACCEPTED
                      created: '2020-10-19T11:17:01Z'
                    - payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                      status: DUPLICATE_IGNORED
                      created: '2020-10-19T10:22:49Z'
                    - payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                      status: REJECTED
                      failureReason:
                        failureCode: AMOUNT_TOO_LARGE
                        failureMessage: Amount should not be greater than 1000
        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/PayoutFailureResponse'
              examples:
                INVALID_INPUT:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: Request does not include the required parameter 'amount'.
                INVALID_PARAMETER:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Value for parameter 'provider' is invalid. Please consult API documentation for validation rules.
                UNSUPPORTED_PARAMETER:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'amnt'. Please remove unsupported parameters from request body.
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DepositResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/payouts/{payoutId}:
    get:
      tags:
        - payouts
      summary: Check payout status
      operationId: getPayout
      parameters:
        - $ref: '#/components/parameters/PayoutId'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutSearchResult'
              examples:
                COMPLETED:
                  value:
                    status: FOUND
                    data:
                      payoutId: 8917c345-4791-4285-a416-62f24b6982db
                      status: COMPLETED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      providerTransactionId: '12356789'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                ACCEPTED:
                  value:
                    status: FOUND
                    data:
                      payoutId: 8917c345-4791-4285-a416-62f24b6982db
                      status: ACCEPTED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                PROCESSING:
                  value:
                    status: FOUND
                    data:
                      payoutId: 8917c345-4791-4285-a416-62f24b6982db
                      status: PROCESSING
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                IN_RECONCILIATION:
                  value:
                    status: FOUND
                    data:
                      payoutId: 8917c345-4791-4285-a416-62f24b6982db
                      status: IN_RECONCILIATION
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                FAILED:
                  value:
                    status: FOUND
                    data:
                      payoutId: 8917c345-4791-4285-a416-62f24b6982db
                      status: FAILED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      failureReason:
                        failureCode: RECIPIENT_NOT_FOUND
                        failureMessage: Recipient not found
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                NOT_FOUND:
                  value:
                    status: NOT_FOUND
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/payouts/resend-callback/{payoutId}:
    post:
      tags:
        - payouts
      summary: Resend payout callback
      description: |
        Resends the callback for a payout to your configured callback URL. The payout must have reached a final state.
        
        Please ensure your implementation of callback handling follows the guidelines in [Handling callbacks](#section/Implementation/Handling-callbacks).
      operationId: payoutsResendCallback
      parameters:
        - $ref: '#/components/parameters/PayoutId'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutResendCallbackResponse'
              examples:
                ACCEPTED:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                NOT_FOUND:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: NOT_FOUND
                      failureMessage: Payout with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found
                INVALID_STATE:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_STATE
                      failureMessage: Payout with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 has not finished processing
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/payouts/fail-enqueued/{payoutId}:
    post:
      tags:
        - payouts
      summary: Cancel enqueued payout
      operationId: payoutsFailEnqueued
      parameters:
        - $ref: '#/components/parameters/PayoutId'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailEnqueuedPayoutResponse'
              examples:
                ACCEPTED:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                NOT_FOUND:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: NOT_FOUND
                      failureMessage: Payout with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found
                INVALID_STATE:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_STATE
                      failureMessage: Payout with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 is not enqueued
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PayoutResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  ## Remittances
  /v2/remittances:
    post:
      tags:
        - remittances
      summary: Initiate remittance
      operationId: createRemittance
      parameters:
        - $ref: '#/components/parameters/Content-Digest'
        - $ref: '#/components/parameters/Signature'
        - $ref: '#/components/parameters/Signature-Input'
        - $ref: '#/components/parameters/Accept-Signature'
        - $ref: '#/components/parameters/Accept-Digest'
      requestBody:
        $ref: '#/components/requestBodies/RemittanceCreationRequest'
      responses:
        '200':
          description: Request has been accepted for processing by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemittanceCreationResponse'
              examples:
                ACCEPTED:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                    created: '2020-10-19T11:17:01Z'
                DUPLICATE_IGNORED:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: DUPLICATE_IGNORED
                    created: '2020-10-19T11:17:01Z'
                PROVIDER_TEMPORARILY_UNAVAILABLE:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: PROVIDER_TEMPORARILY_UNAVAILABLE
                      failureMessage: The provider 'MTN_MOMO_ZMB' is currently not able to process payments. Please consult our status page for downtime information on all providers. Programmatic access is also available, please consult our API docs.
                INVALID_PHONE_NUMBER:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PHONE_NUMBER
                      failureMessage: The phone number '2607634' seems to be invalid for the provider 'MTN_MOMO_ZMB'.
                INVALID_CURRENCY:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_CURRENCY
                      failureMessage: The currency 'USD' is not supported with provider 'MTN_MOMO_ZMB'. Please consult API docs for supported currencies.
                INVALID_AMOUNT:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_AMOUNT
                      failureMessage: The provider MTN_MOMO_ZMB only supports up to '2' decimal places in amount.
                AMOUNT_OUT_OF_BOUNDS:
                  value:
                    remittanceId:
                    status: REJECTED
                    failureReason:
                      failureCode: AMOUNT_OUT_OF_BOUNDS
                      failureMessage: The amount needs to be more than '1' and less than '20000' for provider 'MTN_MOMO_ZMB'.
        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/RemittanceFailureResponse'
              examples:
                INVALID_INPUT:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: Request does not include the required parameter 'amount'.
                INVALID_PARAMETER:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Value for parameter 'provider' is invalid. Please consult API documentation for validation rules.
                UNSUPPORTED_PARAMETER:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'amnt'. Please remove unsupported parameters from request body.
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/remittances/bulk:
    post:
      tags:
        - remittances
      summary: Initiate bulk remittances
      operationId: createRemittances
      requestBody:
        $ref: '#/components/requestBodies/BulkRemittanceCreationRequest'
      parameters:
        - $ref: '#/components/parameters/Content-Digest'
        - $ref: '#/components/parameters/Signature'
        - $ref: '#/components/parameters/Signature-Input'
        - $ref: '#/components/parameters/Accept-Signature'
        - $ref: '#/components/parameters/Accept-Digest'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RemittanceCreationResponse'
              examples:
                Mixed Response:
                  value:
                    - remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                      status: ACCEPTED
                      created: '2020-10-19T11:17:01Z'
                    - remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                      status: DUPLICATE_IGNORED
                      created: '2020-10-19T10:22:49Z'
                    - remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                      status: REJECTED
                      failureReason:
                        failureCode: AMOUNT_TOO_LARGE
                        failureMessage: Amount should not be greater than 1000
        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/RemittanceFailureResponse'
              examples:
                INVALID_INPUT:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: Request does not include the required parameter 'amount'.
                INVALID_PARAMETER:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Value for parameter 'provider' is invalid. Please consult API documentation for validation rules.
                UNSUPPORTED_PARAMETER:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'amnt'. Please remove unsupported parameters from request body.
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DepositResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/remittances/{remittanceId}:
    get:
      tags:
        - remittances
      summary: Check remittance status
      operationId: getRemittance
      parameters:
        - $ref: '#/components/parameters/RemittanceId'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemittanceSearchResult'
              examples:
                COMPLETED:
                  value:
                    status: FOUND
                    data:
                      remittanceId: 8917c345-4791-4285-a416-62f24b6982db
                      status: COMPLETED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      providerTransactionId: '12356789'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                ACCEPTED:
                  value:
                    status: FOUND
                    data:
                      remittanceId: 8917c345-4791-4285-a416-62f24b6982db
                      status: ACCEPTED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                PROCESSING:
                  value:
                    status: FOUND
                    data:
                      remittanceId: 8917c345-4791-4285-a416-62f24b6982db
                      status: PROCESSING
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                IN_RECONCILIATION:
                  value:
                    status: FOUND
                    data:
                      remittanceId: 8917c345-4791-4285-a416-62f24b6982db
                      status: IN_RECONCILIATION
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                FAILED:
                  value:
                    status: FOUND
                    data:
                      remittanceId: 8917c345-4791-4285-a416-62f24b6982db
                      status: FAILED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      failureReason:
                        failureCode: RECIPIENT_NOT_FOUND
                        failureMessage: Recipient not found
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                NOT_FOUND:
                  value:
                    status: NOT_FOUND
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/remittances/resend-callback/{remittanceId}:
    post:
      tags:
        - remittances
      summary: Resend remittance callback
      operationId: remittancesResendCallback
      parameters:
        - $ref: '#/components/parameters/RemittanceId'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemittanceResendCallbackResponse'
              examples:
                ACCEPTED:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                NOT_FOUND:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: NOT_FOUND
                      failureMessage: Remittance with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found
                INVALID_STATE:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_STATE
                      failureMessage: Remittance with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 has not finished processing
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/remittances/fail-enqueued/{remittanceId}:
    post:
      tags:
        - remittances
      summary: Cancel enqueued remittance
      operationId: remittancesFailEnqueued
      parameters:
        - $ref: '#/components/parameters/RemittanceId'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailEnqueuedRemittanceResponse'
              examples:
                ACCEPTED:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                NOT_FOUND:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: NOT_FOUND
                      failureMessage: Remittance with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found
                INVALID_STATE:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_STATE
                      failureMessage: Remittance with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 is not enqueued
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RemittanceResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    remittanceId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  ##Payment page
  /v2/paymentpage:
    post:
      tags:
        - payment-page
      summary: Deposit via Payment Page
      operationId: create-session
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSession'
        required: true
      responses:
        '200':
          description: Payment Page session is created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
              examples:
                PROVIDER_TEMPORARILY_UNAVAILABLE:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: PROVIDER_TEMPORARILY_UNAVAILABLE
                      failureMessage: The provider 'MTN_MOMO_ZMB' is currently not able to process payments. Please consult our status page for downtime information on all providers. Programmatic access is also available, please consult our API docs.
                INVALID_PHONE_NUMBER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PHONE_NUMBER
                      failureMessage: The phone number '2607634' seems to be invalid for the provider 'MTN_MOMO_ZMB'.
                INVALID_CURRENCY:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_CURRENCY
                      failureMessage: The currency 'USD' is not supported with provider 'MTN_MOMO_ZMB'. Please consult API docs for supported currencies.
                INVALID_AMOUNT:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_AMOUNT
                      failureMessage: The provider MTN_MOMO_ZMB only supports up to '2' decimal places in amount.
                AMOUNT_OUT_OF_BOUNDS:
                  value:
                    depositId:
                    status: REJECTED
                    failureReason:
                      failureCode: AMOUNT_OUT_OF_BOUNDS
                      failureMessage: The amount needs to be more than '1' and less than '20000' for provider 'MTN_MOMO_ZMB'.

        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DepositResponseId'
                  - $ref: '#/components/schemas/DepositFailureResponse'
              examples:
                INVALID_INPUT:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: Request does not include the required parameter 'amount'.
                INVALID_PARAMETER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Value for parameter 'provider' is invalid. Please consult API documentation for validation rules.
                UNSUPPORTED_PARAMETER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'amnt'. Please remove unsupported parameters from request body.

        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DepositResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DepositResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    payoutId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  ## Refunds
  /v2/refunds:
    post:
      tags:
        - refunds
      summary: Initiate refund
      operationId: createRefund
      requestBody:
        $ref: '#/components/requestBodies/RefundCreationRequest'
      parameters:
        - $ref: '#/components/parameters/Content-Digest'
        - $ref: '#/components/parameters/Signature'
        - $ref: '#/components/parameters/Signature-Input'
        - $ref: '#/components/parameters/Accept-Signature'
        - $ref: '#/components/parameters/Accept-Digest'
      responses:
        '200':
          description: Request has been accepted for processing by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundCreationResponse'
              examples:
                ACCEPTED:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                    created: '2020-10-19T11:17:01Z'
                DUPLICATE_IGNORED:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: DUPLICATE_IGNORED
                    created: '2020-10-19T11:17:01Z'
                PROVIDER_TEMPORARILY_UNAVAILABLE:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: PROVIDER_TEMPORARILY_UNAVAILABLE
                      failureMessage: The provider 'MTN_MOMO_ZMB' is currently not able to process payments. Please consult our status page for downtime information on all providers. Programmatic access is also available, please consult our API docs.
                INVALID_PHONE_NUMBER:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PHONE_NUMBER
                      failureMessage: The phone number '2607634' seems to be invalid for the provider 'MTN_MOMO_ZMB'.
                INVALID_CURRENCY:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_CURRENCY
                      failureMessage: The currency 'USD' is not supported with provider 'MTN_MOMO_ZMB'. Please consult API docs for supported currencies.
                INVALID_AMOUNT:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_AMOUNT
                      failureMessage: The provider MTN_MOMO_ZMB only supports up to '2' decimal places in amount.
                AMOUNT_OUT_OF_BOUNDS:
                  value:
                    refundId:
                    status: REJECTED
                    failureReason:
                      failureCode: AMOUNT_OUT_OF_BOUNDS
                      failureMessage: The amount needs to be more than '1' and less than '20000' for provider 'MTN_MOMO_ZMB'.
                NOT_FOUND:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: NOT_FOUND
                      failureMessage: Deposit with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found.
                INVALID_STATE:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_STATE
                      failureMessage: Deposit with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 has not finished processing.
        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RefundResponseId'
                  - $ref: '#/components/schemas/RefundFailureResponse'
              examples:
                INVALID_INPUT:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: Request does not include the required parameter 'amount'.
                INVALID_PARAMETER:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Value for parameter 'provider' is invalid. Please consult API documentation for validation rules.
                UNSUPPORTED_PARAMETER:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'amnt'. Please remove unsupported parameters from request body.
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RefundResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RefundResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/refunds/{refundId}:
    get:
      tags:
        - refunds
      summary: Check refund status
      operationId: getRefund
      parameters:
        - $ref: '#/components/parameters/RefundId'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundSearchResult'
              examples:
                COMPLETED:
                  value:
                    status: FOUND
                    data:
                      refundId: 8917c345-4791-4285-a416-62f24b6982db
                      status: COMPLETED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      providerTransactionId: '12356789'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                ACCEPTED:
                  value:
                    status: FOUND
                    data:
                      refundId: 8917c345-4791-4285-a416-62f24b6982db
                      status: ACCEPTED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      created: '2020-10-19T08:17:01Z'
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: From ACME company
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                PROCESSING:
                  value:
                    status: FOUND
                    data:
                      refundId: 8917c345-4791-4285-a416-62f24b6982db
                      status: PROCESSING
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                IN_RECONCILIATION:
                  value:
                    status: FOUND
                    data:
                      refundId: 8917c345-4791-4285-a416-62f24b6982db
                      status: IN_RECONCILIATION
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                FAILED:
                  value:
                    status: FOUND
                    data:
                      refundId: 8917c345-4791-4285-a416-62f24b6982db
                      status: FAILED
                      amount: '123.00'
                      currency: ZMW
                      country: ZMB
                      recipient:
                        type: MMO
                        accountDetails:
                          phoneNumber: '260763456789'
                          provider: MTN_MOMO_ZMB
                      clientReferenceId: 'REF-987654321'
                      customerMessage: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      failureReason:
                        failureCode: RECIPIENT_NOT_FOUND
                        failureMessage: Recipient not found
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                Refund Not Found:
                  value:
                    status: NOT_FOUND
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RefundResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RefundResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/refunds/resend-callback/{refundId}:
    post:
      tags:
        - refunds
      summary: Resend refund callback
      operationId: refundsResendCallback
      parameters:
        - $ref: '#/components/parameters/RefundId'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundResendCallbackResponse'
              examples:
                ACCEPTED:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                NOT_FOUND:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: NOT_FOUND
                      failureMessage: Refund with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found
                INVALID_STATE:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_STATE
                      failureMessage: Refund with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 has not finished processing
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RefundResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RefundResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/refunds/fail-enqueued/{refundId}:
    post:
      tags:
        - refunds
      summary: Cancel enqueued refund
      operationId: refundsFailEnqueued
      parameters:
        - $ref: '#/components/parameters/RefundId'
      responses:
        '200':
          description: Request has been processed by pawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailEnqueuedRefundResponse'
              examples:
                ACCEPTED:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                NOT_FOUND:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: NOT_FOUND
                      failureMessage: Refund with ID f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found
                INVALID_STATE:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_STATE
                      failureMessage: Refund is not enqueued. Only enqueued refunds can be cancelled.
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RefundResponseId'
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/RefundResponseId'
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    refundId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  ## Wallet balances
  /v2/wallet-balances:
    get:
      tags:
        - finances
      summary: Wallet balances
      operationId: wallet-balances
      parameters:
        - $ref: '#/components/parameters/FilterCountry'
      responses:
        '200':
          description: Request has been succesfully processed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckBalanceResponse'
              examples:
                Successful :
                  value:
                    balances:
                      - country: ZMB
                        balance: '21798.03'
                        currency: ZMW
                        provider: ""
                      - country: UGA
                        balance: '10798.03'
                        currency: UGX
                        provider: ""
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  ## Statements
  /v2/statements:
    post:
      tags:
        - finances
      summary: Statements
      operationId: createStatements
      requestBody:
        $ref: '#/components/requestBodies/StatementCreationRequest'
      responses:
        '200':
          description: Request has been accepted for processing by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementCreationResponse'
              examples:
                ACCEPTED:
                  value:
                    statementId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: ACCEPTED
                    created: '2025-10-19T11:17:01Z'
                INVALID_CALLBACK_URL:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_CALLBACK_URL
                      failureMessage: Callback URL must be HTTPS.
                INVALID_DATE_RANGE:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_DATE_RANGE
                      failureMessage: Date range exceeds 31 days.
                WALLET_NOT_FOUND:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: WALLET_NOT_FOUND
                      failureMessage: Wallet combination does not exist.
        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StatementCreationFailureReason'
              examples:
                INVALID_INPUT:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: Request does not include the required parameter 'amount'.
                INVALID_PARAMETER:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Value for parameter 'provider' is invalid. Please consult API documentation for validation rules.
                UNSUPPORTED_PARAMETER:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'amnt'. Please remove unsupported parameters from request body.
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occured.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem. 
  /v2/statements/{statementId}:
    get:
      tags:
        - finances
      summary: Check statement status
      operationId: getStatement
      parameters:
        - $ref: '#/components/schemas/StatementId'
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementSearchResult'
              examples:
                COMPLETED:
                  value:
                    status: FOUND
                    data:
                      statementId: 8917c345-4791-4285-a416-62f24b6982db
                      status: COMPLETED
                      wallet: 
                        currency: ZMW
                        country: ZMB
                        provider: MTN_MOMO_ZMB
                      created: '2020-10-19T08:17:01Z'
                      startDate: '2025-05-10T10:00:00'
                      endDate: '2025-05-11T10:00:00'
                      fileSIze: 1234567
                      downloadUrl: "https://pawapay.io/downloadUrl"
                      downloadUrlExpiresAt: '2020-10-20T08:17:01Z'
                      completedAt: '2020-10-19T08:17:01Z'
                PROCESSING:
                  value:
                    status: FOUND
                    data:
                      statementId: 8917c345-4791-4285-a416-62f24b6982db
                      status: PROCESSING
                      wallet:
                        currency: ZMW
                        country: ZMB
                        provider: MTN_MOMO_ZMB
                      created: '2020-10-19T08:17:01Z'
                      startDate: '2025-05-10T10:00:00'
                      endDate: '2025-05-11T10:00:00'
                FAILED:
                  value:
                    status: FOUND
                    data:
                      statementId: 8917c345-4791-4285-a416-62f24b6982db
                      status: FAILED
                      wallet:
                        currency: ZMW
                        country: ZMB
                        provider: MTN_MOMO_ZMB
                      created: '2020-10-19T08:17:01Z'
                      startDate: '2025-05-10T10:00:00'
                      endDate: '2025-05-11T10:00:00'
                      failedAt: '2020-10-19T08:17:01Z'
                NOT_FOUND:
                  value:
                    status: NOT_FOUND
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    status: REJECTED
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occured.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  
  ## Toolkit
  /v2/availability:
    get:
      tags:
        - toolkit
      summary: Provider Availability
      operationId: availability
      parameters:
        - name: country
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/Country'
        - name: operationType
          in: query
          description: |
            The operation for which you want to get provider availabiity information for.
          required: false
          schema:
            type: string
            enum:
              - DEPOSIT
              - PAYOUT
              - REFUND
              - REMITTANCE
      responses:
        '200':
          description: If a request has been processed by PawaPay successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewaysAvailabilityStatusResult'
              examples:
                Success:
                  value:
                    - country: GHA
                      providers:
                        - provider: VODAFONE_GHA
                          operationTypes:
                            - operationType: DEPOSIT
                              status: OPERATIONAL
                            - operationType: PAYOUT
                              status: DELAYED
                            - operationType: REMITTANCE
                              status: OPERATIONAL
                        - provider: MTN_MOMO_GHA
                          operationTypes:
                            - operationType: DEPOSIT
                              status: OPERATIONAL
                            - operationType: PAYOUT
                              status: OPERATIONAL
                            - operationType: REMITTANCE
                              status: OPERATIONAL
                        - provider: AIRTELTIGO_GHA
                          operationTypes:
                            - operationType: DEPOSIT
                              status: CLOSED
                            - operationType: PAYOUT
                              status: DELAYED
                            - operationType: REMITTANCE
                              status: OPERATIONAL
                    - country: ZMB
                      providers:
                        - provider: MTN_MOMO_ZMB
                          operationTypes:
                            - operationType: DEPOSIT
                              status: CLOSED
                            - operationType: PAYOUT
                              status: OPERATIONAL
                        - provider: AIRTEL_OAPI_ZMB
                          operationTypes:
                            - operationType: DEPOSIT
                              status: OPERATIONAL
                            - operationType: PAYOUT
                              status: DELAYED
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.

  /v2/active-conf:
    get:
      tags:
        - toolkit
      summary: Active Configuration
      operationId: active_conf
      parameters:
        - $ref: '#/components/parameters/FilterCountry'
        - $ref: '#/components/parameters/FilterOperationType'
      responses:
        '200':
          description: If a request has been processed by PawaPay successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerActiveConfigResponse'
              examples:
                Success:
                  value:
                    companyName: Merchant Inc.
                    signatureConfiguration:
                      signedRequestsOnly: true
                      signedCallbacks: true
                    countries:
                      - country: BEN
                        displayName:
                          en: "Benin"
                          fr: "Le Benin"
                        prefix: "229"
                        flag: "https://cdn.com/ben_flag.png"
                        providers:
                          - provider: MTN_MOMO_BEN
                            displayName: MTN
                            logo: "https://cdn.com/mtn_logo.png"
                            nameDisplayedToCustomer: Merchant Inc.
                            currencies:
                              - currency: XOF
                                displayName: "KSh"
                                operationTypes:
                                - DEPOSIT:
                                    authType: PROVIDER_AUTH
                                    pinPrompt: AUTOMATIC
                                    pinPromptRevivable: true
                                    pinPromptInstructions:
                                      channels:
                                        - type: USSD
                                          displayName:
                                            en: "Not getting the PIN prompt?"
                                            fr: "Not getting Le Pin prompt"
                                          quickLink: "tel*182*1*3%23"
                                          variables:
                                            shortCode: "*182#"
                                          instructions:
                                            en:
                                              - text: "Dial *182# on your phone"
                                                template: "Dial {{shortCode}} on your phone"
                                            fr:
                                              - text: "Composez *182# sur votre téléphone"
                                                template: "Composez {{shortCode}} sur votre téléphone"
                                    minTransactionLimit: "1"
                                    maxTransactionLimit: "1000"
                                    decimalsInAmount: NONE
                                    status: OPERATIONAL
                                    callbackUrl: "https://merchant.com/depositCallback"
                                - operationType: PAYOUT
                                  minTransactionLimit: "1"
                                  maxTransactionLimit: "1000"
                                  decimalsInAmount: NONE
                                  status: DELAYED
                                  callbackUrl: "https://merchant.com/payoutCallback"
                                - operationType: REFUND
                                  minTransactionLimit: "1"
                                  maxTransactionLimit: "1000"
                                  decimalsInAmount: NONE
                                  status: CLOSED
                                  callbackUrl: "https://merchant.com/refundCallback"
                                - operationType: REMITTANCE
                                  minTransactionLimit: "1"
                                  maxTransactionLimit: "1000"
                                  decimalsInAmount: NONE
                                  status: OPERATIONAL
                                  callbackUrl: "https://merchant.com/remittanceCallback"
                                - operationType: USSD_DEPOSIT
                                  callbackUrl: "https://merchant.com/ussdCallback"
                                - operationType: NAME_LOOKUP
        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/predict-provider:
    post:
      tags:
        - toolkit
      operationId: predict-provider
      summary: Predict Provider
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MsisdnInput'
        required: true
      responses:
        '200':
          description: Provider prediction was completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderPrediction'

        '400':
          description: Request was rejected due to incompatibility with PawaPay API specification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictionFailureResponse'
              examples:
                INVALID_INPUT:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_INPUT
                      failureMessage: We are unable to parse the body of the request. Please consult API documentation for valid request payload.
                MISSING_PARAMETER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: MISSING_PARAMETER
                      failureMessage: Request does not include the required parameter 'phoneNumber'.
                INVALID_PARAMETER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: INVALID_PARAMETER
                      failureMessage: Value for parameter 'provider' is invalid. Please consult API documentation for validation rules.
                UNSUPPORTED_PARAMETER:
                  value:
                    depositId: f4401bd2-1568-4140-bf2d-eb77d2b2b639
                    status: REJECTED
                    failureReason:
                      failureCode: UNSUPPORTED_PARAMETER
                      failureMessage: Request includes an unsupported parameter 'amount'. Please remove unsupported parameters from request body.

        '401':
          description: Authentication failed. Make sure you have added the API token into the header. If using signatures, make sure they are valid.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthenticationFailureResponse'
              examples:
                AUTHENTICATION_ERROR:
                  value:
                    failureReason:
                      failureCode: AUTHENTICATION_ERROR
                      failureMessage: The API token in the request is invalid.
        '403':
          description: Authorization failure. Please check your authentication token.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AuthorizationFailureResponse'
              examples:
                AUTHORISATION_ERROR:
                  value:
                    failureReason:
                      failureCode: AUTHORISATION_ERROR
                      failureMessage: The API token in the request is not authorised for this endpoint.
        '500':
          description: An unknown failure has occurred.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UnknownFailureResponse'
              examples:
                UNKNOWN_ERROR:
                  value:
                    failureReason:
                      failureCode: UNKNOWN_ERROR
                      failureMessage: Unable to process request due to an unknown problem.
  /v2/public-key/http:
    get:
      tags:
        - toolkit
      summary: Public Keys
      operationId: public_key_http
      responses:
        '200':
          description: If a request has been processed by PawaPay successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicKeyResponse'
              examples:
                Success:
                  value: [
                    {
                      "id": "HTTP_EC_P256_KEY:1",
                      "key": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEYZe9jhnaZKw9ykMBe2IwRg6AgVMx\n2JRE3RMIdf4YazZTaQaUO19uDI5UO0QsTG699UeI+emd63/GY1PyOpf1rw==\n-----END PUBLIC KEY-----\n"
                    }
                  ]
components:
  parameters:
    FilterCountry:
      in: query
      name: country
      description: |
        The country you wish to limit the results to.
        
        Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from [wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
      required: false
      schema:
        type: string
        minLength: 3
        maxLength: 3
        example: ZMB
    FilterOperationType:
      in: query
      name: operationType
      description: |
        The operation you wish to limit the results to.
      required: false
      schema:
        type: string
        enum:
          - DEPOSIT
          - PAYOUT
          - REMITTANCE
          - PUSH_DEPOSIT
          - REFUND
          - NAME_LOOKUP
    DepositId:
      in: path
      name: depositId
      required: true
      description: The id of the deposit that you are performing this operation on.
      schema:
        minLength: 36
        maxLength: 36
        type: string
        format: uuid
      example: f4401bd2-1568-4140-bf2d-eb77d2b2b639
    PayoutId:
      in: path
      name: payoutId
      required: true
      description: The id of the payout that you are performing this operation on.
      schema:
        minLength: 36
        maxLength: 36
        type: string
        format: uuid
      example: f4401bd2-1568-4140-bf2d-eb77d2b2b639
    RefundId:
      in: path
      name: refundId
      required: true
      description: The id of the refund that you are performing this operation on.
      schema:
        minLength: 36
        maxLength: 36
        type: string
        format: uuid
      example: f4401bd2-1568-4140-bf2d-eb77d2b2b639
    RemittanceId:
      in: path
      name: remittanceId
      required: true
      description: The id of the remittance that you are performing this operation on.
      schema:
        minLength: 36
        maxLength: 36
        type: string
        format: uuid
      example: f4401bd2-1568-4140-bf2d-eb77d2b2b639
    SplitPaymentId:
      in: path
      name: splitPaymentId
      required: true
      description: The id of the split payment that you are performing this operation on.
      schema:
        minLength: 36
        maxLength: 36
        type: string
        format: uuid
      example: f4401bd2-1568-4140-bf2d-eb77d2b2b639
    CheckoutId:
      in: path
      name: checkoutId
      required: true
      description: The id of the checkout that you are performing this operation on.
      schema:
        minLength: 36
        maxLength: 36
        type: string
        format: uuid
      example: f4401bd2-1568-4140-bf2d-eb77d2b2b639
    Content-Digest:
      in: header
      name: Content-Digest
      schema:
        type: string
        format: string
        description: SHA-256 or SHA-512 hash of the request body.
      required: false
    Signature:
      in: header
      name: Signature
      schema:
        type: string
        format: string
        description: Signature of the request according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
      required: false
    Signature-Input:
      in: header
      name: Signature-Input
      schema:
        type: string
        format: string
        description: Signature input according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
      required: false
    Accept-Signature:
      in: header
      name: Accept-Signature
      schema:
        type: string
        format: string
        description: Expected signature algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
      required: false
    Accept-Digest:
      in: header
      name: Accept-Digest
      schema:
        type: string
        format: string
        description: Expected digest algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
      required: false
  schemas:
    AccountDetails:
      required:
        - provider
        - phoneNumber
      type: object
      properties:
        phoneNumber:
          $ref: '#/components/schemas/PhoneNumber'
        provider:
          $ref: '#/components/schemas/Provider'
    RemittanceAccountDetails:
      required:
        - provider
        - phoneNumber
      type: object
      properties:
        phoneNumber:
          $ref: '#/components/schemas/PhoneNumber'
        provider:
          $ref: '#/components/schemas/RemittanceProvider'
    RecipientDetails:
      required:
        - firstName
        - lastName
      type: object
      properties:
        firstName:
          type: string
          description: The first name of the recipient of this remittance.
          maxLength: 64
          example: John
        lastName:
          type: string
          description: The last name of the recipient of this remittance.
          maxLength: 64
          example: Doe
    PhoneNumber:
      type: string
      description: |
            The phone number (MSISDN) of the customer paying or receiving payment.
            The format is described in [Wikipedia](https://en.wikipedia.org/wiki/MSISDN). 
            
            Use [predict provider](/v2/api-reference/toolkit/predict-provider) to validate and sanitise the phone number.

            Phone number validation has following rules:
             * Only digits without whitespaces or any other separators or prefixes like '+'.
             * Should not start with zero.
             * Country code is mandatory.
             * Should not exceed or be less than the valid length of specified country.
      example: '260763456789'
    FlexibleMsisdnValue:
      type: string
      description: |
            The phone number (MSISDN) to predict the provider of.
            Must contain the country code.
            
            The input will be sanitized by:
            * removing the leading + sign
            * removing all whitespace
            * removing non-numeric characters
      example: '+260 763-456789'
    PredictedMsisdnValue:
      type: string
      description: |
            The correctly formatted phone number (MSISDN) from your original request that is in a valid format for the rest of the PawaPay Merchant API.
      example: '260763456789'

    AmountDetails:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'

    Amount:
      minLength: 1
      maxLength: 23
      type: string
      pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
      description: |
        The amount of the payment.

        Amount must follow below requirements or the request will be **rejected**:
        * Not all providers support decimals. Find which ones do from [providers](/v2/docs/providers) or dynamically using [active configuration](/v2/api-reference/toolkit/active-configuration) endpoint.
        * Transaction limits apply. Find them from the [Active Configuration](/v2/api-reference/toolkit/active-configuration) endpoint.
        * Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
      example: '15'

    Provider:
      type: string
      description: |
        The provider represents the mobile money operator or processor that can process payments.
        
        Find here a list of all the supported [providers](/v2/docs/providers). 
        
        The [active configuration](/v2/api-reference/toolkit/active-configuration) endpoint provides the list of provider configured for your account.

        You can use the [predict provider](/v2/api-reference/toolkit/predict-provider) enpoint to predict the provider to use based on the phone number (MSISDN).
      example: MTN_MOMO_ZMB
    RemittanceProvider:
      type: string
      description: |
        The provider represents the mobile money operator or processor that can process payments.

        Please contact our Sales team for a list of all the supported providers.

        The [active configuration](/v2/api-reference/toolkit/active-configuration) endpoint provides the list of provider configured for your account.

        You can use the [predict provider](/v2/api-reference/toolkit/predict-provider) enpoint to predict the provider to use based on the phone number (MSISDN).
      example: MTN_MOMO_ZMB
    Country:
      type: string
      minLength: 3
      maxLength: 3
      description: |
        The country in which the payment was initiated.

        Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
      example: ZMB
    CheckoutCountry:
      type: string
      minLength: 3
      maxLength: 3
      description: |
        A country that the hosted payment page allows for this checkout.

        Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
      example: ZMB
    Currency:
      type: string
      description: |
        The currency in which the `amount` is specified.
        
        Format must be the ISO 4217 three character currency code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).
        
        Find the supported currencies for the [provider](/v2/docs/providers).
        
        The [active configuration](/v2/api-reference/toolkit/active-configuration) endpoint has all the providers configured for your account together with the supported currencies.
      example: ZMW
    StatementProvider:
      type: string
      description: |
        If you have provider specific wallets, it indicates which provider specific wallet to generate the statement for in this country.

        You can check which wallets you have from the [wallet balances](/v2/api-reference/wallet-balances/wallet-balances) endpoint.
      example: MTN_MOMO_ZMB
    StatementCountry:
      type: string
      minLength: 3
      maxLength: 3
      description: |
        Country code for the wallet you are generating a statement for.

        You can check which wallets you have from the [wallet balances](/v2/api-reference/wallet-balances/wallet-balances) endpoint.

        Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
      example: ZMB
    StatementCurrency:
      type: string
      description: |
        ISO currency code for the wallet you are generating a statement for.

        You can check which wallets you have from the [wallet balances](/v2/api-reference/wallet-balances/wallet-balances) endpoint.

        Format must be the ISO 4217 three character currency code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).
      example: ZMW
    TransactionDetails:
      required:
        - transactionReference
        - originalAmount
        - originalCurrency
        - buyFxRate
        - senderFees
        - purposeOfFunds
        - sourceOfFunds
      type: object
      properties:
        transactionReference:
          type: string
          description: The unique reference to the transaction in your system
          maxLength: 64
          example: de83150a-5916-48a2-b048-bd85e022cb55
        originalAmount:
          type: string
          description: The original amount in the original currency that is being remitted.
          example: "100"
        originalCurrency:
              type: string
              maxLength: 3
              description: |
                The currency in which the remittance originates.
                Format must be the ISO 4217 three character currency code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).
              example: USD
        buyFxRate:
          type: string
          description: The fx rate applied to the customer for this remittance.
          example: "23.88"
        senderFees:
          type: string
          description: Any service and other fees paid by the customer for this remittance.
          example: "1"
        purposeOfFunds:
          type: string
          description: The intended purpose for the funds being remitted to the recipient.
          maxLength: 64
          enum: 
            - FAMILY_SUPPORT
            - MEDICAL_EXPENSES
            - TUITION_FEES
            - EDUCATION_SUPPORT
            - GIFT_AND_OTHER_DONATIONS
            - HOME_IMPROVEMENT
            - DEBT_SETTLEMENT
            - REAL_ESTATE
            - TAXES
            - SALARY
            - SAVINGS
            - PERSONAL_TRANSFER
            - OTHER
          example: FAMILY_SUPPORT
        sourceOfFunds:
          type: string
          description: The source of the funds being remitted.
          maxLength: 64
          enum:
            - SALARY
            - SAVINGS
            - LOTTERY
            - LOAN
            - BUSINESS_INCOME
            - GIFT
            - OTHER
          example: SALARY
    SenderDetails:
      required:
        - firstName
        - lastName
        - nationality
        - phoneNumber
        - address
        - identification
      type: object
      properties:
        firstName:
          type: string
          description: The first name of the sender of this remittance.
          maxLength: 64
          example: Jane
        lastName:
          type: string
          description: The last name of the sender of this remittance.
          maxLength: 64
          example: Doe
        nationality:
              type: string
              minLength: 3
              maxLength: 3
              description: |
                The nationality of the sender of this remittance. Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
              example: USA
        gender:
          type: string
          description: The gender of the sender of this remittance.
          maxLength: 64
          enum:
            - MALE
            - FEMALE
            - OTHER
          example: FEMALE
        phoneNumber:
          type: string
          description: The phone number of the sender of this remittance.
          maxLength: 64
          example: "12124567890"
        dateOfBirth:
          type: string
          format: date
          description: The date of birth of the sender of this remittance.
          example: "1977-12-31"
        placeOfBirth:
          type: string
          description: The place of birth of the sender of this remittance.
          maxLength: 64
          example: USA
        occupation:
          type: string
          description: The occupation of the sender of this remittance.
          maxLength: 64
          example: "Project manager"
        relationshipRecipient:
          type: string
          description: The nature of the relationship between the sender and the recipient of this remittance.
          maxLength: 64
          enum:
            - FATHER
            - MOTHER
            - SON
            - DAUGHTER
            - BROTHER
            - SISTER
            - HUSBAND
            - WIFE
            - PARTNER
            - FRIEND
            - AUNT
            - UNCLE
            - COUSIN
            - NEPHEW
            - NIECE
            - GRANDFATHER
            - GRANDMOTHER
            - GRANDSON
            - GRANDDAUGHTER
            - STEPCHILD
            - DAUGHTER_IN_LAW
            - SON_IN_LAW
            - BORTHER_IN_LAW
            - SISTER_IN_LAW
            - MOTHER_IN_LAW
            - GUARDIAN
            - SELF
          example: PARTNER
        address:
          $ref: '#/components/schemas/SenderAddress'
        identification:
          $ref: '#/components/schemas/SenderIdentification'
    SenderAddress:
      required:
        - addressLine
        - postalCode
        - city
        - country
      type: object
      properties:
        addressLine:
          type: string
          description: The address of the sender of this remittance.
          maxLength: 64
          example: "1476 Sandhill Rd"
        postalCode:
          type: string
          description: The postal/zip code or the sender of this remittance.
          maxLength: 64
          example: "84058"
        city:
          type: string
          description: The city of the sender of this remittance.
          maxLength: 64
          example: "Orem"
        country:
              type: string
              minLength: 3
              maxLength: 3
              description: |
                The country of the sender of this remittance. Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
              example: USA
    SenderIdentification:
      required:
        - type
        - number
      type: object
      properties:
        type:
          type: string
          description: The type of identification document used to KYC the sender of this remittance.
          example: PASSPORT
          enum:
            - NATIONAL_ID
            - PASSPORT
            - DRIVING_LICENSE
            - SOCIAL_SECURITY_ID
            - RESIDENCE_PERMIT
        number:
          type: string
          description: The id of the identification document used to KYC the sender of this remittance.
          maxLength: 64
          example: E00007730

    ## Payment response ids
    DepositResponseId:
      type: object
      properties:
        depositId:
          $ref: '#/components/schemas/ResponsePaymentId'

    PayoutResponseId:
      type: object
      properties:
        payoutId:
          $ref: '#/components/schemas/ResponsePaymentId'

    RemittanceResponseId:
      type: object
      properties:
        remittanceId:
          $ref: '#/components/schemas/ResponsePaymentId'

    SplitPaymentResponseId:
      type: object
      properties:
        splitPaymentId:
          $ref: '#/components/schemas/InitiationPaymentId'

    RefundResponseId:
      type: object
      properties:
        refundId:
          $ref: '#/components/schemas/ResponsePaymentId'

    StatementId:
          minLength: 36
          maxLength: 36
          type: string
          format: uuid
          description: The unique ID for this statement as specified by PawaPay.
          example: f4401bd2-1568-4140-bf2d-eb77d2b2b639

    ResponsePaymentId:
          minLength: 36
          maxLength: 36
          type: string
          format: uuid
          description: The unique ID for this payment in PawaPay as specified by you during initiation.
          example: f4401bd2-1568-4140-bf2d-eb77d2b2b639

    InitiationPaymentId:
          minLength: 36
          maxLength: 36
          type: string
          format: uuid
          description: |
            A UUIDv4 based unique ID for this payment. 
            We require you to provide the unique ID for all initiated payments to ensure you can always reconcile all payments.
            Please store this ID in your system before initiating the payment with PawaPay.
          example: f4401bd2-1568-4140-bf2d-eb77d2b2b639

    Deposit:
      required:
        - depositId
        - status
        - amount
        - currency
        - country
        - payer
        - created
      type: object
      properties:
        depositId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/DepositStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        payer:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        clientReferenceId:
          $ref: '#/components/schemas/ClientReference'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        failureReason:
          $ref: '#/components/schemas/DepositFailureReason'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'
    V2DepositCallback:
      required:
        - depositId
        - status
        - amount
        - currency
        - country
        - payer
        - created
      type: object
      properties:
        depositId:
          $ref: '#/components/schemas/ResponsePaymentId'
          example: f4401bd2-1568-4140-bf2d-eb77d2b2b639
        status:
          $ref: '#/components/schemas/CallbackStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        payer:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        failureReason:
          $ref: '#/components/schemas/DepositFailureReason'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'

    ProviderTransactionId:
      type: string
      description: The unique ID for this payment assigned by the provider. The customer would see this ID on their SMS receipt and transaction history.
      example: 'ABC123'

    CreatedTimestamp:
      type: string
      description: The timestamp of when the payment was created in the PawaPay platform. Format defined by 'date-time' in RFC3339 section 5.6 from [IETF](https://tools.ietf.org/html/rfc3339#section-5.6)
      format: date-time
      example: '2020-02-21T17:32:29Z'
      
    StatementCreatedTimestamp:
      type: string
      description: The timestamp of when the statement was created in the PawaPay platform. Format defined by 'date-time' in RFC3339 section 5.6 from [IETF](https://tools.ietf.org/html/rfc3339#section-5.6)
      format: date-time
      example: '2020-02-21T17:32:29Z'
      
    PaymentInitiationRequest:
      required:
        - amount
        - currency
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataRequest'

    DepositInitiationRequest:
      allOf:
        - type: object
          required:
            - depositId
            - payer
          properties:
            depositId:
              $ref: '#/components/schemas/InitiationPaymentId'
            payer:
              $ref: '#/components/schemas/PayerOrRecipient'
            preAuthorisationCode:
              $ref: '#/components/schemas/PreauthorisationCode'
            clientReferenceId:
              $ref: '#/components/schemas/ClientReference'
            customerMessage:
              $ref: '#/components/schemas/CustomerMessage'
        - $ref: '#/components/schemas/PaymentInitiationRequest'

    PayoutInitiationRequest:
      allOf:
        - type: object
          required:
            - payoutId
            - recipient
          properties:
            payoutId:
              $ref: '#/components/schemas/InitiationPaymentId'
            recipient:
              $ref: '#/components/schemas/PayerOrRecipient'
            clientReferenceId:
              $ref: '#/components/schemas/ClientReference'
            customerMessage:
              $ref: '#/components/schemas/CustomerMessage'
        - $ref: '#/components/schemas/PaymentInitiationRequest'

    SplitPaymentInitiationRequest:
      allOf:
        - type: object
          required:
            - amount
            - currency
            - splitPaymentId
            - payer
            - splits
          properties:
            splitPaymentId:
              $ref: '#/components/schemas/InitiationPaymentId'
            payer:
              $ref: '#/components/schemas/PayerOrRecipient'
            clientReferenceId:
              $ref: '#/components/schemas/ClientReference'
            customerMessage:
              $ref: '#/components/schemas/CustomerMessage'
            splits:
              type: array
              minItems: 1
              maxItems: 1
              items:
                $ref: '#/components/schemas/SplitPayoutInitiationRequest'
        - $ref: '#/components/schemas/PaymentInitiationRequest'

    CheckoutInitiationRequest:
      type: object
      required:
        - checkoutId
        - returnUrl
      properties:
        checkoutId:
          $ref: '#/components/schemas/InitiationPaymentId'
        returnUrl:
          $ref: '#/components/schemas/ReturnUrl'
        returnMethod:
          $ref: '#/components/schemas/CheckoutReturnMethod'
        defaultLanguage:
          type: string
          description: The default language of the checkout page. Supported languages are `en` and `fr`.
          enum:
            - en
            - fr
          example: en
        countries:
          type: array
          description: Restricts the checkout to the specified countries when provided.
          items:
            $ref: '#/components/schemas/CheckoutCountry'
          example:
            - ZMB
            - CIV
        expiresAfter:
          type: integer
          format: int32
          minimum: 3
          maximum: 60
          description: Number of minutes after creation when the checkout should expire. Must be between 3 and 60. Defaults to 15 if not provided.
          example: 60
        amounts:
          type: array
          description: |
            The fixed amount the customer is asked to pay, specified per country and currency.

            This allows you to set the amount the customer will pay in each country and currency the checkout supports. The customer is then asked to pay the amount matching the country and currency they select on the hosted payment page.

            If `amounts` is provided, it must include an entry for every country in the `countries` array. If omitted, the customer enters the amount themselves on the hosted payment page.
          items:
            $ref: '#/components/schemas/CheckoutAmount'
        payer:
          $ref: '#/components/schemas/CheckoutPayer'
        clientReferenceId:
          $ref: '#/components/schemas/ClientReference'
        reason:
          $ref: '#/components/schemas/CheckoutReason'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataRequest'

    SplitPayoutInitiationRequest:
      type: object
      required:
        - amount
        - recipient
      properties:
        amount:
          $ref: '#/components/schemas/Amount'
        recipient:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'

    RemittanceInitiationRequest:
      allOf:
        - type: object
          required:
            - remittanceId
            - recipient
            - sender
          properties:
            remittanceId:
              $ref: '#/components/schemas/InitiationPaymentId'
            recipient:
              $ref: '#/components/schemas/RemittanceRecipient'
            sender:
              $ref: '#/components/schemas/RemittanceSender'
            customerMessage:
              $ref: '#/components/schemas/CustomerMessage'
        - $ref: '#/components/schemas/PaymentInitiationRequest'

    RefundInitiationRequest:
      allOf:
        - type: object
          required:
            - refundId
            - depositId
          properties:
            refundId:
              $ref: '#/components/schemas/InitiationPaymentId'
            depositId:
              minLength: 36
              maxLength: 36
              type: string
              format: uuid
              description: The `depositId` of the deposit to be refunded.
              example:  "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
            clientReferenceId:
              $ref: '#/components/schemas/ClientReference'
        - $ref: '#/components/schemas/PaymentInitiationRequest'

    StatementCreationRequest:
      allOf:
        - type: object
          required:
            - wallet
            - callbackUrl
            - startDate
            - endDate
          properties:
            wallet:
              $ref: '#/components/schemas/StatementWallet'
            callbackUrl:
              type: string
              description: |
                The URL where PawaPay will `POST` a callback with the `downloadUrl` when the statement has been generated.
              example: 'https://merchant.com/statementCallbacks'
            startDate:
              type: string
              description: The start date of the statement date range. Format defined by 'date-time' in RFC3339 section 5.6 from [IETF](https://tools.ietf.org/html/rfc3339#section-5.6)
              format: date-time
              example: '2025-05-10T10:00:00'
            endDate:
              type: string
              description: The end date of the statement date range. Format defined by 'date-time' in RFC3339 section 5.6 from [IETF](https://tools.ietf.org/html/rfc3339#section-5.6)
              format: date-time
              example: '2025-05-11T10:00:00'
            compressed:
              type: boolean
              description: |
                If `true`, the statement will be compressed using gzip and returned with a `.csv.gz` extension.
                If `false` or not provided, the statement will be returned as a CSV file with a `.csv` extension.
                
    StatementWallet:
      description: |
        Specifies which wallet to generate a statement for.

        You can check which wallets you have from the [wallet balances](/v2/api-reference/wallet-balances/wallet-balances) endpoint.
      required:
        - country
        - currency
      type: object
      properties:
        country:
          $ref: '#/components/schemas/StatementCountry'
        currency:
          $ref: '#/components/schemas/StatementCurrency'
        provider:
          $ref: '#/components/schemas/StatementProvider'

    PreauthorisationCode:
      minLength: 1
      maxLength: 36
      type: string
      pattern: ^[a-zA-Z0-9]+$
      description: Provider with 'authType' as 'PREAUTH' will expect the preauthorization token (OTP) to be passed in through this parameter.

    CheckBalanceResponse:
      required:
        - balances
      type: object
      properties:
        balances:
          type: array
          items:
            $ref: '#/components/schemas/WalletState'
          description: List of wallet balances
    WalletState:
      required:
        - country
        - balance
        - currency
        - provider
      type: object
      properties:
        country:
          type: string
          format: text
          description: | 
            Country of the wallet.

            Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
          example: ZMB
        balance:
          type: string
          description: The current balance of the wallet.
          example: '1000.0'
        currency:
          type: string
          description: Currency of the wallet.
          format: text
          example: 'ZMW'
        provider:
          type: string
          description: If you are using a wallet that is only used by a single provider, that providers code will be shown here.
          example: 'MTN_MOMO_BEN'
    DepositCreationResponse:
      required:
        - depositId
        - status
      type: object
      properties:
        depositId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/DepositCreationStatus'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        failureReason:
          $ref: '#/components/schemas/DepositInitiationFailureReason'
    DepositResendCallbackResponse:
      required:
        - depositId
        - status
      type: object
      properties:
        depositId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/ManualCommandStatus'
        failureReason:
          $ref: '#/components/schemas/ManualActionFailureReason'
    DepositCreationStatus:
      type: string
      description: |
        The initiation status of the deposit: 
        * `ACCEPTED` - The deposit has been **accepted** by PawaPay for processing. 
        * `REJECTED` - The deposit has been **rejected**. See `failureReason` for details 
        * `DUPLICATE_IGNORED` - The deposit has been **ignored** as a duplicate of and already accepted deposit. Deduplication is based on `depositId`.
      enum:
        - ACCEPTED
        - REJECTED
        - DUPLICATE_IGNORED

    ManualActionFailureReason:
      type: object
      description: The reason for the failure for this action
      properties:
        failureCode:
          type: string
          description: |
            Possbile failures:
              * `NOT_FOUND` - The payment to perform the operation on was not found in PawaPay.
              * `INVALID_STATE` - The payment to perform the operation on was not in the correct status. For example, payment was not `COMPLETED`.
        failureMessage:
          type: string
          description: Description of the reason for this failure
      example: Deposit with ID \#f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found

    DepositFailureReason:
      description: The reason of the failure in case the payment is in `FAILED` status.
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Possible deposit failure codes: 
            * `PAYER_NOT_FOUND` - The phone number does not have an mobile money account with the provider or does not belong to the provider. 
            * `PAYMENT_NOT_APPROVED` - Customer did not approve the payment. 
            * `PAYER_LIMIT_REACHED` - Customer has reached a transaction limit of their mobile money wallet. 
            * `PAYMENT_IN_PROGRESS` - Customer has a payment already pending. New payments cannot be initiated during that time. This payment may not have been initiated by you.
            * `INSUFFICIENT_BALANCE` - Customer does not have enough funds. 
            * `WALLET_LIMIT_REACHED` - Customer has reached a wallet limit. 
            * `UNSPECIFIED_FAILURE` - The provider confirmed the payment has failed, but did not provide any information about the reason of the failure.
            * `UNKNOWN_ERROR` - An unknown error has occurred.
          example: INSUFFICIENT_BALANCE
          enum:
            - PAYER_NOT_FOUND
            - PAYMENT_NOT_APPROVED
            - PAYER_LIMIT_REACHED
            - PAYMENT_IN_PROGRESS
            - INSUFFICIENT_BALANCE
            - UNSPECIFIED_FAILURE
            - UNKNOWN_ERROR
        failureMessage:
          type: string
          description: Description of the reason for this failure
          example: The customer does not have enough funds to complete this payment.
    DepositSearchResult:
      required:
        - status
      type: object
      properties:
        status:
          $ref: '#/components/schemas/SearchResultStatus'
        data:
          $ref: '#/components/schemas/Deposit'
    DepositStatus:
      type: string
      description: |
        Possible deposit statuses: 
        * `ACCEPTED` - The deposit has been **accepted** by PawaPay for processing. 
        * `PROCESSING` - The deposit has been submitted to the provider and is being processed. 
        * `IN_RECONCILIATION` - The deposit is being reconciled currently to determine it's final status.
        * `COMPLETED` - The deposit has been successfully processed. This is a **final status.**
        * `FAILED` - The deposit has been processed, but failed. This is a **final status.** See `failureReason` for details.
      enum:
        - ACCEPTED
        - PROCESSING
        - IN_RECONCILIATION
        - COMPLETED
        - FAILED

    SplitPaymentCreationResponse:
      required:
        - splitPaymentId
        - status
      type: object
      properties:
        splitPaymentId:
          $ref: '#/components/schemas/InitiationPaymentId'
        status:
          $ref: '#/components/schemas/SplitPaymentCreationStatus'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        failureReason:
          $ref: '#/components/schemas/SplitPaymentCreationFailureReason'

    SplitPaymentCreationStatus:
      type: string
      description: |
        The initiation status of the split payment:
        * `ACCEPTED` - The split payment has been **accepted** by PawaPay for processing.
        * `REJECTED` - The split payment has been **rejected**. See `failureReason` for details.
        * `DUPLICATE_IGNORED` - The split payment has been ignored as a duplicate of an already accepted split payment. Deduplication is based on `splitPaymentId`.
      enum:
        - ACCEPTED
        - REJECTED
        - DUPLICATE_IGNORED

    SplitPaymentSearchResult:
      required:
        - status
      type: object
      properties:
        status:
          $ref: '#/components/schemas/SearchResultStatus'
        data:
          $ref: '#/components/schemas/SplitPayment'

    CheckoutCreationResponse:
      required:
        - checkoutId
        - status
      type: object
      properties:
        checkoutId:
          $ref: '#/components/schemas/InitiationPaymentId'
        status:
          $ref: '#/components/schemas/CheckoutCreationStatus'
        redirectUrl:
          $ref: '#/components/schemas/CheckoutRedirectUrl'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        expiresAt:
          $ref: '#/components/schemas/CheckoutExpirationTimestamp'
        checkoutCode:
          $ref: '#/components/schemas/CheckoutCode'
        failureReason:
          $ref: '#/components/schemas/CheckoutCreationFailureReason'

    CheckoutCreationStatus:
      type: string
      description: |
        The initiation status of the checkout:
        * `ACCEPTED` - The checkout has been **accepted** and the hosted payment page has been created.
        * `REJECTED` - The checkout has been **rejected**. See `failureReason` for details.
        * `DUPLICATE_IGNORED` - The checkout has been ignored as a duplicate of an already accepted checkout. Deduplication is based on `checkoutId`.
      enum:
        - ACCEPTED
        - REJECTED
        - DUPLICATE_IGNORED

    CheckoutSearchResult:
      required:
        - status
      type: object
      properties:
        status:
          $ref: '#/components/schemas/SearchResultStatus'
        data:
          $ref: '#/components/schemas/Checkout'

    Checkout:
      required:
        - checkoutId
        - status
        - redirectUrl
        - countries
        - amounts
        - depositsHistory
        - metadata
        - reason
        - checkoutCode
      type: object
      properties:
        checkoutId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/CheckoutStatus'
        redirectUrl:
          $ref: '#/components/schemas/CheckoutRedirectUrl'
        returnUrl:
          $ref: '#/components/schemas/ReturnUrl'
        returnMethod:
          $ref: '#/components/schemas/CheckoutReturnMethod'
        defaultLanguage:
          type: string
          description: The default language of the checkout when one was specified during creation.
          example: en
        countries:
          type: array
          description: The list of countries that the hosted payment page should allow for this checkout.
          items:
            $ref: '#/components/schemas/CheckoutCountry'
          example:
            - ZMB
            - CIV
        expiresAfter:
          type: integer
          format: int32
          description: Number of minutes after creation when this checkout is configured to expire. Between 3 and 60; defaults to 15.
          example: 60
        amounts:
          type: array
          description: |
            The fixed amount the customer is asked to pay, specified per country and currency, as configured for this checkout.

            When set, it contains an entry for each country in the `countries` array, defining the amount the customer pays for the country and currency they select on the hosted payment page. If not set, the customer enters the amount themselves on the hosted payment page.
          items:
            $ref: '#/components/schemas/CheckoutAmount'
        payer:
          $ref: '#/components/schemas/CheckoutPayer'
        clientReferenceId:
          $ref: '#/components/schemas/ClientReference'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        depositStatus:
          $ref: '#/components/schemas/CheckoutCurrentDepositStatus'
        deposit:
          $ref: '#/components/schemas/CheckoutDeposit'
        depositsHistory:
          type: array
          description: History of payment attempts within this checkout. A single checkout can contain multiple attempts, but at most one can complete successfully.
          items:
            $ref: '#/components/schemas/CheckoutDeposit'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'
        reason:
          $ref: '#/components/schemas/CheckoutReason'
        checkoutCode:
          $ref: '#/components/schemas/CheckoutCode'

    CheckoutStatus:
      type: string
      description: |
        Possible checkout lifecycle statuses. This is distinct from the initiation status (`CheckoutCreationStatus`) returned when the checkout is created.
        * `WAITING_PAYMENT` - The checkout and its hosted payment page have been created and are waiting for the customer to pay.
        * `PROCESSING` - A payment attempt is in progress and the checkout is still being processed.
        * `COMPLETED` - The checkout has completed successfully. This is a **final status.**
        * `FAILED` - The checkout has failed. Inspect `deposit` or `depositsHistory` for the latest attempt result when available. This is a **final status.**
        * `EXPIRED` - The checkout has expired and can no longer be used. This is a **final status.**
        * `CANCELLED` - The customer cancelled the payment on the hosted payment page. This is a **final status.**
      enum:
        - WAITING_PAYMENT
        - PROCESSING
        - COMPLETED
        - FAILED
        - EXPIRED
        - CANCELLED

    CheckoutCurrentDepositStatus:
      type: string
      description: |
        Current aggregate status for the checkout, representing the latest payment attempt:
        * `PROCESSING` - The latest payment attempt is still being processed. Attempts undergoing reconciliation also remain `PROCESSING` until a final status is determined.
        * `COMPLETED` - The latest payment attempt completed successfully.
        * `FAILED` - The latest payment attempt failed.
      enum:
        - PROCESSING
        - COMPLETED
        - FAILED

    CheckoutDepositStatus:
      type: string
      description: |
        Possible statuses for a payment attempt inside the checkout:
        * `ACCEPTED` - The payment attempt has been accepted by PawaPay for processing.
        * `PROCESSING` - The payment attempt is being processed. Attempts undergoing reconciliation also remain `PROCESSING` until a final status is determined.
        * `COMPLETED` - The payment attempt completed successfully.
        * `FAILED` - The payment attempt failed.
      enum:
        - ACCEPTED
        - PROCESSING
        - COMPLETED
        - FAILED

    CheckoutDeposit:
      required:
        - depositId
        - status
        - created
      type: object
      properties:
        depositId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/CheckoutDepositStatus'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        failureReason:
          $ref: '#/components/schemas/CheckoutDepositFailureReason'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        payer:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'

    CheckoutDepositFailureReason:
      description: The failure reason of the payment attempt when its status is `FAILED`.
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Failure code of the payment attempt.

            Checkout payments use the same failure codes as standard deposits.
          example: PAYMENT_NOT_APPROVED
        failureMessage:
          type: string
          description: Human readable description of the payment attempt failure.
          example: The payer did not approve the payment.

    CheckoutAmount:
      required:
        - country
        - currency
        - amount
      type: object
      properties:
        country:
          type: string
          minLength: 3
          maxLength: 3
          description: |
            The country this amount is for.

            Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
          example: ZMB
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'

    CheckoutPayer:
      description: Details of the payer that should be pre-filled for the hosted payment page, if specified.
      required:
        - type
        - accountDetails
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AccountDetailsType'
        accountDetails:
          $ref: '#/components/schemas/CheckoutAccountDetails'

    CheckoutAccountDetails:
      required:
        - allowCustomerToOverride
      type: object
      properties:
        phoneNumber:
          $ref: '#/components/schemas/PhoneNumber'
        provider:
          $ref: '#/components/schemas/Provider'
        allowCustomerToOverride:
          type: boolean
          description: Indicates whether the customer may change the pre-filled payer details in the hosted payment page.
          example: true

    CheckoutReturnMethod:
      type: string
      description: |
        Controls how the customer is returned from the hosted payment page to the `returnUrl` once the payment is finished or cancelled. The customer is always returned eventually; this only affects the experience.
        * `INSTANT` - The customer is redirected back immediately, with no extra screen.
        * `COUNTDOWN` - A short countdown is shown, then the customer is redirected automatically.
        * `CUSTOMER_ACTION` - The checkout page waits until the customer presses "Return to merchant".
      enum:
        - INSTANT
        - COUNTDOWN
        - CUSTOMER_ACTION

    CheckoutReason:
      type: object
      description: Localized reason values shown to the customer inside the hosted payment page.
      additionalProperties:
        $ref: '#/components/schemas/CustomerMessage'
      example:
        en: GOODS PURCHASE

    CheckoutRedirectUrl:
      type: string
      format: uri
      description: The URL to which the customer must be redirected to open and complete the hosted payment page.
      example: https://checkout.sandbox.pawapay.io/7mVk1x8UbTamQ64xGR

    ReturnUrl:
      type: string
      format: uri
      description: The URL the customer should be redirected to after the payment is processed.
      example: https://merchant.example.com/checkout-result

    CheckoutExpirationTimestamp:
      type: string
      format: date-time
      description: The timestamp when the checkout and its hosted payment page are scheduled to expire.
      example: '2026-03-27T11:30:00Z'

    CheckoutCode:
      type: string
      description: A unique code identifying the checkout. It forms the path of the hosted payment page's `redirectUrl` and is appended to your `returnUrl` as the `checkoutCode` query parameter when the customer is returned to your site. Store it after initiating the checkout, so you can identify which checkout the customer is returning from.
      example: 7mVk1x8UbTamQ64xGR

    CheckoutCreationFailureReason:
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Possible checkout initiation failure codes:
            * `NO_AUTHENTICATION` - The API token was not found in the request headers.
            * `AUTHENTICATION_ERROR` - The API token in the request headers is not valid.
            * `AUTHORISATION_ERROR` - The API token in the request header is not authorised to make this request.
            * `HTTP_SIGNATURE_ERROR` - The signature you have passed with the request did not pass verification.
            * `INVALID_INPUT` - We were unable to parse the payload of the request.
            * `MISSING_PARAMETER` - A mandatory parameter was missing from the request body.
            * `UNSUPPORTED_PARAMETER` - An unsupported parameter was found in the request body.
            * `INVALID_PARAMETER` - A parameter had an incorrect value.
            * `DUPLICATE_METADATA_FIELD` - A duplicate metadata field was found in the request.
            * `INVALID_PAYER_FORMAT` - The payer details are in an invalid format.
            * `INVALID_PHONE_NUMBER` - The phone number is in the wrong format for the selected provider.
            * `EXPIRES_AFTER_OUT_OF_BOUNDS` - The 'expiresAfter' is outside the allowed range of 3 to 60 minutes.
            * `DEPOSITS_NOT_ALLOWED` - Deposits are not enabled on your PawaPay account for this operation.
            * `UNKNOWN_ERROR` - An unknown error has occured.
          enum:
            - NO_AUTHENTICATION
            - AUTHENTICATION_ERROR
            - AUTHORISATION_ERROR
            - HTTP_SIGNATURE_ERROR
            - INVALID_INPUT
            - MISSING_PARAMETER
            - UNSUPPORTED_PARAMETER
            - INVALID_PARAMETER
            - DUPLICATE_METADATA_FIELD
            - INVALID_PAYER_FORMAT
            - INVALID_PHONE_NUMBER
            - EXPIRES_AFTER_OUT_OF_BOUNDS
            - DEPOSITS_NOT_ALLOWED
            - UNKNOWN_ERROR
          example: INVALID_PAYER_FORMAT
        failureMessage:
          type: string
          description: Description of the reason for this failure.

    CheckoutExpirationResponse:
      required:
        - checkoutId
        - status
      type: object
      properties:
        checkoutId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/CheckoutStatus'
        expiredAt:
          type: string
          format: date-time
          description: Timestamp when the checkout was expired.
          example: '2026-03-27T10:45:00Z'
        reason:
          type: string
          description: Reason reported for the expiration.
          example: MANUAL_EXPIRY
        expiredBy:
          type: string
          description: Actor that expired the checkout.
          example: API

    V2CheckoutCallback:
      description: |
        The callback delivered to your configured callback URL when a checkout reaches a final status (`COMPLETED`, `FAILED`, `EXPIRED` or `CANCELLED`).

        The payload is the checkout in its final state, including the latest payment attempt and the full history of attempts.
      required:
        - checkoutId
        - status
        - depositsHistory
        - metadata
        - created
      type: object
      properties:
        checkoutId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/CheckoutStatus'
        checkoutCode:
          $ref: '#/components/schemas/CheckoutCode'
        returnUrl:
          $ref: '#/components/schemas/ReturnUrl'
        countries:
          type: array
          description: The list of countries that the hosted payment page allowed for this checkout.
          items:
            $ref: '#/components/schemas/CheckoutCountry'
          example:
            - ZMB
            - CIV
        amounts:
          type: array
          description: |
            The fixed amount the customer is asked to pay, specified per country and currency, as configured for this checkout.

            When set, it contains an entry for each country in the `countries` array, defining the amount the customer pays for the country and currency they select on the hosted payment page. If not set, the customer enters the amount themselves on the hosted payment page.
          items:
            $ref: '#/components/schemas/CheckoutAmount'
        clientReferenceId:
          $ref: '#/components/schemas/ClientReference'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        depositStatus:
          $ref: '#/components/schemas/CheckoutCurrentDepositStatus'
        deposit:
          $ref: '#/components/schemas/CheckoutDeposit'
        depositsHistory:
          type: array
          description: History of payment attempts within this checkout. A single checkout can contain multiple attempts, but at most one can complete successfully.
          items:
            $ref: '#/components/schemas/CheckoutDeposit'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'
        reason:
          $ref: '#/components/schemas/CheckoutReason'

    SplitPayment:
      required:
        - splitPaymentId
        - status
        - amount
        - currency
        - country
        - payer
        - splits
        - created
      type: object
      properties:
        splitPaymentId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/SplitPaymentStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        payer:
          $ref: '#/components/schemas/PayerOrRecipient'
        clientReferenceId:
          $ref: '#/components/schemas/ClientReference'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        splits:
          type: array
          items:
            $ref: '#/components/schemas/SplitPayout'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'
        failureReason:
          $ref: '#/components/schemas/SplitPaymentDepositFailureReason'

    V2SplitPaymentCallback:
      required:
        - splitPaymentId
        - status
        - amount
        - currency
        - country
        - payer
        - created
      type: object
      properties:
        splitPaymentId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/SplitPaymentCallbackStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        payer:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        splits:
          type: array
          items:
            $ref: '#/components/schemas/SplitPayoutCallback'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'
        failureReason:
          $ref: '#/components/schemas/SplitPaymentDepositFailureReason'

    SplitPayout:
      required:
        - payoutId
        - status
        - amount
        - recipient
      type: object
      properties:
        payoutId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/SplitPayoutStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        recipient:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        failureReason:
          $ref: '#/components/schemas/SplitPaymentPayoutFailureReason'

    SplitPayoutCallback:
      required:
        - payoutId
        - status
        - amount
        - recipient
      type: object
      properties:
        payoutId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/SplitPayoutCallbackStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        recipient:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        failureReason:
          $ref: '#/components/schemas/SplitPaymentPayoutFailureReason'

    SplitPaymentStatus:
      type: string
      description: |
        Possible split payment statuses:
        * `ACCEPTED` - The split payment has been **accepted** by PawaPay for processing.
        * `PROCESSING` - The split payment is being processed.
        * `IN_RECONCILIATION` - The split payment is being reconciled to determine its final state.
        * `DEPOSIT_COMPLETED` - The collection leg has completed and the split payout is still in progress.
        * `ENQUEUED` - The split payout leg has been enqueued for later processing.
        * `COMPLETED` - The collection and the split payout have both completed successfully. This is a **final status.**
        * `PAYOUT_FAILED` - The collection completed, but the split payout failed. This is a **final status.** See `splits[].failureReason` for details.
        * `FAILED` - The collection failed. This is a **final status.** See `failureReason` for details.
      enum:
        - ACCEPTED
        - PROCESSING
        - IN_RECONCILIATION
        - DEPOSIT_COMPLETED
        - COMPLETED
        - ENQUEUED
        - PAYOUT_FAILED
        - FAILED

    SplitPayoutStatus:
      type: string
      description: |
        Possible split payout statuses:
        * `ACCEPTED` - The split payout has been accepted by PawaPay for processing.
        * `ENQUEUED` - The split payout has been accepted, but has been enqueued for processing later.
        * `PROCESSING` - The split payout has been submitted to the provider and is being processed.
        * `COMPLETED` - The split payout has been successfully processed. This is a **final status.**
        * `FAILED` - The split payout has been processed, but failed. This is a **final status.**
      enum:
        - ACCEPTED
        - COMPLETED
        - PROCESSING
        - FAILED
        - ENQUEUED

    SplitPaymentCallbackStatus:
      type: string
      description: |
        Possible split payment callback statuses:
        * `DEPOSIT_COMPLETED` - The collection leg has completed and the split payout is still in progress.
        * `COMPLETED` - The whole split payment has completed successfully.
        * `PAYOUT_FAILED` - The collection completed, but the split payout failed.
        * `FAILED` - The collection leg failed.
      enum:
        - DEPOSIT_COMPLETED
        - COMPLETED
        - PAYOUT_FAILED
        - FAILED

    SplitPayoutCallbackStatus:
      type: string
      description: |
        Possible split payout callback statuses:
        * `ACCEPTED` - The split payout has been accepted by PawaPay for processing.
        * `PENDING` - The split payout is pending further processing.
        * `IN_TRANSIT` - The split payout is in transit with the provider.
        * `IN_RECONCILIATION` - The split payout is being reconciled to determine its final state.
        * `COMPLETED` - The split payout has completed successfully.
        * `CANCELED` - The split payout was cancelled before completion.
        * `FAILED` - The split payout has failed.
      enum:
        - ACCEPTED
        - COMPLETED
        - PENDING
        - IN_TRANSIT
        - IN_RECONCILIATION
        - CANCELED
        - FAILED

    SplitPaymentDepositFailureReason:
      description: The reason of the failure in case the collection leg is in `FAILED` status.
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Possible split payment collection failure codes:
            * `NOT_ENOUGH_FUNDS` - The payer does not have enough funds to complete the payment.
            * `WALLET_LIMIT_REACHED` - The payer wallet has reached a transaction or wallet limit.
            * `PAYER_NOT_FOUND` - The phone number does not have a mobile money account with the provider or does not belong to the provider.
            * `PAYMENT_NOT_APPROVED` - The payer did not approve the payment.
            * `UNSPECIFIED_FAILURE` - The provider confirmed the payment failed, but did not provide additional details.
            * `INSUFFICIENT_BALANCE` - The payer has insufficient balance for this payment.
            * `PAYMENT_IN_PROGRESS` - The payer already has a payment in progress with this provider.
          example: PAYMENT_NOT_APPROVED
          enum:
            - NOT_ENOUGH_FUNDS
            - WALLET_LIMIT_REACHED
            - PAYER_NOT_FOUND
            - PAYMENT_NOT_APPROVED
            - UNSPECIFIED_FAILURE
            - INSUFFICIENT_BALANCE
            - PAYMENT_IN_PROGRESS
        failureMessage:
          type: string
          description: Description of the reason for this failure.
          example: The payer did not approve the payment.

    SplitPaymentPayoutFailureReason:
      description: The reason of the failure in case the split payout leg is in `FAILED` status.
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Possible split payout failure codes:
            * `PAWAPAY_WALLET_OUT_OF_FUNDS` - Your PawaPay wallet does not have enough funds to complete this split payout.
            * `RECIPIENT_NOT_FOUND` - The recipient does not have an account with the provider or it is not active.
            * `WALLET_LIMIT_REACHED` - The recipient wallet has reached a transaction or wallet limit.
            * `MANUALLY_CANCELLED` - The split payout was cancelled manually after being enqueued.
            * `UNSPECIFIED_FAILURE` - The provider confirmed the payout failed, but did not provide additional details.
          example: WALLET_LIMIT_REACHED
          enum:
            - PAWAPAY_WALLET_OUT_OF_FUNDS
            - RECIPIENT_NOT_FOUND
            - WALLET_LIMIT_REACHED
            - MANUALLY_CANCELLED
            - UNSPECIFIED_FAILURE
        failureMessage:
          type: string
          description: Description of the reason for this failure.
          example: The account '260973024456' has reached a transaction limit. Consult API docs for possible transaction limits.

    SplitPaymentCreationFailureReason:
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Possible split payment initiation failure codes:
            * `INVALID_PARAMETER` - A parameter had an incorrect value.
            * `INVALID_RECIPIENT_FORMAT` - The recipient details are in an invalid format.
            * `INVALID_CURRENCY` - The currency is not supported with the selected provider.
            * `INVALID_COUNTRY` - All parties in the split payment must belong to the same country.
            * `INVALID_AMOUNT` - The amount format is invalid for the selected provider.
            * `INVALID_CORRESPONDENT` - The selected provider is invalid for this request.
            * `DUPLICATE_METADATA_FIELD` - A duplicate metadata field was found in the request.
            * `AMOUNT_OUT_OF_BOUNDS` - The amount is outside the supported transaction limits.
            * `AMOUNT_TOO_SMALL` - The amount is below the supported minimum.
            * `AMOUNT_TOO_LARGE` - The amount is above the supported maximum.
            * `INVALID_PAYER_FORMAT` - The payer details are in an invalid format.
            * `INVALID_PHONE_NUMBER` - The phone number is in the wrong format for the selected provider.
            * `PROVIDER_TEMPORARILY_UNAVAILABLE` - The provider is currently not able to process split payments.
            * `SPLIT_PAYMENTS_NOT_ALLOWED` - Split payments are not enabled for this provider on your PawaPay account.
            * `PARAMETER_INVALID` - A parameter value is invalid.
            * `DUPLICATE_FIELD` - The request contains a duplicate field.
            * `UNKNOWN_ERROR` - An unknown error has occured.
            * `PAYOUT_EXCEEDS_DEPOSIT` - The total split payout amount is greater than the deposit amount.
            * `MISSING_SPLIT_AMOUNT` - A split entry is missing its amount.
            * `MULTIPLE_SPLITS_NOT_SUPPORTED` - More than one split payout was provided in the request.
          example: PAYOUT_EXCEEDS_DEPOSIT
          enum:
            - INVALID_PARAMETER
            - INVALID_RECIPIENT_FORMAT
            - INVALID_CURRENCY
            - INVALID_COUNTRY
            - INVALID_AMOUNT
            - INVALID_CORRESPONDENT
            - DUPLICATE_METADATA_FIELD
            - AMOUNT_OUT_OF_BOUNDS
            - AMOUNT_TOO_SMALL
            - AMOUNT_TOO_LARGE
            - INVALID_PAYER_FORMAT
            - INVALID_PHONE_NUMBER
            - PROVIDER_TEMPORARILY_UNAVAILABLE
            - SPLIT_PAYMENTS_NOT_ALLOWED
            - PARAMETER_INVALID
            - DUPLICATE_FIELD
            - UNKNOWN_ERROR
            - PAYOUT_EXCEEDS_DEPOSIT
            - MISSING_SPLIT_AMOUNT
            - MULTIPLE_SPLITS_NOT_SUPPORTED
        failureMessage:
          type: string
          description: Description of the reason for this failure.
          example: The total split payout amount is greater than the deposit amount.
    CallbackStatus:
      type: string
      description: |
        The status of the payment.
        * `COMPLETED` - The payment has been successfully processed.
        * `PROCESSING` - Only sent for providers with authorisation type `REDIRECT_AUTH`. See `auhtorizationUrl`.
        * `FAILED` - The payment request has been processed, but failed.
      enum:
        - COMPLETED
        - PROCESSING
        - FAILED

    ActiveConfigurationOperationType:
      type: string
      description: |
        The type of operation for the configuration.
      enum:
        - DEPOSIT
        - PAYOUT
        - REMITTANCE
        - REFUND
        - USSD_DEPOSIT

    CreateSession:
      type: object
      required:
        - depositId
        - returnUrl
      properties:
        depositId:
          $ref: '#/components/schemas/InitiationPaymentId'
        returnUrl:
          $ref: '#/components/schemas/ReturnUrl'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        amountDetails:
          $ref: '#/components/schemas/AmountDetails'
        phoneNumber:
          $ref: '#/components/schemas/PhoneNumber'
        language:
          type: string
          description: |
            The language in which the Payment Page will be presented to the customer. If the user has explicitly changed their languages preferences, their selection will override this parameter.
          example: "EN"
          enum:
            - "EN"
            - "FR"
        country:
          type: string
          description: |
            If specifified, allows payment from phone numbers only from a specific country. 
            If not specified, the customer can select any country that is configured for your account in PawaPay. 
            
            You can use the [active configuration](/v2/api-reference/toolkit/active-configuration) endpoint to verify which countries and providers have been configured for your account. 
        
            Format must be the ISO 3166-1 alpha-3, three character country code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
          example: ZMB
        reason:
          type: string
          minLength: 1
          maxLength: 50
          description: An optional text which will be displayed to the customer on the payment page to specify what they are paying for.
          example: 'Ticket to festival'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataRequest'

    Session:
      type: object
      properties:
        redirectUrl:
          type: string
          format: uri
          description: |
            The unique URL for this Payment Page. 
            Customer has to be forwarded to this URL where they can complete the payment. 
            
            **Please note! The URL is valid for 15 minutes.**
          example: https://paywith.pawapay.io/?token=AgV4aA3ZxKfGcdMIo6a6Upf7X2MRptdFUrc6Oi3U53CxC0YAkAADABVhd3MtY3J5cHRvLXB1YmxpYy1rZXkAREFzdDR5WktOeWVTRTZ5bTdhVTJJeno3bG1ydkFYenFpUWZqNVQxbGQ2RUgweEpkZVZ0cWJGM3hwMzI1VWN6VGxEdz09AAdwdXJwb3NlAA5jcmVhdGUtc2Vzc2lvbgAFc3RhZ2UAD3NpZ24tY2xvdWRmcm9udAACAAdhd3Mta21zAE5hcm46YXdzOmttczpldS1jZW50cmFsLTE6MTAxOTQ0Mzc3ODY2OmtleS82ZTgzZmVjMS00MWRhLTQxMWQt
    GatewayAvailabilityOperationType:
      type: string
      description: |
        The type of operation for which the availability status applies.  
        * `PAYOUT` -  Relates to payout transactions.
        * `DEPOSIT` - Relates to deposit transactions.
        * `REMITTANCE` -  Relates to remittance transactions.
        * `REFUND` - Related to refund transaction.
      enum:
        - DEPOSIT
        - PAYOUT
        - REMITTANCE
        - REFUND
    GatewayAvailabilityStatus:
      type: string
      description: |
        Possible operation statuses for providers and their operation types: 
        * `OPERATIONAL` -  The provider is operational and open for processing requests.
        * `DELAYED` - The provider is having problems processing payouts. Our payment operations team is currently monitoring the provider. Payouts are being enqueued and will be processed once the problems have been resolved.  
        * `CLOSED` - The provider is having problems and all requests are being rejected by PawaPay.
      enum:
        - OPERATIONAL
        - DELAYED
        - CLOSED
    GatewayAvailabilityOperationTypeResult:
      required:
        - operationType
        - status
      type: object
      properties:
        operationType:
          $ref: '#/components/schemas/GatewayAvailabilityOperationType'
        status:
          $ref: '#/components/schemas/GatewayAvailabilityStatus'
    GatewayAvailabilityProviderResult:
      required:
        - provider
        - operationTypes
      type: object
      properties:
        provider:
          $ref: '#/components/schemas/Provider'
        operationTypes:
          type: array
          items:
            $ref: '#/components/schemas/GatewayAvailabilityOperationTypeResult'
    GatewayAvailabilityStatusResult:
      required:
        - country
        - providers
      type: object
      properties:
        country:
          $ref: '#/components/schemas/Country'
        providers:
          type: array
          items:
            $ref: '#/components/schemas/GatewayAvailabilityProviderResult'
    GatewaysAvailabilityStatusResult:
      type: array
      items:
        $ref: '#/components/schemas/GatewayAvailabilityStatusResult'

    DepositFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/DepositInitiationFailureReason'

    PayoutFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/PayoutInitiationFailureReason'

    RemittanceFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/RemittanceInitiationFailureReason'

    RefundFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/RefundInitiationFailureReason'

    SplitPaymentFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/SplitPaymentRequestFailureReason'

    CheckoutFailureResponse:
      required:
        - status
        - failureReason
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/CheckoutFailureReason'

    SplitPaymentAuthorizationFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/SplitPaymentAuthorizationFailureReason'

    AuthorizationFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/AuthorizationFailureReason'

    AuthenticationFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        status:
          type: string
          enum:
            - REJECTED
          description: The status of the response will always be `REJECTED`
          example: REJECTED
        failureReason:
          $ref: '#/components/schemas/AuthenticationFailureReason'

    PredictionFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        failureReason:
          type: object
          properties:
            failureCode:
              type: string
              description: |
                Reasoncode for the failure.
              example: MISSING_PARAMETER
            failureMessage:
              type: string
              description: A description of the failure
              example: Request does not include the required parameter 'phoneNumber'.

    UnknownFailureResponse:
      required:
        - failureCode
        - failureMessage
      type: object
      properties:
        failureReason:
          type: object
          properties:
            failureCode:
              type: string
              description: |
                Reason for the failure:
                * `UNKNOWN_ERROR` - Unable to process request due to an unknown problem.
              example: UNKNOWN_ERROR
            failureMessage:
              type: string
              description: A description of the failure
              example: Unable to process request due to an unknown problem.

    AccountDetailsType:
      type: string
      description: 'The type of account involved in the transaction. At the moment, only **MMO** is supported.'
      example: MMO
      enum:
        - MMO

    PayerOrRecipient:
      description: Details about the customer who is paying or receiving the payment.
      required:
        - type
        - accountDetails
      type: object
      properties:
        type: 
          $ref: '#/components/schemas/AccountDetailsType'
        accountDetails:
          $ref: '#/components/schemas/AccountDetails'
    RemittanceRecipient:
      description: Details about the customer who is receiving the remittance.
      required:
        - type
        - accountDetails
        - recipientDetails
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AccountDetailsType'
        accountDetails:
          $ref: '#/components/schemas/RemittanceAccountDetails'
        recipientDetails:
          $ref: '#/components/schemas/RecipientDetails'
    RemittanceSender:
      description: Details about the customer who is sending the remittance.
      required:
        - transactionDetails
        - senderDetails
      type: object
      properties:
        transactionDetails:
          $ref: '#/components/schemas/TransactionDetails'
        senderDetails:
          $ref: '#/components/schemas/SenderDetails'

    Payout:
      required:
        - payoutId
        - status
        - amount
        - currency
        - country
        - recipient
        - created
      type: object
      properties:
        payoutId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/PayoutStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        recipient:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        failureReason:
          $ref: '#/components/schemas/PayoutFailureReason'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'

    V2PayoutCallback:
      required:
        - payoutId
        - status
        - amount
        - currency
        - country
        - recipient
        - created
      type: object
      properties:
        payoutId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/CallbackStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        recipient:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        failureReason:
          $ref: '#/components/schemas/PayoutFailureReason'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'

    ClientReference:
          type: string
          description: A reference to an entity in your system that this payment relates to. For example, an invoice ID, customer ID etc.
          example: INV-123456

    CustomerMessage:
      minLength: 4
      maxLength: 22
      type: string
      pattern: ^[a-zA-Z0-9 ]+$
      description: |
        A short narration for the transaction. 
        Depending on the 'provider', this message may be visible to the customer in the SMS receipt or within their transaction history.

        Defaults to your company name as registered on your PawaPay account trimmed to fit the length limitations.
      example: Note of 4 to 22 chars

    PayoutCreationResponse:
      required:
        - payoutId
        - status
      type: object
      properties:
        payoutId:
          $ref: '#/components/schemas/InitiationPaymentId'
        status:
          $ref: '#/components/schemas/PayoutCreationStatus'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        failureReason:
          $ref: '#/components/schemas/PayoutInitiationFailureReason'
    PayoutResendCallbackResponse:
      required:
        - payoutId
        - status
      type: object
      properties:
        payoutId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/ManualCommandStatus'
        failureReason:
          $ref: '#/components/schemas/ManualActionFailureReason'
    FailEnqueuedPayoutResponse:
      required:
        - payoutId
        - status
      type: object
      properties:
        payoutId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/ManualCommandStatus'
        failureReason:
          $ref: '#/components/schemas/ManualActionFailureReason'
    PayoutCreationStatus:
      type: string
      description: |
        The initiation status of the payout: 
        * `ACCEPTED` - The payout has been **accepted** by PawaPay for processing.
        * `REJECTED` - The payout request has been **rejected** by PawaPay. See failureReason for details. 
        * `DUPLICATE_IGNORED` - The payout has been **ignored** as a duplicate of and already accepted payout. Deduplication is based on `payoutId`.
      enum:
        - ACCEPTED
        - REJECTED
        - DUPLICATE_IGNORED
    PayoutFailureReason:
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Possible payout failure codes: 
            * `PAWAPAY_WALLET_OUT_OF_FUNDS` - Your PawaPay wallet does not have enough funds to complete this payout.
            * `RECIPIENT_NOT_FOUND` - The phone number specified as the receipient does not belong to the provider. 
            * `WALLET_LIMIT_REACHED` - The recipient has reached a limit on their wallet that stops them from being able to accept this payout. 
            * `MANUALLY_CANCELLED` - The payout was enqueued and subsequently cancelled from the PawaPay Dashboard or through the [Cancel Enqueued Payout](/v2/api-reference/payouts/cancel-enqueued-payout) endpoint.
            * `UNSPECIFIED_FAILURE` - The provider confirmed the payment has failed, but did not provide any information about the reason of the failure.
            * `UNKNOWN_ERROR` - An unknown error has occurred.
          example: WALLET_LIMIT_REACHED
          enum:
            - PAWAPAY_WALLET_OUT_OF_FUNDS
            - RECIPIENT_NOT_FOUND
            - WALLET_LIMIT_REACHED
            - MANUALLY_CANCELLED
            - UNSPECIFIED_FAILURE
            - UNKNOWN_ERROR
        failureMessage:
          type: string
          description: Description of the reason for this failure
          example: Recipient's address is blocked
    PayoutSearchResult:
      required:
        - status
      type: object
      properties:
        status:
          $ref: '#/components/schemas/SearchResultStatus'
        data:
          $ref: '#/components/schemas/Payout'

    SearchResultStatus:
      type: string
      description: |
        The result of this operation.
        - `FOUND` - The payment was found in PawaPay.
        - `NOT_FOUND` - The payment was not found in PawaPay.
      enum:
        - FOUND
        - NOT_FOUND

    PayoutStatus:
      type: string
      description: |
        Possible payout statuses: 
        * `ACCEPTED` - The payout has been **accepted** by PawaPay for processing. 
        * `ENQUEUED` - The payout has been **accepted**, but has been enqueued for processing later. Read more about [enqueued payouts](/v2/docs/payouts#handling-enqueued-payouts-and-provider-availability). 
        * `PROCESSING` - The payout has been submitted to the provider and is being processed.
        * `IN_RECONCILIATION` - The payout is being reconciled currently to determine it's final status.
        * `COMPLETED` - The payout has been successfully processed. This is a **final status.**
        * `FAILED` - The payout has been processed, but failed. This is a **final status.**. See `failureReason` for details.
      enum:
        - ACCEPTED
        - ENQUEUED
        - PROCESSING
        - IN_RECONCILIATION
        - COMPLETED
        - FAILED

    RefundStatus:
      type: string
      description: |
        Possible refund statuses: 
        * `ACCEPTED` - The refund has been **accepted** by PawaPay for processing. 
        * `ENQUEUED` - The refund has been **accepted**, but has been enqueued for processing later. Read more about [enqueued refunds](/v2/docs/refunds#handling-enqueued-refunds-and-provider-availability). 
        * `PROCESSING` - The refund has been submitted to the provider and is being processed.
        * `IN_RECONCILIATION` - The refund is being reconciled currently to determine it's final status.
        * `COMPLETED` - The refund has been successfully processed. This is a **final status.**
        * `FAILED` - The refund has been processed, but failed. This is a **final status.**. See `failureReason` for details.
      enum:
        - ACCEPTED
        - ENQUEUED
        - PROCESSING
        - IN_RECONCILIATION
        - COMPLETED
        - FAILED

    Remittance:
      required:
        - remittanceId
        - status
        - amount
        - currency
        - country
        - recipient
        - created
      type: object
      properties:
        remittanceId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/RemittanceStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        recipient:
          $ref: '#/components/schemas/RemittanceRecipient'
        sender:
          $ref: '#/components/schemas/RemittanceSender'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        failureReason:
          $ref: '#/components/schemas/RemittanceFailureReason'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'

    V2RemittanceCallback:
      required:
        - remittanceId
        - status
        - amount
        - currency
        - country
        - recipient
        - sender
        - created
      type: object
      properties:
        remittanceId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/CallbackStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        recipient:
          $ref: '#/components/schemas/RemittanceRecipient'
        sender:
          $ref: '#/components/schemas/RemittanceSender'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        failureReason:
          $ref: '#/components/schemas/RemittanceFailureReason'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'

    RemittanceCreationResponse:
      required:
        - remittanceId
        - status
      type: object
      properties:
        remittanceId:
          $ref: '#/components/schemas/InitiationPaymentId'
        status:
          $ref: '#/components/schemas/RemittanceCreationStatus'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        failureReason:
          $ref: '#/components/schemas/RemittanceInitiationFailureReason'
    RemittanceResendCallbackResponse:
      required:
        - remittanceId
        - status
      type: object
      properties:
        remittanceId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/ManualCommandStatus'
        failureReason:
          $ref: '#/components/schemas/ManualActionFailureReason'
    FailEnqueuedRemittanceResponse:
      required:
        - remittanceId
        - status
      type: object
      properties:
        remittanceId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/ManualCommandStatus'
        failureReason:
          $ref: '#/components/schemas/ManualActionFailureReason'
    RemittanceCreationStatus:
      type: string
      description: |
        The initiation status of the remittance: 
        * `ACCEPTED` - The remittance has been **accepted** by PawaPay for processing.
        * `REJECTED` - The remittance request has been **rejected** by PawaPay. See failureReason for details. 
        * `DUPLICATE_IGNORED` - The remittance has been **ignored** as a duplicate of and already accepted remittance. Deduplication is based on `remittanceId`.
      enum:
        - ACCEPTED
        - REJECTED
        - DUPLICATE_IGNORED
    RemittanceFailureReason:
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Possible remittance failure codes: 
            * `PAWAPAY_WALLET_OUT_OF_FUNDS` - Your PawaPay wallet does not have enough funds to complete this remittance.
            * `RECIPIENT_NOT_FOUND` - The phone number specified as the receipient does not belong to the provider. 
            * `WALLET_LIMIT_REACHED` - The recipient has reached a limit on their wallet that stops them from being able to accept this remittance. 
            * `MANUALLY_CANCELLED` - The remittance was enqueued and subsequently cancelled from the PawaPay Dashboard or through the [Cancel Enqueued Remittance](/v2/api-reference/remittances/cancel-enqueued-remittance) endpoint.
            * `UNSPECIFIED_FAILURE` - The provider confirmed the payment has failed, but did not provide any information about the reason of the failure.
            * `UNKNOWN_ERROR` - An unknown error has occurred.
          example: WALLET_LIMIT_REACHED
          enum:
            - PAWAPAY_WALLET_OUT_OF_FUNDS
            - RECIPIENT_NOT_FOUND
            - WALLET_LIMIT_REACHED
            - MANUALLY_CANCELLED
            - UNSPECIFIED_FAILURE
            - UNKNOWN_ERROR
        failureMessage:
          type: string
          description: Description of the reason for this failure
          example: Recipient's address is blocked
    RemittanceSearchResult:
      required:
        - status
      type: object
      properties:
        status:
          $ref: '#/components/schemas/SearchResultStatus'
        data:
          $ref: '#/components/schemas/Remittance'

    RemittanceStatus:
      type: string
      description: |
        Possible remittance statuses: 
        * `ACCEPTED` - The remittance has been **accepted** by PawaPay for processing. 
        * `ENQUEUED` - The remittance has been **accepted**, but has been enqueued for processing later. Read more about [enqueued remittances](/v2/docs/remittances#handling-enqueued-remittances-and-provider-availability). 
        * `PROCESSING` - The remittance has been submitted to the provider and is being processed.
        * `IN_RECONCILIATION` - The remittance is being reconciled currently to determine it's final status.
        * `COMPLETED` - The remittance has been successfully processed. This is a **final status.**
        * `FAILED` - The remittance has been processed, but failed. This is a **final status.**. See `failureReason` for details.
      enum:
        - ACCEPTED
        - ENQUEUED
        - PROCESSING
        - IN_RECONCILIATION
        - COMPLETED
        - FAILED

    Refund:
      required:
        - refundId
        - status
        - amount
        - currency
        - country
        - recipient
        - created
      type: object
      properties:
        refundId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/RefundStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        recipient:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        failureReason:
          $ref: '#/components/schemas/RefundFailureReason'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'
    V2RefundCallback:
      required:
        - refundId
        - status
        - amount
        - currency
        - country
        - recipient
        - created
      type: object
      properties:
        refundId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/CallbackStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        recipient:
          $ref: '#/components/schemas/PayerOrRecipient'
        customerMessage:
          $ref: '#/components/schemas/CustomerMessage'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        providerTransactionId:
          $ref: '#/components/schemas/ProviderTransactionId'
        failureReason:
          $ref: '#/components/schemas/RefundFailureReason'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'
    RefundCreationResponse:
      required:
        - refundId
        - status
      type: object
      properties:
        refundId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/RefundCreationStatus'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        failureReason:
          $ref: '#/components/schemas/RefundInitiationFailureReason'
    RefundResendCallbackResponse:
      required:
        - refundId
        - status
      type: object
      properties:
        refundId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/ManualCommandStatus'
        failureReason:
          $ref: '#/components/schemas/ManualActionFailureReason'
    FailEnqueuedRefundResponse:
      required:
        - refundId
        - status
      type: object
      properties:
        refundId:
          $ref: '#/components/schemas/ResponsePaymentId'
        status:
          $ref: '#/components/schemas/ManualCommandStatus'
        failureReason:
          $ref: '#/components/schemas/ManualActionFailureReason'

    RefundCreationStatus:
      type: string
      description: |
        Possible refund initiation statuses: 
        * `ACCEPTED` - The refund has been **accepted** by PawaPay for processing. 
        * `REJECTED` - The refund has been **rejected** by PawaPay. See `failureReason` for details. 
        * `DUPLICATE_IGNORED` - The refund has been **ignored** as a duplicate of an already accepted refund. Duplication logic relies upon `refundId`.
      enum:
        - ACCEPTED
        - REJECTED
        - DUPLICATE_IGNORED
    RefundFailureReason:
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Possible refund failure codes: 
            * `PAWAPAY_WALLET_OUT_OF_FUNDS` - Your PawaPay wallet does not have enough funds to complete this refund.
            * `RECIPIENT_NOT_FOUND` - The phone number specified for the receipient does not belong to the provider. 
            * `WALLET_LIMIT_REACHED` - The recipient has reached a limit on their wallet that stops them from receiving this refund. 
            * `UNSPECIFIED_FAILURE` - The provider confirmed the payment has failed, but did not provide any information about the reason of the failure.
            * `UNKNOWN_ERROR` - An unknown error has occurred.
          example: WALLET_LIMIT_REACHED
          enum:
            - PAWAPAY_WALLET_OUT_OF_FUNDS
            - RECIPIENT_NOT_FOUND
            - WALLET_LIMIT_REACHED
            - UNSPECIFIED_FAILURE
            - UNKNOWN_ERROR
        failureMessage:
          type: string
          description: Description of the reason for this failure
          example: Recipient's address is blocked

    # Payment initiation failure reasons
    DepositInitiationFailureReason:
      required:
        - failureReason
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Reason for the failure:
            * `NO_AUTHENTICATION` - The API token was not found in the request headers.
            * `AUTHENTICATION_ERROR` - The API token in the request headers is not valid.
            * `AUTHORISATION_ERROR` - The API Token in the request header is not authorised to make this request.
            * `HTTP_SIGNATURE_ERROR` - The signature you have passed with the request did not pass verification.
            * `INVALID_INPUT` - We were unable to parse the payload of the request.
            * `MISSING_PARAMETER` - A mandatory parameter was missing from the request body.
            * `UNSUPPORTED_PARAMETER` - An unsupported parameter was found in the request body.
            * `INVALID_PARAMETER` - A parameter had an incorrect value.
            * `DUPLICATE_METADATA_FIELD` - A duplicate field was found in payment metadata.
            * `DEPOSITS_NOT_ALLOWED` - Deposits are not enabled with the provider on your PawaPay account.
            * `INVALID_PHONE_NUMBER` - The phone number provided is in the wrong format.
            * `INVALID_AMOUNT` - The amount contains decimals which is not supported by the provider.
            * `AMOUNT_OUT_OF_BOUNDS` - The amount is outside of this providers transaction limits.
            * `INVALID_CURRENCY` - The currency is not supported by the provider.
            * `INVALID_PROVIDER` - The provider is not valid for this request. 
            * `PROVIDER_TEMPORARILY_UNAVAILABLE` - The provider is not currently not able to accept payments. 
            * `UNKNOWN_ERROR` - The provider is not valid for this request.
          enum:
            - NO_AUTHENTICATION
            - AUTHENTICATION_ERROR
            - AUTHORISATION_ERROR
            - HTTP_SIGNATURE_ERROR
            - INVALID_INPUT
            - MISSING_PARAMETER
            - UNSUPPORTED_PARAMETER
            - INVALID_PARAMETER
            - DUPLICATE_METADATA_FIELD
            - DEPOSITS_NOT_ALLOWED
            - INVALID_PHONE_NUMBER
            - INVALID_AMOUNT
            - AMOUNT_OUT_OF_BOUNDS
            - INVALID_CURRENCY
            - INVALID_PROVIDER
            - PROVIDER_TEMPORARILY_UNAVAILABLE
            - UNKNOWN_ERROR
        failureMessage:
          type: string
          description: A description of the failure

    PayoutInitiationFailureReason:
      required:
        - failureReason
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Reason for the failure:
            * `NO_AUTHENTICATION` - The API token was not found in the request headers.
            * `AUTHENTICATION_ERROR` - The API token in the request headers is not valid.
            * `AUTHORISATION_ERROR` - The API Token in the request header is not authorised to make this request.
            * `HTTP_SIGNATURE_ERROR` - The signature you have passed with the request did not pass verification.
            * `INVALID_INPUT` - We were unable to parse the payload of the request.
            * `MISSING_PARAMETER` - A mandatory parameter was missing from the request body.
            * `UNSUPPORTED_PARAMETER` - An unsupported parameter was found in the request body.
            * `INVALID_PARAMETER` - A parameter had an incorrect value.
            * `DUPLICATE_METADATA_FIELD` - A duplicate field was found in payment metadata.
            * `PAYOUTS_NOT_ALLOWED` - Payouts are not enabled with the provider on your PawaPay account.
            * `INVALID_PHONE_NUMBER` - The phone number provided is in the wrong format.
            * `INVALID_AMOUNT` - The amount contains decimals which is not supported by the provider.
            * `PAWAPAY_WALLET_OUT_OF_FUNDS` - Your PawaPay wallet does not have the funds to complete this refund.
            * `INVALID_CURRENCY` - The currency is not supported by the provider.
            * `INVALID_PROVIDER` - The provider is not valid for this request. 
            * `PROVIDER_TEMPORARILY_UNAVAILABLE` - The provider is not currently not able to accept payments. 
            * `UNKNOWN_ERROR` - The provider is not valid for this request.
          enum:
            - NO_AUTHENTICATION
            - AUTHENTICATION_ERROR
            - AUTHORISATION_ERROR
            - HTTP_SIGNATURE_ERROR
            - INVALID_INPUT
            - MISSING_PARAMETER
            - UNSUPPORTED_PARAMETER
            - INVALID_PARAMETER
            - DUPLICATE_METADATA_FIELD
            - PAYOUTS_NOT_ALLOWED
            - INVALID_PHONE_NUMBER
            - INVALID_AMOUNT
            - PAWAPAY_WALLET_OUT_OF_FUNDS
            - INVALID_CURRENCY
            - INVALID_PROVIDER
            - PROVIDER_TEMPORARILY_UNAVAILABLE
            - UNKNOWN_ERROR
        failureMessage:
          type: string
          description: A description of the failure

    RemittanceInitiationFailureReason:
      required:
        - failureReason
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Reason for the failure:
            * `NO_AUTHENTICATION` - The API token was not found in the request headers.
            * `AUTHENTICATION_ERROR` - The API token in the request headers is not valid.
            * `AUTHORISATION_ERROR` - The API Token in the request header is not authorised to make this request.
            * `HTTP_SIGNATURE_ERROR` - The signature you have passed with the request did not pass verification.
            * `INVALID_INPUT` - We were unable to parse the payload of the request.
            * `MISSING_PARAMETER` - A mandatory parameter was missing from the request body.
            * `UNSUPPORTED_PARAMETER` - An unsupported parameter was found in the request body.
            * `INVALID_PARAMETER` - A parameter had an incorrect value.
            * `DUPLICATE_METADATA_FIELD` - A duplicate field was found in payment metadata.
            * `REMITTANCES_NOT_ALLOWED` - Remittances are not enabled with the provider on your PawaPay account.
            * `INVALID_PHONE_NUMBER` - The phone number provided is in the wrong format.
            * `INVALID_AMOUNT` - The amount contains decimals which is not supported by the provider.
            * `PAWAPAY_WALLET_OUT_OF_FUNDS` - Your PawaPay wallet does not have the funds to complete this refund.
            * `INVALID_CURRENCY` - The currency is not supported by the provider.
            * `INVALID_PROVIDER` - The provider is not valid for this request. 
            * `PROVIDER_TEMPORARILY_UNAVAILABLE` - The provider is not currently not able to accept payments. 
            * `UNKNOWN_ERROR` - The provider is not valid for this request.
          enum:
            - NO_AUTHENTICATION
            - AUTHENTICATION_ERROR
            - AUTHORISATION_ERROR
            - HTTP_SIGNATURE_ERROR
            - INVALID_INPUT
            - MISSING_PARAMETER
            - UNSUPPORTED_PARAMETER
            - INVALID_PARAMETER
            - DUPLICATE_METADATA_FIELD
            - REMITTANCES_NOT_ALLOWED
            - INVALID_PHONE_NUMBER
            - INVALID_AMOUNT
            - PAWAPAY_WALLET_OUT_OF_FUNDS
            - INVALID_CURRENCY
            - INVALID_PROVIDER
            - PROVIDER_TEMPORARILY_UNAVAILABLE
            - UNKNOWN_ERROR
        failureMessage:
          type: string
          description: A description of the failure

    RefundInitiationFailureReason:
      required:
        - failureReason
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Reason for the failure:
            * `NO_AUTHENTICATION` - The API token was not found in the request headers.
            * `AUTHENTICATION_ERROR` - The API token in the request headers is not valid.
            * `AUTHORISATION_ERROR` - The API Token in the request header is not authorised to make this request.
            * `HTTP_SIGNATURE_ERROR` - The signature you have passed with the request did not pass verification.
            * `INVALID_INPUT` - We were unable to parse the payload of the request.
            * `MISSING_PARAMETER` - A mandatory parameter was missing from the request body.
            * `UNSUPPORTED_PARAMETER` - An unsupported parameter was found in the request body.
            * `INVALID_PARAMETER` - A parameter had an incorrect value.
            * `DUPLICATE_METADATA_FIELD` - A duplicate field was found in payment metadata.
            * `REFUNDS_NOT_ALLOWED` - Refunds are not enabled with the provider on your PawaPay account.
            * `INVALID_PHONE_NUMBER` - The phone number provided is in the wrong format.
            * `INVALID_AMOUNT` - The amount contains decimals which is not supported by the provider.
            * `INVALID_CURRENCY` - The currency is not supported by the provider.
            * `INVALID_PROVIDER` - The provider is not valid for this request. 
            * `PROVIDER_TEMPORARILY_UNAVAILABLE` - The provider is not currently not able to accept payments. 
            * `NOT_FOUND` - The deposit to refund was not found.
            * `INVALID_STATE` - The deposit to refund is not in 'COMPLETED' status or has already been refunded.
            * `UNKNOWN_ERROR` - The provider is not valid for this request.
          enum:
            - NO_AUTHENTICATION
            - AUTHENTICATION_ERROR
            - AUTHORISATION_ERROR
            - HTTP_SIGNATURE_ERROR
            - INVALID_INPUT
            - MISSING_PARAMETER
            - UNSUPPORTED_PARAMETER
            - INVALID_PARAMETER
            - DUPLICATE_METADATA_FIELD
            - REFUNDS_NOT_ALLOWED
            - INVALID_PHONE_NUMBER
            - INVALID_AMOUNT
            - AMOUNT_OUT_OF_BOUNDS
            - PAWAPAY_WALLET_OUT_OF_FUNDS
            - INVALID_CURRENCY
            - INVALID_PROVIDER
            - NOT_FOUND
            - INVALID_STATE
            - UNKNOWN_ERROR
        failureMessage:
          type: string
          description: A description of the failure

    SplitPaymentRequestFailureReason:
      required:
        - failureReason
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Reason for the failure:
            * `INVALID_INPUT` - We were unable to parse the payload of the request.
            * `MISSING_PARAMETER` - A mandatory parameter was missing from the request body.
            * `UNSUPPORTED_PARAMETER` - An unsupported parameter was found in the request body.
            * `INVALID_PARAMETER` - A parameter had an incorrect value.
            * `DUPLICATE_METADATA_FIELD` - A duplicate field was found in payment metadata.
            * `INVALID_RECIPIENT_FORMAT` - The recipient details are in an invalid format.
            * `INVALID_PAYER_FORMAT` - The payer details are in an invalid format.
            * `INVALID_PHONE_NUMBER` - The phone number provided is in the wrong format.
            * `INVALID_AMOUNT` - The amount format is invalid for the selected provider.
            * `INVALID_CURRENCY` - The currency is not supported by the provider.
            * `INVALID_COUNTRY` - All parties in the split payment must belong to the same country.
            * `INVALID_CORRESPONDENT` - The provider is not valid for this request.
            * `AMOUNT_OUT_OF_BOUNDS` - The amount is outside of the supported transaction limits.
            * `AMOUNT_TOO_SMALL` - The amount is below the supported minimum.
            * `AMOUNT_TOO_LARGE` - The amount is above the supported maximum.
            * `PARAMETER_INVALID` - A parameter value is invalid.
            * `DUPLICATE_FIELD` - The request contains a duplicate field.
            * `MISSING_SPLIT_AMOUNT` - A split entry is missing its amount.
            * `MULTIPLE_SPLITS_NOT_SUPPORTED` - More than one split payout was provided in the request.
          enum:
            - INVALID_INPUT
            - MISSING_PARAMETER
            - UNSUPPORTED_PARAMETER
            - INVALID_PARAMETER
            - DUPLICATE_METADATA_FIELD
            - INVALID_RECIPIENT_FORMAT
            - INVALID_PAYER_FORMAT
            - INVALID_PHONE_NUMBER
            - INVALID_AMOUNT
            - INVALID_CURRENCY
            - INVALID_COUNTRY
            - INVALID_CORRESPONDENT
            - AMOUNT_OUT_OF_BOUNDS
            - AMOUNT_TOO_SMALL
            - AMOUNT_TOO_LARGE
            - PARAMETER_INVALID
            - DUPLICATE_FIELD
            - MISSING_SPLIT_AMOUNT
            - MULTIPLE_SPLITS_NOT_SUPPORTED
        failureMessage:
          type: string
          description: A description of the failure

    CheckoutFailureReason:
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Reason for the failure:
            * `INVALID_INPUT` - We were unable to parse the payload of the request.
            * `MISSING_PARAMETER` - A mandatory parameter was missing from the request body.
            * `UNSUPPORTED_PARAMETER` - An unsupported parameter was found in the request body.
            * `INVALID_PARAMETER` - A parameter had an incorrect value.
            * `NOT_FOUND` - The specified checkout was not found.
          enum:
            - INVALID_INPUT
            - MISSING_PARAMETER
            - UNSUPPORTED_PARAMETER
            - INVALID_PARAMETER
            - NOT_FOUND
        failureMessage:
          type: string
          description: A description of the failure

    SplitPaymentAuthorizationFailureReason:
      required:
        - failureReason
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Reason for the failure:
            * `AUTHORISATION_ERROR` - The API Token in the request header is not authorised to make this request.
            * `SPLIT_PAYMENTS_NOT_ALLOWED` - Split payments are not enabled with the provider on your PawaPay account.
          enum:
            - AUTHORISATION_ERROR
            - SPLIT_PAYMENTS_NOT_ALLOWED
        failureMessage:
          type: string
          description: A description of the failure

    ## Generic failure reasons
    AuthorizationFailureReason:
      required:
        - failureReason
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Reason for the failure:
            * `AUTHORISATION_ERROR` - The API Token in the request header is not authorised to make this request.
            * `DEPOSITS_NOT_ALLOWED` - Deposits are not enabled with the provider on your PawaPay account.
            * `PAYOUTS_NOT_ALLOWED` - Payouts are not enabled with the provider on your PawaPay account.
            * `REMITTANCES_NOT_ALLOWED` - Remittances are not enabled with the provider on your PawaPay account.
            * `REFUNDS_NOT_ALLOWED` - Refunds are not enabled with the provider on your PawaPay account.
          enum:
            - AUTHORISATION_ERROR
            - DEPOSITS_NOT_ALLOWED
            - PAYOUTS_NOT_ALLOWED
            - REMITTANCES_NOT_ALLOWED
            - REFUNDS_NOT_ALLOWED
        failureMessage:
          type: string
          description: A description of the failure

    AuthenticationFailureReason:
      required:
        - failureReason
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Reason for the failure:
            * `NO_AUTHENTICATION` - The API token was not found in the request headers.
            * `AUTHENTICATION_ERROR` - The API token in the request headers is not valid.
            * `HTTP_SIGNATURE_ERROR` - The signature you have passed with the request did not pass verification.
          enum:
            - NO_AUTHENTICATION
            - AUTHENTICATION_ERROR
            - HTTP_SIGNATURE_ERROR
        failureMessage:
          type: string
          description: A description of the failure

    RefundSearchResult:
      required:
        - status
      type: object
      properties:
        status:
          $ref: '#/components/schemas/SearchResultStatus'
        data:
          $ref: '#/components/schemas/Refund'

    ManualCommandStatus:
      type: string
      description: |
        Possible initiation statuses: 
        * `ACCEPTED` - The action request has been accepted by PawaPay for processing. 
        * `REJECTED` - The action request has been rejected by PawaPay. See `failureReason` for details.
      enum:
        - ACCEPTED
        - REJECTED
    CustomerActiveConfigResponse:
      required:
        - companyName
        - countries
        - signatureConfiguration
      type: object
      properties:
        companyName:
          type: string
          description: Your company name as configured on your PawaPay account.
          example: Merchant Inc.
        signatureConfiguration:
          type: object
          properties:
            signedRequestsOnly:
              type: boolean
              description: |
                Indicates whether you have forced all financial requests to be signed on your PawaPay account.
            signedCallbacks:
              type: boolean
              description: |
                Indicates whether you have enabled callbacks to be signed by PawaPay.
        countries:
          type: array
          items:
            $ref: '#/components/schemas/CustomerActiveCountryConfigResponse'
    CustomerActiveCountryConfigResponse:
      required:
        - country
        - displayName
        - prefix
        - flag
        - providers
      type: object
      properties:
        country:
          type: string
          minLength: 3
          maxLength: 3
          description: |
            The country that has been configured for your PawaPay account. 
            
            Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
        displayName:
          type: object
          description: |
            The name of the country
          properties:
            en:
              type: string
            fr:
              type: string
          example:
            en: "Benin"
            fr: "Le Benin"
        prefix:
          type: string
          description: |
            The calling code for this country.
          example: "229"
        flag:
          type: string
          description: |
            The URL to a flag for this country.
          example: "https://cdn.com/ben_flag.svg"
        providers:
          type: array
          items:
            $ref: '#/components/schemas/CustomerActiveGatewayConfigResponse'
    CustomerActiveGatewayConfigResponse:
      required:
        - provider
        - displayName
        - nameDisplayedToCustomer
        - logo
        - currencies
      type: object
      properties:
        provider:
          $ref: '#/components/schemas/Provider'
        displayName:
          type: string
          description: |
            The commonly used name for the provider.
        nameDisplayedToCustomer:
          type: string
          description: The name of the company that is shown to the customer on the PIN prompt and/or SMS receipt.
        currencies:
          type: array
          description: The currencies that this provider supports for payments.
          items:
            $ref: '#/components/schemas/CustomerActiveCurrencyConfigResponse'
    CustomerActiveCurrencyConfigResponse:
      required:
        - currency
        - displayName
        - operationTypes
      type: object
      properties:
        currency:
          type: string
          description: |
            The currency code for the supported currency.
            Format must be the ISO 4217 three character currency code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).
          example: ZMW
        displayName:
          type: string
          description: |
            The commonly used abbreviation for this currency.
        operationTypes:
          type: object
          description: |
            The operation types that have been configured for this provider on your PawaPay account.
          properties:
            DEPOSIT:
              description: Configuration for initiating deposits.
              $ref: '#/components/schemas/CustomerActiveDepositOperationTypeConfigResponse'
            PAYOUT:
              description: Configuration for initiating payouts.
              $ref: '#/components/schemas/CustomerActiveGenericOperationTypeConfigResponse'
            REMITTANCE:
              description: Configuration for initiating remittances.
              $ref: '#/components/schemas/CustomerActiveGenericOperationTypeConfigResponse'
            REFUND:
              descriptions: Configuration for initiating refunds.
              $ref: '#/components/schemas/CustomerActiveGenericOperationTypeConfigResponse'
            USSD_DEPOSIT:
              type: object
              description: Configuration for handling USSD deposits.
              properties:
                callbackUrl:
                  $ref: '#/components/schemas/ActiveConfCallbackUrl'
    CustomerActiveDepositOperationTypeConfigResponse:
      allOf:
        - type: object
          properties:
            authType:
              type: string
              description: |
                Indicates the authorisation type that this provider uses for authorising deposits.
              enum:
                - PROVIDER_AUTH
                - PREAUTH
                - REDIRECT_AUTH
            pinPrompt:
              type: string
              description: |
                If the provider uses 'PROVIDER_AUTH' type, indicates whether the PIN-prompt will open automatically or the customer needs to take action for it.
              enum:
                - AUTOMATIC
                - MANUAL
            pinPromptRevivable:
              type: boolean
              description: |
                If the provider uses 'PROVIDER_AUTH' type, indicates whether it is possible for the customer to revive the PIN prompt in cases where it times out before they can authorise the payment.
            pinPromptInstructions:
              description: |
                Shows the instruction to show to the customer for when the authorisation is either:
                  - MANUAL
                  - pinPromptRevivable is true.
              $ref: '#/components/schemas/Instructions'
            authTokenInstructions:
              description: |
                In case of `PREAUTH` type, includes the instruction how the customer can preauhtorise the payment.
              $ref: '#/components/schemas/Instructions'
        - $ref: '#/components/schemas/CustomerActiveGenericOperationTypeConfigResponse'

    CustomerActiveGenericOperationTypeConfigResponse:
      type: object
      properties:
        minAmount:
          type: string
          pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
          description: Minimum amount allowed for this provider for this operation type.
          example: '1'
        maxAmount:
          type: string
          pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
          description: Maximum amount allowed for this provider for this operation type.
          example: '100000'
        decimalsInAmount:
          type: string
          description: |
            THe amount of decimals that this provider allows in `amount`.
          enum:
            - TWO_PLACES
            - NONE
        status:
          $ref: '#/components/schemas/GatewayAvailabilityStatus'
        callbackUrl:
          $ref: '#/components/schemas/ActiveConfCallbackUrl'

    ActiveConfCallbackUrl:
          type: string
          description: |
            The callback URL that you have configured for this operation type.
            
    Instructions:
      required:
        - channels
      properties:
        channels:
          type: array
          items:
            $ref: '#/components/schemas/InstructionChannel'
    InstructionChannel:
      required:
        - type
        - displayName
        - quickLink
        - variables
        - instructions
      properties:
        type:
          type: string
          description: |
            Shows through which channel these instructions can be completed by the customer.
          enum:
            - USSD
            - APP
        displayName:
          type: object
          description: |
            Short instruction for when these instructions should be follow by the customer. See example.
          properties:
            en:
              type: string
            fr:
              type: string
          example:
            en: "Not getting the PIN prompt?"
            fr: "Je ne reçois pas l’invite de code PIN."
        quickLink:
          type: string
          description: |
            A quicklink to take the customer further in the instructions. For example, predialing a USSD shortcode.
          example: "tel*182*1*3%23"
        variables:
          type: object
          description: |
            A map of variables for values used in the 'template' of 'instructions'. 
            You can use the tempalte if you are looking to add emphasis to key vairbales like the number to dial or the options to choose.
          properties:
            additionalProperties:
              type: string
          example:
            - "shortCode": "*182#"
        instructions:
          type: object
          description: |
            List of instructions to show to the customer.
          properties:
            en:
              $ref: '#/components/schemas/InstructionTemplate'
            fr:
              $ref: '#/components/schemas/InstructionTemplate'
    InstructionTemplate:
      required:
        - text
        - template
      properties:
        text:
          type: string
          description: |
            This is the prerendered instruction that can be shown to the customer.
        template:
          type: string
          description: |
            This is the template for the instruction. The variables can be emphasised and replace in the tempalte to get the final instruction.
    MsisdnInput:
      required:
        - phoneNumber
      type: object
      properties:
        phoneNumber:
          $ref: '#/components/schemas/FlexibleMsisdnValue'
    ProviderPrediction:
      required:
        - country
        - provider
        - phoneNumber
      type: object
      properties:
        country:
          $ref: '#/components/schemas/Country'
        provider:
          $ref: '#/components/schemas/Provider'
        phoneNumber:
          $ref: '#/components/schemas/PredictedMsisdnValue'
    PublicKeyResponse:
        type: array
        items:
              $ref: '#/components/schemas/PublicKeyResponseItem'
    PublicKeyResponseItem:
        required:
          - id
          - key
        type: object
        properties:
          id:
            type: string
            description: The ID of the public key.
          key:
            type: string
            description: The public key to use when verifying the signature in a callback sent by PawaPay.
    TransactionMetadataRequest:
      description: | 
        A list of metadata that you can attach to the payment for providing additional context about the payment.
        For example, adding the channel from which the payment was initated, product ID or anything else that might help your operations team.

        Metadata will be included in:
        - In the dashboard on payment details pages
        - Financial statements as JSON object 
        - Callbacks

        Metadata can be used when searching in the PawaPay Dashboard. 
        Full value of the metadata field must be used for searches.

        Metadata will not be visible to the customer that is involved in this payment. 

        Up to 10 metadata fields can be attached to a payment.
      type: array
      items:
        $ref: '#/components/schemas/TransactionMetadataRequestItem'
      example:
        - orderId: 'ORD-123456789'
        - customerId: 'customer@email.com'
          isPII: true
    TransactionMetadataRequestItem:
      type: object
      properties:
        additionalProperties:
          type: string
          description: The metadata that you are attaching to the payment. For example `"orderId":"ORD-123456789"`.
          example: '"orderId": "ORD-123456789"'
        isPII:
          type: boolean
          default: false
          description: Indicates whether the field contains personally identifiable information. Used for compliance with GDPR or other relevant data privacy laws.
          example: true
      example:
        - orderId: 'ORD-123456789'
        - customerId: 'customer@email.com'
          isPII: true
    TransactionMetadataResponse:
      description: | 
        The metadata that was provided in the original initation request in a JSON object format.
      type: object
      properties:
        additionalProperties:
          type: string
          description: Each passed in metadata field will be a property of the metadata JSON object.
      example:
        orderId: 'ORD-123456789'
        customerId: 'customer@email.com'
    
    Statement:
      required:
        - statementId
        - status
        - wallet
        - created
        - startDate
        - endDate
      type: object
      properties:
        statementId:
          $ref: '#/components/schemas/StatementId'
        status:
          $ref: '#/components/schemas/StatementStatus'
        wallet:
          $ref: '#/components/schemas/StatementWallet'
        created:
          $ref: '#/components/schemas/StatementCreatedTimestamp'
        startDate:
          type: string
          description: |
            The start date of the statement date range. Format defined by 'date-time' in RFC3339 section 5.6 from [IETF](https://tools.ietf.org/html/rfc3339#section-5.6)
          format: date-time
          example: '2025-05-10T10:00:00'
        endDate:
          type: string
          description: |
            The end date of the statement date range. Format defined by 'date-time' in RFC3339 section 5.6 from [IETF](https://tools.ietf.org/html/rfc3339#section-5.6)
          format: date-time
          example: '2025-05-01T10:00:00'
        fileSize:
          type: number
          description: |
            The file size in bytes of the generated statement.
          example: 1048576
        downloadUrl:
          format: uri
          description: |
            The URL from which to download the generated statement.
            
            **Please note! The URL is valid until `downloadUrlExpiresAt`.**
        downloadUrlExpiresAt:
          type: string
          description: |
            The download URL expiration time. After this time, the statement cannot be downloaded any more and a new statement should be generated.
          format: date-time
          example: '2025-05-01T10:00:00'
        completedAt:
          type: string
          description: |
            The date and time when the statement was generated.
          format: date-time
          example: '2025-05-01T10:00:00'
        failedAt:
          type: string
          description: |
            The data and time when the statement generation failed.
          format: date-time
          example: '2025-05-01T10:00:00'
        failureReason:
          $ref: '#/components/schemas/StatementFailureReason'
    StatementSearchResult:
      required:
        - status
      type: object
      properties:
        status:
          type: string
          description: |
            The result of this operation.
            - `FOUND` - The statement was found in PawaPay.
            - `NOT_FOUND` - The statement was not found in PawaPay.
          enum:
            - FOUND
            - NOT_FOUND
        data:
          $ref: '#/components/schemas/Statement'
    StatementStatus:
      type: string
      description: |
        Possible statement statuses: 
        * `PROCESSING` - The statement is in **processing** status.
        * `COMPLETED` - The statement has been **completed**. See downloadUrl to download the file.
        * `FAILED` - The statement has been **failed**. See failureReason for details.
      enum:
        - PROCESSING
        - COMPLETED
        - FAILED
    StatementCreationResponse:
      required:
        - status
        - wallet
      type: object
      properties:
        statementId:
          $ref: '#/components/schemas/StatementId'
        status:
          $ref: '#/components/schemas/StatementCreationStatus'
        created:
          $ref: '#/components/schemas/StatementCreatedTimestamp'
        failureReason:
          $ref: '#/components/schemas/StatementCreationFailureReason'
    StatementCreationStatus:
      type: string
      description: |
        The initiation status of the statement: 
        * `ACCEPTED` - The statement has been **accepted** by PawaPay for generation.
        * `REJECTED` - The statement request has been **rejected** by PawaPay. See failureReason for details.
      enum:
        - ACCEPTED
        - REJECTED
    StatementCreationFailureReason:
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Possible statement failure codes:
            * `NO_AUTHENTICATION` - The API token was not found in the request headers.
            * `AUTHENTICATION_ERROR` - The API token in the request headers is not valid.
            * `AUTHORISATION_ERROR` - The API Token in the request header is not authorised to make this request.
            * `INVALID_INPUT` - We were unable to parse the payload of the request.
            * `MISSING_PARAMETER` - A mandatory parameter was missing from the request body.
            * `UNSUPPORTED_PARAMETER` - An unsupported parameter was found in the request body.
            * `INVALID_PARAMETER` - A parameter had an incorrect value.
            * `INVALID_CALLBACK_URL` - Callback URL must be a valid URL and use HTTPS schema.
            * `INVALID_DATE_RANGE` - Date range exceeds 31 days. 
            * `WALLET_NOT_FOUND` - Wallet requested does not exist.
          example: WALLET_NOT_FOUND
          enum:
            - NO_AUTHENTICATION
            - AUTHENTICATION_ERROR
            - AUTHORISATION_ERROR
            - INVALID_INPUT
            - MISSING_PARAMETER
            - UNSUPPORTED_PARAMETER
            - INVALID_PARAMETER
            - INVALID_CALLBACK_URL
            - INVALID_DATE_RANGE
            - WALLET_NOT_FOUND
        failureMessage:
          type: string
          description: Description of the reason for this failure
          example: Wallet does not exist.
    StatementFailureReason:
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: |
            Possible statement failure codes:
            * `UNKNOWN_ERROR` - Unable to process request due to an unknown problem.
          example: UNKNOWN_ERROR
          enum:
            - UNKNOWN_ERROR
        failureMessage:
          type: string
          description: Description of the reason for this failure
          example: Unable to process request due to an unknown problem.
          
  requestBodies:

    ## Payment initiation requests
    DepositCreationRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DepositInitiationRequest'
      required: true
    SplitPaymentCreationRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SplitPaymentInitiationRequest'
      required: true
    CheckoutCreationRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CheckoutInitiationRequest'
      required: true
    PayoutCreationRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PayoutInitiationRequest'
      required: true
    BulkPayoutCreationRequest:
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/PayoutInitiationRequest'
      required: true
    RemittanceCreationRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RemittanceInitiationRequest'
      required: true
    BulkRemittanceCreationRequest:
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/RemittanceInitiationRequest'
      required: true
    RefundCreationRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RefundInitiationRequest'
      required: true
    StatementCreationRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StatementCreationRequest'
      required: true 
    
  securitySchemes:
    bearerAuth:
      type: http
      description: See [Authentication](/v2/docs/how_to_start#how-to-authenticate-calls-to-the-merchant-api).
      scheme: bearer
      bearerFormat: JWT
x-tagGroups:
  - name: API Reference
    tags:
      - deposits
      - split-payments
      - checkouts
      - payouts
      - remittances
      - refunds
      - payment-page
      - finances
      - toolkit
x-webhooks:
  payoutCallback:
    post:
      tags:
        - payouts
      summary: Payout Status Callback
      operationId: payoutWebhook
      security: []
      parameters:
        - in: header
          name: Content-Digest
          schema:
            type: string
            format: string
            description: SHA-256 or SHA-512 hash of the request body.
          required: false
        - in: header
          name: Signature
          schema:
            type: string
            format: string
            description: Signature of the request according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Signature-Input
          schema:
            type: string
            format: string
            description: Signature-Input according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/)
          required: false
        - in: header
          name: Signature-Date
          schema:
            type: string
            format: date-time
            description: Timestamp when signature was created. This is a custom field and is not part of [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Signature
          schema:
            type: string
            format: string
            description: Expected signature algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Digest
          schema:
            type: string
            format: string
            description: Expected digest algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2PayoutCallback'
        required: true
      responses:
        '200':
          description: OK
  splitPaymentCallback:
    post:
      tags:
        - split-payments
      summary: Split Payment Status Callback
      operationId: splitPaymentWebhook
      security: []
      parameters:
        - in: header
          name: Content-Digest
          schema:
            type: string
            format: string
            description: SHA-256 or SHA-512 hash of the request body.
          required: false
        - in: header
          name: Signature
          schema:
            type: string
            format: string
            description: Signature of the request according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Signature-Input
          schema:
            type: string
            format: string
            description: Signature-Input according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/)
          required: false
        - in: header
          name: Signature-Date
          schema:
            type: string
            format: date-time
            description: Timestamp when signature was created. This is a custom field and is not part of [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Signature
          schema:
            type: string
            format: string
            description: Expected signature algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Digest
          schema:
            type: string
            format: string
            description: Expected digest algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2SplitPaymentCallback'
        required: true
      responses:
        '200':
          description: Callback considered delivered.
  remittanceCallback:
    post:
      tags:
        - remittances
      summary: Remittance Status Callback
      operationId: remittanceWebhook
      security: []
      parameters:
        - in: header
          name: Content-Digest
          schema:
            type: string
            format: string
            description: SHA-256 or SHA-512 hash of the request body.
          required: false
        - in: header
          name: Signature
          schema:
            type: string
            format: string
            description: Signature of the request according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Signature-Input
          schema:
            type: string
            format: string
            description: Signature-Input according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/)
          required: false
        - in: header
          name: Signature-Date
          schema:
            type: string
            format: date-time
            description: Timestamp when signature was created. This is a custom field and is not part of [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Signature
          schema:
            type: string
            format: string
            description: Expected signature algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Digest
          schema:
            type: string
            format: string
            description: Expected digest algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2RemittanceCallback'
        required: true
      responses:
        '200':
          description: OK
  depositCallback:
    post:
      tags:
        - deposits
      summary: Deposit Status Callback
      operationId: depositWebhook
      security: []
      parameters:
        - in: header
          name: Content-Digest
          schema:
            type: string
            format: string
            description: SHA-256 or SHA-512 hash of the request body.
          required: false
        - in: header
          name: Signature
          schema:
            type: string
            format: string
            description: Signature of the request according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Signature-Input
          schema:
            type: string
            format: string
            description: Signature-Input according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/)
          required: false
        - in: header
          name: Signature-Date
          schema:
            type: string
            format: date-time
            description: Timestamp when signature was created. This is a custom field and is not part of [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Signature
          schema:
            type: string
            format: string
            description: Expected signature algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Digest
          schema:
            type: string
            format: string
            description: Expected digest algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2DepositCallback'
        required: true
      responses:
        '200':
          description: Callback considered delivered.
  refundCallback:
    post:
      tags:
        - refunds
      summary: Refund Status Callback
      operationId: refundWebhook
      security: []
      parameters:
        - in: header
          name: Content-Digest
          schema:
            type: string
            format: string
            description: SHA-256 or SHA-512 hash of the request body.
          required: false
        - in: header
          name: Signature
          schema:
            type: string
            format: string
            description: Signature of the request according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Signature-Input
          schema:
            type: string
            format: string
            description: Signature-Input according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/)
          required: false
        - in: header
          name: Signature-Date
          schema:
            type: string
            format: date-time
            description: Timestamp when signature was created. This is a custom field and is not part of [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Signature
          schema:
            type: string
            format: string
            description: Expected signature algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Digest
          schema:
            type: string
            format: string
            description: Expected digest algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2RefundCallback'
        required: true
      responses:
        '200':
          description: OK
  checkoutCallback:
    post:
      tags:
        - checkouts
      summary: Checkout Status Callback
      operationId: checkoutWebhook
      security: []
      parameters:
        - in: header
          name: Content-Digest
          schema:
            type: string
            format: string
            description: SHA-256 or SHA-512 hash of the request body.
          required: false
        - in: header
          name: Signature
          schema:
            type: string
            format: string
            description: Signature of the request according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Signature-Input
          schema:
            type: string
            format: string
            description: Signature-Input according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/)
          required: false
        - in: header
          name: Signature-Date
          schema:
            type: string
            format: date-time
            description: Timestamp when signature was created. This is a custom field and is not part of [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Signature
          schema:
            type: string
            format: string
            description: Expected signature algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
        - in: header
          name: Accept-Digest
          schema:
            type: string
            format: string
            description: Expected digest algorithm of the response according to [RFC-9421](https://datatracker.ietf.org/doc/rfc9421/).
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2CheckoutCallback'
        required: true
      responses:
        '200':
          description: Callback considered delivered.
