Skip to content

7 min read

Connect a Perfect Panel to 402pay for balance top-ups

How an SMM panel on Perfect Panel connects 402pay: set up the key and payment method, embed the top-up form or use a button, and have buyer balances credited automatically.

A panel window with its balance filling in green over an embedded top-up formA panel window with its balance filling in green over an embedded top-up form
On this page

Our post on payments for SMM panels describes how a panel that writes its own Add funds page accepts top-ups through the API. Many panels don't write one. They run on Perfect Panel, where the Add funds page is a list of payment methods the owner configures, and there is no server of theirs to receive a webhook.

For those panels, 402pay has a connector. You give the dashboard an Admin API key for your panel, paste a snippet into a payment method, and buyers top up on a 402pay page. When a top-up is paid, 402pay adds it to the buyer's balance on your panel by itself. This post walks through the setup, what buyers see, how the crediting works, and where it stops.

What the connector does

The connector sits between your panel's Add funds page and your panel's balance. A buyer chooses 402pay as the payment method, lands on a top-up page of ours, and enters an amount in your panel's currency. They pay on the usual 402pay pay page, by card or with crypto. When the payment succeeds, 402pay adds the amount to their balance on your panel and records it there as a payment with a memo that names the 402pay payment.

A row of five steps: the buyer opens Add funds on the panel, the top-up page asks for an amount, the buyer pays on the pay page, the payment succeeds, and the balance is credited on the panel.A row of five steps: the buyer opens Add funds on the panel, the top-up page asks for an amount, the buyer pays on the pay page, the payment succeeds, and the balance is credited on the panel.
Nothing runs on your panel. The top-up page, the payment, and the credit all happen on our side.

The money works as it does for every 402pay payment: it goes to your own wallet, and the top-up is an ordinary payment with ordinary pricing. What the connector adds is the last step. Instead of your server hearing about the payment and crediting a balance, 402pay calls your panel's Admin API and does it for you. The social media panels page summarizes the product for panels.

Set it up

The dashboard has a step-by-step guide for this under Settings, then Perfect Panel, with the code to paste ready to copy. The Perfect Panel guide in the developer docs covers the same ground with screenshots. It takes about ten minutes, and the order is:

  1. Create an Admin API key on Perfect Panel's own account site, not in your panel's admin area. Tick only the three permissions 402pay needs: Users › Get user list, Payments › Add payment, and Payments › Get payment list.
  2. In the dashboard, enter your panel's address and the key, and connect. Use the address your buyers open, without any path after it.
  3. On your panel, add a payment method of type Manual, name it 402pay, and paste the code the dashboard gives you into its instructions. Then choose Check in the dashboard.
  4. Optionally, paste the username script into your panel's custom footer code, so buyers don't type their username.
  5. Try it with a small top-up from a buyer account of your own.

Connecting asks you to confirm it's you, and 402pay tests the key against your panel before it keeps anything. A wrong address, a key that doesn't work, or a missing permission is shown under its field so you can fix it. The test credits nobody. 402pay also reads your panel's currency from the panel, so you don't enter one.

You can connect before the Manual method exists. 402pay keeps the connection and reports that the method is missing, and the dashboard's next step has you add it. Top-ups are accepted meanwhile and credited once the method is there.

Embed the form or use a button

The code you paste into the method's instructions comes in two forms, and the dashboard builds both with your own top-up link in them.

EmbedThe top-up form shows inside your panel's Add funds page, with a link under it that opens the same page in a new tab. This is the one the guide recommends.
ButtonA "Top up with 402pay" button that opens the top-up page in a new tab, where the whole payment happens.

With the embed, buyers pay without leaving your panel: the pay page and the receipt open in the same frame. Only a card provider's page opens in a new tab, and a wallet app opens as it always does. Paste the code in the editor's code view, since pasted into the visual view it shows as text.

The embed works because our top-up pages, unlike the rest of the checkout, are allowed to sit in a frame on any https site. That is the only page that is. If you would rather keep buyers on a page of ours from the start, the button does that.

What the buyer sees

On Add funds, the buyer picks 402pay from your list of methods and sees either the form or the button, depending on the code you chose. The top-up page asks for two things: a panel username and an amount in your panel's currency, which can be USD, EUR, GBP, CAD, or AUD.

  • With the username script in your footer code, the username is filled in from the signed-in buyer's account, and only the amount is asked. Without it, the buyer types the username.
  • The username is checked against your panel before anyone pays. A name that isn't on the panel, or an account that isn't active, is turned away on the page.
  • Your top-up link also takes username, amount, and email in its query string, so a link from anywhere can open the page with fields already filled in. Every field stays editable.
  • Nobody is asked for an email. When a way to pay needs one, the pay page uses the email your panel has for the buyer, unless the link supplies a different one. The receipts article covers what the receipt holds.

After the payment, the receipt shows with a button back to your panel's Add funds page, where the balance has gone up.

How the balance gets credited

Each top-up is recorded in 402pay as a credit, and its status shows under Settings, then Perfect Panel, beside the username, the amount, and the payment:

Awaiting paymentThe buyer hasn't paid. They have 24 hours.
CreditingPaid. The balance is being added on your panel.
CreditedThe balance is on your panel.
FailedYour panel refused it, or couldn't be reached for about a day. The balance wasn't added.
CanceledThe payment expired or was canceled, so there is nothing to add.

Once a payment succeeds, 402pay looks for a payment on your panel with that top-up's memo. If one is there, it stops, so a balance is never added twice even if an answer from your panel was lost on the way. If not, it adds the amount through your panel's Admin API, using the Manual method.

A refusal fails the credit at once: the key was deleted or lost a permission, the Manual method is gone, or the buyer's account was removed. The dashboard says why, and Retry credits it after you fix it. When your panel simply can't be reached, 402pay tries again over about a day, starting after a minute, before the credit fails.

Short, late, and unpaid top-ups

A top-up is an ordinary payment, so the rules of ordinary payments apply. A buyer has 24 hours to pay it. If they don't, the payment expires, the credit is canceled, and nothing is added to the balance.

A transfer that falls short is treated as it is anywhere else: within your underpayment tolerance it counts as paid, and further short the payment becomes underpaid. An underpaid top-up is not credited yet. It waits until the buyer sends the rest or you accept what arrived.

Accepting a short top-up credits the full amount

The credit is for the amount the buyer asked to top up, not the amount that arrived. If you accept a payment that came in short, the whole requested amount goes onto the balance. Decide that on the payment, before you accept it, or ask for the remainder instead.

Our guide to underpayments and overpayments and the payment statuses article cover each option.

Mark a pending payment as paid

Sometimes the money reaches you another way. A buyer sends a bank transfer to you directly, or pays in cash, and the top-up payment is still pending. From the payment's page in the dashboard, you can mark a pending payment as paid, with an optional reason that stays on the payment for your team.

The payment closes as succeeded, so the connector credits the buyer's balance like any paid top-up. It also lets you try the whole flow, from the top-up page to the balance, without sending funds. Know what it does and doesn't do:

  • No funds reach 402pay, so no 402pay fee is charged and nothing lands in your wallet.
  • The usual succeeded notifications and webhooks are sent, and the payment records who marked it, when, and why.
  • It asks you to confirm it's you, only works on a pending payment, and can't be undone.

Caveats

  • Your panel's currency must be USD, EUR, GBP, CAD, or AUD. A currency 402paydoesn't take can't connect.
  • Only active accounts are topped up. Other account statuses on a panel haven't been tested.
  • The Admin API key can add balance to any account on your panel. Tick only the three permissions, and keep the key to yourself: it isn't shown again after you connect.
  • Pausing top-ups in the dashboard makes the link unavailable until you turn them back on. Disconnecting stops the link at once and deletes the saved key; top-ups already paid are still credited. Connecting again gives a new link, so paste the new code into your payment method.
  • You can set a minimum and a maximum top-up in the dashboard, within what a payment may be in your panel's currency.

Panels that build their own Add funds page can still use the API and webhooks directly, as in payments for SMM panels and crediting a prepaid balance from webhooks. The connector is for panels that don't.

Common questions

  • No server code. You paste a snippet into a Manual payment method's instructions, and optionally a script into the custom footer code. 402pay does the crediting through your panel's Admin API.
  • Yes, with the embed code. The top-up form, the pay page, and the receipt all show inside the frame on your Add funds page. A card provider's page opens in a new tab. With the button code, the top-up page opens in a new tab instead.
  • It shows once the payment confirms, with a button back to your panel's Add funds page, and its link keeps working if the buyer wants it later. 402pay doesn't email it.
  • It reads it from your panel when you connect. If the panel's currency is not one 402pay takes, the connection is refused.
  • A shortfall within your underpayment tolerance counts as paid. A larger one leaves the top-up underpaid, and it is not credited until the buyer sends the rest or you accept it. Accepting credits the full amount the buyer asked for.
  • It closes a pending payment as succeeded when you received the money another way, so the buyer's balance is credited. No 402pay fee is charged and nothing lands in your wallet. It can't be undone.

See what 402pay can do for you.

Discover how 402pay helps your business accept any card and get paid in crypto, straight to a wallet you control.