user3098629
user3098629

Reputation: 305

Stripe Error Unrecognized request URL (POST: /v1/customers/)

I am attempting to update a card for a customer but I keep running into the following error:

Unrecognized request URL (POST: /v1/customers/). If you are trying to list objects, remove the trailing slash. If you are trying to retrieve an object, make sure you passed a valid (non-empty) identifier in your code. Please see https://stripe.com/docs or we can help at https://support.stripe.com/.

public function create_payment( $meta ) {
        
        try {
            
            return \Stripe\Customer::update( $meta );
        } catch ( \Exception $e ) {

            return $this->get_error( $e );
        }
        
    }

The array I am passing is:

Array ( [0] => cus_Ki70TVjxbH5Iyj [1] => Array ( [default_source] => card_1K2iuHEnwinWAjhjSN00IXjp ) )

Upvotes: 1

Views: 2284

Answers (1)

user3098629
user3098629

Reputation: 305

The problem is that a trailing slash was being passed to the API and that was causing the error. It is fixed now

Upvotes: 1

Related Questions