via API

In order to make a payment request, you must have created a DD contact in Zepto system.

Step 1 - Make a payment request

Endpoint: POST /payment_requests

{
  "description": "Visible to both initiator and authoriser",
  "matures_at": "2016-12-19T02:10:56Z",
  "amount": 99000,
  "authoriser_contact_id": "de86472c-c027-4735-a6a7-234366a27fc7",
  "your_bank_account_id": "9c70871d-8e36-4c3e-8a9c-c0ee20e7c679",
  "metadata": {
    "custom_key": "Custom string",
    "another_custom_key": "Maybe a URL"
  }
}
{
  "data": {
    "ref": "PR.3",
    "initiator_id": "ca7bc5b3-e47f-4153-96fb-bbe326b42772",
    "authoriser_id": "970e4526-67d9-4ed9-b554-f5cf390ab775",
    "authoriser_contact_id": "de86472c-c027-4735-a6a7-234366a27fc7",
    "schedule_ref": null,
    "status": "pending_approval",
    "responded_at": null,
    "created_at": "2016-12-19T02:10:56Z",
    "credit_ref": null,
    "payout": {
      "amount": 99000,
      "description": "The elite package for 4",
      "matures_at": "2016-12-25T00:00:00Z"
    },
    "metadata": {
      "custom_key": "Custom string",
      "another_custom_key": "Maybe a URL"
    }
  }
}

The above API call will create a request for payment from the contact that you have specified in the authoriser_contact_id field. The amount field is given in cents, so, in the above example, the field "amount": 99000 is equal to requesting $990.00 from this contact.

ℹ️

If the amount specified in the Request is within the terms set out in the Agreement, this Payment Request will be automatically approved and will begin processing. In the case where the amount is outside of the terms set out in the Agreement, it will give you the following error :

The Payment Request to Contact Name exceeds the terms of agreements.


Step 2 - Listen to the webhook notification

A series of webhook events will be trigger as the payment processes through various stages. Refer to this page to learn about the webhooks flow.


Sandbox Simulations

To ensure you understand different outcomes when a transaction is processed and incorporate all the scenarios in your integration, refer to the Sandbox Simulations Guide.