Rupa Rawi - Revou Group Project
  1. payment method
Rupa Rawi - Revou Group Project
  • auth
    • register user
      POST
    • login
      POST
    • refresh token
      POST
  • user
    • address
      • create address
      • get all address
      • update address
      • delete address
    • payment method
      • get all payment methods
        GET
      • delete payment method
        DELETE
      • update payment method
        PUT
      • create payment method
        POST
    • update own profile
      PUT
    • get own profile
      GET
    • get public profile
      GET
  • product
    • category
      • get categories tree
      • get categories detail
    • wishlist
      • add item to wishlist
      • remove item to wishlist
      • get wishlist
    • promotions
      • get promotion detail (public)
      • get active promotions (public)
    • get product details (public)
      GET
    • get product list (public)
      GET
    • get public vendor products
      GET
  • admin
    • category
      • create category
      • update category
      • soft delete category
      • create subcategory
    • vendor management
      • get all vendors
      • vendor application review
    • promotions
      • get all promotions
      • create promotion
      • update promotion
    • get admin logs
      GET
  • vendor
    • product
      • soft delete product
      • create product
      • update product
      • get vendor products
    • vendor apply
      POST
    • get vendor profile
      GET
    • update vendor profile
      PUT
    • vendor stats
      GET
    • Vendor recent orders
      GET
  • order
    • cart
      • add item to cart
      • update item in cart
      • delete item in cart
      • get cart
    • update order status
    • get order
    • get all orders
    • pre-checkout calculation
    • order checkout
  • article
    • delete article
    • create article
    • get article
    • get article detail
    • update article
  • product review
    • create review product
    • get product reviews by product id
    • get product review detail
    • update product review detail
    • delete product review
  • testimony
    • create testimonial
    • update testimonial
    • get testimonial
    • delete testimonial
  1. payment method

create payment method

Developing
POST
user/me/payment-methods
class PaymentType(Enum):
CREDIT_CARD = "credit card"
DEBIT_CARD = "debit card"
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'user/me/payment-methods' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc0NjAzOTUxNywianRpIjoiOWU0YTg4YzAtYTJlNS00Yzk3LTliYTMtMzA0N2FmMzJiMGM2IiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjE3IiwibmJmIjoxNzQ2MDM5NTE3LCJjc3JmIjoiYjM5YmYxZDAtNjQ2ZS00N2MxLWJlMTUtMDc0ZDM2YzFhYzE2IiwidXNlcm5hbWUiOiJlY29fc2VsbGVyMTAiLCJlbWFpbCI6InNlbGxlcjEwQGV4YW1wbGUuY29tIn0.NOPXUzRkau0gZKldc-jUOz4pTGUdZ3zECgcXFAlZc0o' \
--header 'Content-Type: application/json' \
--data-raw '{
    "payment_type": "credit card",
    "provider": "Visa",
    "account_number": "4111111111111111",
    "expiry_date": "03/26",
    "is_default": true
  }'
Response Response Example
{
  "message": {
    "account_number": "4111************",
    "created_at": "Mon, 05 May 2025 17:30:05 GMT",
    "id": 7,
    "payment_type": "credit card",
    "provider": "Visa",
    "updated_at": "Mon, 05 May 2025 17:30:05 GMT",
    "user_id": 17
  },
  "success": true
}

Request

Header Params
Authorization
string 
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc0NjAzOTUxNywianRpIjoiOWU0YTg4YzAtYTJlNS00Yzk3LTliYTMtMzA0N2FmMzJiMGM2IiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjE3IiwibmJmIjoxNzQ2MDM5NTE3LCJjc3JmIjoiYjM5YmYxZDAtNjQ2ZS00N2MxLWJlMTUtMDc0ZDM2YzFhYzE2IiwidXNlcm5hbWUiOiJlY29fc2VsbGVyMTAiLCJlbWFpbCI6InNlbGxlcjEwQGV4YW1wbGUuY29tIn0.NOPXUzRkau0gZKldc-jUOz4pTGUdZ3zECgcXFAlZc0o
Body Params application/json
payment_type
string 
required
provider
string 
required
account_number
string 
required
expiry_date
string 
required
is_default
boolean 
required
Examples

Responses

🟢201Success
application/json
Body
message
object 
required
account_number
string 
required
created_at
string 
required
id
integer 
required
payment_type
string 
required
provider
string 
required
updated_at
string 
required
user_id
integer 
required
success
boolean 
required
Modified at 2025-05-05 17:31:12
Previous
update payment method
Next
update own profile
Built with