POST/payments/intents

Create

Creates the payment intent resource

Request Body

required
object

Request with information to create a payment intent

paymentRequestIdstring

Primary identifier of the payment request associated to the payment intent

parametersobject

Credentials neccesary to create a payment intent

cpfrequiredstring

CPF of the payer

cnpjstring

CNPJ of the payer

namestring

Name of the payer. Only required for automatic pix payment requests.

connectorIdnumber

Primary identifier of the connector associated to the payment intent

paymentMethodstring

Payment method can be PIS (Payment Initiation) or PIX (PIX QR flow).

PIS
isDynamicPixboolean

Only for PIX paymentMethod. If true, the generated PIX QR code is dynamic and one-use. This requires the customerId to be present, and the customer must have CPF/CNPJ

Example

json
{}

Responses

200Create a payment intent.
object

Request with information related to a payment intent

idrequiredstring

Primary identifier

statusrequiredstring

Lifecycle of a payment intent. The flow goes from consent collection (CONSENT_*) to payment execution (PAYMENT_*). **Consent phase** - `STARTED`: the consent process started at Pluggy. - `ENQUEUED`: the payment is enqueued waiting for the consent flow to be initiated. - `CONSENT_AWAITING_AUTHORIZATION`: the payer must complete the authorization at the institution (see `consentUrl`). - `CONSENT_AUTHORIZED`: the consent was granted by the payer. - `CONSENT_REJECTED`: the consent was rejected by the payer or the institution. **Payment phase** - `PAYMENT_PENDING`: the payment was submitted to the institution and is waiting confirmation. - `PAYMENT_PARTIALLY_ACCEPTED`: the payment was accepted but still needs an additional authorization (e.g. multi-signature accounts). - `PAYMENT_SETTLEMENT_PROCESSING`: the settlement is being processed. - `PAYMENT_SETTLEMENT_DEBTOR_ACCOUNT`: the funds were debited from the payer account; awaiting clearing. - `PAYMENT_COMPLETED`: the payment was confirmed by the institution. - `PAYMENT_REJECTED`: the payment was rejected after consent was authorized. **Terminal / other** - `REJECTED`: generic rejected status (institution-specific reason in `errorDetail`). - `ERROR`: an unexpected error occurred during the flow. - `CANCELED`: the intent was canceled. - `REVOKED`: the consent was revoked after authorization (recurring payments only). - `CONSUMED`: the consent was fully consumed (recurring payments reached their end).

STARTEDENQUEUEDCONSENT_AWAITING_AUTHORIZATIONCONSENT_AUTHORIZEDCONSENT_REJECTEDPAYMENT_PENDINGPAYMENT_PARTIALLY_ACCEPTEDPAYMENT_SETTLEMENT_PROCESSINGPAYMENT_SETTLEMENT_DEBTOR_ACCOUNTPAYMENT_COMPLETEDPAYMENT_REJECTEDREJECTEDERRORCANCELEDREVOKEDCONSUMED
createdAtrequiredstring (date-time)

Date when the payment intent was created

updatedAtrequiredstring (date-time)

Date when the payment intent was updated

paymentRequestobject

Payment request associated to the payment intent

All of:
part 1object

Response with information related to a payment request

connectorobject

Connector associated to the payment intent

All of:
part 1object

Connector object

consentUrlstring

Url to authorize the payment intent

referenceIdstring

Pix id related to the payment intent

paymentMethodstring

Payment method can be PIS (Payment Initiation) or PIX

PISPIX

Default: "PIS"

pixDataobject

Pix data related to the payment intent (only applies for PIX payment method)

All of:
part 1object

Payment Intent PIX data

debtorobject | nullnullable

Information about the payer's account, returned by the institution after the payment is completed. Null until the institution exposes it.

All of:
part 1object

Information about the payer's account, as returned by the institution after the payment is completed. Only populated for `PAYMENT_COMPLETED` payment intents on connectors that expose this data.

errorDetailobject

Error details when payment intent fails

All of:
part 1object

Details about an error that occurred with the payment intent

Example response

json
{
  "id": "4cfe1f6d-ae71-4c35-aae0-8f8a535ffbbd",
  "status": "CONSENT_AWAITING_AUTHORIZATION",
  "createdAt": "2023-11-06T15:38:47.861Z",
  "updatedAt": "2023-11-06T15:45:19.384Z",
  "paymentRequest": {
    "id": "c2a6b7d9-3349-435d-8341-44021449ebbc",
    "amount": 100.5,
    "description": "Transferência",
    "status": "IN_PROGRESS",
    "createdAt": "2023-11-06T13:03:45.689Z",
    "updatedAt": "2023-11-06T15:45:19.401Z",
    "callbackUrls": null,
    "recipient": null,
    "paymentUrl": "https://pay.pluggy.ai/05c693bf-c196-47ea-a28c-8251d6bb8a06"
  },
  "connector": {
    "id": 603,
    "name": "Bradesco",
    "primaryColor": "e5173f",
    "institutionUrl": "https://banco.bradesco/open-finance/logo/icones_vetorial-pf.svg",
    "country": "BR",
    "type": "PERSONAL_BANK",
    "credentials": [
      {
        "validation": "^\\d{3}\\.?\\d{3}\\.?\\d{3}-?\\d{2}$",
        "validationMessage": "CPF deve ter 11 números.",
        "label": "CPF",
        "name": "cpf",
        "type": "number",
        "placeholder": "",
        "optional": false
      }
    ],
    "imageUrl": "https://cdn.pluggy.ai/assets/connector-icons/203.svg",
    "hasMFA": false,
    "oauth": true,
    "health": {
      "status": "ONLINE",
      "stage": null
    },
    "products": [
      "ACCOUNTS",
      "TRANSACTIONS",
      "IDENTITY",
      "CREDIT_CARDS",
      "PAYMENT_DATA",
      "LOANS",
      "INVESTMENTS"
    ],
    "createdAt": "2023-07-12T20:20:17.253Z",
    "isSandbox": false,
    "isOpenFinance": true
  },
  "consentUrl": "https://consenturl.com"
}

Code Examples

bash
curl -X POST 'https://api.pluggy.ai/payments/intents' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -d '{}'

Try It