Payment Method Hosted Pages API

Design

The Payment Method Hosted Pages API is designed for you to be able to create a hosted page on which a property can enter their payment method details. You will need to create a Billing Customer prior to hitting this endpoint.

Authentication

Payment Method Hosted Pages require authentication

Actions

Create a Payment Method Hosted Page

Request

Make a POST request to the following endpoint:

https://app.staylists.com/api/v3/payment_method_hosted_pages

Parameters

billing_customer_id a string reference obtained from the Billing Customers API

redirect_url the URL you’d like the customer to be redirect to after they’ve added or updated their Payment Method.

Response

When successful

We’ll return a 200 with a body that looks something like this:

{
    "object": "PaymentMethodHostedPage",
    "data": {
        "url": "https://staylists.chargebee.com/pages/v3/PqXTw00o2TAfVhUPDNGGQrTOrcur9vBCW/",
    }
}

You can then send the customer to this URL.

When unsuccessful

{
    "error": "customer[id] : customer resource with identifier does-not-exist does not exist."
}