Skip to main content
Version: 2019-05-29 (Current)

Download bulk status report

Download the detailed status report for a completed bulk charge schedule creation job. The report includes the original CSV data with additional columns showing the creation status and any error messages for each row.

Request Parametersโ€‹

Required - 1 fieldPath Parameters
โ–ผ
`recurring_id`STRING(required)
The recurring export ID returned from the bulk create endpoint. IDs start with recr_. The job must be in "completed" state.
Example:"recr_test_5xuy4w91xqz7d1w9u0t"

Responsesโ€‹

200

Report downloaded

Returns a CSV file containing the status report. The response Content-Type is text/csv.

CSV columns include:
  • All original columns from the uploaded CSV
  • status - Row processing status (success or failed)
  • schedule_id - Created schedule ID (schd_*) for successful rows
  • error_code - Error code for failed rows
  • error_message - Detailed error description for failed rows
Example output:

customer_key,customer,card,amount,description,every,period,days_of_month,start_date,end_date,status,schedule_id,error_code,error_message sub_001,cust_test_abc123,,100000,Monthly plan,1,month,1,2025-02-01,2026-01-31,success,schd_test_xyz789,, sub_002,cust_test_invalid,,50000,Basic plan,1,month,15,2025-02-01,,failed,,invalid_customer,Customer not found

400

Bad request

Request validation failed. Check the error message for details.

Common causes:
  • Invalid recurring_id format
  • Job is not yet completed (still pending or processing)

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key
  • Incorrect HTTP Basic Auth format

404

Not found

Bulk creation job not found or report not available.

Common causes:
  • Invalid recurring_id
  • Job belongs to different account
  • Mixing test and live mode keys
  • Report has expired (older than 30 days)

5xx

Server error

Server-side error occurred. These are rare but should be handled gracefully.

How to handle:

Code samplesโ€‹

# Download bulk creation status report
curl https://api.omise.co/recurring_exports/recr_test_5xuy4w91xqz7d1w9u0t/download \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-o status_report.csv

Processing the Status Reportโ€‹

After downloading the report, you can process it to handle failed rows:

import csv

def process_status_report(filepath):
successful = []
failed = []

with open(filepath, 'r') as f:
reader = csv.DictReader(f)
for row in reader:
if row['status'] == 'success':
successful.append({
'customer_key': row['customer_key'],
'schedule_id': row['schedule_id']
})
else:
failed.append({
'customer_key': row['customer_key'],
'error_code': row['error_code'],
'error_message': row['error_message']
})

print(f"Successful: {len(successful)}")
print(f"Failed: {len(failed)}")

# Retry failed rows or notify relevant teams
for fail in failed:
print(f" - {fail['customer_key']}: {fail['error_message']}")

return successful, failed

successful, failed = process_status_report('status_report.csv')

Error and result codesโ€‹

Row Status Valuesโ€‹

StatusDescription
successSchedule created successfully
failedSchedule creation failed

Common Error Codes in Reportโ€‹

CodeDescriptionResolution
invalid_customerCustomer ID not foundVerify customer exists and is active
no_card_attachedCustomer has no payment cardAttach a card to the customer
invalid_cardCard ID not found or expiredUse a valid card or remove to use default
invalid_amountAmount is zero, negative, or invalidProvide positive integer amount
invalid_periodPeriod value not recognizedUse day, week, or month
invalid_days_of_monthInvalid day valuesUse values 1-28
invalid_date_formatDate format not recognizedUse YYYY-MM-DD format
start_date_in_pastStart date is in the pastUse current or future date
end_date_before_startEnd date is before start dateEnsure end date is after start date
duplicate_scheduleSchedule already exists for customerCheck for existing schedules

๐Ÿ”‘API Credentials

Try it outโ€‹

Required - 1 fields
โ–ผ
Your IP: ...Loading...