SpareSpare Docs
GuidesAPI Reference

Mandate Scheduling

Schedule a future mandate transaction and approve it for execution.

Integration guide

Goal: Set up a future-dated or recurring payment that requires explicit approval before execution.

Estimated time: 15 minutes

Prerequisites

  • Sandbox credentials
  • Payer relationship configured for mandates in your product

Schedule a transaction

curl -X POST https://api.sandbox.tryspare.ae/mandate/schedule \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "x-tenant: UAE" \
  -H "Content-Type: application/json" \
  -d '{
    "mandateId": "MANDATE_ID",
    "executionDate": "2026-07-01",
    "amount": 500.00
  }'
const scheduled = await client.mandates.schedule({
  amount: 500_00,
  currency: "AED",
  executionDate: "2026-07-01",
  description: "Monthly subscription",
});
scheduled = client.mandates.schedule(
    amount=500_00,
    currency="AED",
    execution_date="2026-07-01",
    description="Monthly subscription",
)
var scheduled = client.mandates().schedule(ScheduleMandateRequest.builder()
    .amount(500_00)
    .currency("AED")
    .executionDate("2026-07-01")
    .description("Monthly subscription")
    .build());
var scheduled = await client.Mandates.ScheduleAsync(new ScheduleMandateRequest
{
    Amount = 500_00,
    Currency = "AED",
    ExecutionDate = "2026-07-01",
    Description = "Monthly subscription",
});
scheduled, err := client.Mandates.Schedule(ctx, &spareapi.ScheduleMandateRequest{
    Amount:        500_00,
    Currency:      "AED",
    ExecutionDate: "2026-07-01",
    Description:   "Monthly subscription",
})
if err != nil {
    log.Fatal(err)
}

Approve the mandate

Your backend or the payer approves depending on your flow:

curl -X PATCH https://api.sandbox.tryspare.ae/mandate/approve \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "x-tenant: UAE" \
  -H "Content-Type: application/json" \
  -d '{
    "mandateId": "MANDATE_ID",
    "transactionId": "TRANSACTION_ID",
    "amount": 500.00,
    "executionDate": "2026-07-01"
  }'
await client.mandates.approve({
  mandateId: scheduled.data.id,
});
client.mandates.approve(mandate_id=scheduled.data.id)
client.mandates().approve(ApproveMandateRequest.builder()
    .mandateId(scheduled.getData().getId())
    .build());
await client.Mandates.ApproveAsync(new ApproveMandateRequest
{
    MandateId = scheduled.Data.Id,
});
_, err := client.Mandates.Approve(ctx, &spareapi.ApproveMandateRequest{
    MandateId: scheduled.Data.Id,
})
if err != nil {
    log.Fatal(err)
}

Monitor execution

curl https://api.sandbox.tryspare.ae/mandate/MANDATE_ID/transactions \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "x-tenant: UAE"
const transactions = await client.mandates.listTransactions({
  mandateId: scheduled.data.id,
});
transactions = client.mandates.list_transactions(mandate_id=scheduled.data.id)
var transactions = client.mandates().listTransactions(ListMandateTransactionsRequest.builder()
    .mandateId(scheduled.getData().getId())
    .build());
var transactions = await client.Mandates.ListTransactionsAsync(new ListMandateTransactionsRequest
{
    MandateId = scheduled.Data.Id,
});
transactions, err := client.Mandates.ListTransactions(ctx, &spareapi.ListMandateTransactionsRequest{
    MandateId: scheduled.Data.Id,
})
if err != nil {
    log.Fatal(err)
}

Key takeaways

  • Mandates separate scheduling from approval and execution.
  • Poll transactions or use webhooks to confirm bank execution.

On this page