HomeProduct DocsAPI ReferenceChangelog
RecurlyAPI GuidesRecurly.jsWebhooksAPI ReferenceSupportBook demo
API Reference

Preview Gift Card

Preview a gift card purchase. Allows the gifter to confirm that the delivery details provided are correct.

Note: To use the gift cards API endpoints, some configuration is required. Please see our docs for further instructions.

Preview Response

The preview response will be slightly different than the purchase response:

  • The gift card object will not have a reference link.
  • The id will be nil.
  • The redemption code will be nil.
  • A new attribute called checkout_cost will be included. This will always match the unit_amount_in_cents for now. In the future, when we support coupon discounts on gift card purchases, checkout_cost will be the after discount cost to the gifter.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

The product code of the gift card product.

integer
required

The amount of the gift card. Must match an amount on the gift card product.

string
required

The currency of the unit_amount_in_cents.

boolean
Defaults to false

Set to true to bypass sending the purchase to your configured tax service. Defaults to false.

delivery
object
required

Block of delivery information. Includes the params method through personal_message below.

string
required

Whether the delivery method is email or post.

string

The email address of the recipient. Required if method = email.

string

The first name of the recipient.

string

The last name of the recipient.

address
object

Block of address information for the recipient. Includes the params address1 through phone below. Required if method = post.

string

The first street address line of the recipient. Required if method = post.

string

The second street address line of the recipient.

string

The city of the recipient. Required if method = post.

string

The state/province of the recipient. Required if method = post and country = US, CA, IT or NL.

string

The zip/postal code of the recipient. Required if method = post.

string

The country of the recipient. Required if method = post.

string

The phone number of the recipient.

string

The name of the gifter for the purpose of message displays to the recipient.

string

The personal message from the gifter to the recipient. 255 characters.

gifter_account
object
required

Block of account details for the gifter. This can reference an existing account_code or create a new account using the Account objects params. An account_code is required.

string
required

The account code of the gifter's account.

Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/xml