Overview
OnlinePay allows you to accept payments using multiple methods. There are several integration methods to choose from depending on how you want to accept online payments:
Integration method | Description | PCI compliance |
---|---|---|
Hosted Payments Page (HPP) | Full page redirect to OnlinePay servers | SAQ A |
iFrame | Render a OnlinePay hosted form on your website | SAQ A |
Pay by Link | Send payment links to your customers manually or automate with an API | SAQ A |
Server-to-Server API | Perform API calls to capture customer payment information and place orders | SAQ D |
This chapter provides information about how to accept payments using server-to-server REST API calls to capture customer details, payment information, and place orders. REST API uses RESTful architecture, or Representational State Transfer, which allows you to exchange information reliably and securely through application programming interface (API) requests.
This section covers the information you need to know to interact with our APIs and start taking online payments.
Depending on your familiarity with using APIs, you may want to use an API client, such as Postman or Insomnia , so that you can easily capture and store variables. Alternatively, you can make cURL requests directly from the command line or use our API Reference documentation
Authentication
OnlinePay's API uses the Basic authentication method to secure REST API requests. Basic authentication sends HTTPS requests with an Authorization
header containing Base64-encoded strings as a username and password.
These encoded keys are passed in the API request header in the following format:
Authorization: Basic {user-uid}:{api-key}
Replace the {user-uid} and {api-key} values with your own keys.
Environment variables
Variable | |
---|---|
Base URL | https://au.gsc.verifone.cloud/ |
API Key | Create an API Key |
User ID | Retrieve your User ID |
Payment Provider Contracts | Payment Provider Contracts |
3DS Contract | 3DS Contract |
Entity ID | Entity ID |
Create an API key
To create an API key, your OnlinePay account must have at least one of the following roles:
-
Merchant Admin
-
Merchant External Partner
-
Merchant Supervisor
-
Merchant Cashier
Use the following procedure to create a new API key or copy one you've already created.
-
Log in to your OnlinePay dashboard.
-
Click your settings menu in the upper-right corner, then select API Keys.
-
Click Create API key.
-
Click Copy public key to copy the key to your clipboard.
-
Paste the API key into your preferred REST API client, such as Postman or Insomnia, or save it in a secure location for use when making requests using cURL.
Note
When you close the API key window or click Discard, you will not be able to retrieve the key again.
You can have up to five API keys.
Do not share your API key or make it available to anyone else.
Retrieve your User ID
Do the following steps to retrieve your unique user-uid
.
-
Navigate to My Account in the OnlinePay dashboard.
-
Copy the string in the URL following
/users/
. -
Save the UUID value as a
userId
variable in your REST API client.Alternatively, you can pass the UUID in your request header if using cURL.
Payment Provider Contracts
-
In your OnlinePay dashboard, navigate to Administration > Account Setup > Payment (Provider) Contracts.
-
Click the payment provider contract that you want to use for your API request.
-
Copy the Payment Provider Contract ID and save it to your preferred REST API client as an environment variable or save it in a secure location for use when making requests using cURL.
3DS Contract
-
In your OnlinePay dashboard, navigate to Administration > Advanced Settings > 3DS Contracts.
-
Click the 3D Secure provider contract you want to use for your API request.
-
On the 3DS contract details page, copy the 3-D Secure Contract ID and save it to your preferred REST API client as an environment variable or save it in a secure location for use when making requests using cURL.
Entity ID
-
In your OnlinePay dashboard, navigate to Administration > Account Setup > Organisation.
-
Click the name of the organisation or site that you want to use for your API request.
-
On the organisation General information page, copy the Organisation ID and save it to your preferred REST API client as an environment variable or save it in a secure location for use when making requests using cURL.