Amazon Flexible Payments Service
Basic Quick Start (API Version 2010-08-28)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

Single-Use Token API

This section describes the parameters you use with the Co-branded service API to request creation of a single-use payment token (where pipelineName=SingleUse). You use this API to implement the equivalent of a Pay Now button on your site to redirect the sender to the CBUI for payment authorization. For more information, see Getting Authorization.

Request Parameters

Name

Description

Required

addressName

addressLine1

addressLine2

city

state

country

zip

phoneNumber

The sender's shipping address. You might choose to collect the address on your website and pass it to the CBUI. If you choose to collect the shipping address yourself, you can use these parameters to specify it. This address will be displayed to the sender on the payment authorization confirmation page. See also the description of collectShippingAddress.

Type: String

Default: None

No

callerReference

A value you provide that uniquely identifies the request. For more information, see Important Values to Store in Your Database.

Type: String

Default: None

Constraint: Max size = 128 characters

Yes

collectShippingAddress

If you set this value to True, all the shipping address parameters (addressName, addressLine1, etc.) are ignored, and the shipping/mailing address that the sender confirms on the CBUI pages is returned as part of the return URL.

Type: Boolean

Default: False

Valid Values: True | False

No

currencyCode

Specifies the currency of all amounts that this pipeline accepts.

Type: String

Default: USD

Valid Values: USD

No

discount

Any discount amount that you have offered to the sender or buyer. It will be displayed to the sender on the payment authorization confirmation page. If you do not specify this parameter, it will not be displayed.

Type: String

Default: None

No

giftWrapping

Any gift wrapping amount that you want to charge the sender or buyer. It will be displayed to the sender on the payment authorization confirmation page. If you do not specify this parameter, it will not be displayed.

Type: String

Default: None

No

handling

Any handling amount (in addition to the shipping amount) that you want to charge the sender or buyer. It will be displayed to the sender on the payment authorization confirmation page. If you do not specify this parameter, it will not be displayed.

Type: String

Default: None

No

itemTotal

The sum of item amounts without any shipping, handling, gift wrapping, or tax charges. This amount will be displayed to the sender along with other charges such as shipping, handling, gift wrapping, tax or discounts.

Type: String

Default: None

No

paymentMethod

Specifies payment methods the recipient supports. Use CC for credit cards, ACH for bank account withdrawal, and ABT for Amazon Payments balance transfer.

Type: Comma-separated list

Default: ABT

Valid Values: CC | ACH | ABT

No

paymentReason

Specifies the reason for this payment transaction. You can provide a limited set of HTML tags to format your text, including <b>, <i>, <u>, <ul>, <li>, <br>, <em>, <strong>, and <strike>. Other tags are ignored.

Type: String

No

reserve

If you set this to True, you must use the reserve and settle functionality for subsequent payments related to this payment authorization.

However, if you set this to False, you may not use the reserve and settle functionality for subsequent payments related to this payment authorization.

Type: Boolean

Default: False

Valid Values: True | False

No

shipping

The shipping amount that you want to charge the sender. It will be displayed to the sender on the payment authorization confirmation page. If you do not specify this parameter, it will not be displayed.

Type: String

Default: None

No

tax

The tax amount that you have offered to the sender. It will be displayed to the sender on the payment authorization confirmation page. If you do not specify this parameter, it will not be displayed.

Type: String

Default: None

No

transactionAmount

The amount payable in this transaction. If you have specified values for other amount parameters (such as itemTotal, shipping, handling, etc.), the value for this parameter should be the sum of those parameters.

Type: String

Default: None

Yes

The request also uses the parameters common to all Co-Branded service API requests. For more information, see Common Parameters.

Response Parameters

Parameter

Description

addressName

addressLine1

addressLine2

city

state

zip

phoneNumber

The sender's shipping address. These parameters are returned only if collectShippingAddress was set to True in the request.

Type: String

errorMessage

This is text in a human readable form that specifies the reason for a request failure.

Type: String

expiry

Specifies the expiry (if any) of the payment method.

Type: String

Size: 20 Bytes

status

The status of the Co-Branded service request.

Type: String

Valid Values: See Status Codes.

tokenID

Specifies the token ID string associated with the token just created (installed).

Type: String

Size: 65 Bytes

warningCode

There might be cases when the sender token is installed successfully but there is an associated warning. This parameter denotes that warning.

Type: String

Valid Values: invalidShippingAddress (returned when you pass an incorrect shipping address in the request parameters addressLine1, addressLine2, city, etc.)

warningMessage

Specifies a human readable text that explains the warning corresponding to the warningCode.

Type: String

Responses also include parameters common to all responses. For more information, see Response Parameters.

Status Codes

Status Code

Description

SA

Success status for the ABT payment method.

SB

Success status for the ACH (bank account) payment method.

SC

Success status for the credit card payment method.

SE

System error.

A

Buyer abandoned the pipeline.

CE

Specifies a caller exception.

PE

Payment Method Mismatch Error: Specifies that the buyer does not have the payment method you requested.

NP

There are several cases where the NP status is returned:

  • The payment instruction installation was not allowed on the sender's account, because the sender's email account is not verified

  • The sender and the recipient are the same

  • The recipient account is a personal account, and therefore cannot accept credit card payments

  • A user error occurred because the pipeline was cancelled and then restarted

  • The account associated with one of the recipient tokens you specified is closed

NM

You are not registered as a third-party caller to make this transaction. Contact Amazon Payments for more information.