Checkout Sessions

Attach checkout session

Creates a payment intent, payment method, and attaches them. Returns status and redirect URL if needed.

post/v1/checkout_sessions/{id}/attach

Request

  • Base URL
    https://api.paymongo.com
  • URL
    https://api.paymongo.com/v1/checkout_sessions/{id}/attach
  • Auth
    HTTP basic

Path parameters

idstring required

Checkout session ID

Request body

Example request

{
  "data": {
    "attributes": {
      "payment_method_type": "card"
    }
  }
}

Response

Payment method attached successfully

has_moreboolean

Example response

{
  "data": {
    "attributes": {
      "payments": [
        {
          "attributes": {
            "status": "paid"
          }
        }
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.