URL
/host/pgw/api/payment-method/delete
Method:
POST
Header params
An authentication token is required to prevent unauthorized access to protected data.
Required:
-> auth_token=[string]
- authorization token
-> content-type
- application/json
URL Params
Api will consume query and data params.
Required (Query params):
id=[string]
- payment method id (also known as pm_alias)
POST Params
Required:
-> delete_reason=[string]
- reason for deleting payment method
Example request
Curl:
curl -X POST \
'https://mobile.webteh.hr/pgw/api/payment-method/delete?id=q292GMUIoy3CPJ_5V4ghr7OJQOzU5qhHhNKB4ou3' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: aa25ccdc-45e0-4a39-b3e6-48e012bb55a4' \
-H 'auth_token: 00001111222233330000111122223333' \
-d '{
"delete_reason": "User delete"
}'
Success Response:
Response is successful:
Response contains: status: string
Code: 200
Content:
{
"status": "not_deleted"
}
Error Response:
Error response can occur in scenarios:
- Wrong or missing auth token
- Code:
401 UNAUTHORIZED
- Invalid input (delete_reason not provided, etc)
- Code:
422 Unprocessable entity
- Response:
{
"status": "not_deleted",
"message": "Validation failed",
"errors": [
"Delete reason (delete_reason) not provided!"
]
}- Payment method with id not found
- Code:
422 Unprocessable entity
- Response:
{
"status": "not_deleted",
"message": "Validation failed",
"errors": [
"Payment method q292GMUIoy3CPJ_5V4ghr7OJQOzU5qhHhNKB4ou3 not found"
]
}