Update Payment Method For An Order
Safely update or re-create Stripe payment intent and persist state; handles edge cases and resurrection.
Overview
- Method: POST
- Path:
/shared/payment/update-payment-method/<orderId> - Tags: shared
Parameters
orderId (path)
- Type:
string - Required: Yes
- Description: orderId parameter
Request Body
- Content Type:
application/json - Required: Yes
Fields
| Field | Type | Required | Details |
|---|---|---|---|
| paymentMethodId | string | Yes | |
| customerId | string | Yes |
Responses
200
Successful response
Content Type: application/json
{
"success": true,
"message": "string",
"paymentIntentId": "string",
"paymentStatus": "string",
"actionTaken": "string",
"isAuthorized": true,
"isCaptured": true,
"needsManualCapture": true,
"orderStatus": "string",
"amount": "string",
"nextSteps": "string",
"note": "string",
"cardDetails": "string",
"last4": "string",
"exp_month": 123,
"exp_year": 123
}400
Bad Request
Content Type: application/json
{
"success": true,
"message": "string",
"error": "string"
}401
Unauthorized
404
Not Found
500
Internal Server Error
Example Usage
curl -X POST \
https://api.pillexa.com/shared/payment/update-payment-method/<orderId> \
-H "Content-Type: application/json" \
-d '{"example": "data"}'