Sarraf API
    Preparing search index...

    Function paymob

    • Create the Paymob adapter: new Sarraf({ providers: { paymob: paymob({...}) } }).

      Parameters

      • options: {
            apiKey?: string;
            baseUrl?: string;
            hmacSecret: string;
            integrationIds: Partial<
                Record<
                    | "card"
                    | "wallet"
                    | "cash_outlet"
                    | "installments"
                    | "bnpl"
                    | "bank_transfer"
                    | "other"
                    | "card_auth"
                    | "card_moto"
                    | "apple_pay",
                    number,
                >,
            >;
            publicKey: string;
            region?: "egypt"
            | "ksa"
            | "uae"
            | "oman";
            secretKey: string;
        }
        • OptionalapiKey?: string

          Legacy API key: needed for transaction inquiry (getPayment / reconcile).

        • OptionalbaseUrl?: string

          Override the region base URL (testing / proxies).

        • hmacSecret: string

          HMAC secret from the dashboard: verifies transaction callbacks.

        • integrationIds: Partial<
              Record<
                  | "card"
                  | "wallet"
                  | "cash_outlet"
                  | "installments"
                  | "bnpl"
                  | "bank_transfer"
                  | "other"
                  | "card_auth"
                  | "card_moto"
                  | "apple_pay",
                  number,
              >,
          >

          Integration ids, one per payment method (card, wallet, cash_outlet for kiosk, bnpl, installments, …) plus card_auth, card_moto and apple_pay. Test/live mode must match the keys.

        • publicKey: string

          Public key (pk_…): builds the Unified Checkout URL. Safe for browsers.

        • Optionalregion?: "egypt" | "ksa" | "uae" | "oman"
        • secretKey: string

          Secret key (sk_test_… / sk_live_…): creates intentions, refunds, voids.

      Returns PaymobProvider