API Customization and Themes

WePay allows you to customize the OAuth2 Authorization page, the iframe checkout, withdrawal flow, and API emails look, to match your site’s design. You can either do this manually on your App dashboard or using the /app/modify API call.


Customization within the App Dashboard

The easiest way to change the colors and logo used for customization is through your App dashboard. Log into WePay and go to your App’s dashboard. Click the “Configure” tab. Scroll down to Logo section and add an image. Scroll down to Colors section and click “Customize colors”. You should be able to select primary, secondary, background and button colors. Save your changes.

Customize


Theme Structure

The customization engine allows you to create themes that can be used by your API application and/or the accounts that you create. See the theme structure definition for more details.


Customize the OAuth2 Authorization page

If you want to set a theme on an authorization or registration page, you need to associate the theme with your API app. Pass the theme_object parameter (example below) to the /app/modify API call to set a theme to be used for the OAuth2 authorization page.

API Call:

  • PHP
  • cURL
  • Ruby
  • Python

Response:


Customize the iframe checkout, API emails, and withdrawal flow

To customize an iframe checkout, you need to associate a theme with the account that is getting paid. To allow this we have added theme_object parameters to the /account/create and /account/modify calls.

Similar to above you will pass the theme_object parameter to the /account/modify call, which will associate that theme with that account and will be used on all subsequent iframe checkouts.

API Call:

  • PHP
  • cURL
  • Ruby
  • Python

Response


Email Messages

Some calls such as /checkout/create have parameters that let you pass an email message (generally payer_email_message and payee_email_message). These parameters accept a whitelisted set of HTML tags so that you have limited layout/design control over your custom message. Here is the whitelist:

- <strong>
- <em>
- <b>
- <a>
- <br>
- <br />
- <dl>
- <dd>
- <dt>
- <em>
- <span>
- <table>
- <tr>
- <td>
- <tbody>
- <thead>
- <tfoot>
- <div>
- <img>