MarketPe APIs
Payments

Payment Concepts

Terminology:

  • App: refers to the marketpe application ui.
  • Api: refers to the marketpe apis that will be called by your system.
  • PR: payment or payment request

Create PR

Call payment/create api

  • pass a unique clientPaymentId from your system
  • once PR is created in marketpe, you must not allow edits in your system

PR state diagram

We recommend you only handle CANCELLED and COMPLETED states in your system, as these are the only terminal states of a payment.

NOTE: FAILED is not a terminal state, it can be reset and re-executed from marketpe app.

Edit or delete PR

Sometimes you may want to change the bank account or amount, or you simply want to delete the PR.

We do not allow edits or deletes for security reasons. We recommend you 'cancel' the PR and create a new one. Cancelled PR is a soft delete, it is visible in app but can not be executed.

Note: Cancel PR action is only allowed if the PR is in NEW state.

You can use payment/cancel api to cancel the PR. In your system, you must generate a new unique id if generating a new PR.

Keep status in sync

We want to ensure that status in your system is in sync with the status in marketpe app.

  1. Webhook
    We will call your webhook endpoint when status of PR changes.
  2. On demand sync
    We still recommend you implement logic on your end that can be called on demand to sync status. In rare cases, webhook may fail or be delayed. Here you want to call payment/get which will return data from marketpe system. You can then update data in your system accordingly.

Last updated on