Account-Switch and Payments

Here is an example of how account switch and payment jobs could be handled

Job Code

Job Type / Scope

Purpose

Input

What it returns

EnsureConnection

Write

(Inject fields)

Authenticate with the external service and obtain an access token.
Also used to keep a session open.

  • Username
  • Password
  • Source GUID
  • Access token

FetchBalance

Read

(Retrieve data as JSON)

Retrieve the user's current balance.

  • Access token
  • Current balance

FetchPaymentMethods

Read

(Retrieve data as JSON)

List available payment methods for the user.

  • Access token
  • A list of all payment
    methods available to the user.

MakePayment

Write

(Inject fields)

Make a payment.

  • Access token
  • Amount
  • Payment method ID (optional)
  • Message
  • Confirmation ID

AddPaymentMethod

Write

(Inject fields)

Add a new
payment method.

  • Access token
  • Routing number
  • Account number
  • Account holder
  • Account type
  • Billing address
  • Bank address
  • Is it a business?
  • Set as default?
  • Message
  • Pay Method ID

CloseConnection

Write

(Trigger action)

End the session
with the external service.

  • Access token
  • Delete credentials

NOTES ABOUT THE ENDPOINT

The main endpoint that will be called is /api/v1/jobs/submit.This endpoint will allow you to submit a job. When calling the endpoint through our API, the results of the job are delivered via webhooks.

To use the API, you'll need to choose a Job Code according to your needs (see table). For example, if you are trying to make a connection to a provider, you would use the Job Code "EnsureConnection". If you are trying to make a payment, you would use the Job Code "MakePayment".

You will then need to provide the request parameters required for the endpoint to do its work. This input is different for every type of Job you are trying to accomplish. For example, if you are trying to make a payment, you will require the access token returned by the webhook during your initial connection, input the amount you are going to pay, and choose the payment method you will be using.

Once all the parameters are filled-in, the endpoint will do the rest!

IMPORTANT: If you try to perform a Job while another one is already in progress on the same account, it will be automatically blocked, and an error message will be displayed with the Job_Id that is already running.

In this case, the endpoint will return a 409 response that looks like this:

{
   "job_id": "b35aa2af-41e4-4833-95c9-9efd2069e70c",
   "message": "Job b35aa2af-41e4-4833-95c9-9efd2069e70c is already running"
}