Charge a billing agreement

Changed on
post/paypal/billing_agreements/{id}/charge

Request

  • Base URL
    https://gateway.pmnts-sandbox.io/v1.0
  • URL
    https://gateway.pmnts-sandbox.io/v1.0/paypal/billing_agreements/{id}/charge
  • Auth
    HTTP basic

Path parameters

idstring required

The ID of the billing agreement.

Headers

Content-Typestring

Request body

amountinteger required

A positive integer representing how much to charge, in the smallest currency unit (eg., 100 to charge $1.00, or 100 to Charge ¥100, a zero decimal currency)

referencestring required

Reference of the transaction

currencystring required

Three letter ISO currency code, in UPPERCASE

Response

200

successfulboolean
testboolean

Example response

{
  "successful": true,
  "response": {
    "id": "071-PPO-8JGDRKEVMBBX6IQH",
    "reference": "ref_12345_34636456",
    "amount": 12000,
    "decimal_amount": 120,
    "successful": true,
    "message": "Approved",
    "currency": "AUD",
    "transaction_id": "071-PPO-8JGDRKEVMBBX6IQH",
    "transaction_date": "2020-10-13T12:54:02+11:00",
    "intent": "Capture",
    "paypal_reference": "ref_12345_34636456",
    "invoice_id": "ref_12345_34636456",
    "billing_agreement_id": "071-PBA-KIKSZHGXIQF5POME",
    "status": "Completed",
    "payment_source": "BILLING_AGREEMENT",
    "captured_amount": 120,
    "captures": [
      {
        "id": "071-PPC-YS3DA76TDUBTJEHB",
        "status": "Completed",
        "captured": true,
        "amount": 12000,
        "decimal_amount": 120,
        "successful": true,
        "currency": "AUD",
        "transaction_id": "071-PPC-YS3DA76TDUBTJEHB",
        "transaction_date": "2020-10-13T12:54:03+11:00",
        "invoice_id": "ref_12345_34636456",
        "paypal_fee": 318,
        "seller_receivable_net_amount": 11682,
        "note_to_payer": "Sporting Goods",
        "is_final_capture": true
      }
    ],
    "payer": {
      "id": "SNGQ72BA8UA4W",
      "email": "test-buyer@example.com",
      "address": {
        "country_code": "AU"
      }
    },
    "payee": {
      "id": "D5RX47YP2688U"
    }
  },
  "test": true
}

Changes