Payment Intents

Attach a payment method to a payment intent

Attaches a payment method, which starts the authorization and returns the payer's next_action. Served by core-api or payments-api depending on the organization's rollout, which may enable payments-api per the attached method's type, in the same response shape either way. A request carrying payment_method_options is served by either; payments-api accepts the field without acting on it.

post/v1/payment_intents/{id}/attach

Request

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

Path parameters

idstring required

Payment intent ID

Request body

Example request

{
  "data": {
    "attributes": {
      "payment_method": "pm_abc123",
      "return_url": "https://merchant.example/done"
    }
  }
}

Response

OK

Example response

{
  "data": {
    "id": "pi_abc123",
    "type": "payment_intent"
  }
}

Changes

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