### GET /v1/internal/stages Source: https://docs.paymongo.com/reference/list_internal_stages Documentation for the List stages endpoint, including query parameters, headers, and example request. ```APIDOC ## GET /v1/internal/stages ### Description List stages with optional pipeline_id, name, and entity_type filters (lead or deal). Cursor pagination: reuse the same query params when following `cursor`. Ordered by created_at descending. ### Method GET ### Endpoint https://sales-api.paymongo.com/v1/internal/stages ### Parameters #### Query Parameters - **cursor** (string) - Optional - Cursor from previous response - **limit** (integer) - Optional - Page size (1-50, default 20) - **pipeline_id** (array of strings) - Optional - Comma-separated or repeated pipeline IDs (match any) - **name** (string) - Optional - Filter by stage name (substring, case-insensitive) - **entity_type** (string) - Optional - Filter by pipeline entity type (lead or deal) #### Headers - **accept** (string) - Optional - Defaults to application/json. Allowed: `*/*`, `application/json` ### Request Example ``` curl --request GET \ --url https://sales-api.paymongo.com/v1/internal/stages \ --header 'accept: application/json' ``` ### Response #### Success Response (200) OK #### Error Response (400) Bad Request ``` -------------------------------- ### cURL request to list workflow instances Source: https://docs.paymongo.com/reference/instances Use this cURL command to list workflow instances with current step info. It sends a GET request to the base URL with an accept header for JSON. No query parameters are included in this example. ```shell curl --request GET \ --url https://api.paymongo.com/v1/workflows/instances \ --header 'accept: application/json' ``` -------------------------------- ### Create a capability request with curl Source: https://docs.paymongo.com/docs/onboarding-aas-capability-requests Creates a capability request for onboarding a product. The request is always created for the account whose secret key made the call; an account_id in the body is ignored. Only one open request per product code is allowed; a second create while one is still submitted, under_review, or pending_clarification is rejected as a duplicate. The request is created in the submitted status, with exceptions for auto-approved account updates and auto-declined requests. ```bash curl -X POST https://api.paymongo.com/v1/requests \ -u sk_live_xxxxxxxxxxxx: \ -H 'Content-Type: application/json' \ -d '{ "request_type": "onboarding", "product_code": "prd_svc_paymongo_ewallet_maya", "requester_id": "org_xxxxxxxxxxxx", "kyb_data": {} }' ``` -------------------------------- ### GET /v1/card_installment_plans Source: https://docs.paymongo.com/reference/card-installment-plans Documentation for the List all Installment Plans endpoint, including query parameters and example request. ```APIDOC ## GET /v1/card_installment_plans ### Description Retrieves a list of all installment plans available for card payments. This endpoint allows you to fetch the available installment plans, optionally filtered by the total amount of the installment. ### Method GET ### Endpoint https://api.paymongo.com/v1/card_installment_plans ### Parameters #### Query Parameters - **amount** (int32) - Optional - Total amount of the installment. A positive integer with minimum amount of 300000 (PHP 3,000.00). 300000 is expressed in cents, the smallest currency unit. If you want to receive an amount of 3500.50, the value that you should pass is 350050. ### Request Example ``` curl --request GET \ --url https://api.paymongo.com/v1/card_installment_plans \ --header 'accept: application/json' \ --header 'authorization: Basic ••••' ``` ### Response #### Success Response (200) Returns a list of installment plans. The response schema is not detailed in the source. #### Response Example ```json {} ``` #### Error Response (400) Returns an error response. The error schema is not detailed in the source. #### Response Example ```json {} ``` ``` -------------------------------- ### POST /onboarding (E-wallets and card) Source: https://docs.paymongo.com/docs/onboarding-aas-capability-requests Creates an onboarding request for e-wallet or card products. The account is the source of truth, so kyb_data is normally empty; include missing fields or documents only if eligibility check reports them missing. ```APIDOC ## [POST] /onboarding ### Description Creates an onboarding request for e-wallet or card products. The account is the source of truth, so kyb_data is normally empty; include missing fields or documents only if eligibility check reports them missing. ### Method POST ### Endpoint /onboarding ### Parameters #### Request Body - **request_type** (string) - Required - Must be "onboarding". - **product_code** (string) - Required - One of the e-wallet or card product codes. - **requester_id** (string) - Required - The ID of the requester. - **kyb_data** (object) - Optional - Normally empty; include missing fields or documents as needed. ### Request Example { "request_type": "onboarding", "product_code": "prd_svc_paymongo_ewallet_gcash", "requester_id": "org_xxxxxxxxxxxx", "kyb_data": {} } ### Response #### Success Response (200) - **id** (string) - The ID of the created request. - **status** (string) - The status of the request. #### Response Example { "id": "req_xxxxxxxxxxxx", "status": "pending" } ``` -------------------------------- ### GET /v1/ledger_entries Source: https://docs.paymongo.com/reference/list-ledger-entries Documentation for the GET /v1/ledger_entries endpoint, including query parameters and a cURL request example. ```APIDOC ## [GET] /v1/ledger_entries ### Description Retrieves a list of ledger entries. Supports pagination, filtering by status, ledger account, direction, ledger transaction, and bulk retrieval by IDs. ### Method GET ### Endpoint https://api.paymongo.com/v1/ledger_entries ### Parameters #### Query Parameters - **after** (string) - Optional - Use a ledger entry ID to retrieve records that come after the specified one. - **before** (string) - Optional - Use a ledger entry ID to retrieve records that come before the specified one. - **per_page** (int32) - Optional - The number of records to return. - **status** (string) - Optional - Use this query parameter to filter ledger entries by status. Valid values are pending, posted, or archived. - **ledger_account_id** (string) - Optional - Returns all ledger entries associated with a specific ledger account. - **direction** (string) - Optional - Retrieves all ledger entries that match the specified direction. - **ledger_transaction_id** (string) - Optional - Returns all ledger entries linked to a specific ledger transaction. - **id[]** (array of strings) - Optional - To retrieve specific records in bulk, pass their IDs as query parameters using id[]. For example: ?id[]=123&id[]=456. ### Request Example ``` curl --request GET \ --url https://api.paymongo.com/v1/ledger_entries \ --header 'accept: application/json' \ --header 'authorization: Basic ••••' ``` ### Response #### Success Response (200) Returns a list of ledger entries. The response schema is not detailed in the source. #### Response Example Not provided in the source. ``` -------------------------------- ### Onboarding request for e-wallet/card product Source: https://docs.paymongo.com/docs/onboarding-aas-capability-requests Example request body for onboarding an e-wallet or card product. The account is the source of truth, so kyb_data is normally empty or omitted; include only fields or documents that the eligibility check reports as missing. ```json { "request_type": "onboarding", "product_code": "prd_svc_paymongo_ewallet_gcash", "requester_id": "org_xxxxxxxxxxxx", "kyb_data": {} } ``` -------------------------------- ### GET /v1/fraud/rules Source: https://docs.paymongo.com/reference/fraud-list-all-rules This snippet documents the GET endpoint for listing all fraud rules, including query parameters, request example, and response schema. ```APIDOC ## GET /v1/fraud/rules ### Description Retrieves a paginated list of all custom fraud rules configured for your organization. Each rule defines a set of conditions (such as risk score thresholds, country codes, payment amounts, etc.) and the action to take (`allow`, `block`, or `review`) when those conditions are met. The endpoint returns rule metadata, logical operators, priority order, and the full set of conditions for each rule. ### Method GET ### Endpoint https://api.paymongo.com/v1/fraud/rules ### Parameters #### Query Parameters - **after** (string) - Optional - A cursor for use in pagination. `after` is a resource ID that defines your place in the list. For example, if you make a list request and receive 10 resources, ending with `some_resource_id`, your subsequent call can include `after=some_resource_id` in order to fetch the next page of the list. - **limit** (integer) - Optional - Defaults to 10. Limit of resources to return. If not passed, the default limit is 10. - **rule_attribute** (string) - Optional - Name of the rule attribute. ### Request Example ``` curl --request GET \ --url 'https://api.paymongo.com/v1/fraud/rules?limit=10' \ --header 'accept: application/json' \ --header 'authorization: Basic ••••' ``` ### Response #### Success Response (200) - **has_more** (boolean) - Indicates if there are more resources to fetch. - **data** (array) - List of rule resources. - **id** (string) - Unique ID of the Rule resource. - **type** (string) - Resource type (`fraud.rule`). - **enabled** (boolean) - Whether the rule is active. - **name** (string) - Name of the rule. - **operator** (string) - Logical operator for combining conditions (`AND` or `OR`). - **rules** (array) - List of rule conditions. - **rule_attribute** (string) - Attribute evaluated (e.g., risk score, country). - **rule_value** (string or array) - Value(s) for the condition. - **action** (string) - Action to take (`allow`, `block`, `review`). - **rule_order** (integer) - Priority order of the rule. - **created_at** (string) - Timestamp when the rule was created. - **updated_at** (string or null) - Timestamp when the rule was last updated. #### Response Example ```json { "has_more": false, "data": [ { "id": "frl_abcdefg123456", "type": "fraud.rule", "enabled": true, "name": "My 1st Rule", "operator": "AND", "rules": [ { "rule_attribute": "risk_score_gte", "rule_value": "700" }, { "rule_attribute": "card_country_id", "rule_value": ["NG"] } ], "action": "block", "rule_order": 1, "created_at": "2025-07-21T10:01:23.456Z", "updated_at": null }, { "id": "frl_hijklmn123456", "type": "fraud.rule", "enabled": true, "name": "My 2nd Rule", "operator": "AND", "rules": [ { "rule_attribute": "billing_country_id", "rule_value": "NG" } ], "action": "block", "rule_order": 2, "created_at": "2025-07-21T10:03:23.456Z", "updated_at": null } ] } ``` ``` -------------------------------- ### Get deal line item Source: https://docs.paymongo.com/reference/get_internal_deals_deal_id_line_items This snippet documents the GET endpoint for retrieving a deal line item, including path parameters and example request. ```APIDOC ## GET /v1/internal/deals/{deal_id}/line_items/{line_item_id} ### Description Retrieves a specific line item associated with a deal. This endpoint is part of the internal sales API and requires authentication. ### Method GET ### Endpoint https://sales-api.paymongo.com/v1/internal/deals/{deal_id}/line_items/{line_item_id} ### Parameters #### Path Parameters - **deal_id** (string) - Required - Deal ID - **line_item_id** (string) - Required - Line item ID ### Request Example ``` curl --request GET \ --url https://sales-api.paymongo.com/v1/internal/deals/deal_id/line_items/line_item_id \ --header 'accept: application/json' ``` ### Response #### Success Response (200) OK #### Error Responses - **400** - Bad Request - **404** - Not Found ``` -------------------------------- ### Build signup link with email and invitation_code Source: https://docs.paymongo.com/docs/account-settings-linked-accounts Constructs the signup link using the invitee's email and the invitation_id from the create step. The email must be URL-encoded, especially '+' as '%2B', otherwise signup will fail. ```text https://dashboard.paymongo.com/signup?email={EMAIL}&invitation_code={invitation_id} ``` -------------------------------- ### Offer object example Source: https://docs.paymongo.com/docs/financial-services-capital-loan-offers Example of the canonical offer resource. All amounts are integers in centavos; fee and rate amounts are in basis points when the corresponding *_type is bps (e.g., 1000 bps = 10%) or a fixed centavo amount when fixed. loan_type is term or revolving, and term_type is week or month. ```json { "id": "offer_01HX0000000000000000000000", "lender_id": "org_01HX...", "name": "Flexible Financing", "loan_type": "term", "status": "active", "currency": "PHP", "min_amount": 10000000, "max_amount": 50000000, "amount_increment": 1000000, "interest_fee": 500, "interest_fee_type": "bps", "repayment_rate": 1000, "repayment_rate_type": "bps", "min_term": 1, "min_term_type": "month", "max_term": 12, "max_term_type": "month", "live_mode": false, "created_at": "2026-04-20T01:23:45+08:00", "updated_at": "2026-04-20T01:23:45+08:00" } ``` -------------------------------- ### GET /v1/ledger_transactions/{id} Source: https://docs.paymongo.com/reference/get-ledger-transaction This snippet documents the GET endpoint for retrieving a ledger transaction by its ID, including the path parameter and a cURL request example. ```APIDOC ## GET /v1/ledger_transactions/{id} ### Description Retrieves a specific ledger transaction by its unique identifier. ### Method GET ### Endpoint https://api.paymongo.com/v1/ledger_transactions/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier for the ledger transaction. ### Request Example ``` curl --request GET \ --url https://api.paymongo.com/v1/ledger_transactions/id \ --header 'accept: application/json' \ --header 'authorization: Basic ••••' ``` ### Response #### Success Response (200) - Returns the ledger transaction details. #### Response Example ```json {} ``` ``` -------------------------------- ### Example error response for getting a trigger execution Source: https://docs.paymongo.com/reference/get-trigger-execution Example JSON error response with a top-level errors array containing a machine-readable code and human-readable detail. ```json { "errors": [ { "code": "trigger_execution_not_found", "detail": "trigger execution not found" } ] } ``` -------------------------------- ### List settings for a key (GET /v1/config_items) Source: https://docs.paymongo.com/docs/set-up-expense-management-with-the-api Lists settings for a given config_key, e.g., 'budget_code'. Each item in the response has an id used for deletion. ```bash curl --request GET --url "$EXPENSE_API_BASE_URL/v1/config_items?config_key=budget_code" --user "$PAYMONGO_SECRET_KEY:" ``` -------------------------------- ### Retrieve the instance with curl Source: https://docs.paymongo.com/docs/fiaas-workflows-quickstart GET /v1/workflows/instances/inst_xyz789... to fetch the full instance state, including current step status and outputs. ```bash curl --request GET 'https://api.paymongo.com/v1/workflows/instances/inst_xyz789...' \ --header 'Authorization: Basic ${YOUR_BASIC_TOKEN}' \ --header 'Organization-Id: ${YOUR_ORG_ID}' ``` -------------------------------- ### cURL example for getting a trigger execution Source: https://docs.paymongo.com/reference/get-trigger-execution Example cURL command to retrieve a trigger execution. Uses the secret key as the username and includes the Organization-Id header. ```bash curl https://api.paymongo.com/v1/workflows/trigger-executions/trgexec_abc123 \ -u sk_test_xxxxxxxxxxxxxxxx: \ -H "Organization-Id: org_xxxxxxxxxxxx" ``` -------------------------------- ### Retrieve a Rule - Example Response Source: https://docs.paymongo.com/reference/fraud-get-a-rule Example response for retrieving a single Rule resource. Shows the rule's id, type, livemode, enabled status, name, operator, conditions, action, rule_order, and timestamps. ```json { "data": { "id": "frl_abcdefg123456", "type": "fraud.rule", "livemode": true, "enabled": true, "name": "My 1st Rule", "operator": "AND", "rules": [ { "rule_attribute": "risk_score_gte", "rule_value": "700" }, { "rule_attribute": "card_country_id", "rule_value": ["NG"] } ], "action": "block", "rule_order": 1, "created_at": "2025-07-21T10:01:23.456Z", "updated_at": null } } ``` -------------------------------- ### GET /v1/subscriptions Source: https://docs.paymongo.com/reference/retrieve-list-of-subscriptions This snippet documents the GET /v1/subscriptions endpoint, which retrieves a list of all subscriptions. It includes query parameters for pagination and filtering, and a cURL request example. ```APIDOC ## GET /v1/subscriptions ### Description Retrieves a list of all Subscriptions created using the secret API key. Supports pagination and filtering by customer or plan. ### Method GET ### Endpoint https://api.paymongo.com/v1/subscriptions ### Parameters #### Query Parameters - **after** (string) - Optional - A cursor for use in pagination. `after` is a resource ID that defines your place in the list. For example, if you make a list request and receive 10 resources, ending with some_resource_id, your subsequent call can include after=some_resource_id in order to fetch the next page of the list. - **before** (string) - Optional - A cursor for use in pagination. `before` is a resource ID that defines your place in the list. For example, if you make a request and receive 10 resources, starting with some_resource_id, your subsequent call can include before=some_resource_id in order to fetch the previous page of the list. - **customer_id** (string) - Optional - ID of the customer. You can use this to filter the subscriptions by Customer. - **limit** (int32) - Optional - Number of resources to return. The default value is 10. `min:1` `max:100` Example: `10` - **plan_id** (string) - Optional - ID of the plan. You can use this to filter the subscriptions by Plan. - **sort_by** (string) - Optional - Sort by Subscription Attribute. - **order** (string) - Optional - Sort transaction record by order. Examples: `asc` or `desc` ### Request Example ``` curl --request GET \ --url https://api.paymongo.com/v1/subscriptions \ --header 'accept: application/json' \ --header 'authorization: Basic ••••' ``` ### Response #### Success Response (200) Returns a list of subscriptions. #### Response Example (No example provided in the source) ### Error Handling - **400** - Bad request. See response body for details. ``` -------------------------------- ### GET /v1/internal/tickets Source: https://docs.paymongo.com/reference/list_internal_tickets Documentation for the List tickets endpoint, including query parameters and example request. ```APIDOC ## GET /v1/internal/tickets ### Description Lists internal tickets with optional filtering by various criteria such as cursor, limit, IDs, title, status, priority, source, and linked entities. ### Method GET ### Endpoint https://sales-api.paymongo.com/v1/internal/tickets ### Parameters #### Query Parameters - **cursor** (string) - Optional - Cursor for pagination. - **limit** (integer) - Optional - Limit (1-50). - **ids** (array of strings) - Optional - Comma-separated or repeated ticket IDs (match any). - **title** (string) - Optional - Title substring. - **status** (array of strings) - Optional - Comma-separated or repeated ticket status values (match any). - **priority** (array of strings) - Optional - Comma-separated or repeated ticket priority values (match any). - **source** (array of strings) - Optional - Comma-separated or repeated ticket source values (match any). - **organization_ids** (array of strings) - Optional - Comma-separated or repeated organization IDs linked via organization_ticket. - **deal_ids** (array of strings) - Optional - Comma-separated or repeated deal IDs linked via deal_ticket. - **contact_ids** (array of strings) - Optional - Comma-separated or repeated contact IDs linked via contact_ticket. - **lead_ids** (array of strings) - Optional - Comma-separated or repeated lead IDs linked via lead_ticket. - **tag_ids** (array of strings) - Optional - Comma-separated or repeated tag IDs linked via ticket_tag. - **owner_ids** (array of strings) - Optional - Comma-separated or repeated record owner IDs linked via owner_ticket (match any). - **date_from** (string) - Optional - Created at lower bound (RFC3339). - **date_to** (string) - Optional - Created at upper bound (RFC3339). ### Request Example ``` curl --request GET \ --url https://sales-api.paymongo.com/v1/internal/tickets \ --header 'accept: application/json' ``` ### Response #### Success Response (200) OK #### Error Responses - **400** - Bad Request - **500** - Internal Server Error ``` -------------------------------- ### Sample Balance Object JSON Source: https://docs.paymongo.com/reference/ledger-balances Example JSON response showing the structure of the balances object with pending_balance, posted_balance, and available_balance keys. Each balance contains credits, debits, amount, currency, and currency_exponent fields. ```json { "balances": { "pending_balance": { "credits": 434751752772, "debits": 431936883967, "amount": 2814868805, "currency": "PHP", "currency_exponent": 2 }, "posted_balance": { "credits": 434708814958, "debits": 431936883967, "amount": 2771930991, "currency": "PHP", "currency_exponent": 2 }, "available_balance": { "credits": 434708814958, "debits": 431936883967, "amount": 2771930991, "currency": "PHP", "currency_exponent": 2 } } } ``` -------------------------------- ### GET /v1/payments Source: https://docs.paymongo.com/reference/list-all-payments Documentation for the List all Payments endpoint, including query parameters and example request. ```APIDOC ## GET /v1/payments ### Description Retrieves a list of Payments using the secret API key. Supports pagination and filtering by creation date and status. ### Method GET ### Endpoint https://api.paymongo.com/v1/payments ### Parameters #### Query Parameters - **before** (string) - Optional - A cursor for use in pagination. `before` is a resource ID that defines your place in the list. For example, if you make a request and receive 10 resources, starting with some_resource_id, your subsequent call can include before=some_resource_id in order to fetch the previous page of the list. - **after** (string) - Optional - A cursor for use in pagination. `after` is a resource ID that defines your place in the list. For example, if you make a list request and receive 10 resources, ending with some_resource_id, your subsequent call can include after=some_resource_id in order to fetch the next page of the list. - **limit** (string) - Optional - Defaults to 10. Limit of resources to return. If not passed, the default limit is 10. - **created_at** (date) - Optional - Field to indicate when the payment was created. - **created_at.between** (string) - Optional - Field to indicate when the payment was made given a select period (Format: YYYY-DD-MM HH:mm..YYYY-DD-MM HH:mm). - **created_at.gt** (date) - Optional - Field to indicate when the payment was created after the given date (created_at.greater than). - **created_at.gte** (date) - Optional - Field to indicate when the payment was created after or on the given date (created_at.greater than or equal to). - **created_at.lt** (date) - Optional - Field to indicate when the payment was created before the given date (created_at.less than). - **created_at.lte** (date) - Optional - Field to indicate when the payment was created before or on the given date (created_at.less than or equal to). - **status** (string) - Optional - Field to filter payment transactions that are in the inputted status. ### Request Example ``` curl --request GET \ --url 'https://api.paymongo.com/v1/payments?limit=10' \ --header 'accept: application/json' \ --header 'authorization: Basic ••••' ``` ### Response #### Success Response (200) Returns a list of payments. #### Error Response (400) Returns an error response. ``` -------------------------------- ### POST /v1/customers Source: https://docs.paymongo.com/reference/create_customers Creates a new customer with first name, last name, email, and default device. ```APIDOC ## [POST] /v1/customers ### Description Creates a new customer with first name, last name, email, and default device. ### Method POST ### Endpoint https://api.paymongo.com/v1/customers ### Parameters #### Request Body - **data** (object) - Required - The data object containing customer attributes. - **attributes** (object) - Required - The attributes of the customer. - **default_device** (string) - Optional - The default device for the customer (e.g., "phone"). ### Request Example ```json { "data": { "attributes": { "default_device": "phone" } } } ``` ### Response #### Success Response (200) OK #### Error Responses - **400** - Bad Request - **401** - Unauthorized - **500** - Internal Server Error ``` -------------------------------- ### Response from creating a child account Source: https://docs.paymongo.com/docs/onboarding-aas-quick-start Example response from creating a child account. Shows `activation_status: "pending"` and a generated `id` prefixed with `org_`. Save this `id` for subsequent calls. ```json { "data": { "id": "org_zeZdrgooHpjxzDpwvAsHXEAr", "type": "merchant", "activation_status": "pending", "person": { "type": "representative", "email_address": "owner@example-merchant.com", "mobile_number": "+639991234567", "identity_verification_status": "pending" }, "created_at": 1680000000, "updated_at": 1680000000 } } ``` -------------------------------- ### Example response for getting a trigger execution Source: https://docs.paymongo.com/reference/get-trigger-execution Example JSON response showing a trigger execution object with fields like id, trigger_id, workflow_instance_id, event_message_id, event_payload, state, livemode, and timestamps. ```json { "data": { "id": "trgexec_abc123", "trigger_id": "trg_def456", "workflow_instance_id": "winst_ghi789", "event_message_id": "evtmsg_jkl012", "event_payload": { "type": "payment.paid", "data": { "amount": 100000, "currency": "PHP" } }, "state": "executed", "livemode": false, "created_at": "2026-06-18T04:21:00Z", "updated_at": "2026-06-18T04:21:02Z" } } ``` -------------------------------- ### Sample Rate Resource JSON Source: https://docs.paymongo.com/reference/rates Example JSON response for the Rate resource, showing the structure with id, target_currency, base_currency, provider, buy_price, sell_price, and created_at fields. ```json { "data": { "id": "rate_a5ff5ad729e276491b7b6e24", "target_currency": "USDT", "base_currency": "PHP", "provider": "PDAX", "buy_price": 57.26, "sell_price": 57.28, "created_at": 1752816266 } } ``` -------------------------------- ### GET /v1/subscriptions/plans/{id} Source: https://docs.paymongo.com/reference/retrieve-a-plan This snippet documents the GET endpoint to retrieve a plan by its unique identifier. It includes the endpoint URL, required path parameter, authentication method, and example cURL request. ```APIDOC ## [GET] /v1/subscriptions/plans/{id} ### Description Retrieve a Plan using its unique identifier. Requires a secret API key for authentication. ### Method GET ### Endpoint https://api.paymongo.com/v1/subscriptions/plans/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier of the plan. ### Request Example ``` curl --request GET \ --url https://api.paymongo.com/v1/subscriptions/plans/id \ --header 'accept: application/json' \ --header 'authorization: Basic ••••' ``` ### Response #### Success Response (200) Successful retrieval of the plan. #### Error Response (400) Bad request. The request could not be understood or was missing required parameters. ``` -------------------------------- ### Example response of the Workflow Creation Source: https://docs.paymongo.com/docs/fiaas-workflows-automatically-automatically-direct-payouts-to-bank-account-or-other-paymongo-wallet Shows the JSON response from creating a workflow, including the workflow ID, organization ID, and the definition with a send_money step. ```json { "id": "flow-J08KdKADWGgX1y3", "organization_id": "org_k92tXwQfLJm8aZyR4vB1cNd7", "name": "send-money-from-payout", "description": "Send money from Payout", "definition": { "steps": [ { "action_name": "send_money", "amount": "${net_amount}", "currency": "PHP", "destination": { "account": "123456789012", "account_name": "ACCOUNT NAME 1", "bic": "RCBCPHMMXXX", "type": "bank" }, "notes": "Payout Disbursement", "provider": "auto", "source": { "account": "${merchant_account_number}", "account_name": "", "bic": "", "payment_id": "", "type": "wallet" } } ], "version": 1 }, "created_at": "2026-01-14T02:39:34.910765Z", "updated_at": "2026-01-14T02:39:34.910765Z" } ``` -------------------------------- ### List all installment plans with cURL Source: https://docs.paymongo.com/reference/card-installment-plans Use this cURL command to list all installment plans. It sends a GET request to the /v1/card_installment_plans endpoint with basic authentication. The authorization header uses a placeholder for the base64-encoded credentials. ```shell curl --request GET \ --url https://api.paymongo.com/v1/card_installment_plans \ --header 'accept: application/json' \ --header 'authorization: Basic ••••' ``` -------------------------------- ### Automatic Metadata Enhancement Example Source: https://docs.paymongo.com/docs/account-settings-linked-transactions Example of metadata after automatic enhancement. PayMongo adds internal keys starting with PYM_ to indicate the child and parent accounts involved; these keys are stripped from client-supplied metadata. ```json "metadata": { "order_id": "your_existing_metadata_1", "customer_id": "your_existing_metadata_2", "PYM_executed_for": "org_childID", "PYM_requested_by": "org_parentID" } ``` -------------------------------- ### Create a card program with cURL Source: https://docs.paymongo.com/docs/issuing POST to /v1/issuing/card-programs with Basic auth using your secret key. Requires name and description. Card programs cannot be updated or deleted via the API. ```bash curl -X POST https://api.paymongo.com/v1/issuing/card-programs \ -u sk_live_xxxxxxxx: \ -H "Content-Type: application/json" \ -d '{ "name": "Marketing Team Cards", "description": "Virtual cards for the marketing team ad spend" }' ``` -------------------------------- ### Payment Intent with setup_future_usage Source: https://docs.paymongo.com/docs/payment-acceptance-card-vaulting JSON body for creating a Payment Intent with setup_future_usage to vault the card on successful payment. The customer_id must reference an existing Customer. ```json { "data": { "attributes": { "amount": 10000, "currency": "PHP", "payment_method_allowed": ["card"], "setup_future_usage": { "session_type": "on_session", "customer_id": "cus_Exy3jegPk4eEagpQcE6wnLB4" } } } } ``` -------------------------------- ### cURL request to get active form layout Source: https://docs.paymongo.com/reference/list_internal_form_layouts_active Sends a GET request to the active form layout endpoint with the required accept header. The record_type query parameter is not included in the example, but it is required for the request to succeed. ```shell curl --request GET \ --url https://sales-api.paymongo.com/v1/internal/form_layouts/active \ --header 'accept: application/json' ``` -------------------------------- ### Create a catch-all workflow rule with POST /v1/workflow_rules Source: https://docs.paymongo.com/docs/set-up-expense-management-with-the-api Creates a catch-all workflow rule that matches every expense amount (subject.amount >= 0). Rules are evaluated from lowest priority number to highest; the first active match wins. Replace with the template_id from the template response. ```bash curl --request POST --url "$APPROVALS_API_BASE_URL/v1/workflow_rules" --user "$PAYMONGO_SECRET_KEY:" --header "Content-Type: application/json" --data '{ "resource": "expense", "operation": "ResolveWorkflow", "name": "All expenses", "priority": 100, "status": "active", "conditions": { "all": [ { "field": "subject.amount", "operator": "gte", "value": 0 } ] }, "workflow_template_id": "", "workflow_template_version": 1 }' ``` -------------------------------- ### Example response for contracts list Source: https://docs.paymongo.com/docs/financial-services-contract-and-loan Example response for the contracts list endpoint, showing a contract with its associated loan details. ```json { "data": [ { "id": "contract_123", "status": "active", "currency": "PHP", "loan_type": "revolving", "approved_amount": 1000000, "remaining_amount": 400000, "interest_fee": 250, "interest_fee_type": "bps", "repayment_rate": 1250, "repayment_rate_type": "bps", "term": 12, "term_type": "month", "loans": [ { "id": "loan_123", "status": "active", "purpose": "Expand business inventory", "principal_amount": 300000, "outstanding_principal_amount": 300000, "outstanding_interest_amount": 15000, "outstanding_dst_amount": 500, "created_at": "2024-01-01T00:00:00Z" } ] } ] } ```