credit api