In order for you to initialise the payment form successfully, you will need to load the Fiat Payment.
LimePay.FiatPayments.load(limePayToken) // returns new Promise<>.then(fiatPayment => {}).catch(error => {});
Where limePayToken
is the token returned after Creating Payment. Returns instance of type Fiat Payment once the promise is resolved.
You can sign the transactions through the LimePay Wallet of the user by performing:
payment.signWithLimePayWallet(password) // returns new Promise<>
NOTE: The example above shows how you can sign transactions for a shopper that uses LimePay Wallets. More information on the other ways you can sign your user's transactions can be found in the Web-Library Documentation.
In order to submit the payment for processing one should execute:
fiatPayment.process(cardHolderInformaton).catch(error => {})
Where fiatPayment
is instance of Fiat Payment returned from performing:
LimePay.FiatPayments.load(limePayToken);
cardHolderInformaton
is object with the following properties:
Attribute | Type | Description | Required |
|
| Name of the shopper that will be billed | Yes |
|
| Whether the shopper is a company or not | Yes |
|
| Shopper's ISO, Alpha-2 country code | Yes |
|
| Shopper's ZIP | Yes |
|
| Shopper's street address | Yes |
|
| VAT or TAX number of the shopper | No |
IMPORTANT: You have to sign the transactions for the payment before process
.
NOTE: Once you've sent the payment for processing successfully, you can monitor its status getting the payment using the SDK.
Fiat Payments have can have VAT/TAX that is applied to them. You can calculate the VAT/TAX for a fiat payment, in order to show it to the customer by:
fiatPayment.calculateVAT(cardHolderData).then(vatData => {}).catch(error => {})
Where fiatPayment
is instance of Fiat Payment returned from performing:
LimePay.FiatPayments.load(limePayToken);
and cardHolderData
is object with the following properties:
Attribute | Type | Description | Required |
|
| Shopper's ISO, Alpha-2 country code | Yes |
|
| Whether the shopper is a company or not | Yes |
|
| VAT or TAX number of the shopper | No |
|
| The reduced VAT/TAX rate that the shopper can apply for | No |
Once the promise is resolved, the returned object is of type:
Attribute | Type | Description | Nullable |
|
| VAT/TAX percentage that is being applied to the payment | No |
|
| VAT/TAX amount calculated by | No |
|
| This is the total amount for the payment. | No |
In order for you to process Relayed payment, you would need to load it by performing the following function:
LimePay.RelayedPayments.load(limePayToken) // returns Promise<>.then(relayedPayment => {}).catch(error => {});
Where limePayToken
is the token returned after Creating Payment. Returns instance of type Relayed Payment once the promise is resolved.
In order to trigger the processing of the relayed payment one should execute:
relayedPayment.process() // returns Promise<>.catch(error => {})
Where relayedPayment
is the instance of Relayed Payment returned from performing:
LimePay.RelayedPayments.load()
IMPORTANT: You have to sign the transactions for the payment before process
.
NOTE: Once you've sent the payment for processing successfully, you can monitor its status getting the payment using the SDK.