public static function create(
        Amount $amountInquired,
        Pointer $counterpartyAlias,
        string $description,
        bool $allowBunqme,
        int $monetaryAccountId = null,
        array $attachment = null,
        string $merchantReference = null,
        string $status = null,
        int $minimumAge = null,
        string $requireAddress = null,
        bool $wantTip = null,
        bool $allowAmountLower = null,
        bool $allowAmountHigher = null,
        string $redirectUrl = null,
        int $eventId = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId)]
            ),
            [
                self::FIELD_AMOUNT_INQUIRED => $amountInquired,
                self::FIELD_COUNTERPARTY_ALIAS => $counterpartyAlias,
                self::FIELD_DESCRIPTION => $description,
                self::FIELD_ATTACHMENT => $attachment,
                self::FIELD_MERCHANT_REFERENCE => $merchantReference,
                self::FIELD_STATUS => $status,
                self::FIELD_MINIMUM_AGE => $minimumAge,
                self::FIELD_REQUIRE_ADDRESS => $requireAddress,
                self::FIELD_WANT_TIP => $wantTip,
                self::FIELD_ALLOW_AMOUNT_LOWER => $allowAmountLower,
                self::FIELD_ALLOW_AMOUNT_HIGHER => $allowAmountHigher,
                self::FIELD_ALLOW_BUNQME => $allowBunqme,
                self::FIELD_REDIRECT_URL => $redirectUrl,
                self::FIELD_EVENT_ID => $eventId,
            ],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
public static function create(
        Amount $amountInquired,
        Pointer $counterpartyAlias,
        string $description,
        bool $allowBunqme,
        int $monetaryAccountId = null,
        array $attachment = null,
        string $merchantReference = null,
        string $status = null,
        int $minimumAge = null,
        string $requireAddress = null,
        bool $wantTip = null,
        bool $allowAmountLower = null,
        bool $allowAmountHigher = null,
        string $redirectUrl = null,
        int $eventId = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId)]
            ),
            [
                self::FIELD_AMOUNT_INQUIRED => $amountInquired,
                self::FIELD_COUNTERPARTY_ALIAS => $counterpartyAlias,
                self::FIELD_DESCRIPTION => $description,
                self::FIELD_ATTACHMENT => $attachment,
                self::FIELD_MERCHANT_REFERENCE => $merchantReference,
                self::FIELD_STATUS => $status,
                self::FIELD_MINIMUM_AGE => $minimumAge,
                self::FIELD_REQUIRE_ADDRESS => $requireAddress,
                self::FIELD_WANT_TIP => $wantTip,
                self::FIELD_ALLOW_AMOUNT_LOWER => $allowAmountLower,
                self::FIELD_ALLOW_AMOUNT_HIGHER => $allowAmountHigher,
                self::FIELD_ALLOW_BUNQME => $allowBunqme,
                self::FIELD_REDIRECT_URL => $redirectUrl,
                self::FIELD_EVENT_ID => $eventId,
            ],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
public static function create ( Amount $ amountInquired , Pointer $ counterpartyAlias , string $ description , bool $ allowBunqme , int $ monetaryAccountId = null , array $ attachment = null , string $ merchantReference = null , string $ status = null , int $ minimumAge = null , string $ requireAddress = null , bool $ wantTip = null , bool $ allowAmountLower = null , bool $ allowAmountHigher = null , string $ redirectUrl = null , int $ eventId = null , array $ customHeaders = [ ] ) : BunqResponseInt { $ apiClient = new ApiClient ( static :: getApiContext ( ) ) ; $ responseRaw = $ apiClient -> post ( vsprintf ( self :: ENDPOINT_URL_CREATE , [ static :: determineUserId ( ) , static :: determineMonetaryAccountId ( $ monetaryAccountId ) ] ) , [ self :: FIELD_AMOUNT_INQUIRED => $ amountInquired , self :: FIELD_COUNTERPARTY_ALIAS => $ counterpartyAlias , self :: FIELD_DESCRIPTION => $ description , self :: FIELD_ATTACHMENT => $ attachment , self :: FIELD_MERCHANT_REFERENCE => $ merchantReference , self :: FIELD_STATUS => $ status , self :: FIELD_MINIMUM_AGE => $ minimumAge , self :: FIELD_REQUIRE_ADDRESS => $ requireAddress , self :: FIELD_WANT_TIP => $ wantTip , self :: FIELD_ALLOW_AMOUNT_LOWER => $ allowAmountLower , self :: FIELD_ALLOW_AMOUNT_HIGHER => $ allowAmountHigher , self :: FIELD_ALLOW_BUNQME => $ allowBunqme , self :: FIELD_REDIRECT_URL => $ redirectUrl , self :: FIELD_EVENT_ID => $ eventId , ] , $ customHeaders ) ; return BunqResponseInt :: castFromBunqResponse ( static :: processForId ( $ responseRaw ) ) ; }
Create a new payment request.

@param Amount $amountInquired         The Amount requested to be paid by the
person the RequestInquiry is sent to. Must be bigger than 0.
@param Pointer $counterpartyAlias     The Alias of the party we are
requesting the money from. Can be an Alias of type EMAIL, PHONE_NUMBER or
IBAN. In case the EMAIL or PHONE_NUMBER Alias does not refer to a bunq
monetary account, 'allow_bunqme' needs to be 'true' in order to trigger
the creation of a bunq.me request. Otherwise no request inquiry will be
sent.
@param string $description            The description for the RequestInquiry.
Maximum 9000 characters. Field is required but can be an empty string.
@param bool $allowBunqme              Whether or not sending a bunq.me request is
allowed.
@param int|null $monetaryAccountId
@param BunqId[]|null $attachment      The Attachments to attach to the
RequestInquiry.
@param string|null $merchantReference Optional data to be included with
the RequestInquiry specific to the merchant. Has to be unique for the
same source MonetaryAccount.
@param string|null $status            The status of the RequestInquiry. Ignored in
POST requests but can be used for revoking (cancelling) the
RequestInquiry by setting REVOKED with a PUT request.
@param int|null $minimumAge           The minimum age the user accepting the
RequestInquiry must have. Defaults to not checking. If set, must be
between 12 and 100 inclusive.
@param string|null $requireAddress    Whether a billing and shipping address
must be provided when paying the request. Possible values are: BILLING,
SHIPPING, BILLING_SHIPPING, NONE, OPTIONAL. Default is NONE.
@param bool|null $wantTip             [DEPRECATED] Whether or not the accepting user
can give an extra tip on top of the requested Amount. Defaults to false.
@param bool|null $allowAmountLower    [DEPRECATED] Whether or not the
accepting user can choose to accept with a lower amount than requested.
Defaults to false.
@param bool|null $allowAmountHigher   [DEPRECATED] Whether or not the
accepting user can choose to accept with a higher amount than requested.
Defaults to false.
@param string|null $redirectUrl       The URL which the user is sent to after
accepting or rejecting the Request.
@param int|null $eventId              The ID of the associated event if the request
was made using 'split the bill'.
@param string[] $customHeaders

@return BunqResponseInt
Create a new payment request .