API Info

Important Notes:
  • There is a hand limit of 100 transactions per api request.
  • The system doesn't check if a transaction was already added before. If you succesfully double post a transaction to the API it will be added to the system twice. Make sure to succesfully send each transaction to the API only once!

Authentication

All requests to the API should include the X-API-TOKEN header. The value of the header is your API key. Please keep this key safe and don't share it. If you need you can always generate a new key which will automatically revoke the previous one.

API TokenYou do not have a token yet, click the Reset token button to create one.

You can view/copy your API token only once, at the time of creation.

Getting your wallets balance [GET]

You need to make a GET request to: https://play.onefinance.solutions/api/v1/account/balance

The response is a simple JSON object with the currency as the key and the balance as the value.


Getting a transaction [GET]

You need to make a GET request to: https://play.onefinance.solutions/api/v1/transaction/[id_of_transaction]

The response is a simple JSON object with 2 properties: transaction with the details of the transactions and errors with an array of errors. transactions were added succesfully.

Possible Statuses:

Note: You can get notified of status changes by subscribing to our Webhooks.

sample response [get] without errors

Copy

{
    "transaction": {
    "id": 1234,
    "reference": "REF1234",
    "currency": "EUR",
    "sum": 120.5,

Expand Code


sample response [get] with errors

Copy

{
    "transaction": null,
    "errors": [ ]
}

Getting a list of transactions [GET]

You need to make a GET request to: https://play.onefinance.solutions/api/v1/transactions

The response is a simple JSON object with 2 properties: transactions and errors. If both arrays are empty it means there are no transactions for the given request

Example GET request: https://play.onefinance.solutions/api/v1/transactions?date=2022-01-01&page=2&status-confirmed

pageInteger. 100 transactions per page

dateDate of transaction. Date range "?date=yyyy-mm-dd-yyyy-mm-dd' or single date "?date=yyyy-mm-dd'

statusStatus of transaction. Possible statuses:

typeType of transaction. Possible types:

methodMethod of transaction. Possible methods:

sample response [get] without errors

Copy

{
   "transactions": [
      {
       "ID": 11286,
       "Type": "Fee",
       "Reference": null,

Expand Code


sample response [get] with errors

Copy

    "transaction": [ ],
    "errors": [
        "invaliid type test"
    ]
}

Creating a deposit transaction [POST]

Make a POST request to: https://play.transferworld.com/api/v1/transaction/receive

The response you receive will be a simple JSON object with three properties: transaction_id, payment_url and an array of errors. If the errors array is empty, it means the transaction was added successfully.

The payment_url contains the URL of a third-party payment provider where the customer should proceed with the payment.

The body of the POST request includes a list of transaction properties in JSON format. The accepted properties are as follows (* means mandatory):

Merchant *

String. Min 1, Max 255

The name of the merchant as it appears on TransferWorld Manage merchants

Method *

String. Min 1, Max 5

The payment method to use.

  • SEPA
    The Single Euro Payments Area (SEPA). Can only be used for payments between/within the countries that are part of the SEPA zone.
  • FAST
    UK Faster Payments. Can only be used for payments within UK.

Sender Type *

The type of sender.

  • Individual
  • Corporate

Provider *

The payment provider to use. String, one of plaid.

Amount *

The deposit amount can be either an integer or a float (e.g., 100.50).

Currency *

The currency code for the deposit. String, one of EUR, GBP.

Country

Country Code2 for the deposit. String, one of GB, ES, NL, FR, IE, CA, IT, PL, DK, NO, SE, EE, LT, LV, PT. Available only for Plaid

Return URL *

A valid URL address where the customer will be redirected after completing the payment with the third-party provider.

Reference

A unique reference number for the deposit transaction. The request will be denied if a transaction with the same reference already exists in our system.

Please provide all the mandatory properties and use the correct URL and format for the POST request.

SAMPLE PLAID REQUEST BODY [POST]

Copy

      {
       "Merchant": "Services",
       "Method": "UK_FAST",
       "Sender Type": "Corporate",
       "Provider": "plaid",
       "Amount": "22",


SAMPLE RESPONSE [GET] WITHOUT ERRORS

Copy

{
    "transaction_ids": 123,
    "payment_url": "https://pay.url.com/transactions/tx_033430335f43d"
    "errors": null
}


SAMPLE RESPONSE [GET] WITH ERRORS

Copy

{
    "errors": "Reference must be unique"
}

Creating withdrawal transaction [POST]

You need to make a POST request to: https://play.onefinance.solutions/api/v1/transaction/send

The response is a simple JSON object with 2 properties: transaction_ids with an error of created transactions and errors with an array of errors. If the errors array is empty it means all transactions were added succesfully.

The body of the POST request should be an array of transactions in JSON format. The accepted properties for each transaction are show below (* means mandatory)

Note: All data must be in English. We do not support accented or latin extended characters at this moment.

Merchant *

String. Min 1, Max 255

The name of the merchant as it appears on OneFinance Manage merchants

Source*

String. Min 1, Max 255

The source to make the transfer from. Can be either "wallet" or the IBAN of your bank account or combination of bank code and account number.

For example if 123456 is sort code and 12345678 is bank account number, the value will be 12-34-56 12345678 (the spaces and dashes are ignored, you can use them for convenience).

Defaults to "wallet".

Method *

String. Min 1, Max 5

The payment method to use. Required to be filled in if source is an IBAN. Can be any of:

  • SWIFT
    International SWIFT payments (used by default for non SEPA countries). SEPA countries cannot use SWIFT as payment method, use SEPA instead.
  • SEPA
    The Single Euro Payments Area (SEPA). Can only be used for payments between/within the countries that are part of the SEPA zone.
  • FAST
    Faster Payments. Can only be used for payments within UK.

Reference*

String. Min 1, Max 255

A unique reference number of the transfer. If a transaction already exists in our systsem with this reference the request will be denied.

Comment

String. Min 1, Max 128

You can enter a short comment to help you identify this transaction.

Amount⭑

Number

The amount of the transfer - only integers or floats (e.g. 100.50)

Currency *

String. Min 3, Max 3

Currency code for the transfer. Can be one of the following: EUR, USD, GBP, AUD, ILS, ZAR, NOK

Fee Payer *

String. Min 4, Max 6

Who will pay the fee? (One of the following:)

  • full
    Merchant pays the fee
  • client
    Client pays the fee

Beneficiary*

String. Min 2, Max 255

The name of the beneficiary (validation regexp: /^[A-Z0-9,- \(\)]+$/i)

Customer Number

String. Min 1, Max 100

A reference number of the customer

Email

String. Min 3, Max 255

The email address of the beneficiary

Phone

String. Min 7, Max 15

The phone number of the beneficiary, including country code

Nationality

String. Min 2, Max 100

The nationality of the beneficiary

Date Of Birth

String. Min 2, max 255

The name of the bank

Beneficiary Type

String. Min 9, Max 10

Can be either individual or corporate

Business Registration

String. Min 1, Max 100

The registration number of the business in case of a corporate beneficiary (mandatory for Australia)

Address *

String. Min 2, Max 255

The address of the customer (validation regexp: /^[A-Z0-9,.:\-V \(\)]+$/)

City *

String. Min 2, Max 50

The city of the customer (validation regexp: /^[A-Z0-9,.:\-\ \(\)]+$/i)

State

String. Min 2, Max 255

The state or county of the customer (validation regexp: /^[A-Z0-9,.:\-V \(\)]+$/i)

Postal Code *

String. Min 2, Max 100

The post code of the customer (validation regexp: /^[A-Z0-9,.:\-V \(\)]+$/i)

Country *

String. Min 2, Max 100

The country code of the customer ISO 3166-1 alpha-2 code

Account Type*

String. Min 4, Max 14

One of the following:

  • iban
    IBAN
  • account_number
    Account Number

Account Number*

String. Min 2, Max 100

(only required if Account Type is account_number)
A national account number

IBAN *

String. Min 5, Max 34

(only required if Account Type is iban) The international IBAN number

National Bank Code Type*

String. Min 3, Max 9

(only required if Account Type is account_number) One of the following:

  • aba
    ABA code - mandatory for USA
  • bank_code
    Bank Code
  • bsb
    BSB code-mandatory for Australia
  • ncc
    NCC code - mandatory for New Zealand
  • ifsc
    IFSC
  • sort
    Sort Code
  • transit
    Transit Number & institution Number

Important note: For non IBAN transactions you must specify one of the National Bank Code Type.

National Bank Code *

String. Min 2, Max 100

(required when National Bank Code Type is used) The national bank code according to the type

SWIFT *

String. Min 8, Max 11

The SWIFT/BIC code of the bank and branch

The following fields are required but usually our system can automatically find these details when submitting IBAN, SWIFT, BSB or NCC, though we still recommend submitting them in case our system was unable to automatically detect them, as this will result in the transaction being denied. In all other cases they are mandatory and use the same validation conditions as the details of the beneficiary.

Bank Name *

String. Min 2, Max 255

The name of the bank

Branch

String. Min 2, Max 255

The name of the branch

Bank Address *

String. Min 2, Max 255

The address of the bank

Bank City*

String. Min 2, Max 50

The city of the bank

Bank State

String. Min 2, Max 255

The state or county of the bank

Bank Postal Code *

String. Min 2, Max 100

The postal code of the bank

Bank Country*

String. Min 2, Max 100

The country of the bank

Response Samples

sample response [get] without errors

Copy

{
    "transaction_ids": [1, 2 ],
    "errors": [ ]
}

Expand Code


sample response [get] with errors

Copy

{
    "transaction_ids": [ ],
    "errors": {
        "line 1": ["Sorry, not enough funds to perform the operation"]
        "line 2": ["The Bank Name field is required.","The Bank Name field is required.","The Bank City field is required.","The Bank Postal Code field is required.","The Bank Postal Code field is required.",]
}

Note: The line numbers in the errors array corollate to the index+1 of the transaction in the array of transactions in the request body.

PHP

Example use of php

Copy

<?php

//get CURL resource
$ch = Cur_init();

// set url

Expand Code

Elixir

Example use of Elixir

Copy

defmodule SendRequest do
@moduledoc """
First, make sure you add HTTPoison to your mix.exs dependencies:

def deps do
[

Expand Code

Ruby

Example use of Ruby

Copy

require 'net/http'
require 'net/https'
require 'json'

#Request Sample (POST)
def send_reques

Expand Code

Node

Example use of Node

Copy

// request Request Sample
(function(callback ){
'use strict';

const httpTransport = require('https');
const responseEncoding = 'utf8';

Expand Code