# fluentform/6.2.13/app/Modules/Payments/PaymentMethods/Stripe/API/Invoice.php

Fluent Forms – Customizable Contact Forms, Survey, Quiz, &amp; Conversational Form Builder, version 6.2.13. 58 lines.

- Page: https://pluginprobe.com/plugins/fluentform/6.2.13/code/app/Modules/Payments/PaymentMethods/Stripe/API/Invoice.php
- Raw: https://pluginprobe.com/plugins/fluentform/6.2.13/raw/app/Modules/Payments/PaymentMethods/Stripe/API/Invoice.php
- Modified: 2025-03-19T15:44:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluentform/6.2.13/code/app/Modules/Payments/PaymentMethods/Stripe/API/Invoice.php#L10-L20`.

```php
<?php

namespace FluentForm\App\Modules\Payments\PaymentMethods\Stripe\API;

use FluentForm\App\Modules\Payments\PaymentMethods\Stripe\StripeSettings;

if (!defined('ABSPATH')) {
	exit;
}

class Invoice
{
	use RequestProcessor;

	public static function createItem($item, $formId)
	{
        $secretKey = apply_filters_deprecated(
            'fluentform-payment_stripe_secret_key',
            [
                StripeSettings::getSecretKey($formId),
                $formId
            ],
            FLUENTFORM_FRAMEWORK_UPGRADE,
            'fluentform/payment_stripe_secret_key',
            'Use fluentform/payment_stripe_secret_key instead of fluentform-payment_stripe_secret_key.'
        );
		$secretKey = apply_filters('fluentform/payment_stripe_secret_key', $secretKey, $formId);

		ApiRequest::set_secret_key($secretKey);

		$response = ApiRequest::request($item, 'invoiceitems', 'POST');

		return static::processResponse($response);
	}

	public static function retrieve($invoiceId, $formId, $args = [])
	{
        $secretKey = apply_filters_deprecated(
            'fluentform-payment_stripe_secret_key',
            [
                StripeSettings::getSecretKey($formId),
                $formId
            ],
            FLUENTFORM_FRAMEWORK_UPGRADE,
            'fluentform/payment_stripe_secret_key',
            'Use fluentform/payment_stripe_secret_key instead of fluentform-payment_stripe_secret_key.'
        );

		$secretKey = apply_filters('fluentform/payment_stripe_secret_key', $secretKey, $formId);

		ApiRequest::set_secret_key($secretKey);

		$response = ApiRequest::request($args, 'invoices/' . $invoiceId, 'POST');

		return static::processResponse($response);
	}
}

```
