Appearance
Simple Payments
Pay Now Button
Add button
First you need to add a button to your website and add "Pay Now" as the button text. Below you will find examples of the most popular E-commerce Platforms. If you cannot find yours in the list, let us know.
WIX
Click here to see how to add a button to your WIX site.
Squarespace
Click here to see how to add a button to your Squarespace site.
WordPress
Click here to see how to add a button to your WordPress site.
Shopify
Click here to see how to add a button to your Shopify site.
Copy URL
Log in to the Control Panel and go to Simple Payments/Pages. Choose the form you want to use. Click on the 3 dots and Copy Page URL
.
Set URL on button
All you have to do is add the URL to the button. Replace your URL with the one between the quotation marks.
javascript
<a href="{https://sandbox.approvely.net}/spp/example-page">Pay Now</a>
Url Parameters
Custom Fields
Comma separate the custom field ids and values you want to prefill. You can get the custom field ID from the Control Panel under Manage->Custom Fields.
Colon separate the custom field id and value.
javascript
{https://sandbox.approvely.net}/spp/example-page?custom_fields=field1ID:value,field2ID:value
// Example
{https://sandbox.approvely.net}/spp/beef_jerky?custom_fields=cotpggp97i67muer2dd0:meat,coyqg1p97i67muer2dd1:spicy
Products
Comma separate the product ids and quantities you want to prefill. You can get the product ID from the Control Panel under Shopping->Products->Edit Product->ID (upper right hand corner).
Colon separate the product id, quantity, price
javascript
{https://sandbox.approvely.net}/spp/example-page?add_products=product1ID:quantity:price,product2ID:quantity:price
// Example
{https://sandbox.approvely.net}/spp/beef_jerky?add_products=cjocdq45co1epquvdn60:2:8.23,cjocdq45co1epquvdn61:1:3.50
Plan
Select a plan automatically on page load using a plan ID. You can get the plan ID from the Control Panel under Simple Payments->Plans->Edit Plan->ID (upper left hand corner).
javascript
{https://sandbox.approvely.net}/spp/example-page?add_plan=planID
// Example
{https://sandbox.approvely.net}/spp/beef_jerky?add_plan=cron36bug2jkcqd9mij0
Amount
If you have preset amounts, you can set an amount to be selected on page load using the add_amount
query string parameter.
javascript
{https://sandbox.approvely.net}/spp/example-page?add_amount={integer}
The example below will set the amount to $1.00 on page load.
javascript
// Example
{https://sandbox.approvely.net}/spp/beef_jerky?add_amount=100
Custom Amount
If you have custom amount enabled, you can set an amount to be prefilled on page load using the add_custom_amount
query string parameter.
javascript
{https://sandbox.approvely.net}/spp/example-page?add_custom_amount={float or integer}
Both examples below will set the amount to $1.00 on page load.
javascript
// Example using an integer.
{https://sandbox.approvely.net}/spp/beef_jerky?add_custom_amount=100
// Example using a float.
{https://sandbox.approvely.net}/spp/beef_jerky?add_custom_amount=1.00
API
Create product
Request Method:
POST
URL Endpoint:
/api/merchant/{merchantid}/product
Name | Type | Default | Description | Required | Regex |
---|---|---|---|---|---|
sku | string | Product Sku | true | ([0-9a-z]{0-20}) | |
name | string | display name | true | ([0-9a-z -]{0-100}) | |
img | string | product image (base64 encoded) | false | ||
price | unsigned int | unit price | true | ([0-9a-z -]{0-100}) | |
fixed_amount | boolean | should we lock the amount or allow the end user to customize the amount | true | ||
fixed_qty | boolean | should we lock the quantity or allow the end user to customize the quantity | true | ||
description | string | item description | true | 254 characters |
Create recurring plan
Request Method:
POST
URL Endpoint:
/api/recurring/plan
Name | Type | Default | Description | Required | Regex |
---|---|---|---|---|---|
name | string | plan name | true | ([0-9a-z -]{0-100}) | |
amount | unsigned int | Amount to be billed in cents (100 = $1.00) | true | ([0-9a-z -]{0-100}) | |
currency | string | currency "USD" | true | USD | |
billing_cycle_interval | integer | How often to run the billing cycle (run every X months) | |||
billing_frequency | string literal | "monthly" | How often to run the plan within a billing cycle. ("monthly", "twice_monthly", "daily") | * | |
billing_days | string | null | Which day of the month to bill on. If "twice_monthly" then comma separate dates ("1, 15"). For the last day of the month, use "0". | * | |
duration | integer | 0 | Number of times for the discount to be billed (use 0 if you want the plan to persist until cancelled) | ||
features.allow_custom_amount | boolean | false | Shoule we allow a custom amount to be used | true | ([0-9a-z -]{0-100}) |
add_ons | array of objects | Enumerates add-ons for a recurring plan | |||
add_ons[#] .id | string | ID of the referenced add_on | |||
add_ons[#] .name | string | Display name for the add_on (optional, this overrides the add_ons value) | |||
add_ons[#] .description | string | Description for the add_on (optional, this overrides the add_ons value) | |||
add_ons[#] .amount | int | Amount to be added (optional, this overrides the add_ons value) | |||
add_ons[#] .duration | int | Duration for the add_on to be billed (optional, this overrides the add_ons value) | |||
discounts | array of objects | Enumerates discounts for a recurring plan | |||
discounts[#] .id | string | ID of the referenced discount | |||
discounts[#] .name | string | Display name for the discount (optional, this overrides the discount value) | |||
discounts[#] .description | string | Description for the discount (optional, this overrides the discount value) | |||
discounts[#] .amount | int | Amount to be discounted (optional, this overrides the discount value) | |||
discounts[#] .duration | int | Duration for the discount to be billed (optional, this overrides the discount value) |
Create custom field
Request Method:
POST
URL Endpoint:
/api/customfields
Name | Type | Default | Description | Required | Regex |
---|---|---|---|---|---|
name | string | display name | true | ([0-9a-z -]{0-100}) | |
type | string | group name for referencing groups of custom fields | ([0-9a-z]{0-50}) | ||
group_name | string | group name for referencing groups of custom fields | ([0-9a-z]{0-50}) | ||
required | boolean | should we require this field | false | ||
validation_type | string | How should we validate these values. | (open | ||
values | array({name:string, value: string}) | Values are an array of objects with keys of name and value |
Create Simple Payments
Request Method:
POST
URL Endpoint:
/api/merchant/{merchantid}/simple-payment
Name | Type | Default | Description | Required | Regex |
---|---|---|---|---|---|
form_type | string | Simple Payments Page Type | (donation) | ||
slug | string | This is the URL slug appended to /spp/ | true | ([0-9a-z]{0-20}) | |
name | string | display name | true | ([0-9a-z -]{0-100}) | |
title | string | Simple Payments Page Title | true | ([0-9a-z -]{0-100}) | |
description | string | Simple Payments Page description | true | 254 characters | |
payment_settings | array of objects | Enumerates payment types to accept | |||
payment_settings[#] .payment_method | string | Allows card and ach payments | (card | ach) | |
layout | string | Page Layout to use. | true | (full | |
image_url | string | Page image (base64 encoded) | false | ||
background_color | string | Background color to use, only if not using layout full | true | ||
amount_header | string | Page heading over Amounts section | false | ([0-9a-z -]{0-100}) | |
amount_options | array of unsigned integers | Enumerates predefined amounts to accept | |||
manual_amount | boolean | Should we allow custom amounts to be entered? Only available if not using products or plans | false | ||
plans_header | string | Page heading over Plans section | false | ([0-9a-z -]{0-100}) | |
plan_ids | array of strings | Enumerates plan ids to make available | |||
products_header | string | Page heading over Products section | false | ([0-9a-z -]{0-100}) | |
products_ids | array of strings | Enumerates product ids to make available | |||
custom_fields_header | string | Page heading over Custom Fields section | false | ([0-9a-z -]{0-100}) | |
custom_field_ids | array of strings | Enumerates custom fields ids to make available | |||
success_url | string | Where to redirect after a successful payment | false |