Shasta API Reference

Welcome to Shasta API documentation. Here you will find the different available api calls and the taxonomy of the objects involved. If in trouble, please, contact us at the provided support email. Further documentation with examples is available in https://guides.payments.shasta.me

API Endpoint
https://api.payments.shasta.me/v1
Contact: hello@shasta.me
Schemes: https
Version: 1.0.0

Pagination

The API uses cursor-based pagination. All list endpoints return data in reverse chronological order, and have the following common structure:

GET parameters

  • limit: How many items to fetch, between 1 and 100, default 10.
  • cursor: Value of cursor_next from a previous request. If not given, it will fetch the most recent items.

Response data

  • data: The received items, in a JSON array.
  • has_next: Whether there are more items to fetch.
  • cursor_next: Cursor to fetch the next page of items. Only present if has_next is true.

Meta

Most API objects have a meta field you can use to store your own key-value data. For example, you can store a user's full name, or mappings to primary key IDs from your own database.
Metadata is not used by the API in any way.
Modifying these keys via the API is perfectly fine, and can be very useful. For example, creating an account via API with a name that will be displayed in the dashboard.

Authentication

Authentication The API uses HTTP Bearer for its authentication. Both an Authorization header with type Bearer and the API key must be included. For example:

Authorization: Bearer ckey_xxxx... 

There are two kind of API keys:

  • Private key (prefix key_): Are allowed to do everything in your Project. Only to be used from server-side code. Cannot be embedded to apps or websites.
  • Public key (prefix ckey_): Are only allowed to create card tokens. Can safely be embedded to your app or website to be used with client-side SDKs.

General

Value: object
All the monetary values in the API are represented with Value objects, consisting of an amount and a currency.

  • currency: Currency of the amount
  • amount: Amount, represented in the smallest currency units as an integer. For example, cents for Euro amounts.

Projects

Shasta Payments APIs work as a Project that includes everything (Cards, Transactions, etc.). The keys of each API also belong to a Project, which gives access only to the objects pertaining to said Project.

Normally a single Project is enough, but it might be useful to separate multiple operations into several projects to get finer-grained privilege separation.

Get project

GET /project

Get a project

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (ProjectID)",
  "created_at": "string (date-time)",
  "default_card_payin_instant_account_id": "string (AccountID)",
  "default_card_payin_fee_account_id": "string (AccountID)",
  "card_payin_fee": "0.01",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit project

PATCH /project

Edit project

default_card_payin_instant_account_id: string (AccountID)
meta: Meta
Request Example
{
  "default_card_payin_instant_account_id": "string (AccountID)",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (ProjectID)",
  "created_at": "string (date-time)",
  "default_card_payin_instant_account_id": "string (AccountID)",
  "default_card_payin_fee_account_id": "string (AccountID)",
  "card_payin_fee": "0.01",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Accounts

An Account is where funds are stored.

Each account has its own currency and can only store funds in said currency. To store funds in several different currencies, multiple accounts must be created. Free account creation and maintenance allows having an infinite number of accounts. Some setup suggestions are:

  • One account per user with their funds, for a standard e-wallet app.
  • Many accounts in many currencies per user, if you want to allow your users to hold many currencies and exchange between them.
  • Two accounts per user: one for available funds and another for "held" funds. There is no need for creating an account for each of the users. For example, for a marketplace service it might be enough to create accounts only for the sellers, and perform charges from the buyers' cards directly to the sellers' accounts.

Accounts can have negative balance if the allow_negative_balance flag is setted, as long as the sum of balances of all accounts in the Project is positive, calculated separately per currency.

List accounts

GET /accounts

List accounts

limit: integer
in query

(no description)

cursor: string
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (AccountID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "customer_id": "string (CustomerID)",
      "balance": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "auto_bank_payout": {
        "min_balance": {
          "currency": "EUR",
          "amount": "102.53"
        },
        "bank_account_id": "string (BankAccountID)",
        "concept": "string (string)"
      },
      "allow_negative_balance": false,
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Create account

POST /accounts

Create account

currency: Currency
allow_negative_balance: boolean false
customer_id: string (CustomerID) null
auto_bank_payout: AutoBankPayout
meta: Meta
Request Example
{
  "currency": "EUR",
  "allow_negative_balance": false,
  "customer_id": "string (CustomerID)",
  "auto_bank_payout": {
    "min_balance": {
      "currency": "EUR",
      "amount": "102.53"
    },
    "bank_account_id": "string (BankAccountID)",
    "concept": "string (string)"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (AccountID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "balance": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "auto_bank_payout": {
    "min_balance": {
      "currency": "EUR",
      "amount": "102.53"
    },
    "bank_account_id": "string (BankAccountID)",
    "concept": "string (string)"
  },
  "allow_negative_balance": false,
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Get account

GET /accounts/{account_id}

Get account

account_id: string (AccountID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (AccountID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "balance": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "auto_bank_payout": {
    "min_balance": {
      "currency": "EUR",
      "amount": "102.53"
    },
    "bank_account_id": "string (BankAccountID)",
    "concept": "string (string)"
  },
  "allow_negative_balance": false,
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit account

PATCH /accounts/{account_id}

Edit account

allow_negative_balance: boolean false
meta: Meta
account_id: string (AccountID)
in path

(no description)

Request Example
{
  "allow_negative_balance": "boolean",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (AccountID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "balance": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "auto_bank_payout": {
    "min_balance": {
      "currency": "EUR",
      "amount": "102.53"
    },
    "bank_account_id": "string (BankAccountID)",
    "concept": "string (string)"
  },
  "allow_negative_balance": false,
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Transactions

Transactions are balance changes in an account.

A transaction does only affect one account, therefore, any operation that involve multiple accounts will imply multiple transactions. For example, doing a Transfer of 20 EUR from one account to another creates a transaction of -20 EUR on the source and another one of +20 EUR on the destination.

The cause of a transaction is revealed by the type field and the several _id fields.

All transactions are definitive, meaning that once a transaction is done, it can’t be "reverted" or "disappear".

List transactions

GET /transactions

List transactions

limit: integer
in query

(no description)

cursor: string
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (TransactionID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "account_id": "string (AccountID)",
      "type": "string",
      "value": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "balance_after": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "transfer_id": "string (TransferID)",
      "card_payin_id": "string (CardPayinID)",
      "card_payin_refund_id": "string (CardPayinRefundID)",
      "bank_payin_id": "string (BankPayinID)",
      "bank_payout_id": "string (BankPayoutID)"
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

List account transactions

GET /accounts/{account_id}/transactions
limit: integer
in query

(no description)

cursor: string
in query

(no description)

account_id: string (AccountID)
in path

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (TransactionID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "account_id": "string (AccountID)",
      "type": "string",
      "value": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "balance_after": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "transfer_id": "string (TransferID)",
      "card_payin_id": "string (CardPayinID)",
      "card_payin_refund_id": "string (CardPayinRefundID)",
      "bank_payin_id": "string (BankPayinID)",
      "bank_payout_id": "string (BankPayoutID)"
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Get transaction

GET /transactions/{transaction_id}
transaction_id: string (TransactionID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (TransactionID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "type": "string",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "balance_after": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "transfer_id": "string (TransferID)",
  "card_payin_id": "string (CardPayinID)",
  "card_payin_refund_id": "string (CardPayinRefundID)",
  "bank_payin_id": "string (BankPayinID)",
  "bank_payout_id": "string (BankPayoutID)"
}

Customers

A Customer represents a customer of the service. Accounts, Cards and BankAccounts can be attached to it.

In case the service is using Shasta Payments APIs to hold the users’ funds, that making it subject to KYC/AML regulations, a Customer for each one of the customers must be created, attaching all of their accounts, cards and bank accounts to it and filling in the necessary KYC information in the Customer object.

Depending on the nature of the service, the role of the customer if applicable (e.g.: seller vs buyer), and the volume of funds transacted, the required KYC information may vary.

Customer objects can still be used for convenience even if the service is not subject to KYC/AML, as it can be useful to organize accounts, cards and bank accounts, and storing metadata in the customer.

List customers

GET /customers
limit: integer
in query

(no description)

cursor: string
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (CustomerID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "first_name": "Javier",
      "last_name": "Hernandez",
      "email_address": "javi@example.com",
      "phone_number": "string",
      "nationality": "ES",
      "employment_status": "self_employed",
      "address": {
        "line_1": "Avenida Omejos, 5",
        "line_2": "Atico 2a",
        "postal_code": "08291",
        "city": "L'Hospitalet de Llobregat",
        "region": "Barcelona",
        "country": "ES"
      },
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Create customer

POST /customers
first_name: string
last_name: string
email_address: string
phone_number: string
nationality: string
employment_status: string student, employed, self_employed, searching, not_employed
address: Address
meta: Meta
Request Example
{
  "first_name": "Javier",
  "last_name": "Hernandez",
  "email_address": "javi@example.com",
  "phone_number": "string",
  "nationality": "ES",
  "employment_status": "self_employed",
  "address": {
    "line_1": "Avenida Omejos, 5",
    "line_2": "Atico 2a",
    "postal_code": "08291",
    "city": "L'Hospitalet de Llobregat",
    "region": "Barcelona",
    "country": "ES"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CustomerID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "first_name": "Javier",
  "last_name": "Hernandez",
  "email_address": "javi@example.com",
  "phone_number": "string",
  "nationality": "ES",
  "employment_status": "self_employed",
  "address": {
    "line_1": "Avenida Omejos, 5",
    "line_2": "Atico 2a",
    "postal_code": "08291",
    "city": "L'Hospitalet de Llobregat",
    "region": "Barcelona",
    "country": "ES"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Get customer

GET /customers/{customer_id}
customer_id: string (CustomerID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CustomerID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "first_name": "Javier",
  "last_name": "Hernandez",
  "email_address": "javi@example.com",
  "phone_number": "string",
  "nationality": "ES",
  "employment_status": "self_employed",
  "address": {
    "line_1": "Avenida Omejos, 5",
    "line_2": "Atico 2a",
    "postal_code": "08291",
    "city": "L'Hospitalet de Llobregat",
    "region": "Barcelona",
    "country": "ES"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit customer

PATCH /customers/{customer_id}
first_name: string
last_name: string
email_address: string
phone_number: string
nationality: string
employment_status: string student, employed, self_employed, searching, not_employed
address: Address
meta: Meta
customer_id: string (CustomerID)
in path

(no description)

Request Example
{
  "first_name": "Javier",
  "last_name": "Hernandez",
  "email_address": "javi@example.com",
  "phone_number": "string",
  "nationality": "ES",
  "employment_status": "self_employed",
  "address": {
    "line_1": "Avenida Omejos, 5",
    "line_2": "Atico 2a",
    "postal_code": "08291",
    "city": "L'Hospitalet de Llobregat",
    "region": "Barcelona",
    "country": "ES"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CustomerID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "first_name": "Javier",
  "last_name": "Hernandez",
  "email_address": "javi@example.com",
  "phone_number": "string",
  "nationality": "ES",
  "employment_status": "self_employed",
  "address": {
    "line_1": "Avenida Omejos, 5",
    "line_2": "Atico 2a",
    "postal_code": "08291",
    "city": "L'Hospitalet de Llobregat",
    "region": "Barcelona",
    "country": "ES"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Transfers

A Transfer is an internal transfer between two Accounts.

If the two accounts involved in the transfer are set with different currencies, a currency exchange operation will be automatically performed, with the process still being always free.

Transfers with a currency exchange do incur in foreign exchange costs based on market conditions (there is a "spread", which means the current best buy price is slightly higher than the current best sell price.)

List transfers

GET /transfers
limit: integer
in query

(no description)

cursor: integer
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (TransferID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "source_account_id": "string (AccountID)",
      "source_transaction_id": "string (TransactionID)",
      "destination_account_id": "string (AccountID)",
      "destination_transaction_id": "string (TransactionID)",
      "value": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Create transfer

POST /transfers
source_account_id: string (AccountID)
destination_account_id: string (AccountID)
value: Value
meta: Meta
Request Example
{
  "source_account_id": "string (AccountID)",
  "destination_account_id": "string (AccountID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (TransferID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "source_account_id": "string (AccountID)",
  "source_transaction_id": "string (TransactionID)",
  "destination_account_id": "string (AccountID)",
  "destination_transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Get transfer

GET /transfers/{transfer_id}
transfer_id: string (TransferID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (TransferID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "source_account_id": "string (AccountID)",
  "source_transaction_id": "string (TransactionID)",
  "destination_account_id": "string (AccountID)",
  "destination_transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit transfer

PATCH /transfers/{transfer_id}
meta: Meta
transfer_id: string (TransferID)
in path

(no description)

Request Example
{
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (TransferID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "source_account_id": "string (AccountID)",
  "source_transaction_id": "string (TransactionID)",
  "destination_account_id": "string (AccountID)",
  "destination_transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Card Tokens

According to PCI DSS security regulations, every service handling card numbers must pass PCI audits and certifications.

Shasta Payments allows to use CardTokens to send the card data directly from the client app or website, freeing the server of ever seeing the card data, effectively freeing it from PCI DSS compliance.

How it works:

  • Generate a "token key", which is a special kind of API key that only has permissions to create tokens.
  • Embed the token key into the client app or website.
  • When a customer enters a card, do a Create Token request from the client.
  • Send the CardToken ID to the service’s servers
  • From the service’s servers, use the token ID to create a Card or a CardPayin.

Each CardToken has only one use and expires 10 minutes after its creation.

If just a single payment is needed, use of the token should be made to create a CardPayin.

If wanted to store the card for multiple/recurring payments, make use of the token to create a Card. The created Card doesn't expire and can be used for multiple CardPayins.

Create card token

POST /acquiring/card_tokens
card_info: CardInfo
Request Example
{
  "card_info": {
    "number": "4321432143214321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "cvv": "987"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CardTokenID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  }
}

Get card token

GET /acquiring/card_tokens/{card_token_id}
card_token_id: string (CardTokenID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CardTokenID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  }
}

Cards

Shasta Payments servers safely encrypt the information each Card holds.

This automatic storage of the card information allows to always have ready the usage of the card for future or recurring payments, which frees from having to store the information manually, which would imply PCI DSS compliance.

List cards

GET /acquiring/cards
limit: integer
in query

(no description)

cursor: integer
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (CardID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "customer_id": "string (CustomerID)",
      "card_info": {
        "number": "432143******4321",
        "expiration_month": 12,
        "expiration_year": 2020,
        "brand": "visa"
      },
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Create card

POST /acquiring/cards
customer_id: string (CustomerID) null
card_token_id: string (CardTokenID)
card_info: CardInfo
meta: Meta
Request Example
{
  "customer_id": "string (CustomerID)",
  "card_token_id": "string (CardTokenID)",
  "card_info": {
    "number": "4321432143214321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "cvv": "987"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CardID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Get card

GET /acquiring/cards/{card_id}
card_id: string (CardID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CardID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit card

PATCH /acquiring/cards/{card_id}
meta: Meta
card_id: string (CardID)
in path

(no description)

Request Example
{
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CardID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Card Payins

To charge a credit or a debit card, you create a Card Payin object. You can retrieve and refund individual charges as well as list all charges. Charges are identified by a unique, random ID.
Card payin flows for 3D secure are as follows.
- First, create a card payin (POST /acquiring/card_payins),
make sure is_secure is set to true, and secure_redirect_url to a redirect URI of choice, response will have a secure_start_url field which leads to a secure authentication page.
- Redirect your user to that page. Once the authentication has finished and is successfull, the page will redirect to secure_redirect_url.
- Then call the Finish card payin endpoint (POST /acquiring/card_payins/{card_payin_id}/finish).
Note that after a card payin is done, the value will not be reflected in the account unless the card payin was done with the is_instant parameter set to true. See the Schema Definition for usage.

List card payins

GET /acquiring/card_payins
limit: integer
in query

(no description)

cursor: integer
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (CardPayinID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "card_id": "string (CardID)",
      "card_info": {
        "number": "432143******4321",
        "expiration_month": 12,
        "expiration_year": 2020,
        "brand": "visa"
      },
      "account_id": "string (AccountID)",
      "transaction_id": "string (TransactionID)",
      "value": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "state": "string",
      "is_secure": "bool",
      "secure_start_url": "string",
      "secure_redirect_url": "string",
      "is_instant": "bool",
      "instant_account_id": "string (AccountID)",
      "instant_authorized_transaction_id": "string (TransactionID)",
      "instant_settled_transaction_id": "string (TransactionID)",
      "fee_account_id": "string (AccountID)",
      "refunded_value": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Create card payin

POST /acquiring/card_payins
account_id: string (AccountID)
value: Value
card_info: CardInfo
card_token_id: string (CardTokenID)
card_id: string (CardID)
is_secure: bool
secure_redirect_url: string
is_instant: bool
instant_account_id: string (AccountID)
fee_account_id: string (AccountID)
meta: Meta
Request Example
{
  "account_id": "string (AccountID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "card_info": {
    "number": "4321432143214321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "cvv": "987"
  },
  "card_token_id": "string (CardTokenID)",
  "card_id": "string (CardID)",
  "is_secure": "bool",
  "secure_redirect_url": "string",
  "is_instant": "bool",
  "instant_account_id": "string (AccountID)",
  "fee_account_id": "string (AccountID)",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CardPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_id": "string (CardID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "state": "string",
  "is_secure": "bool",
  "secure_start_url": "string",
  "secure_redirect_url": "string",
  "is_instant": "bool",
  "instant_account_id": "string (AccountID)",
  "instant_authorized_transaction_id": "string (TransactionID)",
  "instant_settled_transaction_id": "string (TransactionID)",
  "fee_account_id": "string (AccountID)",
  "refunded_value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Get card payin

GET /acquiring/card_payins/{card_payin_id}
card_payin_id: string (CardPayinID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CardPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_id": "string (CardID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "state": "string",
  "is_secure": "bool",
  "secure_start_url": "string",
  "secure_redirect_url": "string",
  "is_instant": "bool",
  "instant_account_id": "string (AccountID)",
  "instant_authorized_transaction_id": "string (TransactionID)",
  "instant_settled_transaction_id": "string (TransactionID)",
  "fee_account_id": "string (AccountID)",
  "refunded_value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit card payin

PATCH /acquiring/card_payins/{card_payin_id}
meta: Meta
card_payin_id: string (CardPayinID)
in path

(no description)

Request Example
{
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CardPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_id": "string (CardID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "state": "string",
  "is_secure": "bool",
  "secure_start_url": "string",
  "secure_redirect_url": "string",
  "is_instant": "bool",
  "instant_account_id": "string (AccountID)",
  "instant_authorized_transaction_id": "string (TransactionID)",
  "instant_settled_transaction_id": "string (TransactionID)",
  "fee_account_id": "string (AccountID)",
  "refunded_value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Finish card payin

POST /acquiring/card_payins/{card_payin_id}/finish
card_payin_id: string (CardPayinID)
in path

(no description)

Request Example
{}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (CardPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_id": "string (CardID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "state": "string",
  "is_secure": "bool",
  "secure_start_url": "string",
  "secure_redirect_url": "string",
  "is_instant": "bool",
  "instant_account_id": "string (AccountID)",
  "instant_authorized_transaction_id": "string (TransactionID)",
  "instant_settled_transaction_id": "string (TransactionID)",
  "fee_account_id": "string (AccountID)",
  "refunded_value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

List card payin refunds

GET /acquiring/card_payin_refunds
limit: integer
in query

(no description)

cursor: integer
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (CardPayinID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "account_id": "string (AccountID)",
      "card_payin_id": "string (CardPayinID)",
      "transaction_id": "string (TransactionID)",
      "value": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "state": "string",
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Create card payin refund

POST /acquiring/card_payin_refunds
card_payin_id: string (AccountID)
meta: Meta
Request Example
{
  "card_payin_id": "string (AccountID)",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

undefined

Response Example (200 OK)
{
  "id": "string (CardPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "card_payin_id": "string (CardPayinID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "state": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Get card payin refund

GET /acquiring/card_payin_refunds/{card_payin_refund_id}
card_payin_refund_id: string (CardPayinRefundID)
in path

(no description)

undefined

Response Example (200 OK)
{
  "id": "string (CardPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "card_payin_id": "string (CardPayinID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "state": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit card payin refund

PATCH /acquiring/card_payin_refunds/{card_payin_refund_id}
meta: Meta
card_payin_refund_id: string (CardPayinRefundID)
in path

(no description)

Request Example
{
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

undefined

Response Example (200 OK)
{
  "id": "string (CardPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "card_payin_id": "string (CardPayinID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "state": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Card Verifications

List card verifications

GET /acquiring/card_verifications
limit: integer
in query

(no description)

cursor: integer
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (CardVerificationID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "card_id": "string (CardID)",
      "card_info": {
        "number": "432143******4321",
        "expiration_month": 12,
        "expiration_year": 2020,
        "brand": "visa"
      },
      "is_secure": "bool",
      "secure_start_url": "string",
      "secure_redirect_url": "string",
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Create card verification

POST /acquiring/card_verifications
card_info: CardInfo
card_token_id: string (CardTokenID)
card_id: string (CardID)
is_secure: bool
secure_redirect_url: string
meta: Meta
Request Example
{
  "card_info": {
    "number": "4321432143214321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "cvv": "987"
  },
  "card_token_id": "string (CardTokenID)",
  "card_id": "string (CardID)",
  "is_secure": "bool",
  "secure_redirect_url": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

undefined

Response Example (200 OK)
{
  "id": "string (CardVerificationID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_id": "string (CardID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "is_secure": "bool",
  "secure_start_url": "string",
  "secure_redirect_url": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Get card verification

GET /acquiring/card_verifications/{card_verification_id}
card_verification_id: string (CardVerificationID)
in path

(no description)

undefined

Response Example (200 OK)
{
  "id": "string (CardVerificationID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_id": "string (CardID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "is_secure": "bool",
  "secure_start_url": "string",
  "secure_redirect_url": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit card verification

PATCH /acquiring/card_verifications/{card_verification_id}
meta: Meta
card_verification_id: string (CardVerificationID)
in path

(no description)

Request Example
{
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

undefined

Response Example (200 OK)
{
  "id": "string (CardVerificationID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_id": "string (CardID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "is_secure": "bool",
  "secure_start_url": "string",
  "secure_redirect_url": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Finish card verification

POST /acquiring/card_verifications/{card_verification_id}/finish
card_verification_id: string (CardVerificationID)
in path

(no description)

Request Example
{}

undefined

Response Example (200 OK)
{
  "id": "string (CardVerificationID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_id": "string (CardID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "is_secure": "bool",
  "secure_start_url": "string",
  "secure_redirect_url": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Bank Accounts

Object to store customer's bank account information.

List bank accounts

GET /bank_accounts
limit: integer
in query

(no description)

cursor: integer
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (BankAccountID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "customer_id": "string (CustomerID)",
      "bank_account_info": {
        "beneficiary_name": "Juan Lopez",
        "beneficiary_swift": "BBVABEBBXXX",
        "iban": "ES1212341234123412341234"
      },
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Create bank account

POST /bank_accounts
bank_account_info: BankAccountInfo
customer_id: string (CustomerID) null
meta: Meta
Request Example
{
  "bank_account_info": {
    "beneficiary_name": "Juan Lopez",
    "beneficiary_swift": "BBVABEBBXXX",
    "iban": "ES1212341234123412341234"
  },
  "customer_id": "string (CustomerID)",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (BankAccountID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "bank_account_info": {
    "beneficiary_name": "Juan Lopez",
    "beneficiary_swift": "BBVABEBBXXX",
    "iban": "ES1212341234123412341234"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Get bank account

GET /bank_accounts/{bank_account_id}
bank_account_id: string (BankAccountID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (BankAccountID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "bank_account_info": {
    "beneficiary_name": "Juan Lopez",
    "beneficiary_swift": "BBVABEBBXXX",
    "iban": "ES1212341234123412341234"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit bank account

PATCH /bank_accounts/{bank_account_id}
meta: Meta
bank_account_id: string (BankAccountID)
in path

(no description)

Request Example
{
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (BankAccountID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "bank_account_info": {
    "beneficiary_name": "Juan Lopez",
    "beneficiary_swift": "BBVABEBBXXX",
    "iban": "ES1212341234123412341234"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Bank Payin References

It's a code to identify customer's bank payins. It's mandatory to allow a user to add funds through a bank transfer.

List bank payin references

GET /bank_payin_references
limit: integer
in query

(no description)

cursor: integer
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (BankPayinReferenceID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "account_id": "string (AccountID)",
      "reference": "string",
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Create bank payin reference

POST /bank_payin_references
account_id: string (AccountID)
meta: Meta
Request Example
{
  "account_id": "string (AccountID)",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

undefined

Response Example (200 OK)
{
  "id": "string (BankPayinReferenceID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "reference": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Get bank payin reference

GET /bank_payin_references/{bank_payin_reference_id}
bank_payin_reference_id: string (BankPayinReferenceID)
in path

(no description)

undefined

Response Example (200 OK)
{
  "id": "string (BankPayinReferenceID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "reference": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit bank payin reference

PATCH /bank_payin_references/{bank_payin_reference_id}
account_id: string (AccountID)
meta: Meta
bank_payin_reference_id: string (BankPayinReferenceID)
in path

(no description)

Request Example
{
  "account_id": "string (AccountID)",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

undefined

Response Example (200 OK)
{
  "id": "string (BankPayinReferenceID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "reference": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Bank Payins

A BankPayin is an incoming bank transfer to Shasta Payments.
Since accounts don't have their own IBAN codes, incoming bank transfers must be sent to one of the Shasta Payments IBANs, indicating a reference code in the bank transfer concept.
To obtain a reference code, create a BankPayinReference associated to an Account. Then, make a bank transfer to Shasta Payments IBAN, indicating the reference code in the concept. When the funds are received, the reference is automatically detected, and a BankPayin is created to the specified account.
Reference codes can be used for multiple bank payins, and they never expire.

List bank payins

GET /bank_payins
limit: integer
in query

(no description)

cursor: integer
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (BankPayinID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "bank_payin_reference_id": "string (BankPayinReferenceID)",
      "account_id": "string (AccountID)",
      "transaction_id": "string (TransactionID)",
      "value": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Get bank payin

GET /bank_payins/{bank_payin_id}
bank_payin_id: string (BankPayinID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (BankPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "bank_payin_reference_id": "string (BankPayinReferenceID)",
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit bank payin

PATCH /bank_payins/{bank_payin_id}
meta: Meta
bank_payin_id: string (BankPayinID)
in path

(no description)

Request Example
{
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (BankPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "bank_payin_reference_id": "string (BankPayinReferenceID)",
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Bank Payouts

A BankPayout is a bank transfer to a traditional bank account outisde Shasta Payments.
Bank transfers can take 2 business days to reach the destination.
The destination bank can refund a bank transfer. This is usually due to the destination account not existing, being blocked or closed, in which case the refund arrives in 2 business days. In more exceptional cases, such as the destination bank holding the transfer for manual review, the refund can arrive weeks or months after the initial transfer.
When creating a bank payout you can specify either the bank account information directly, or a stored BankAccount.

List bank payouts

GET /bank_payouts
limit: integer
in query

(no description)

cursor: integer
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (TransferID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "account_id": "string (AccountID)",
      "transaction_id": "string (TransactionID)",
      "refund_transaction_id": "string (TransactionID)",
      "bank_account_info": {
        "beneficiary_name": "Juan Lopez",
        "beneficiary_swift": "BBVABEBBXXX",
        "iban": "ES1212341234123412341234"
      },
      "bank_account_id": "string (BankAccountID)",
      "value": {
        "currency": "EUR",
        "amount": "102.53"
      },
      "concept": "string",
      "miniref": "string",
      "state": "string",
      "meta": {
        "name": "My Account",
        "user_id": "85190"
      }
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Create bank payout

POST /bank_payouts
account_id: string (AccountID)
bank_account_id: string (BankAccountID)
bank_account_info: BankAccountInfo
concept: string
value: Value
meta: Meta
Request Example
{
  "account_id": "string (AccountID)",
  "bank_account_id": "string (BankAccountID)",
  "bank_account_info": {
    "beneficiary_name": "Juan Lopez",
    "beneficiary_swift": "BBVABEBBXXX",
    "iban": "ES1212341234123412341234"
  },
  "concept": "string",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (TransferID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "refund_transaction_id": "string (TransactionID)",
  "bank_account_info": {
    "beneficiary_name": "Juan Lopez",
    "beneficiary_swift": "BBVABEBBXXX",
    "iban": "ES1212341234123412341234"
  },
  "bank_account_id": "string (BankAccountID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "concept": "string",
  "miniref": "string",
  "state": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Get bank payout

GET /bank_payouts/{bank_payout_id}
bank_payout_id: string (BankPayoutID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (TransferID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "refund_transaction_id": "string (TransactionID)",
  "bank_account_info": {
    "beneficiary_name": "Juan Lopez",
    "beneficiary_swift": "BBVABEBBXXX",
    "iban": "ES1212341234123412341234"
  },
  "bank_account_id": "string (BankAccountID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "concept": "string",
  "miniref": "string",
  "state": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Edit bank payout

PATCH /bank_payouts/{bank_payout_id}
meta: Meta
bank_payout_id: string (BankPayoutID)
in path

(no description)

Request Example
{
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (TransferID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "refund_transaction_id": "string (TransactionID)",
  "bank_account_info": {
    "beneficiary_name": "Juan Lopez",
    "beneficiary_swift": "BBVABEBBXXX",
    "iban": "ES1212341234123412341234"
  },
  "bank_account_id": "string (BankAccountID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "concept": "string",
  "miniref": "string",
  "state": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Files

Upload files to Shasta and view info.

Get file list

GET /files
limit: integer
in query

(no description)

cursor: integer
in query

(no description)

200 OK

undefined

type
object
Response Example (200 OK)
{
  "data": [
    {
      "id": "string (FileID)",
      "created_at": "string (date-time)",
      "project_id": "string (ProjectID)",
      "md5": "string",
      "crc32": "string",
      "filename": "string",
      "filetype": "integer",
      "public": "boolean",
      "url": "string"
    }
  ],
  "has_next": true,
  "cursor_next": "string (cursor)"
}

Upload file

POST /files
public: string
file: bytes
Request Example
{
  "public": "string",
  "file": "bytes"
}
200 OK

undefined

Response Example (200 OK)
{
  "id": "string (FileID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "md5": "string",
  "crc32": "string",
  "filename": "string",
  "filetype": "integer",
  "public": "boolean",
  "url": "string"
}

Get file

GET /files/{file_id}
file_id: string (FileID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "id": "string (FileID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "md5": "string",
  "crc32": "string",
  "filename": "string",
  "filetype": "integer",
  "public": "boolean",
  "url": "string"
}

Delete file

DELETE /files/{file_id}
file_id: string (FileID)
in path

(no description)

Download file

GET /files/{file_id}/download
file_id: string (FileID)
in path

(no description)

200 OK

undefined

Response Example (200 OK)
{
  "signed_url": "string",
  "url": "string"
}

Schema Definitions

Meta: object

string
Example
{
  "name": "My Account",
  "user_id": "85190"
}

Currency: string

string EUR, XBTC, XETH

Value: object

currency: Currency
amount: string (decimal)
Example
{
  "currency": "EUR",
  "amount": "102.53"
}

AutoBankPayout: object

min_balance: Value
bank_account_id: string (BankAccountID)
concept: string (string)
Example
{
  "min_balance": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "bank_account_id": "string (BankAccountID)",
  "concept": "string (string)"
}

Account: object

id: string (AccountID)
created_at: string (date-time)
project_id: string (ProjectID)
customer_id: string (CustomerID)
balance: Value
auto_bank_payout: AutoBankPayout
allow_negative_balance: boolean
meta: Meta
Example
{
  "id": "string (AccountID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "balance": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "auto_bank_payout": {
    "min_balance": {
      "currency": "EUR",
      "amount": "102.53"
    },
    "bank_account_id": "string (BankAccountID)",
    "concept": "string (string)"
  },
  "allow_negative_balance": false,
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Project: object

id: string (ProjectID)
created_at: string (date-time)
default_card_payin_instant_account_id: string (AccountID)

Account where to get the temporary hold value

default_card_payin_fee_account_id: string (AccountID)

The account where the fee is substracted. If this account has a negative balance, this amount will be a debt and your card pay in may stop working (only in live environment)

card_payin_fee: string (decimal)

The percent fee applied to card pay ins

meta: Meta
Example
{
  "id": "string (ProjectID)",
  "created_at": "string (date-time)",
  "default_card_payin_instant_account_id": "string (AccountID)",
  "default_card_payin_fee_account_id": "string (AccountID)",
  "card_payin_fee": "0.01",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Customer: object

id: string (CustomerID)
created_at: string (date-time)
project_id: string (ProjectID)
first_name: string
last_name: string
email_address: string
phone_number: string
nationality: string
employment_status: string student, employed, self_employed, searching, not_employed
address: Address
meta: Meta
Example
{
  "id": "string (CustomerID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "first_name": "Javier",
  "last_name": "Hernandez",
  "email_address": "javi@example.com",
  "phone_number": "string",
  "nationality": "ES",
  "employment_status": "self_employed",
  "address": {
    "line_1": "Avenida Omejos, 5",
    "line_2": "Atico 2a",
    "postal_code": "08291",
    "city": "L'Hospitalet de Llobregat",
    "region": "Barcelona",
    "country": "ES"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

Address: object

line_1: string
line_2: string
postal_code: string
city: string

City

region: string
country: string
Example
{
  "line_1": "Avenida Omejos, 5",
  "line_2": "Atico 2a",
  "postal_code": "08291",
  "city": "L'Hospitalet de Llobregat",
  "region": "Barcelona",
  "country": "ES"
}

Transaction: object

id: string (TransactionID)
created_at: string (date-time)
project_id: string (ProjectID)
account_id: string (AccountID)
type: string magic, transfer_source, transfer_destination, card_payin, bank_payin, bank_payout, card_payin_refund, card_payin_instant_authorized, card_payin_instant_settled
value: Value
balance_after: Value
transfer_id: string (TransferID)
card_payin_id: string (CardPayinID)
card_payin_refund_id: string (CardPayinRefundID)
bank_payin_id: string (BankPayinID)
bank_payout_id: string (BankPayoutID)
Example
{
  "id": "string (TransactionID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "type": "string",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "balance_after": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "transfer_id": "string (TransferID)",
  "card_payin_id": "string (CardPayinID)",
  "card_payin_refund_id": "string (CardPayinRefundID)",
  "bank_payin_id": "string (BankPayinID)",
  "bank_payout_id": "string (BankPayoutID)"
}

Transfer: object

id: string (TransferID)
created_at: string (date-time)
project_id: string (ProjectID)
source_account_id: string (AccountID)
source_transaction_id: string (TransactionID)
destination_account_id: string (AccountID)
destination_transaction_id: string (TransactionID)
value: Value
meta: Meta
Example
{
  "id": "string (TransferID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "source_account_id": "string (AccountID)",
  "source_transaction_id": "string (TransactionID)",
  "destination_account_id": "string (AccountID)",
  "destination_transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

CardInfo: object

number: string (card)

Card number without spaces

expiration_month: integer

Expiration month (1-12)

expiration_year: integer

Full expiration year

cvv: string

CVC/CVV

Example
{
  "number": "4321432143214321",
  "expiration_month": 12,
  "expiration_year": 2020,
  "cvv": "987"
}

CardInfoResp: object

number: string (card)

Card number masked with asterisks

expiration_month: integer

Expiration month (1-12)

expiration_year: integer

Full expiration year

brand: string

Card brand (visa, mastercard...)

Example
{
  "number": "432143******4321",
  "expiration_month": 12,
  "expiration_year": 2020,
  "brand": "visa"
}

CardToken: object

id: string (CardTokenID)
created_at: string (date-time)
project_id: string (ProjectID)
card_info: CardInfoResp
Example
{
  "id": "string (CardTokenID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  }
}

Card: object

id: string (CardID)
created_at: string (date-time)
project_id: string (ProjectID)
customer_id: string (CustomerID)
card_info: CardInfoResp
meta: Meta
Example
{
  "id": "string (CardID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

CardPayin: object

id: string (CardPayinID)
created_at: string (date-time)
project_id: string (ProjectID)
card_id: string (CardID)
card_info: CardInfoResp
account_id: string (AccountID)
transaction_id: string (TransactionID)
value: Value
state: string processing, authorized, declined, pending_secure, settled
is_secure: bool

Should use 3D Secure or not

secure_start_url: string
secure_redirect_url: string
is_instant: bool

Should the card payin amount appear reflected in account balance after payin. Needs a valid instant_account_id in the request or default_card_payin_instant_account_id to be set in project.

instant_account_id: string (AccountID)

Account where to get the temporary hold value. Important this account needs to be a separate account, and can be defined as default_card_payin_instant_account_id in the project parameters as a fallback. instant_acount_id overrides default_card_payin_instant_account_id.

instant_authorized_transaction_id: string (TransactionID)
instant_settled_transaction_id: string (TransactionID)
fee_account_id: string (AccountID)
refunded_value: Value
meta: Meta
Example
{
  "id": "string (CardPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_id": "string (CardID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "state": "string",
  "is_secure": "bool",
  "secure_start_url": "string",
  "secure_redirect_url": "string",
  "is_instant": "bool",
  "instant_account_id": "string (AccountID)",
  "instant_authorized_transaction_id": "string (TransactionID)",
  "instant_settled_transaction_id": "string (TransactionID)",
  "fee_account_id": "string (AccountID)",
  "refunded_value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

CardPayinRefund: object

id: string (CardPayinID)
created_at: string (date-time)
project_id: string (ProjectID)
account_id: string (AccountID)
card_payin_id: string (CardPayinID)
transaction_id: string (TransactionID)
value: Value
state: string processing, authorized, declined
meta: Meta
Example
{
  "id": "string (CardPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "card_payin_id": "string (CardPayinID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "state": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

CardVerification: object

id: string (CardVerificationID)
created_at: string (date-time)
project_id: string (ProjectID)
card_id: string (CardID)
card_info: CardInfoResp
is_secure: bool
secure_start_url: string
secure_redirect_url: string
meta: Meta
Example
{
  "id": "string (CardVerificationID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "card_id": "string (CardID)",
  "card_info": {
    "number": "432143******4321",
    "expiration_month": 12,
    "expiration_year": 2020,
    "brand": "visa"
  },
  "is_secure": "bool",
  "secure_start_url": "string",
  "secure_redirect_url": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

BankAccountInfo: object

beneficiary_name: string
beneficiary_swift: string
iban: string
Example
{
  "beneficiary_name": "Juan Lopez",
  "beneficiary_swift": "BBVABEBBXXX",
  "iban": "ES1212341234123412341234"
}

BankAccount: object

id: string (BankAccountID)
created_at: string (date-time)
project_id: string (ProjectID)
customer_id: string (CustomerID)
bank_account_info: BankAccountInfo
meta: Meta
Example
{
  "id": "string (BankAccountID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "customer_id": "string (CustomerID)",
  "bank_account_info": {
    "beneficiary_name": "Juan Lopez",
    "beneficiary_swift": "BBVABEBBXXX",
    "iban": "ES1212341234123412341234"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

BankPayout: object

id: string (TransferID)
created_at: string (date-time)
project_id: string (ProjectID)
account_id: string (AccountID)
transaction_id: string (TransactionID)
refund_transaction_id: string (TransactionID)
bank_account_info: BankAccountInfo
bank_account_id: string (BankAccountID)
value: Value
concept: string

Cut-off at 130 chars.

miniref: string
state: string sent, refunded
meta: Meta
Example
{
  "id": "string (TransferID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "refund_transaction_id": "string (TransactionID)",
  "bank_account_info": {
    "beneficiary_name": "Juan Lopez",
    "beneficiary_swift": "BBVABEBBXXX",
    "iban": "ES1212341234123412341234"
  },
  "bank_account_id": "string (BankAccountID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "concept": "string",
  "miniref": "string",
  "state": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

BankPayinReference: object

id: string (BankPayinReferenceID)
created_at: string (date-time)
project_id: string (ProjectID)
account_id: string (AccountID)
reference: string
meta: Meta
Example
{
  "id": "string (BankPayinReferenceID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "account_id": "string (AccountID)",
  "reference": "string",
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

BankPayin: object

id: string (BankPayinID)
created_at: string (date-time)
project_id: string (ProjectID)
bank_payin_reference_id: string (BankPayinReferenceID)
account_id: string (AccountID)
transaction_id: string (TransactionID)
value: Value
meta: Meta
Example
{
  "id": "string (BankPayinID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "bank_payin_reference_id": "string (BankPayinReferenceID)",
  "account_id": "string (AccountID)",
  "transaction_id": "string (TransactionID)",
  "value": {
    "currency": "EUR",
    "amount": "102.53"
  },
  "meta": {
    "name": "My Account",
    "user_id": "85190"
  }
}

File: object

id: string (FileID)
created_at: string (date-time)
project_id: string (ProjectID)
md5: string
crc32: string
filename: string
filetype: integer
public: boolean
url: string
Example
{
  "id": "string (FileID)",
  "created_at": "string (date-time)",
  "project_id": "string (ProjectID)",
  "md5": "string",
  "crc32": "string",
  "filename": "string",
  "filetype": "integer",
  "public": "boolean",
  "url": "string"
}