Replace the order's card

Moves the order onto another of the customer's saved cards, and charges anything already due to it. The new card becomes the order's active card.

You can replace the card when the order saves cards, has a successful or scheduled payment, and its status isn't complete, cancelled, paused or rejected.

This can take money. In the same call, BillPro charges every payment that's due and unpaid: each scheduled payment that failed, was rejected, or passed its date without being collected.

  • Two or more due payments are merged into one payment for the total. The originals are marked merged.
  • The payment is charged now. This happens whatever the profile's "Action when requesting a card replacement" setting says.
  • If nothing is due, the card is replaced and nothing is charged. result.successful is true and payment is null.
  • A declined card returns 200 with result.successful: false. The new card stays on the order.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required
≥ 1

Your merchant profile ID. Required in every request.

Find it in the BillPro dashboard address, after /profiles/. For example, in /profiles/1234/orders the profile ID is 1234.

string
required

ID of the order.

Body Params
integer
required

ID of one of the customer's saved cards, such as 311. It must belong to the order's customer.

Responses

Language
Credentials
Bearer
API token
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json