Capture API

This guide explains how to do translation refund through API call .

REQUEST

testing server:

POST https://staging.xpay.app/api/payments/capture-payment/

production(Live) server:

POST https://community.xpay.app/api/payments/capture-payment/

Parameters

Authorization

This method requires authorization, supply the header with a key value pair with that structure

"x-api-key" : string

Required Properties

Property nameValueDescriptionNotes
x-api-keystringAPI key linked to your communitygenerate API key

โ€‹

Request body

Required Properties

Property nameValueDescriptionNotes
transaction_uuidstringID that is uniques to your transaction
danger

Hardcoding the customer data in the production version of your app will raise a risk in the payment processor and the transaction will be declined

Optional Properties

Do not supply any optional parameters.

Response

If successful, this method returns a response body with the following structure:

{
 {
    "status": {
        "code": 200,
        "message": "success",
        "errors": []
    },
    "data": {
        "message": "Transaction was successfully captured."
    },
    "count": null,
    "next": null,
    "previous": null
}"previous": null
}

Example

{
    "transaction_uuid": "a3d8fd1c-a919-4f4c-b1c1-2e3f6ad486d6",
}
{
  "status": {
    "code": 201,
    "message": "success",
    "errors": []
  },
  "data": {
        "message": "Transaction was successfully captured."
        },
  "count": null,
  "next": null,
  "previous": null
}