pos-resend-direct-otp
Method: POST
Path: /pos/payments/resend-direct-otp
Tags: Payments
Summary
Resend direct OTP
Pos SDK Usage
SDK Method: pos.resendDirectOtp()
Example:
typescript
const { data, error } = await pos.resendDirectOtp({
txn_id: "txn_123",
challenge_id: "challenge_123"
});
if (error) {
console.error("Failed to resend OTP:", error.message);
}TypeScript Definition
typescript
"pos-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: {
txn_id?: string;
challenge_id?: string;
} & {
[key: string]: unknown;
};
};
};
};
};
/** @description The payment input or authentication attempt is invalid. */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
code: string;
errors?: Record<string, never>;
};
};
};
401: components["responses"]["Unauthorized"];
403: components["responses"]["Forbidden"];
408: components["responses"]["RequestTimeout"];
500: components["responses"]["InternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["RequestTimeout"] | RequestTimeout |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Request Body
Content Types: application/json
Responses
200
OK
400
The payment input or authentication attempt is invalid.
401
Authentication failed. Codes include token-required, token-expired and token_not_valid for an invalid or expired token.
403
Access denied. token-required requires an authenticated session; permission-denied means the caller cannot access this resource. On POS, session-expired requires signing in again.
408
500
The request failed because of an unexpected error.
504
The request timed out.
OpenAPI Definition
json
{
"operationId": "pos-resend-direct-otp",
"summary": "Resend direct OTP",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"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",
"maxLength": 256,
"minLength": 1,
"pattern": "\\S"
},
"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",
"maxLength": 256,
"minLength": 1,
"pattern": "\\S"
}
},
"required": [
"txn_id",
"challenge_id"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"payment_info": {
"type": "object",
"additionalProperties": true,
"properties": {
"txn_id": {
"type": "string"
},
"challenge_id": {
"type": "string"
}
}
}
},
"required": [
"payment_info"
],
"type": "object"
}
},
"required": [
"message",
"success",
"content"
]
}
}
}
},
"400": {
"description": "The payment input or authentication attempt is invalid.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"x-speakeasy-error-message": true
},
"success": {
"type": "boolean"
},
"code": {
"type": "string"
},
"errors": {
"type": "object"
}
},
"required": [
"message",
"success",
"code"
]
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"408": {
"$ref": "#/components/responses/RequestTimeout"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"externalDocs": {
"url": "https://llm-docs.commercengine.io/admin-pos/operations/pos-resend-direct-otp"
},
"security": [
{
"Authorization": []
}
],
"tags": [
"Payments"
],
"x-speakeasy-group": "pos",
"x-speakeasy-name-override": "resendDirectOtp"
}Auto-generated from OpenAPI spec and TypeScript definitions