Recurring Payments Use Case

This use case describes how merchants (recipients) can accept fixed recurring payments from their customers using Amazon FPS.

Fast Route (a web site) is a real-time traffic information service that allows users to receive updates on city traffic conditions using their mobile phone. Users can select various subscription plans offered by Fast Route. The subscription plans offered by Fast Route are hourly, daily, and monthly charges. Users are charged depending on the subscription plan they choose.

For demonstration purposes the subscription periods in the sample application is set to hours. However, in a real life use case, Amazon FPS supports subscription period in days, months and years. Also, all subscriptions have a validity of one year.

The user experience illustrates the steps in subscribing and setting up payments for the online magazine subscription.

This topic contains information that can help you in building a similar application with the assumption that you are the caller and the recipient. As a caller you can make web service calls to Amazon FPS and as a recipient you can receive payments for the subscription. John is the sender in this use case who uses his Amazon Payment account balance to pay for the subscription. Fast Route is the caller that directs John to the Amazon FPS recurring-use token installation pipeline to install a token that will be used to charge John for his subscription.

See the Acquiring Recurring Payments Tokens section for information on recurring payment tokens.

[Note]Note

This use case assumes that you are the caller and the recipient (Fast Route).

Since you play the role of a caller and a recipient, you need a caller token and a recipient token on your account. You can install these tokens on your account using the InstallPaymentInstruction operation. See the Installing Tokens on your Account section for more information on installing tokens on your account. See the Acquiring Recipient Tokenssection for more information on setting up a recipient token on your account.

You will require only one caller token and one recipient token for executing all the payment transactions in this use case and therefore, this is a one-time set up.

In this use case, John plays the role of a sender who registers at the Fast Route web site and uses his Amazon Payment account to subscribe to the real-time traffic information service. You must direct John to the Amazon FPS recurring-use token installation pipeline using a signed URL. A signed URL is created using your caller credentials and other required parameters as explained below.

ParameterValueDescription
callerReferenceFast Route - 1169619557608A unique reference created to identify the sender token for your future use.
paymentReasonPayment for real-time traffic information service subscriptionText describing this transaction for your customers. This information is available in the Payment Authorization page.
recipientTokenIdThis is your recipient token IdThis is used to identify the recipient.
paymentMethodabt, ba, ccPayment methods used to make the payment.
transactionAmount20The cost of the subscription.
callerKeyYour caller keyThis is your AWS Access Key Id which is used by Amazon FPS to identify you in the pipeline.
awsSignatureThis is the URL signatureSignature of the encoded URL created using your Access Key Id
pipelineNameRecurringName of this pipeline
returnURLhttp://www.fastroute.com/thanks.jspThe web site URL, where the user is redirected after completing the payment authorization (token installation).
validityStart1169617898Validity of the token.
validityExpiry1177393898Validity of the token.
recurringPeriod1 weekThe frequency at which Fast Route will charge John for the subscription.
globalAmountLimit30The maximum amount that can be charged using the recurring payment sender token.
usageLimitType2AmountYou can specify either Amount or Count (number of times) as the usage limit type.
usageLimitPeriod21 Week

This takes the value of the following type (examples):

  • 1 Month

  • 4 Years

A integer followed by one of the following strings

  • Hour

  • Day

  • Week

  • Month

  • Year

See the Signing A URL section for more information on creating a signed URL.

The co-branded UI pipeline returns the following response parameters:

ParameterValueDescription
TokenId55X2BQEECJVXLDPDCTVM1QQBJM8ETBMSUS35M7377C17F37CKBB53HII6AV7WXVTThis is John’s sender token that you will use in the Pay call.
statusSCStatus of the transaction. Since John uses credit card as the payment method to buy the credit instrument, the status is SC.

You can now use the sender token received from the Amazon FPS recurring-use token installation pipeline along with your caller token and recipient token in the Pay operation to transfer money.

See the Making a Pay Request section for detailed information about using tokens to make a Pay call. Also see Pay operation section for information on the request and response parameters. Parameters and values used in this case are given below:

ParameterValueDescription
RecipientTokenIdYour recipient token IdThe token to which the sender will make payments. In this use case this is your token.
SenderTokenIdYour sender token IdSpecifies the sender token created by John.
CallerTokenIdYour caller token IdYour caller token.
TransactionAmount20The cost of the subscription.
TransactionDate2007-01-24T06:17:33.929ZThe date on which the transaction is received by Amazon FPS.
SenderReferenceJohn - 1169619557608A unique value used to identify the sender on your web site.
RecipientReferenceFastRoute - 1169619557608A unique value used to identify the recipient on your web site.
CallerReferenceFastRoute - 1169619557608A unique reference created to identify the sender token for your future reference.
ChargeFeeToRecipientSpecifies that the participant pays the fees to Amazon FPS for the transaction.
SenderDescriptionJohn - 1169619557608Text description about the sender involved in the transaction.
CallerDescriptionFastRoute Online Traffic InformationText description about the caller in the transaction.
RecipientDescriptionFastRoute Online Traffic InformationText description about the recipient involved in the transaction.
MetaDataPayment for the weekly magazine subscriptionUsed to specify details of the transaction.

You have to process the response received from Amazon FPS. The response from Amazon FPS contains the status of the transaction and the transactionId. You can store the transactionId for future references. See the Handling Synchronous Responses section for more information.

As a result of the Pay call, money is transferred from sender's account to the recipients account.You can view your account balance from the account management UI. See the Managing Your Account section for more information.