Paystack Inline Embed


Deprecation notice

Inline Embed checkout has been deprecated and is no longer supported by Paystack. We recommend that you integrate our new checkout via Paystack Popup and Paystack standard. These checkout options are improved, optimized for successful transactions, and equipped with smart error resolution directly on the checkout to ensure that your customers have the best payment experience.

Paystack Inline Embed offers a stylish Inline that loads the credit card form in a set container like it sits in your page.

Working with Paystack Inline Embed

Here is a sample code that calls Paystack and also handles outcome.



Please note that the key to use with inline is the public key and not the secret key

<script src=""></script>
<div id="paystackEmbedContainer"></div>

   key: 'pk_test_221221122121',
   email: '[email protected]',
   amount: 10000,
   container: 'paystackEmbedContainer',
   callback: function(response){
        alert('successfully subscribed. transaction ref is ' + response.reference);

Things to note while using Inline Embed

  1. You need to specify a container div that will house the form. All classes and styles on this div will be reset.
  2. The embed will automatically load in the container. No need to call loadIframe() on the Paystack instance
  3. The payment form will be 100% of the width of wherever you put it.
  4. To maintain a uniform design, your page's background color should be white.

When the user enters their card details, Paystack will validate the card, charge the card, and pass a response object (containing the status of the transaction including reference as reference) to your callback function. If no callback function is set, we will insert a hidden field named paystack-reference on the parent form and submit the form to whatever action you set.

Before you give value to the customer, please make a server-side call to our verification endpoint to confirm the status and properties of the transaction.

Configuration options

'*' indicates required parameters.




Your publishable Key from Paystack. Use test key for test mode and live key for live mode


Unique transaction reference


The customer's email address.


Amount in kobo. Ignored if creating a subscription.


Javascript function that should be called if the payment is successful


Currency charge should be performed in. Default is NGN


If transaction is to create a subscription to a predefined plan, provide plan code here.


Used to apply a multiple to the amount returned by the plan code above.

For Split Payments


( string ) The code for the subaccount that owns the payment. e.g. ACCT_8f4s1eq7ml6rlzj


( integer, optional ) A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split). e.g. 7000 for a 70 naira flat fee.


( string, optional ) Who bears Paystack charges? account or subaccount. Defaults to account.

Related: Verifying Transactions