Apto Mobile API (1.0)

Welcome to the Apto B2C API reference.

Apto provides an easy way to access different financial services in a unified and easy to use API. The Apto Platform is designed around a set of core services focused in team management, project / product handling, user account management, user data verification and cards management. On top of these features, different financial services are offered. The list of financial services offered by the Apto Platform will be improved adding more services in the future.

The Apto platform offers a set of APIs that are designed to cover different integration scenarios:

  • B2C API. This API is designed to be used from a final user application interacting with the Apto platform. Examples of this are native applications (iOS, Android) or websites. This document describes the Apto B2C API.
  • B2B API. This API is designed to be used in a backend to backend integration with the Apto platform. You can find more information about the Apto B2B API here

We’ve tried to make this documentation as straightforward as possible and provide clear example code, but please drop us a line with any questions you may have.

The Apto B2C API is architected around REST, and uses HTTP verbs and unique URI's to access the different resources. It uses HTTP response codes to indicate status and errors. All responses come in standard JSON. The Apto B2C API is served over HTTPS to ensure data privacy; HTTP is not supported

Verifications

How user is verified to access the API resources

Starts a verification

post/v1/verifications/start
/v1/verifications/start

Starts a verification returning its ID and status

Request Body schema: application/json
One of
  • VerificationEmailDataPoint
  • VerificationDobDataPoint
  • VerificationPhoneDataPoint
datapoint_type
required
string
Value: "email"
datapoint
required
object

Responses

200

successful operation

400

Invalid request

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "datapoint_type": "email",
  • "datapoint":
    {
    • "email": "tony.stark@aptopayments.com"
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "verification",
  • "verification_id": "entity_27288bc122db1339",
  • "status": "pending"
}

Finish a verification

post/v1/verifications/{verification_id}/finish
/v1/verifications/{verification_id}/finish

Finish a verification returning its ID and status

path Parameters
verification_id
required
string <entity_{0-9a-f}>

ID of verification

Request Body schema: application/json
secret
required
string

Responses

200

successful operation

400

Invalid request

404

No existing verification

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "secret": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "verification",
  • "verification_id": "entity_27288bc122db1339",
  • "status": "pending"
}

Restarts a verification

post/v1/verifications/{verification_id}/restart
/v1/verifications/{verification_id}/restart

Restarts a verification returning a new ID and status

path Parameters
verification_id
required
string <entity_{0-9a-f}>

ID of verification

Responses

200

successful operation

400

Invalid request

404

No existing verification

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "verification",
  • "verification_id": "entity_27288bc122db1339",
  • "status": "pending"
}

Retrieves a verification

get/v1/verifications/{verification_id}/status
/v1/verifications/{verification_id}/status

Retrieves a verification returning its ID and status

path Parameters
verification_id
required
string <entity_{0-9a-f}>

ID of verification

Responses

200

successful operation

400

Invalid request

404

No existing verification

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "verification",
  • "verification_id": "entity_27288bc122db1339",
  • "status": "pending"
}

Users

All about users and users data management

Creates a user

post/v1/user
/v1/user

Creates a user and its initial data

Request Body schema: application/json
data_points
required
object

Responses

200

successful operation

400

Invalid request

401

User session expired when trying to create a user with the same data more then once

404

No existing verification

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data_points":
    {
    • "type": "list",
    • "data":
      [
      • {
        }
      ]
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "user",
  • "user_id": "crdhldr_b04f29605a018f7d72a2",
  • "user_token": "E5PWX4T9dcPriIo ... ao0QZLC6YL/dAyaA8",
  • "user_data":
    {
    • "type": "list",
    • "data":
      [
      • {
        }
      ],
    • "page": 0,
    • "rows": 5,
    • "has_more": true,
    • "total_rows": 10
    }
}

Updates a user

put/v1/user/{user_id}
/v1/user/{user_id}

Updates a user data

path Parameters
user_id
required
string <entity_{0-9a-f}>

User unique ID

Request Body schema: application/json
data_points
required
object

Responses

200

successful operation

400

Invalid request

404

User does not exist

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data_points":
    {
    • "type": "list",
    • "data":
      [
      • {
        }
      ]
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "user",
  • "user_id": "crdhldr_b04f29605a018f7d72a2",
  • "user_token": "E5PWX4T9dcPriIo ... ao0QZLC6YL/dAyaA8",
  • "user_data":
    {
    • "type": "list",
    • "data":
      [
      • {
        }
      ],
    • "page": 0,
    • "rows": 5,
    • "has_more": true,
    • "total_rows": 10
    }
}

Retrieves a user

get/v1/user/{user_id}
/v1/user/{user_id}

Retrieves a user and its data

path Parameters
user_id
required
string <entity_{0-9a-f}>

User unique ID

Responses

200

successful operation

400

Invalid request

404

User does not exist

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "user",
  • "user_id": "crdhldr_b04f29605a018f7d72a2",
  • "user_token": "E5PWX4T9dcPriIo ... ao0QZLC6YL/dAyaA8",
  • "user_data":
    {
    • "type": "list",
    • "data":
      [
      • {
        }
      ],
    • "page": 0,
    • "rows": 5,
    • "has_more": true,
    • "total_rows": 10
    }
}

User login

post/v1/user/login
/v1/user/login

Login user into the system and returns its ID and access token

Request Body schema: application/json
verifications
required
object

Responses

200

successful operation

400

Invalid request

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "verifications":
    {
    • "type": "list",
    • "data":
      [
      • {
        },
      • {
        }
      ]
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "user_id",
  • "user_id": "crdhldr_b04f29605a018f7d72a2",
  • "user_token": "E5PWX4T9dcPriIo ... ao0QZLC6YL/dAyaA8"
}

Cards

Create and manage user's cards

Issues a card

post/v1/user/accounts/issuecard
/v1/user/accounts/issuecard

Issues a new card for the user

Request Body schema: application/json
type
required
string
Value: "card"
balance_version
required
string
Enum: "v1" "v2"
card_product_id
string Nullable ^entity_[0-9a-f]{16}$

Mandatory if more than one available

balance_store
object Nullable

Responses

200

successful operation

400

Invalid request

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "card",
  • "balance_version": "v1",
  • "card_product_id": "entity_entity_ed56f762f2c407fa",
  • "balance_store":
    {
    • "type": "custodian",
    • "custodian_type": "coinbase",
    • "credential":
      {
      • "type": "credential",
      • "credential_type": "oauth",
      • "access_token": "3a1psty6xga9qhbbjp7j95sisw69pqfl02zxmwlfg2ryqnoz23ucygxfusfw7qvb",
      • "refresh_token": "nllp1sr5p2jzqhx4geosztae63rk3hqe5dfbe254dil0wr5boe7bpinuhjqku17f"
      }
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "card",
  • "account_id": "crd_98hnhu9sc7i9ay73375",
  • "last_four": "1234",
  • "card_network": "VISA",
  • "card_brand": "Marvel Card",
  • "card_issuer": "Apto Payments",
  • "expiration": "2021-03",
  • "pan": "4000123456739010",
  • "cvv": "123",
  • "state": "active",
  • "kyc_status": "resubmit_details",
  • "kyc_reason": "Please contact customer service to check your ID documents",
  • "spendable_today":
    {
    • "currency": "USD",
    • "amount": "1457.87"
    },
  • "native_spendable_today":
    {
    • "currency": "USD",
    • "amount": "1457.87"
    },
  • "total_balance":
    {
    • "currency": "USD",
    • "amount": "1457.87"
    },
  • "native_total_balance":
    {
    • "currency": "USD",
    • "amount": "1457.87"
    },
  • "ordered_status": "ordered",
  • "cardholder_first_name": "Anthony",
  • "cardholder_last_name": "Stark",
  • "issued_at": "2019-07-30T07:03:55+00:00",
  • "name_on_card": "TONY STARK",
  • "features":
    {
    • "get_pin":
      {
      • "status": "enabled",
      • "type": "IVR",
      • "ivr_phone":
        {