resend-direct-otp
Method: POST
Path: /payments/resend-direct-otp
Tags: Payments
Summary
Resend direct OTP
Description
Resend direct OTP
Storefront SDK Usage
SDK Method: sdk.payments.resendDirectOtp()
Example:
typescript
// If user didn't receive OTP or it expired:
const { data, error } = await sdk.payments.resendDirectOtp({
txn_id: "txn_01H9XYZ12345ABCDE",
challenge_id: "challenge_01H9XYZ12345ABCDE"
});
if (error) {
console.error("Failed to resend OTP:", error.message);
} else {
console.log("OTP resent successfully");
console.log("New payment info:", data.payment_info);
}TypeScript Definition
typescript
"resend-direct-otp": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": {
/** @description You can get the txn_id from the response of create order API under the payment object inside the payment_info object. The key is 'id' under the params object inside the authentication object. */
txn_id: string;
/** @description You can get the challenge_id from the response of create order API under the payment object inside the payment_info object. The key is 'challenge_id' under the params object inside the authentication object. */
challenge_id: string;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
payment_info: components["schemas"]["JusPayExpressCheckoutResponse"];
};
};
};
};
400: components["responses"]["BadRequest"];
401: components["responses"]["Unauthorized"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["JusPayExpressCheckoutResponse"] | JusPayExpressCheckoutResponse |
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
Request Body
Content Types: application/json
Responses
200
OK
400
Bad request
401
Not authorized for given operation on the Resource
OpenAPI Definition
json
{
"tags": [
"Payments"
],
"operationId": "resend-direct-otp",
"summary": "Resend direct OTP",
"description": "Resend direct OTP",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/operations/resend-direct-otp",
"description": "API reference for the resend-direct-otp operation"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"txn_id",
"challenge_id"
],
"properties": {
"txn_id": {
"description": "You can get the txn_id from the response of create order API under the payment object inside the payment_info object. The key is 'id' under the params object inside the authentication object.",
"type": "string"
},
"challenge_id": {
"description": "You can get the challenge_id from the response of create order API under the payment object inside the payment_info object. The key is 'challenge_id' under the params object inside the authentication object.",
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success",
"content"
],
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"payment_info": {
"$ref": "#/components/schemas/JusPayExpressCheckoutResponse"
}
},
"required": [
"payment_info"
],
"type": "object"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
}
},
"security": [
{
"Authorization": []
}
],
"x-speakeasy-group": "payments",
"x-speakeasy-ignore": true,
"x-speakeasy-name-override": "resendDirectOtp"
}Auto-generated from OpenAPI spec and TypeScript definitions