Generate OTP

POST/api/pay/v1/otp/generate

Generate a One-Time Password (OTP) for card payment authentication. This API is called after a card payment is created and the card requires OTP-based verification (native OTP flow).

Requires Bearer token. Get token →

Request Body

NameTypeDescription
payment_id
stringrequired

Unique identifier of the payment requiring OTP verification.

Response

NameTypeDescription
next
string[]

Available next actions.

meta_data
object

Additional metadata for OTP handling.

resend_after
string

Minimum wait time in seconds before OTP can be resent.

Status Codes

200OTP generated successfully.
400
422Unprocessable entity — payment not eligible for OTP generation.
500
503Service temporarily unavailable.
Request
curl --request POST \
  --url https://pluraluat.v2.pinepg.in/api/pay/v1/otp/generate \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "payment_id": "v1-5757575757-aa-hU1rUd-cc-l"
}'

Run this request

200 OK
{
  "next": [
    "SUBMIT_OTP",
    "RESEND_OTP"
  ],
  "meta_data": {
    "resend_after": "180"
  }
}
New chat
Responses are generated using AI and may contain mistakes.
Hi! I'm Pine, your AI developer assistant. Ask me anything about Pine Labs APIs, integrations, or troubleshooting.

Tip: you can create a new chat with ⌘ + E