Forms

A Form in Bamboo Payment allows customers to perform purchases or tokenization through a web interface.

Methods supported

GetToken

This method receives an object with the specific parameters for the desired payment method.

Object tokenRequest:

PropertyDescriptionMandatory?
Physical NetworkCardsRedirect
PaymentMediaId
numeric
Payment media identifier.
PaymentMediaType
numeric
Payment media type identifier (see table Payment method types).
IssuerBank
numeric
Bank identifier (see table Issuer Bank).
Email
string
Email address of the Customer.
DocumentNumber
string
Customer document number.
DocumentType
numeric
Customer document type.
LoyaltyPlanId
numeric
Loyalty Plan identifier.
LoyaltyPlanUserIdentification
string
Loyalty Plan user identifier.

Examples:


This example generates a token for _RedPagos_.
var tokenRequest = {
 PaymentMediaId: 5, 
 Email: "john@mail.com", 
 DocumentNumber: "12345672", 
 DocumentType: 2
 };
 
PWCheckout.Iframe.GetToken(tokenRequest);

This example opens the capture form only for MasterCard cards.

var tokenRequest = {
 PaymentMediaId: 2, 
 Email: "john@mail.com"
 };
 
PWCheckout.Iframe.GetToken(tokenRequest);

This example opens the capture form only for MasterCard cards issued by Santander Bank.

var tokenRequest = {
 PaymentMediaId: 2, 
 IssuerBank: 1, 
 Email: "john@mail.com"
 };
 
PWCheckout.Iframe.GetToken(tokenRequest);

This example opens the capture form only for Visa Debit cards.

var tokenRequest = {
 PaymentMediaId: 1, 
 PaymentMediaType: 2, 
 Email: "john@mail.com"
 };
 
PWCheckout.Iframe.GetToken(tokenRequest);

This example generates a OneTimeToken for Khipu payments.

var tokenRequest = {
 PaymentMediaId: 110, 
 Email: "john@mail.com"
 };
 
PWCheckout.Iframe.GetToken(tokenRequest);

JavaScript Objects

CloseInfo

The CloseInfo object is returned in the closed event, triggered when the user closes the card data capture form.

FieldDescription
Reason
string
Description of the reason why the window was closed. The possible causes are the following:
  • ESCAPE: The user pressed the Esc button.
  • CLOSE_BUTTON: The user pressed the closing button of the window.
  • TIMEOUT: The user has exceeded the maximum waiting time to enter the data.
  • COMMERCE_ACTION: The commerce needs to take an action.
  • ERROR: An error occurred.
  • TOKEN_RECEIVED: The generated token was received from the data entered by the user.
  • NOTIFICATION_RECEIVED: A notification has been received.
  • PAGE_CLICK: The user clicked the page outside the capture form, and the property close_onclick is true.

TokenInfo

The TokenInfo object is returned in the tokenCreated event triggered by the card data capture form after processing the user’s data.

Field
Type
Description
TokenId
string
Token identifier.
Created
timestamp
Token creation date and time.
Type
string
Token type, possible values:
  • OneTime
  • Commerce
Brand
string
Brand of the card or payment method used.
IssuerBank
string
Card issuer bank.
Owner
string
Cardholder name.
Bin
numeric[6]
Card identifier.
Last4
numeric[4]
The cards last four digits.
CardType
string
Payment method (or card) type, possible values:
  • CreditCard
  • DebitCard
  • PhysicalNetwork
  • PrePaid
CardExpMonth
numeric[2]
Card expiration month.
CardExpYear
numeric[2]
Card expiration year.

NotificationInfo

The NotificationInfo object is returned in the notificationReceived event, which is triggered when the Verification Code Request Flow finishes.

Field
Type
Description
ProcessType
string
Defines the process type of the notification is being issued.
Possible values are:
  • PURCHASE_PENDING – process to authorize a pending purchase.
ProcessStatus
numeric[1]
Possible statuses of a process are:
  • 1 – OK (the process completed successfully)
  • 2 – PENDING (the process is still pending)
  • 3 – ERROR (the process completed with error)

What's next?

Checkout Form

Amplified and responsive suitable for web and mobile applications.

Embedded Checkout Form

Corresponds to a payment form embedded on its page, simplifying and securing the capture of sensitive data for the processing of online payments.

footer
Last modified June 24, 2024

© Bamboo | All rights reserved 2024