Manage Payment Operations

 

BETA

Link is currently available in stage only.

Now that you’ve onboarded merchants and begun processing Chase Integrated Payments, you’re ready to implement some basic payment operations tools.


Issue Refunds

 

Merchants can issue refunds from their Chase Integrated Payments dashboard, or your platform can assist in this function using the POST /refunds API.

With the refunds endpoint, it’s possible to perform partial refunds or full refunds. Please note that WePay and platform fees are refunded only in full refunds; if a partial refund is issued and your platform has not explicitly opted to refund platform fees, then the amount sent in the refund request will come from the merchant.

If you’ve subscribed to refund notifications, WePay will send a notification to your platform when a refund occurs.

To issue a refund, you’ll need to make sure you have a few things handy:

  • Payment ID
  • Refund Reason
  • Amount (could be a partial of the whole transaction, up to the whole transaction value itself)
  • Fee amount to return
  • Currency

Send a POST, with a Unique-Key, similar to the one below:

{
  "payment_id": "00000000-0000-0000-0000-000006fcd875",
  "refund_reason": "delayed shipping",
  "amounts": {
	"total_amount": 100,
	"currency": "USD",
	"fee_refund_amount": 0
  }
}

Send a POST like this (including a Unique-Key) to issue a partial refund of the net and to include all or some of the platform fees in that refund:

{
  "payment_id": "00000000-0000-0000-0000-000006fcd875",
  "refund_reason": "delayed shipping",
  "amounts": {
	"total_amount": 100,
	"currency": "USD",
	"fee_refund_amount": 50
  }
}

As a note, if your Merchant’s account is below $0, WePay will attempt to execute a recovery to bring the account back up to $0. We’ll send a notification to your platform if we execute a Recovery.

Note

It is the merchant’s responsibility to post their refund policy. WePay recommends that your platform provides a method for merchants to post their refund policy through your UI.


Cancel Authorized Payments

 

In the Process Chase Integrated Payments article, we discussed how to capture an authorized payment. There may be instances where a payment has been authorized but needs to be canceled, as opposed to captured. In these instances, use the POST /payments/{id}/cancel API request. For this request you will need:

  1. The payment ID
  2. The cancellation reason

Once you have those details, send a request like so:

curl -X POST \
 /payments/21763483-12be-4d07-afe3-ab81a962f3e5/cancel \ // Use the payment ID in the endpoint
 -H "App-Id: 121212" \
 -H "App-Token: prod_MTAwXzk5OWIwZT666LWYwNWItNDU4MS1iZjBiL" \
 -H "Api-Version: 3.0" \
 -H "Content-Type: application/json" \
 -H "WePay-Risk-Token: 123e4567-e89b-12d3-a456-426655440000" \  // Insert the token returned by the WePay JS
 -H "Client-IP: 100.166.99.123" \  // Insert the IP returned by the WePay JS
 -d '{
 	"cancel_reason": "Payer decided to cancel prior to shipment"
 }'

The request response will include "status": "canceled".


Reflect Adjustments

 

On occasion, WePay will need to make an adjustment to a merchant’s account. Be sure to subscribe to the adjustments.created Notification so that you can incorporate the adjustment information to your platform functions as needed.


Handle Disputes

 

Disputes are a normal part of credit card processing. With a Link integration, WePay will help the merchant navigate and manage disputes if they occur, and your platform should subscribe to the following Notifications in order to keep your platform functions coordinated with WePay data:

  • disputes.created
  • disputes.resolved
  • disputes.updated


Next up: Now that you’re prepared to Manage Payment Operations, you are ready to Test and Launch. Questions? Need help? Visit our support page!