Transactions

When making API requests to our system, it is important to include the authorization token in the Authorization header to authenticate your requests. The correct format for including the token is:

Authorization: Bearer ${ACCESS_TOKEN}

For detailed information on obtaining and using access tokens, please refer to the Authentication section of our documentation.

Create a transaction

This endpoint allows you to create a new transaction in the Skyline Digital system. To create a transaction, you must provide a payload that includes the following fields:

FieldTypeDescription

token

string

The token to be used for the payment.

walletAddress

string

The wallet address where the transaction will be sent from. This wallet must belong to the authenticated user

chainId

number

The chain ID of the blockchain network where the transaction will be executed.

payments

Array

An array of payment objects.

isDraft

boolean

Create transaction as a draft

Payments

The payments object is where you define each payment that needs to be made in your transaction. Below is an explanation of each field within the payments object:

FieldTypeDescription

receiver

Object

The receiver where the payment will be sent to.

bankAccount

Object

The bank account where the payment will be sent to.

amountFiat

string

The amount of fiat currency to be paid.

currencyIsoCode

string

The ISO code of the fiat currency to be paid.

reason

string

Generic field users use to input why they are making a payment (eg: paying a contractor)

instructions

string

Reference type field that users can use to input invoice numbers, reference IDs or account numbers for Omnibus accounts

documentS3Key

string

(Optional) S3 Key for the payment document.

There are several ways to create a transaction. You can provide the receiver ID, create a new receiver in the payment request, or specify the bank account ID. Below are some example payloads that illustrate these options:

To create a transaction by passing an existing bank account ID, use the following payload:

BankAcc Id
{
      "token": "USDC",
      "walletAddress": "0x0000000000000000000000000000000000000000",
      "chainId": 5,
      "payments": [
        {
          "bankAccount": {
            "id": "63f8b55d30d63f38e1caac89"
          },
          "amountFiat": "1000",
          "currencyIsoCode": "USD",
          "reason": "Salary for the month of June",
          "instructions": "omnibus account: 523234"          
        }
      ]
}

If the bank account ID is provided, the system will check if the bank account exists and belongs to a receiver owned by the currently authenticated user.

If the bank account ID is not provided, specify the receiver and bank account, for example:

New Receiver, new BankAcc
{
      "token": "USDC",
      "walletAddress": "0x0000000000000000000000000000000000000000",
      "chainId": 5,
      "payments": [
        {
          "receiver": {
            "firstName": "John",
            "lastName": "Mayer",
            "address": "123 Main St.",
            "type": "INDIVIDUAL",
            "countryIsoCode": "US",
            "email": "john.mayer@example.com"
          },
          "bankAccount": {
            "accountNumber": "1234567890",
            "bicSwift": "ICBCUSBJ"
          },
          "amountFiat": "1000",
          "currencyIsoCode": "USD",
          "reason": "Salary for the month of June"
        }
      ]
}

The system will first try to find if the receiver is already created by checking if the email and currency combination already exists. If the receiver is not created, it will create the receiver and then create the bank account associated with the receiver.

{
      "token": "USDC",
      "walletAddress": "0x0000000000000000000000000000000000000000",
      "chainId": 5,
      "payments": [
        {
          "receiver": {
            "id": "642312c96eb191e45530ea2d"
          },
          "bankAccount": {
            "accountNumber": "1234567890",
            "bicSwift": "ICBCUSBJ"
          },
          "amountFiat": "1000",
          "currencyIsoCode": "USD",
          "reason": "Salary for the month of June"
        }
      ]
}
  • If you provide a receiver ID, we'll check if it exists in our system. If it doesn't, we'll return an error message.

  • If the receiver ID you provided does exist, we'll check if the bank account number and currency you provided belong to that receiver. If they don't, we'll create a new bank account for that receiver with the information provided in the payload.

Some payments in your transaction may fail while others may succeed. For this reason, we only throw errors as described in Table below. However, for any errors not listed in Table, you can find information in the statusInfo field of each payment in your transaction, which will give you more details about the status of each payment

Transaction PartnerId header

If the user provides the partner Mongo object ID in the optional header field,parterId, the transaction will be executed under the assumption that it was not created on our platform.

Transaction Errors

ErrorStatus CodeDescription

Token not supported

403

token is not supported by our system.

No payments

403

no payments were provided

Error creating payments, check payment details

400

There was an error creating the payments associated with the transaction. Check the payment details for errors.

Payment Errors

Description

Currency not supported

The specified currency is not supported by the system.

Country not supported

The specified receiver country is not supported by the system.

Bank account not found

The specified bank account id could not be found.

Receiver not found

The specified receiver id could not be found.

Receiver type is required

The type of the receiver is required.

Receiver email is required

The email of the receiver is required.

Receiver address is required

The address of the receiver is required.

Receiver country is required

The country of the receiver is required.

Bank account number is required

The bank account number is required.

Bank account bic swift is required

The BIC/SWIFT code for the bank account is required.

Trading pair not supported

The trading pair specified is not supported.

Wallet address not valid

The wallet address provided is not valid.

Token not supported

The specified token is not supported by the system.

Unable to find quotes, please try again in a few seconds

Unable to find quotes for the Payment at this time, please try again later.

Last updated