Get started

An overview of the steps to start accepting payments using AOPay:

1. Get a Sandbox account

Note

If you already have your Merchant Sandbox account to login into Merchant Back-office Sandbox, skip creating a free Sandbox account instruction.

Get started by creating a free Sandbox account. Your Sandbox account gives you access to the Merchant Back-office Sandbox, a unified area for managing your AOPay account and payments across different channels, regions, and currencies. Based on the country you do business in, we’ll enable specific payment methods to suit your needs.

Your Merchant Back-office Sandbox account allows you to:

2. Verify your Merchant account

You should have created a free Sandbox account to test the API against.

Note

Before you start with integration, it is good for developers to understand

  1. To verify that your account API credentials is working correctly, let’s make an authorisation token request call:

    • In order to get your API credentials - Merchant Secret Key and Merchant ID log into Merchant Back-office Sandbox and go to Home ‣ Header bar. Once there, copy your Merchant ID and continue to Merchant Secret Key widget to display and copy your Merchant Secret Key.

    • Follow the process described in the Security section.

    • If your account API credentials - Merchant Secret Key and Merchant ID are set up correctly, you receive an authorisation token.

    Note

    Your Merchant Secret Key will allow you to generate security tokens. You will need this to authorise your API calls. Copy and securely store the Merchant Secret Key in your system. If your Merchant Secret Key is lost or compromised, you will need to generate a new one.

  2. To verify that your currencies and payment methods configuration is setup, let’s see your configuration:

    • Check your currencies and payment methods configuration in the Merchant BackOffice portal. Log into Merchant Back-office Sandbox and go to Home ‣ Merchant’s Paychannels widget to see the payment options you can use to accept your payments.

    • Another way is to check your currencies and payment methods configuration through our API. Generate authorisation token - Security for this API operation POST /payins/!availablePaymentOptions use POST /payins/!availablePaymentOptions endpoint to get your currencies and payment methods configuration.

  3. To verify that your currencies and payment methods configuration is working correctly, let’s create your firts Payment:

    • Before you start accepting payments with our platform, you need to choose which method of integration you will use. Check our Incoming Payment guideline to get information about the differences between Payment Web Application and Direct integration and choose which one you prefer based on your business needs.

    • Follow the process described in our Incoming Payment guideline.

    • If your configuration is set up correctly, you will find your first payment in your Merchant Back-office Sandbox. Go to Home ‣ Payin and payout.

  4. Another testing option is to use the sample API calls we provide for each method within our API endpoints. All you need to do is insert your specific parameters, and you can test the calls from the API console or copy the cURL request and use your command line.

3. Next steps

  1. You should get to know our commonly used principles before you start your integration in Sandbox environment. They are described in the General concepts section.

  2. Check detailed description of the Outgoing Payment process integration

4. Go Live

Now you are ready to start accepting live payments. Please contact our Merchant support team: They will guide you through the Live account configuration process.

The transition from your integration to the Live account is very simple, as all you need to do is add your Live account Merchant Secret Key, Merchant ID and Live environment URLs to your integrated server.

Note

We will be in touch with you all the time during the integration process, so you can be confident whenever you make your Live account activation request.

5. Learn about payments

Terminology

We’ve listed the most commonly used terms below, and you can see a full list of our terminology here

Participants: Customer, Merchant, Platform

Payments: Payment, Incoming Payment, Outgoing Payment, Payment method, Payment operator, customer data

Security: Auth token, API credentials, Merchant code, Merchant Secret key

Payment Web Application: RedirectURL

Payments lifecycle

If you want to learn more about how payments work, you need to understand our payments lifecycle.

Regardless of the payment method, each payment goes through the same basic status sequence. The available payment statuses in the payments platform are shown below:

Payment request lifecycle

@startuml
hide empty description

skinparam State {
  StartColor #219653
  EndColor #219653
  FontColor #4C4C4C
  BorderColor #CFD8DC
  BackgroundColor #F8F8F8
  ArrowColor #000000
  FontColor<<success>> #4CAF50
  BackgroundColor #FFFFFF
  FontColor<<failure>> #E53935
  FontColor<<processing>> #F57C00
}

skinparam Activity {
  BorderColor #4C4C4C
  BackgroundColor #FFFFFF
}

state fork_state <<choice>>
[*] --> fork_state : Payment request

fork_state --> Accepted
fork_state --> Refused

state "<back:#E8F5E9>Accepted</back>" as Accepted <<success>>: 201 HTTP status returned
state "<back:#FEEBEE>Refused</back>" as Refused <<failure>>: 4xx HTTP status returned
state "<back:#FFF3E0>Processing</back>" as Processing <<processing>>

Accepted --> Processing

Processing --> Successful
Processing --> Failed

state "<back:#E8F5E9>Successful</back>" as Successful <<success>>: Callback sent
state "<back:#FEEBEE>Failed</back>" as Failed <<failure>>: Callback sent

Successful --> [*]
Failed --> [*]
@enduml

To check the status of the payment, you have a few options: you can use endpoints for getting Incoming Payment or Outgoing Payment status or login to the Merchant Back-office Sandbox and go to Home ‣ Payin and payout.

Status

Description

Accepted

A valid payment order has been received. This is the initial state for all valid payments.

Refused

An invalid payment order has been received. Such payments are not visible in Merchant Back-Office.

Processing

The payment is being processed by the customer and/or financial institution.

Successful

The payment has been successfully processed and your account balance has been changed.

Failed

The payment failed to be processed.

Incoming payment (PAYIN) integration flow

Here you can see all integration calls which needs to be done in order to process an incoming payment in both systems using our Payment Web Application.

Payin integration flow

@startuml
actor Customer
participant Merchant
participant API as Platform #99FF99
participant PaymentWebApp #99FF99

Customer -> Merchant : proceed Payment
Merchant -> Platform : get Authorization token
Platform --> Merchant : Token
Merchant -> Merchant : compile PaymentWebApp \n redirectURL
Merchant -->> Customer : RedirectURL
Customer -> PaymentWebApp : submit Payment
PaymentWebApp -> Platform : post Payment request
group If Payment method requires\nExternal Payment reference
  Customer -> PaymentWebApp : submit External Payment Reference
  PaymentWebApp -> Platform : post External Payment Reference
end
PaymentWebApp -->> Customer : return to Merchant's page
note over Platform, PaymentWebApp #FFAAAA: Payment request processing
Platform ->> Merchant : post Callback
Merchant -> Platform : get Payment status (Token)
Platform --> Merchant : Payment Detail

@enduml

Outgoing payment (PAYOUT) integration flow

Here you can see all integration calls which needs to be done in order to process an outgoing payment in both systems.

Payin integration flow

@startuml
actor Customer
participant Merchant
participant API as Platform #99FF99

Customer -> Merchant : proceed Payout
Merchant -> Platform : get Authorization token
Platform --> Merchant : Token
Merchant -> Platform : post Payment request
note over Platform #FFAAAA: Payment request processing
Platform ->> Merchant : post Callback
Merchant -> Platform : get Payment status (Token)
Platform --> Merchant : Payment Detail
@enduml