NoteMerchant should request to whitelist deeplink to make this work. Please connect with our product/support for this.
| Integration Needed | Details |
|---|---|
| Mini App Frontend | Available since: GoPay 1.45.0 |
| Mini App npm SDK Version | Available since: 0.3.19 |
Sample Request:
const webUrl = response.webRedirectUrl;
function convertToGoPayDeepLink(url) {
const urlObj = new URL(url);
const params = urlObj.search;
return `gopay://merchanttransfer${params}`;
}
const paymentDeeplink = convertToGoPayDeepLink(webUrl);
miniAppSdk.triggerPayment({ deeplink: paymentDeeplink }).then((result) => {
console.log('Payment status:', result.data.status);
});Sample Response:
Success Response:
{
success: true,
data: {
status: "success"
}
}Error Response:
{
success: false,
error: {
code: 300,
message: "Permission denied"
},
}- Data will be null in case of success = false, and vice versa.
- Error will be null in case of success = true, and vice versa.
This service only requires frontend implementation.
Payment status values:
| Status | Description |
|---|---|
| success | User has successfully paid the transaction |
| cancelled | User cancelled the transaction |
| failed | There's an error processing the transaction |
| pending | User goes back to the miniapp without completing or cancelling the payment |
Possible Error Codes:
| Error Code | Description |
|---|---|
| 200 | Incomplete parameter error |
| 201 | Invalid parameter type error |
| 202 | Parameter data error |
| 401 | Network error |