Subscribe to payment form lifecycle events to track user interactions, validate input, handle errors, and respond to payment completion
Using the Solidgate Payment Form, you can establish comprehensive customer action tracking through the events it generates.
These events provide valuable touchpoints for monitoring and analyzing customer interactions. They handle the tracking of successful payments, resolution of form initialization issues, and analysis of customer interactions with form controls, offering comprehensive insights into the payment workflow.
1
2
3
4
<Payment{...restParams}onEventName={callback}/>
1
2
3
4
5
6
constform=PaymentFormSdk.init(data)form.on('event_type',(e)=>{constbody=e.data// The body of any available event as it described below.
// The code will be run when the event is received.
})
form.unsubscribeAll() to remove all existing event subscriptions
form.unsubscribe("eventName") to remove a subscription for a specific event, where eventName is the name of the event you want to stop listening to
Form lifecycle
These events track the major stages of the payment form, from initialization to submission, and provide feedback on whether the payment process was successful or failed.
Mounted
When the Payment Form,
Guide
Add a Google Pay button to your embedded payment form for one-tap checkout on Android devices and Chrome browsers with token security.
Google Pay,
Guide
Add an Apple Pay button to your embedded payment form for one-tap checkout with biometric authentication on supported Apple devices.
Apple Pay
, or APM buttons are initialized, rendered, and displayed.
1
2
3
4
interfaceMountedMessage{type:'mounted',entity:'applebtn'|'googlebtn'|'form'|'resign'|'bizum'|'blik'|'mbway'|'paypal'|'pix'|'pix-qr'// one of listed values
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importReact,{FC,useCallback}from'react'importReactDOMfrom'react-dom';importPayment,{InitConfig,SdkMessage,MessageType}from"@solidgate/react-sdk"exportconstMyPayment: FC<{merchantData: InitConfig['merchantData']styles?: InitConfig['styles']formParams?: InitConfig['formParams']width?: string}>=(props)=>{consthandleMounted=useCallback((event: SdkMessage[MessageType.Mounted])=>{// here logic
},[])return(<Payment{...props}onMounted={handleMounted}/>)}
<template><Payment:merchant-data="merchantData"@mounted="mounted"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functionmounted(event:SdkMessage[MessageType.Mounted]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(mounted)="onMounted($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onMounted(event: SdkMessage[MessageType.Mounted]):void{// here your logic
}}
Submit
When the payment is successfully submitted by the customer, the event can be triggered for Payment Form,
Guide
Add a Google Pay button to your embedded payment form for one-tap checkout on Android devices and Chrome browsers with token security.
Google Pay,
Guide
Add an Apple Pay button to your embedded payment form for one-tap checkout with biometric authentication on supported Apple devices.
Apple Pay
, or APM buttons.
1
2
3
4
interfaceSubmitMessage{type:'submit',entity:'applebtn'|'googlebtn'|'form'|'resign'|'bizum'|'blik'|'mbway'|'paypal'|'pix'|'pix-qr'// one of listed values, indicates how payment was processed
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importReact,{FC,useCallback}from'react'importReactDOMfrom'react-dom';importPayment,{InitConfig,SdkMessage,MessageType}from"@solidgate/react-sdk"exportconstMyPayment: FC<{merchantData: InitConfig['merchantData']styles?: InitConfig['styles']formParams?: InitConfig['formParams']width?: string}>=(props)=>{consthandleSubmit=useCallback((event: SdkMessage[MessageType.Submit])=>{// here logic
},[])return(<Payment{...props}onSubmit={handleSubmit}/>)}
<template><Payment:merchant-data="merchantData"@submit="submit"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functionsubmit(event:SdkMessage[MessageType.Submit]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(submit)="onSubmit($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onSubmit(event: SdkMessage[MessageType.Submit]):void{// here your logic
}}
Card
The card event fires on every valid card number and returns BIN level metadata such as brand, bin, cardType, cardCategory, bank, and binCountrybefore submit, without ever exposing the PAN, CVV, expiry, or cardholder name.
Use it to adapt UI and pricing, prevent declines on risky binCountry mismatches, hint acquirer routing, and segment customers by issuer and tier before authorization.
1
2
3
4
5
6
7
8
9
10
11
interfaceCardMessage{type:'card'card:{brand:"AMERICAN EXPRESS",// card scheme in upper case: 'VISA', 'MASTERCARD', 'AMERICAN EXPRESS', 'DISCOVER', 'JCB', 'DINERS CLUB', 'UNIONPAY', 'MAESTRO', etc., or 'unknown'
bin:"377400",// first 6 digits of the PAN as a string
cardType:"DEBIT",// funding type in upper case: 'CREDIT', 'CREDIT/DEBIT', 'DEBIT', 'PREPAID', 'CHARGE CARD', 'DEFERRED DEBIT', or 'unknown'
cardCategory:"BUSINESS",// scheme product tier in upper case: 'STANDARD', 'CLASSIC', 'CONSUMER', 'BUSINESS', 'CORPORATE', 'PLATINUM', 'WORLD', 'INFINITE', 'ELECTRON', etc.
bank:"BANK OF AMERICA",// issuing bank name in upper case (e.g. 'BANK OF AMERICA', 'CITIBANK'); empty when not resolved
binCountry:"USA"// ISO 3-letter country code of the issuing bank (e.g. 'USA', 'GBR', 'DEU')
}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importReact,{FC,useCallback}from'react'importReactDOMfrom'react-dom';importPayment,{InitConfig,SdkMessage,MessageType}from"@solidgate/react-sdk"exportconstMyPayment: FC<{merchantData: InitConfig['merchantData']styles?: InitConfig['styles']formParams?: InitConfig['formParams']width?: string}>=(props)=>{consthandleCard=useCallback((event: SdkMessage[MessageType.Card])=>{// here logic
},[])return(<Payment{...props}onCard={handleCard}/>)}
<template><Payment:merchant-data="merchantData"@card="card"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functioncard(event:SdkMessage[MessageType.Card]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(card)="onCard($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onCard(event: SdkMessage[MessageType.Card]):void{// here your logic
}}
Interaction
Tracks customer interactions with form elements, including buttons and input fields.
Monitors interaction types click, change, focus, blur, enterKeyDown, pageClose, and resetRequested. Provides real-time field-level and form-level validation states isValid, isTouched for both regular and resign payment forms.
For wallet and
Guide
Add alternative payment method buttons to your payment form with customizable styling, placement, and method-specific display conditions.
APM buttons,
interactions can indicate both button clicks and modal close/page close actions.
Event distinction
pageClose fires when the customer clicks the modal’s close ✕ button before form submission.
resetRequested fires when the customer clicks the modal’s close ✕ button after form submission, but only when the APM button was initialized with resetEnabled: true.
This event does not automatically close the modal or cancel the order. It is your responsibility to handle it by destroying the SDK instance and re-initializing with a new order/intent.
interfaceInteractionMessage{type:'interaction'target:{// Indicates source of interaction
type:'button'|'input'// one of the listed
name:'submit'|'applePay'|'googlePay'|'clicktopay'|'cashapp'|'bizum'|'blik'|'mbway'|'paypal'|'pix'|'pix-qr'|'cardNumber'|'cardCvv'|'cardExpiryDate'|'cardHolder'|'email'|'zipCode'|'resignCvv'// Additional field names are also possible, e.g.:
// 'brazilCpf', 'brazilCustomerPhone', 'brazilZip', 'billingAddress', 'billingCity', 'billingState',
// 'pakistanCnic', 'blikCode', 'firstName', 'lastName', 'customerPhone', etc.
interaction:'click'|'change'|'focus'|'blur'|'enterKeyDown'|'pageClose'|'resetRequested'// one of the listed
}cardForm:{// Indicates current card form state
fields:{cardNumber:{isValid: booleanisTouched: boolean}cardCvv:{isValid: booleanisTouched: boolean}cardExpiryDate:{isValid: booleanisTouched: boolean}// The rest of the fields are optional, including, but not limited to: the `cardHolder` field
}isValid: booleanisTouched: boolean}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
interfaceInteractionMessage{type:'interaction'target:{// Indicates source of interaction
type:'button'|'input'// one of the listed
name:'submit'|'resignCvv'// It could be one of the listed; furthermore, Solidgate might extend the list.
interaction:'click'|'change'|'focus'|'blur'|'enterKeyDown'// one of the listed
}resignForm:{// Indicates current resign form state
fields:{resignCvv:{isValid: booleanisTouched: boolean}}isValid: booleanisTouched: boolean}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importReact,{FC,useCallback}from'react'importReactDOMfrom'react-dom';importPayment,{InitConfig,SdkMessage,MessageType}from"@solidgate/react-sdk"exportconstMyPayment: FC<{merchantData: InitConfig['merchantData']styles?: InitConfig['styles']formParams?: InitConfig['formParams']width?: string}>=(props)=>{consthandleInteraction=useCallback((event: SdkMessage[MessageType.Interaction])=>{// here logic
},[])return(<Payment{...props}onInteraction={handleInteraction}/>)}
<template><Payment:merchant-data="merchantData"@interaction="interaction"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functioninteraction(event:SdkMessage[MessageType.Interaction]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(interaction)="onInteraction($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onInteraction(event: SdkMessage[MessageType.Interaction]):void{// here your logic
}}
Form redirect
Indicates when the form redirects the customer to another page, status, or 3D verification page.
1
2
3
interfaceFormRedirectMessage{type:'formRedirect'}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importReact,{FC,useCallback}from'react'importReactDOMfrom'react-dom';importPayment,{InitConfig,SdkMessage,MessageType}from"@solidgate/react-sdk"exportconstMyPayment: FC<{merchantData: InitConfig['merchantData']styles?: InitConfig['styles']formParams?: InitConfig['formParams']width?: string}>=(props)=>{consthandleRedirect=useCallback((event: SdkMessage[MessageType.Redirect])=>{// here logic
},[])return(<Payment{...props}onRedirect={handleRedirect}/>)}
<template><Payment:merchant-data="merchantData"@redirect="redirect"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functionredirect(event:SdkMessage[MessageType.Redirect]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(redirect)="onRedirect($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onRedirect(event: SdkMessage[MessageType.Redirect]):void{// here your logic
}}
Custom styles appended
If custom styles are in place, this event indicates that the form has become visible to the customer, making it helpful for hiding preloaders.
<template><Payment:merchant-data="merchantData"@custom-styles-appended="customStylesAppended"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functioncustomStylesAppended(event:SdkMessage[MessageType.CustomStylesAppended]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(customStylesAppended)="onCustomStylesAppended($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onCustomStylesAppended(event: SdkMessage[MessageType.CustomStylesAppended]):void{// here your logic
}}
Payment processing
These events provide insights into the payment process, including 3DS verification, the order status, and details about the payment, like pricing and taxes.
Success
This event indicates that the payment has been successfully processed.
1
2
3
4
5
6
7
8
9
10
11
interfaceSuccessMessage{type:'success',entity:'applebtn'|'googlebtn'|'form'|'resign'|'bizum'|'blik'|'mbway'|'paypal'|'pix'|'pix-qr'// one of listed values, indicates how payment was processed
order:{// an optional order object
status: string// an optional order status field
currency: string// an optional order currency field
amount: number// an optional order amount field
subscription_id: string// an optional subscription id field
order_id: string// an optional order id field
}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importReact,{FC,useCallback}from'react'importReactDOMfrom'react-dom';importPayment,{InitConfig,SdkMessage,MessageType}from"@solidgate/react-sdk"exportconstMyPayment: FC<{merchantData: InitConfig['merchantData']styles?: InitConfig['styles']formParams?: InitConfig['formParams']width?: string}>=(props)=>{consthandleSuccess=useCallback((event: SdkMessage[MessageType.Success])=>{// here logic
},[])return(<Payment{...props}onSuccess={handleSuccess}/>)}
<template><Payment:merchant-data="merchantData"@success="success"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functionsuccess(event:SdkMessage[MessageType.Success]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(success)="onSuccess($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onSuccess(event: SdkMessage[MessageType.Success]):void{// here your logic
}}
Verify
This event informs you that the payment is undergoing processing through the 3D flow.
1
2
3
interfaceVerifyMessage{type:'verify'}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importReact,{FC,useCallback}from'react'importReactDOMfrom'react-dom';importPayment,{InitConfig,SdkMessage,MessageType}from"@solidgate/react-sdk"exportconstMyPayment: FC<{merchantData: InitConfig['merchantData']styles?: InitConfig['styles']formParams?: InitConfig['formParams']width?: string}>=(props)=>{consthandleVerify=useCallback((event: SdkMessage[MessageType.Verify])=>{// here logic
},[])return(<Payment{...props}onVerify={handleVerify}/>)}
<template><Payment:merchant-data="merchantData"@verify="verify"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functionverify(event:SdkMessage[MessageType.Verify]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(verify)="onVerify($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onVerify(event: SdkMessage[MessageType.Verify]):void{// here your logic
}}
Fail
This event indicates that the payment had been declined.
1
2
3
4
5
6
7
8
9
10
11
12
13
interfaceFailMessage{type:'fail'entity:'applebtn'|'googlebtn'|'form'|'resign'|'bizum'|'blik'|'mbway'|'paypal'|'pix'|'pix-qr'// one of listed values, indicates how payment was processed
code: string// an optional error code from https://docs.solidgate.com/payments/payments-insights/error-codes/
message: string// an optional error message field
order:{// an optional order object
status: string// an optional order status field
currency: string// an optional order currency field
amount: number// an optional order amount field
subscription_id: string// an optional subscription id field
order_id: string// an optional order id field
}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importReact,{FC,useCallback}from'react'importReactDOMfrom'react-dom';importPayment,{InitConfig,SdkMessage,MessageType}from"@solidgate/react-sdk"exportconstMyPayment: FC<{merchantData: InitConfig['merchantData']styles?: InitConfig['styles']formParams?: InitConfig['formParams']width?: string}>=(props)=>{consthandleFail=useCallback((event: SdkMessage[MessageType.Fail])=>{// here logic
},[])return(<Payment{...props}onFail={handleFail}/>)}
<template><Payment:merchant-data="merchantData"@fail="fail"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functionfail(event:SdkMessage[MessageType.Fail]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(fail)="onFail($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onFail(event: SdkMessage[MessageType.Fail]):void{// here your logic
}}
Order status
This event indicates that the order status was changed while processing. However, the event may not show all changes before the final order
Guide
An order is a customer’s request to purchase goods or services, progressing through various states based on payment status.
status
approved
or
declined
.
interfaceOrderStatusMessage{type:'orderStatus',entity:'applebtn'|'googlebtn'|'form'|'resign'|'bizum'|'blik'|'mbway'|'paypal'|'pix'|'pix-qr',// one of listed values, indicates how payment was processed
response: object// Partial order status response.
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importReact,{FC,useCallback}from'react'importReactDOMfrom'react-dom';importPayment,{InitConfig,SdkMessage,MessageType}from"@solidgate/react-sdk"exportconstMyPayment: FC<{merchantData: InitConfig['merchantData']styles?: InitConfig['styles']formParams?: InitConfig['formParams']width?: string}>=(props)=>{consthandleOrderStatus=useCallback((event: SdkMessage[MessageType.OrderStatus])=>{// here logic
},[])return(<Payment{...props}onOrderStatus={handleOrderStatus}/>)}
<template><Payment:merchant-data="merchantData"@order-status="orderStatus"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functionorderStatus(event:SdkMessage[MessageType.OrderStatus]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(orderStatus)="onOrderStatus($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onOrderStatus(event: SdkMessage[MessageType.OrderStatus]):void{// here your logic
}}
Payment details
This event informs of updates or changes to payment details, including price,
Guide
Streamline tax management for your international business operations with Solidgate.
taxes,
and other relevant information, enabling comprehensive tracking of customer actions through the events generated.
<template><Payment:merchant-data="merchantData"@payment-details="paymentDetails"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functionpaymentDetails(event:SdkMessage[MessageType.PaymentDetails]):void{// Validate event structure and handle payment details here
}</script>
<template><Payment:merchant-data="merchantData"@resize="resize"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functionresize(event:SdkMessage[MessageType.Resize]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(resize)="onResize($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onResize(event: SdkMessage[MessageType.Resize]):void{// here your logic
}}
Error
Indicates an error during form initialization or processing. The following Error classes are provided:
ConnectionError - happens when the customer experiences problems with their internet connection.
InitPaymentError - happens when an error with payment intent occurs during initialization.
The message contains a strict object with code and an explanation of the particular error.
Additionally, it includes a details field, allowing you to create different handlers for different errors.
The following error codes are supported (details.code):
GatewayError - occurs when Solidgate cannot parse the response from its backend, please contact support.
Guide
Cardholder authentication was not successful to complete the payment.
1.01
- Invalid credentials or signature generated.
Guide
“Invalid data” code message is used for validation errors, with the reason for the validation triggering specified in the body (object error) of the response.
2.01
- Invalid data in payment intent.
It could be a non-existing product ID or other properties, which is described in a message.
Provides detailed description in details.message by pair key from payment intent with corresponding error message.
Guide
An unrecognized decline code was received during the transaction.
6.01
- Something went wrong on the backend side, please contact support.
<template><Payment:merchant-data="merchantData"@error="error"/></template><scriptlang="ts"setup>import{defineAsyncComponent}from'vue'import{InitConfig,SdkMessage,MessageType}from'@solidgate/vue-sdk'constPayment=defineAsyncComponent(()=>import('@solidgate/vue-sdk'))constmerchantData:InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}functionerror(event:SdkMessage[MessageType.Error]):void{// here your logic
}</script>
import{Component}from'@angular/core';import{InitConfig,SdkMessage,MessageType}from"@solidgate/angular-sdk";@Component({selector:'app-root',template:`
<ngx-solid-payment
[merchantData]="merchantData"
(error)="onError($event)"
></ngx-solid-payment>
`})exportclassAppComponent{merchantData: InitConfig['merchantData']={merchant:'<<--YOUR MERCHANT ID-->>',signature:'<<--YOUR SIGNATURE OF THE REQUEST-->>',paymentIntent:'<<--YOUR PAYMENT INTENT-->>'}onError(event: SdkMessage[MessageType.Error]):void{// here your logic
}}