PayMongo Payment Intents API

The Payment Intents API from PayMongo — 3 operation(s) for payment intents.

Documentation

📖
Documentation
https://docs.paymongo.com/docs/payment-acceptance-introduction
📖
APIReference
https://docs.paymongo.com/reference/create-a-paymentintent
📖
APIReference
https://docs.paymongo.com/reference/create-a-paymentmethod
📖
APIReference
https://docs.paymongo.com/reference/list-all-payments
📖
Documentation
https://docs.paymongo.com/docs/older-workflows
📖
Documentation
https://docs.paymongo.com/docs/payment-channels-hosted-checkout
📖
APIReference
https://docs.paymongo.com/reference/create_checkout_sessions
📖
Documentation
https://docs.paymongo.com/docs/payment-channels-payment-links
📖
APIReference
https://docs.paymongo.com/reference/post_v1-payment-links
📖
Documentation
https://docs.paymongo.com/docs/payment-acceptance-card-vaulting
📖
APIReference
https://docs.paymongo.com/reference/retrieve-customer
📖
Documentation
https://docs.paymongo.com/docs/payment-acceptance-refunds
📖
Documentation
https://docs.paymongo.com/docs/payment-acceptance-qr-ph
📖
APIReference
https://docs.paymongo.com/reference/generate-mpm-qr
📖
Documentation
https://docs.paymongo.com/docs/developer-tools-webhooks
📖
APIReference
https://docs.paymongo.com/reference/create-a-webhook
📖
Documentation
https://docs.paymongo.com/docs/payment-acceptance-subscriptions
📖
APIReference
https://docs.paymongo.com/reference/create-a-subscription
📖
Documentation
https://docs.paymongo.com/docs/money-movement-moving-money-with-api
📖
APIReference
https://docs.paymongo.com/reference/transfer-resource
📖
Documentation
https://docs.paymongo.com/docs/money-movement-forex
📖
APIReference
https://docs.paymongo.com/reference/quote-resource
📖
APIReference
https://docs.paymongo.com/reference/fraud-detection-overview

Specifications

Other Resources

OpenAPI Specification

paymongo-payment-intents-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: PayMongo Checkout Sessions Payment Intents API
  description: PayMongo is a Philippine payments platform. The REST API lets businesses accept payments via cards, GCash, Maya (PayMaya), GrabPay, ShopeePay, QR Ph, BillEase (buy-now-pay-later), and direct online banking, using the Payment Intent / Payment Method workflow, hosted Checkout Sessions, Payment Links, Customers, Refunds, and Webhooks. All amounts are integers in centavos (1 PHP = 100). PHP is the only settlement currency (card intents may optionally be switched to USD).
  version: '2020-08-08'
  termsOfService: https://www.paymongo.com/terms
  contact:
    name: PayMongo Developer Support
    email: support@paymongo.com
    url: https://docs.paymongo.com
servers:
- url: https://api.paymongo.com/v1
  description: Production (live and test mode selected by API key prefix)
security:
- basicAuth: []
tags:
- name: Payment Intents
paths:
  /payment_intents:
    post:
      operationId: createPaymentIntent
      tags:
      - Payment Intents
      summary: Create a Payment Intent
      description: Creates a Payment Intent that tracks the lifecycle of a payment. Uses the secret API key. Amount is an integer in centavos (minimum 2000 = PHP 20.00 for most methods).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentIntentCreate'
      responses:
        '200':
          description: Payment Intent created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentIntentResource'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
  /payment_intents/{id}:
    get:
      operationId: retrievePaymentIntent
      tags:
      - Payment Intents
      summary: Retrieve a Payment Intent
      parameters:
      - $ref: '#/components/parameters/ResourceId'
      - name: client_key
        in: query
        required: false
        schema:
          type: string
        description: Client key allowing retrieval with the public key (client-side).
      responses:
        '200':
          description: Payment Intent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentIntentResource'
        '404':
          $ref: '#/components/responses/Error'
  /payment_intents/{id}/attach:
    post:
      operationId: attachPaymentIntent
      tags:
      - Payment Intents
      summary: Attach a Payment Method to a Payment Intent
      description: Attaches a Payment Method to a Payment Intent to attempt the payment. For redirect-based methods (GCash, GrabPay, Maya) the response contains a next_action.redirect.url the customer must be sent to.
      parameters:
      - $ref: '#/components/parameters/ResourceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentIntentAttach'
      responses:
        '200':
          description: Payment Intent after attach
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentIntentResource'
        '400':
          $ref: '#/components/responses/Error'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
                  attribute:
                    type: string
    PaymentIntentAttach:
      type: object
      required:
      - data
      properties:
        data:
          type: object
          properties:
            attributes:
              type: object
              required:
              - payment_method
              properties:
                payment_method:
                  type: string
                  description: The Payment Method id (pm_...) to attach.
                client_key:
                  type: string
                return_url:
                  type: string
                  description: URL the customer is redirected to after off-site authorization.
    PaymentIntentResource:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: pi_xxx
            type:
              type: string
              example: payment_intent
            attributes:
              type: object
              properties:
                amount:
                  type: integer
                currency:
                  type: string
                status:
                  type: string
                  enum:
                  - awaiting_payment_method
                  - awaiting_next_action
                  - processing
                  - succeeded
                  - cancelled
                client_key:
                  type: string
                next_action:
                  type: object
                  nullable: true
                  properties:
                    type:
                      type: string
                      example: redirect
                    redirect:
                      type: object
                      properties:
                        url:
                          type: string
                        return_url:
                          type: string
    PaymentIntentCreate:
      type: object
      required:
      - data
      properties:
        data:
          type: object
          properties:
            attributes:
              type: object
              required:
              - amount
              - payment_method_allowed
              - currency
              properties:
                amount:
                  type: integer
                  description: Amount in centavos (integer). Minimum typically 2000 (PHP 20.00).
                  example: 10000
                currency:
                  type: string
                  description: Three-letter ISO currency code, uppercase. PHP is the default and only settlement currency (card intents may be switched to USD).
                  example: PHP
                payment_method_allowed:
                  type: array
                  items:
                    type: string
                    enum:
                    - card
                    - gcash
                    - grab_pay
                    - paymaya
                    - billease
                    - dob
                    - qrph
                  example:
                  - card
                  - gcash
                  - grab_pay
                  - paymaya
                capture_type:
                  type: string
                  enum:
                  - automatic
                  - manual
                  default: automatic
                description:
                  type: string
                statement_descriptor:
                  type: string
                metadata:
                  type: object
                  additionalProperties: true
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  parameters:
    ResourceId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: The identifier of the resource (e.g. pi_..., pm_..., pay_...).
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication. Provide your API key as the Basic-auth username (secret key sk_test_* / sk_live_* for server-side calls; for calls that accept the public key pk_test_* / pk_live_*, the public key goes in the username field). The password field is left blank unless a call requires both keys.