API Docs

@Pay 101

Docs > API Docs

@Pay For Developers

At this point, you probably know that @Pay allows customers to use their email in the same way they would use a credit card. This page will build on that knowledge and outline the typical @Pay transaction flow, along with the associated API calls that are made.

Before we dive into the traditional flow, we should go over a few terms that will be used throughout this document. * +Token+: A value that contains information about a financial transaction (an invoice or a product sales offer, for instance). * +Card Registration+: The process of registering a card with @Pay for future use. * +Payment Capture Page+: A page that the customer is directed to in order to enter their payment information for card registration.

Typical @Pay Flow

The typical @Pay Flow is structured in the following way:

  • A token is created by the merchant.
  • A customer will make a transaction with the token.
  • The payment will be verified against @Pay’s services using the customer’s e-mail address. ** If the e-mail address references a card that has been previously registered with @Pay, we will move on to payment processing. ** If the e-mail address does not reference a card that has been registered with @Pay, the customer will receive communication directing them to the Payment Capture Page for card registration.
  • Transaction will be processed against the registered credit card.

As you can see from the outlined flow, there are three main points where the @Pay API is utilized: Token creation, Card Registration, and Transaction Processing.

Token Creation

Available Clients: Ruby, PHP Tokens can be generated programmatically by both the Ruby and PHP clients. These tokens contain information about the merchant, the transaction amount, and the customer’s e-mail address (if applicable). Detailed information on generating a token can be found in our Ruby Documentation and our PHP Documentation.

Once a token is generated, it can be utilized to create transactions.

Card Registration

Available Clients: @Pay.js Card registration is necessary when a card is not currently associated with an e-mail address. Should this case arise, your site may register the card on behalf of the customer using @Pay.js. For examples on this operation, you can view our page on registering cards.

Transaction Processing

Available Clients: @Pay.js Should your site ever need to charge the card directly without a token, you may initiate transactions direcly through the use of @Pay.js. For examples on this operation, you can view our @Pay.js documentation.