{"openapi":"3.0.3","info":{"title":"rano API","version":"2026-11-01","description":"Payments for South Africa: cards, PayShap and EFT, with the fee on every payment."},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your secret key, sk_test_… or sk_live_…"}},"schemas":{}},"paths":{"/v1/payments":{"post":{"summary":"Create a payment","tags":["Payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount","currency"],"additionalProperties":false,"properties":{"amount":{"type":"integer","minimum":1,"description":"In the currency's minor unit (cents): 38600 is R386.00."},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"description":{"type":"string","maxLength":1000},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"payment_method_type":{"type":"string","enum":["card","payshap","eft"]},"confirm":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Default Response"}}},"get":{"summary":"List payments","tags":["Payments"],"parameters":[{"schema":{"type":"string","pattern":"^([1-9]|[1-9][0-9]|100)$"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"starting_after","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payments/{id}":{"get":{"summary":"Retrieve a payment","tags":["Payments"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9a-z]{26}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payments/{id}/confirm":{"post":{"summary":"Confirm a payment","tags":["Payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"payment_method_type":{"type":"string","enum":["card","payshap","eft"]}},"nullable":true}}}},"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9a-z]{26}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payments/{id}/cancel":{"post":{"summary":"Cancel a payment","tags":["Payments"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9a-z]{26}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/refunds":{"post":{"summary":"Refund a payment","tags":["Refunds"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payment"],"additionalProperties":false,"properties":{"payment":{"type":"string","pattern":"^pay_[0-9a-z]{26}$"},"amount":{"type":"integer","minimum":1,"description":"Defaults to everything not yet refunded."},"reason":{"type":"string","enum":["requested_by_customer","duplicate","fraudulent"]}}}}}},"responses":{"200":{"description":"Default Response"}}},"get":{"summary":"List refunds","tags":["Refunds"],"parameters":[{"schema":{"type":"string","pattern":"^([1-9]|[1-9][0-9]|100)$"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"starting_after","required":false},{"schema":{"type":"string"},"in":"query","name":"payment","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/refunds/{id}":{"get":{"summary":"Retrieve a refund","tags":["Refunds"],"parameters":[{"schema":{"type":"string","pattern":"^rfnd_[0-9a-z]{26}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/balance":{"get":{"summary":"Retrieve your balance","tags":["Balance"],"responses":{"200":{"description":"Default Response"}}}},"/v1/events":{"get":{"summary":"List events","tags":["Events"],"parameters":[{"schema":{"type":"string","pattern":"^([1-9]|[1-9][0-9]|100)$"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"starting_after","required":false},{"schema":{"type":"string"},"in":"query","name":"type","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/events/{id}":{"get":{"summary":"Retrieve an event","tags":["Events"],"parameters":[{"schema":{"type":"string","pattern":"^evt_[0-9a-z]{26}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/webhook_endpoints":{"post":{"summary":"Create a webhook endpoint","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","enabled_events"],"additionalProperties":false,"properties":{"url":{"type":"string","maxLength":2048},"enabled_events":{"type":"array","minItems":1,"items":{"type":"string","enum":["*","payment.created","payment.requires_action","payment.succeeded","payment.failed","payment.canceled","refund.created","refund.succeeded","refund.failed"]}}}}}}},"responses":{"200":{"description":"Default Response"}}},"get":{"summary":"List webhook endpoints","tags":["Webhooks"],"responses":{"200":{"description":"Default Response"}}}},"/v1/webhook_endpoints/{id}":{"delete":{"summary":"Delete a webhook endpoint","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","pattern":"^we_[0-9a-z]{26}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/webhook_endpoints/{id}/replay":{"post":{"summary":"Send an event to a webhook endpoint again","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["event"],"additionalProperties":false,"properties":{"event":{"type":"string","pattern":"^evt_[0-9a-z]{26}$"}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^we_[0-9a-z]{26}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/test_helpers/payments/{id}/approve":{"post":{"summary":"Simulate the customer choosing approve in their banking app","tags":["Test helpers"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9a-z]{26}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/test_helpers/payments/{id}/decline":{"post":{"summary":"Simulate the customer choosing decline in their banking app","tags":["Test helpers"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9a-z]{26}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/test_helpers/payments/{id}/simulate_eft":{"post":{"summary":"Simulate the customer paying an EFT payment","tags":["Test helpers"],"description":"Puts a credit for this payment on a simulated bank statement and imports it, exactly as a real statement is matched. Leave out amount to pay in full; change it to test partial and overpayments. Leave out reference to use the one on the payment; change it to test typos and unknown references.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"amount":{"type":"integer","minimum":1},"reference":{"type":"string","minLength":1,"maxLength":140}},"nullable":true}}}},"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9a-z]{26}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}}},"servers":[{"url":"https://api.rano.co.za"}],"security":[{"bearer":[]}]}