Payments

Complete Payment

Once you have capture all the funds from the Virtual Debit Card, you can call this endpoint to complete the payment.

That will mark the payment as complete and remaining funds will be released back to the user.

This endpoint is available for Card Rails (Virtual Debit Cards) only.

Refer to Merchant API Guide for more information.

post/api/v1/payments/{paymentId}/complete

Request

Path parameters

paymentIdstring uuid required

Payment ID

Example:123e4567-e89b-12d3-a456-426614174000

Query parameters

includestring

Comma-separated list of resources to include. Supported resources: paymentIntent

Headers

Client-IDstring uuid required

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Example:123e4567-e89b-12d3-a456-426614174000
Authorizationstring uuid required

Secure secret to access privileged endpoints.

Example:Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Response

OK

Example response

{
  "data": {
    "attributes": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "status": "Sent",
      "amount": 9999,
      "channel": "ORG-1",
      "reference": "MERCHANT-GENERATED-TOKEN",
      "disbursement": [
        {
          "counterpartyId": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
          "amount": 800,
          "fee": 10,
          "remit": true
        },
        {
          "counterpartyId": "4cf95060-dd01-42ac-9020-8ca42004920d",
          "amount": 200,
          "fee": 5,
          "remit": true
        }
      ],
      "charges": {
        "fee": {
          "amount": 150,
          "type": "pay_by_wallet"
        },
        "rewards": 1000
      },
      "deductions": {
        "rewards": 1000,
        "fees": 150
      }
    },
    "relationships": {
      "paymentIntent": {
        "links": {
          "self": "/api/v1/payment-intents/497f6eca-6276-4993-bfeb-53cbbbba6f08"
        }
      }
    },
    "links": {
      "virtualDebitCard": "https://secure-api.accruesavings.com/api/v1/payments/497f6eca-6276-4993-bfeb-53cbbbba6f08/card"
    }
  },
  "links": {
    "self": "/api/v1/payments/497f6eca-6276-4993-bfeb-53cbbbba6f08/complete"
  },
  "included": [
    {
      "attributes": {
        "balance": {
          "available": 1500,
          "eligibleReward": 500,
          "upperLimit": 103600
        },
        "amount": 3600,
        "reference": "MERCHANT-GENERATED-TOKEN",
        "walletId": "123e4567-e89b-12d3-a456-426614174000"
      }
    }
  ]
}

Changes

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