Skip to content

Welcome to the SpankPay (v2) Developer Documentation!

The SpankPay Merchant SDK makes it easy to get paid in popular crypto currencies.

Before you get started though, you should consider the following items to determine if SpankPay is right for you:

  1. Is your site focused on the adult/porn industry?
    • We work exclusively with the adult industry, and will shut down accounts found implemented in other market segments.
  2. Is your site ready to accept varying payment amounts?
    • We cannot guarantee that an invoice will be paid in the exact amount that it is invoiced for. Underpayments and overpayments are real possibilities that must be handled.
    • Our most successful partners implement their own internal credit systems, and utilize the SpankPay SDK to allow their users to purchase credits via crypto.
    • A well implemented setup will parse our webhook for the actual amount received and credit their users accordingly (aka not based on invoice amount).
    • This is a requirement that we hope to address and remove in the future.
  3. Is my geographic location supported?
  4. Do you have the required technical knowledge or have a developer to work with?
    • We do our best to provide support to our integration partners, but some aspects of implementation are subjective to your site.
    • SpankPay will provide direct support on issues related to our SDK, but cannot help build you a custom integration.
  5. Do you have a dedicated support rep?
    • Our support team is here to help with issues directly relating to SpankPay, but you will need to handle any site specific issues internally.

Getting Started

Follow these steps to get yourself started with SpankPay.

  1. Review our Core Concepts and Configuration Requirements
  2. Create and Setup your SpankPay account
  3. Integrate the SpankPay SDK JS Library on to your site
  4. Configure and Test your Webhook request handler with the SDK Integration

1. Core Concepts and Configuration Requirements

  • Holding Currency - Your holding currency is the currency all your incoming tips will be stored in. UNDERSTANDING HOLDING CURRENCIES IS CRITICAL!
    • Your holding currency can potentially have a large effect on your fees and therefore average transaction costs.
    • For example, if your holding currency is Bitcoin and your client pays you in USD, your incoming USD tip will be converted to Bitcoin once it hits your SpankPay wallet.
    • For additional information regarding fees, see also:
    • Your holding currency will determine which amount field you will need to parse from our webhooks to properly credit your users.
  • Production API Key - this is the API key to be used in your live deployments.
  • Test API Key - Used for staging/development.
    • Not connected to actual payment systems.
    • Required for “Pay With Test” button to show up
    • Unlike prod keys, this requires the “username” field to be passed back.
    • If the username does not match the API key, it will experience 404 errors.
  • Metadata - optional data you can encode to be included to help identify users.
    • Cannot be null, will cause integration to 404.
    • Can be empty, but must follow proper contextual syntax
    • E.g. (use {} to pass an empty metadata)
  • Accepted Currencies - Explicitly list the currencies you are willing to accept.
    • Can include BTC, ETH, USD, USDC, and DAI.
    • By default, if not specified, will include five listed above.
    • Listing unsupported currencies, such as LTC, can cause 404 issues.
  • Redirect URL - Where users should be redirected after completing an invoice.
  • Callback URL - Your address where our webhooks should be sent.
  • Allow Partial - Currently MUST be set to true.
  • Fiat Payments - SpankPay does not actually natively support incoming fiat payments - instead the user will purchase ETH during the sending process from Wyre, who will send the ETH on behalf of the user to the wallet associated with the invoice. Additional fees are charged to the user during checkout, see our help article for more details.

2. Create and Setup your SpankPay account

  1. Create a SpankPay account.
  2. Select your holding currency.
  3. Grab your API Key from the SpankPay dashboard:
    • Left Navigation Menu → ”Developer” → “API Keys and Webhooks”

3. Integrate SpankPay SDK into your site.

The first step in integrating SpankPay into your website is including the SpankPay JavaScript external resource.

This can be done directly with a <script> tag:

<script src=""></script>

See SpankPay APIs for complete API documentation for the spankpay.js library.

In SpankPay, an Invoice is used to request payment from a user. Invoices can be created through a Pay Button:

    data-description="Test Invoice HTML"
  Pay with SpankPay!

<script src=""></script>

This Pay with SpankPay! button will take the user to the SpankPay SDK payment page. Once the invoice has been paid, Spankpay will send a webhook to the callbackUrl provided (in this example- "").

And For a complete description of each of these methods, including their options, see the Invoice API.

4. Configure and Test Webhook request handler

When SpankPay receives confirmation of a user's payment, it will send a request to the callback webhook URL with a Payment to notify your application that the payment was completed successfully.